public void Insert(TableStore store, Action <Record> action)
        {
            var ts = tables.Values;

            var r = store.Insert();

            action(r);

            foreach (var t in ts)
            {
                var(_, _, test) = t;

                var cbs = callbacks[t];
                foreach (var arr in test(r))
                {
                    foreach (var cb in cbs)
                    {
                        cb(t[arr], ChangeType.Add, Enumerable.Empty <object>());
                    }
                }
            }
        }
Exemple #2
0
        public static Table Create(TableStore store)
        {
            IEnumerable <Array8> Snapshot()
            {
                foreach (var index in store.GetRows())
                {
                    Array8 r = new Array8(1);
                    r[0] = index;
                    yield return(r);
                }
            }

            IEnumerable <Array8> Test(Record record)
            {
                var(indices, table) = record;
                if (store == table && store.Test(indices[0]))
                {
                    yield return(indices);
                }
            }

            return(new Table(store, Snapshot, Test));
        }