From b777d3a18b095421d77fbc72f569595a41f6b50b Mon Sep 17 00:00:00 2001 From: Bo Han Date: Fri, 10 May 2019 10:58:52 -0400 Subject: [PATCH] Improves keyIsEmpty() function that allows use Int16, Int32, Int64 types as key --- Sources/StORM/StORM.swift | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/Sources/StORM/StORM.swift b/Sources/StORM/StORM.swift index b992a6e..821642b 100644 --- a/Sources/StORM/StORM.swift +++ b/Sources/StORM/StORM.swift @@ -115,6 +115,12 @@ open class StORM { switch theType { case is Int.Type, is Int?.Type: return (val as! Int == 0) + case is Int16.Type, is Int16?.Type: + return (val as! Int16 == 0) + case is Int32.Type, is Int32?.Type: + return (val as! Int32 == 0) + case is Int64.Type, is Int64?.Type: + return (val as! Int64 == 0) case is String.Type, is String?.Type: return (val as! String).isEmpty default: