diff --git a/Sources/ZeeQL/Access/Attribute.swift b/Sources/ZeeQL/Access/Attribute.swift index 273e3f1..768712b 100644 --- a/Sources/ZeeQL/Access/Attribute.swift +++ b/Sources/ZeeQL/Access/Attribute.swift @@ -418,12 +418,14 @@ open class ModelAttribute : Attribute, Equatable { public extension Attribute { + @inlinable func eq(_ attr: Attribute) -> KeyComparisonQualifier { let key = AttributeKey(self) let otherKey = AttributeKey(attr) return KeyComparisonQualifier(key, .EqualTo, otherKey) } + @inlinable func eq(_ value : Any?) -> KeyValueQualifier { let key = AttributeKey(self) return KeyValueQualifier(key, .EqualTo, value) @@ -431,7 +433,8 @@ public extension Attribute { } public extension Attribute { - + + @inlinable func like(_ pattern : String) -> KeyValueQualifier { let key = AttributeKey(self) return KeyValueQualifier(key, .Like, pattern) diff --git a/Sources/ZeeQL/Access/AttributeKey.swift b/Sources/ZeeQL/Access/AttributeKey.swift index 541d0b7..9191707 100644 --- a/Sources/ZeeQL/Access/AttributeKey.swift +++ b/Sources/ZeeQL/Access/AttributeKey.swift @@ -14,6 +14,7 @@ */ public struct AttributeKey : Key, Equatable { + @inlinable public var key : String { return attribute.name } public let entity : Entity?