From ee8f023acbd556bd424768432213b03a98d9281e Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Helge=20He=C3=9F?= Date: Sun, 8 Dec 2024 15:58:13 +0100 Subject: [PATCH] More inlinable ... --- Sources/ZeeQL/Access/Attribute.swift | 5 ++++- Sources/ZeeQL/Access/AttributeKey.swift | 1 + 2 files changed, 5 insertions(+), 1 deletion(-) 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?