Esempio n. 1
0
        public KeyValuePair <int, object>?ReadWithStatistic(int key, out int comparasions)
        {
            comparasions = 0;
            var dataBlockNumber = DbIndexFileUtility.FindDataBlockNumberWithStatistic(key, _dbConnection, ref comparasions);

            return(DbDataFileUtility.FindRecordWithStatistic(key, dataBlockNumber, _dbConnection, ref comparasions));
        }
Esempio n. 2
0
        public void RewriteWithIndexRebuild(SortedDictionary <int, object> data)
        {
            if (!data.Any())
            {
                return;
            }
            var indexes = DbDataFileUtility.RewriteWithIndexRebuild(data, _dbConnection);

            DbIndexFileUtility.Rewrite(indexes, _dbConnection);
        }
Esempio n. 3
0
        public bool Delete(int key)
        {
            var dataBlockNumber = DbIndexFileUtility.FindDataBlockNumber(key, _dbConnection);

            return(DbDataFileUtility.Delete(key, dataBlockNumber, _dbConnection));
        }
Esempio n. 4
0
        public KeyValuePair <int, object>?Read(int key)
        {
            var dataBlockNumber = DbIndexFileUtility.FindDataBlockNumber(key, _dbConnection);

            return(DbDataFileUtility.FindRecord(key, dataBlockNumber, _dbConnection));
        }
Esempio n. 5
0
        public void Write(KeyValuePair <int, object> record)
        {
            var dataBlockNumber = DbIndexFileUtility.FindDataBlockNumber(record.Key, _dbConnection);

            DbDataFileUtility.Write(record, dataBlockNumber, _dbConnection);
        }
Esempio n. 6
0
        public void Write(int key, object value)
        {
            var dataBlockNumber = DbIndexFileUtility.FindDataBlockNumber(key, _dbConnection);

            DbDataFileUtility.Write(new KeyValuePair <int, object>(key, value), dataBlockNumber, _dbConnection);
        }