Set the default limit parameter of selection queries 46/119346/1
authorMu-Woong Lee <muwoong.lee@samsung.com>
Thu, 16 Mar 2017 11:04:32 +0000 (20:04 +0900)
committerMu-Woong Lee <muwoong.lee@samsung.com>
Thu, 16 Mar 2017 11:04:32 +0000 (20:04 +0900)
Change-Id: I1965cb8970d1c12417cbf479b3e055656a794776
Signed-off-by: Mu-Woong Lee <muwoong.lee@samsung.com>
src/client/ContextStoreSearchQuery.cpp
src/shared/ContextStoreTypesPrivate.h

index e1161b6..cc606c8 100644 (file)
@@ -20,7 +20,7 @@
 using namespace ctx;
 
 ContextStoreSearchQuery::ContextStoreSearchQuery() :
-       __limit(0)
+       __limit(DEFAULT_QUERY_LIMIT)
 {
 }
 
@@ -84,6 +84,8 @@ unsigned int ContextStoreSearchQuery::getLimit() const
 
 bool ContextStoreSearchQuery::valid() const
 {
-       // TODO
+       if (__projection.empty())
+               return false;
+
        return true;
 }
index 786fec0..1d3a5b8 100644 (file)
@@ -62,4 +62,6 @@
 #define COL_TIMESTAMP          "__timestamp"
 #define COL_OWNER_ID           "__ownerId"
 
+#define DEFAULT_QUERY_LIMIT    10
+
 #endif