Ejemplo n.º 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));
        }
Ejemplo n.º 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));
        }
Ejemplo n.º 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);
        }
Ejemplo n.º 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);
        }
Ejemplo n.º 5
0
        public override int Remove(string collection, StoreDictionary where)
        {
            string whereJSON = where != null ? where.ToJSON().ToString() : "";

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

            return(iosStore_remove(collection, whereJSON));
        }