public static void Delete <TKey, TValue>(this LightningTransaction txn, LightningDatabase db, TKey key, TValue value)
        {
            var keyBytes   = db.ToBytes(key);
            var valueBytes = db.ToBytes(value);

            txn.Delete(db, keyBytes, valueBytes);
        }
        public static void Put <TKey, TValue>(this LightningTransaction txn, LightningDatabase db, TKey key, TValue value, PutOptions options = PutOptions.None)
        {
            var keyBytes   = db.ToBytes(key);
            var valueBytes = db.ToBytes(value);

            txn.Put(db, keyBytes, valueBytes, options);
        }
        public static TValue Get <TKey, TValue>(this LightningTransaction txn, LightningDatabase db, TKey key)
        {
            var keyBytes   = db.ToBytes(key);
            var valueBytes = txn.Get(db, keyBytes);

            return(db.FromBytes <TValue>(valueBytes));
        }
        public static bool TryGetBy <TKey>(this LightningTransaction txn, LightningDatabase db, TKey key, out GetByOperation value)
        {
            byte[] valueBytes;

            var keyBytes = db.ToBytes(key);
            var result   = txn.TryGet(db, keyBytes, out valueBytes);

            value = result
                ? new GetByOperation(db, valueBytes)
                : null;

            return(result);
        }
        public static void Delete <TKey>(this LightningTransaction txn, LightningDatabase db, TKey key)
        {
            var keyBytes = db.ToBytes(key);

            txn.Delete(db, keyBytes);
        }
        public static byte[] GetRawValue <TKey>(this LightningTransaction txn, LightningDatabase db, TKey key)
        {
            var keyBytes = db.ToBytes(key);

            return(txn.Get(db, keyBytes));
        }
        public static bool ContainsKey <TKey>(this LightningTransaction txn, LightningDatabase db, TKey key)
        {
            var keyBytes = db.ToBytes(key);

            return(txn.ContainsKey(db, keyBytes));
        }