示例#1
0
        public override int Set(string collection, StoreDictionary values, StoreDictionary where)
        {
            string valuesJSON = values.ToJSON().ToString();
            string whereJSON  = where != null ? where.ToJSON().ToString() : "";

            return(native.CallStatic <int>("set", collection, valuesJSON, whereJSON));
        }
示例#2
0
        public override int Set(string collection, StoreDictionary values, StoreDictionary where)
        {
            string valuesJSON = values.ToJSON().ToString();
            string whereJSON  = where != null ? where.ToJSON().ToString() : "";

            return(iosStore_set(collection, valuesJSON, whereJSON));
        }
示例#3
0
        public override IEnumerable <StoreDictionary> Get(string collection, StoreList columns, StoreDictionary where, int limit)
        {
            string columnsJSON  = columns.ToJSON().ToString();
            string whereJSON    = where != null ? where.ToJSON().ToString() : "";
            string recordsJSON  = native.CallStatic <string>("get", collection, columnsJSON, whereJSON, limit < 0 ? null : limit + "");
            JSON   recordsArray = JSON.Parse(recordsJSON);

            StoreDictionary[] records = new StoreDictionary[recordsArray.length];
            for (int i = 0; i < records.Length; i++)
            {
                records[i] = new StoreDictionary(recordsArray[i]);
            }
            return(records);
        }
示例#4
0
        public override IEnumerable <StoreDictionary> Get(string collection, StoreList columns, StoreDictionary where, int limit)
        {
            string columnsJSON = columns.ToJSON().ToString();
            string whereJSON   = where != null ? where.ToJSON().ToString() : "";

            System.IntPtr pointer     = iosStore_get(collection, columnsJSON, whereJSON, limit < 0 ? "" : limit + "");
            string        recordsJSON = Marshal.PtrToStringAnsi(pointer);

            Marshal.FreeHGlobal(pointer);
            JSON recordsArray = JSON.Parse(recordsJSON);

            StoreDictionary[] records = new StoreDictionary[recordsArray.length];
            for (int i = 0; i < records.Length; i++)
            {
                records[i] = new StoreDictionary(recordsArray[i]);
            }
            return(records);
        }
示例#5
0
        public override int Remove(string collection, StoreDictionary where)
        {
            string whereJSON = where != null ? where.ToJSON().ToString() : "";

            return(native.CallStatic <int>("remove", collection, whereJSON));
        }
示例#6
0
        public override int Remove(string collection, StoreDictionary where)
        {
            string whereJSON = where != null ? where.ToJSON().ToString() : "";

            return(iosStore_remove(collection, whereJSON));
        }