public static IEnumerable <IFluentColumnFamily <CompareWith> > Get <CompareWith>(this CassandraColumnFamily <CompareWith> family, BytesType startKey, int keyCount, Expression <Func <IFluentRecordHasFluentColumns <CompareWith>, bool> > expression, CompareWith columnStart, CompareWith columnEnd, bool columnsReversed = false, int columnCount = 100)
            where CompareWith : CassandraType
        {
            var op = new GetColumnFamilyIndexedSlices <CompareWith>(new CassandraIndexClause <CompareWith>(startKey, keyCount, expression), new RangeSlicePredicate(columnStart, columnEnd, columnsReversed, columnCount));

            return(family.ExecuteOperation(op));
        }
        public static int ColumnCount <CompareWith>(this CassandraColumnFamily <CompareWith> family, BytesType key, CompareWith columnStart, CompareWith columnEnd, bool reversed = false, int count = 100)
            where CompareWith : CassandraType
        {
            var op = new ColumnCount(key, new RangeSlicePredicate(columnStart, columnEnd, reversed, count));

            return(family.ExecuteOperation(op));
        }
        // get_indexed_slices

        public static IEnumerable <IFluentColumnFamily <CompareWith> > Get <CompareWith>(this CassandraColumnFamily <CompareWith> family, BytesType startKey, int keyCount, Expression <Func <IFluentRecordHasFluentColumns <CompareWith>, bool> > expression, IEnumerable <CompareWith> columnNames)
            where CompareWith : CassandraType
        {
            var op = new GetColumnFamilyIndexedSlices <CompareWith>(new CassandraIndexClause <CompareWith>(startKey, keyCount, expression), new ColumnSlicePredicate(columnNames));

            return(family.ExecuteOperation(op));
        }
        public static IEnumerable <IFluentColumnFamily <CompareWith> > Get <CompareWith>(this CassandraColumnFamily <CompareWith> family, BytesType startKey, BytesType endKey, string startToken, string endToken, int keyCount, CompareWith columnStart, CompareWith columnEnd, bool columnsReversed = false, int columnCount = 100)
            where CompareWith : CassandraType
        {
            var op = new GetColumnFamilyRangeSlices <CompareWith>(new CassandraKeyRange(startKey, endKey, startToken, endToken, keyCount), new RangeSlicePredicate(columnStart, columnEnd, columnsReversed, columnCount));

            return(family.ExecuteOperation(op));
        }
        // get_range_slice

        public static IEnumerable <IFluentColumnFamily <CompareWith> > Get <CompareWith>(this CassandraColumnFamily <CompareWith> family, BytesType startKey, BytesType endKey, string startToken, string endToken, int keyCount, IEnumerable <CompareWith> columnNames)
            where CompareWith : CassandraType
        {
            var op = new GetColumnFamilyRangeSlices <CompareWith>(new CassandraKeyRange(startKey, endKey, startToken, endToken, keyCount), new ColumnSlicePredicate(columnNames));

            return(family.ExecuteOperation(op));
        }
        public static IEnumerable <IFluentColumnFamily <CompareWith> > Get <CompareWith>(this CassandraColumnFamily <CompareWith> family, IEnumerable <BytesType> keys, CompareWith columnStart, CompareWith columnEnd, bool columnsReversed = false, int columnCount = 100)
            where CompareWith : CassandraType
        {
            var op = new MultiGetColumnFamilySlice <CompareWith>(keys, new RangeSlicePredicate(columnStart, columnEnd, columnsReversed, columnCount));

            return(family.ExecuteOperation(op));
        }
        public static IEnumerable <ICqlRow <CompareWith> > Cql <CompareWith>(this CassandraColumnFamily <CompareWith> family, UTF8Type cqlQuery)
            where CompareWith : CassandraType
        {
            var op = new ExecuteCqlQuery <CompareWith>(cqlQuery);

            return(family.ExecuteOperation(op));
        }
        public static void InsertColumn <CompareWith>(this CassandraColumnFamily <CompareWith> family, BytesType key, CompareWith columnName, BytesType columnValue, DateTimeOffset timestamp, int timeToLive)
            where CompareWith : CassandraType
        {
            var op = new InsertColumn(key, columnName, columnValue, timestamp, timeToLive);

            family.ExecuteOperation(op);
        }
        public static int ColumnCount <CompareWith>(this CassandraColumnFamily <CompareWith> family, BytesType key, IEnumerable <CompareWith> columnNames)
            where CompareWith : CassandraType
        {
            var op = new ColumnCount(key, new ColumnSlicePredicate(columnNames));

            return(family.ExecuteOperation(op));
        }
        public static void RemoveColumn <CompareWith>(this CassandraColumnFamily <CompareWith> family, BytesType key, CompareWith columnName)
            where CompareWith : CassandraType
        {
            var op = new RemoveColumn(key, columnName);

            family.ExecuteOperation(op);
        }
        public static IFluentColumn <CompareWith> GetColumn <CompareWith>(this CassandraColumnFamily <CompareWith> family, BytesType key, CompareWith columnName)
            where CompareWith : CassandraType
        {
            var op = new GetColumn <CompareWith>(key, columnName);

            return(family.ExecuteOperation(op));
        }
        // multi_get_slice

        public static IEnumerable <IFluentColumnFamily <CompareWith> > Get <CompareWith>(this CassandraColumnFamily <CompareWith> family, IEnumerable <BytesType> keys, IEnumerable <CompareWith> columnNames)
            where CompareWith : CassandraType
        {
            var op = new MultiGetColumnFamilySlice <CompareWith>(keys, new ColumnSlicePredicate(columnNames));

            return(family.ExecuteOperation(op));
        }
        public static void InsertCounterColumn(this CassandraColumnFamily family, CassandraObject key,
                                               CassandraObject superColumnName, CassandraObject columnName,
                                               long columnValue)
        {
            var op = new AddColumn(key, superColumnName, columnName, columnValue);

            family.ExecuteOperation(op);
        }
        public static void InsertColumn(this CassandraColumnFamily family, CassandraObject key, FluentColumnPath path)
        {
            var columnName  = path.Column.ColumnName;
            var columnValue = path.Column.ColumnValue;
            var timestamp   = path.Column.ColumnTimestamp;
            var timeToLive  = path.Column.ColumnSecondsUntilDeleted;

            var op = new InsertColumn(key, columnName, columnValue, timestamp, timeToLive);

            family.ExecuteOperation(op);
        }
        public static void InsertColumn <CompareWith>(this CassandraColumnFamily <CompareWith> family, BytesType key, FluentColumnPath path)
            where CompareWith : CassandraType
        {
            var columnName  = path.Column.ColumnName;
            var columnValue = path.Column.ColumnValue;
            var timestamp   = path.Column.ColumnTimestamp;
            var timeToLive  = path.Column.ColumnTimeToLive;

            var op = new InsertColumn(key, columnName, columnValue, timestamp, timeToLive);

            family.ExecuteOperation(op);
        }
        public static FluentColumn GetColumn(this CassandraColumnFamily family, CassandraObject key, CassandraObject columnName)
        {
            var op = new GetColumn(key, columnName);

            return(family.ExecuteOperation(op));
        }
        public static void InsertColumn(this CassandraColumnFamily family, CassandraObject key, CassandraObject columnName, BytesType columnValue, DateTimeOffset timestamp, int?timeToLive)
        {
            var op = new InsertColumn(key, columnName, columnValue, timestamp, timeToLive);

            family.ExecuteOperation(op);
        }
        public static int ColumnCount(this CassandraColumnFamily family, CassandraObject key, CassandraObject columnStart, CassandraObject columnEnd, bool reversed = false, int count = 100)
        {
            var op = new ColumnCount(key, new CassandraRangeSlicePredicate(columnStart, columnEnd, reversed, count));

            return(family.ExecuteOperation(op));
        }
        public static FluentColumnFamily GetSingle(this CassandraColumnFamily family, CassandraObject key, IEnumerable <CassandraObject> columnNames)
        {
            var op = new GetColumnFamilySlice(key, new CassandraColumnSlicePredicate(columnNames));

            return(family.ExecuteOperation(op));
        }
        public static int ColumnCount(this CassandraColumnFamily family, CassandraObject key, IEnumerable <CassandraObject> columnNames)
        {
            var op = new ColumnCount(key, new CassandraColumnSlicePredicate(columnNames));

            return(family.ExecuteOperation(op));
        }
        public static void RemoveColumn(this CassandraColumnFamily family, CassandraObject key, CassandraObject columnName)
        {
            var op = new Remove(key, columnName);

            family.ExecuteOperation(op);
        }