Пример #1
0
        public string EnsureOnlyUpdatesOneRow(string initialContents, string data, string keys)
        {
            TextFile.Spit(_file, initialContents);
            var subject = new JsonDB(_file);

            var ddata = Read.Dict<string,object>(data);
            var dkeys = Read.Dict<string,object>(keys);

            subject.Ensure("table1", ddata, dkeys);
            return subject.ReadAll("table1").Print();
        }
Пример #2
0
        public string Reads_MultipleTables(string initialContents, string table)
        {
            TextFile.Spit(_file, initialContents);
            var subject = new JsonDB(_file);

            var res = subject.ReadAll(table);
            return res.Print();
        }