Object

ToCassandraByte method convert various type to byte array rightly. UTF8 encoding for string, Big Endian for numeric type, Big Endian ticks for DateTime and TimeSpan, ToByteArray for Guid(TimeUUID), And binary serialize for other object. Reason of Big Endian format is interoperability with java. If Cassandraemon take Little Endian format, CompareWith=LongType ColumnFamily can't sort by column name.
  • ToCassandraByte ()

String

String extension methods speak for itself.
They also be able to use LINQ where condition, example 'Key.In ("1", "2")'.
  • In (params string[] stringArray)
  • GreaterThanOrEqual (string item)
  • LessThanOrEqual (string item)
  • Between (string start, string end)

Byte[]

Byte Array extention methods speak for itself.
"In, GreaterThanOrEqual, LessThanOrEqual , Between" methods also be able to use LINQ where condition, example 'Column.In (1, 2)'.
  • In (params byte[] items)
  • In (params sbyte[] items)
  • In (params string[] items)
  • In (params DateTime[] items)
  • In (params TimeSpan[] items)
  • In (params bool[] items)
  • In (params char[] items)
  • In (params short[] items)
  • In (params int[] items)
  • In (params long[] items)
  • In (params ushort[] items)
  • In (params uint[] items)
  • In (params ulong[] items)
  • In (params float[] items)
  • In (params double[] items)
  • In (params Guid[] items)
  • In (params Enum[] items)
  • In (params IEnumerable<byte[]> items)
  • GreaterThanOrEqual (object item)
  • LessThanOrEqual (object item)
  • Between (object start, object end)
  • ToByte ()
  • ToSByte ()
  • ToUTF8 ()
  • ToDateTime ()
  • ToTimeSpan ()
  • ToBool ()
  • ToChar ()
  • ToInt16 ()
  • ToInt32 ()
  • ToInt64 ()
  • ToUInt16 ()
  • ToUInt32 ()
  • ToUInt64 ()
  • ToSingle ()
  • ToDouble ()
  • ToGuid ()
  • ToEnum<TEnum> ()
  • ToObject<T> ()

Guid

Guid Extension methods convert Guid (TimeUUID) to DateTime.
  • ToDateTime ()
  • ToDateTime (DateTimeKind kind)
  • ToDateTimeUtc ()
  • ToDateTimeLocal ()

Column

Column Extension methods help for building Column object.
  • SetName (object name)
  • SetValue (object value)
  • SetTimeStamp (long unixTime)
  • SetTtl (int ttl)
  • SetNameValue (object name, object value)
  • SetNameValueTimestamp (object name, object value, long unixTime)
  • SetNameValueTtl (object name, object value, int ttl)
  • SetNameValueTimestampTtl (object name, object value, long unixTime, int ttl)

List<Column>

List<Column> Extension methods help for adding Column object.
  • Add (object name, object value)
  • Add (object name, object value, long unixTime)
  • Add (object name, object value, int ttl)
  • Add (object name, object value, long unixTime, int ttl)
  • SetTtl (int ttl)

SuperColumn

SuperColumn Extension methods help for building SuperColumn object.
  • SetName (object name)
  • SetColumn (Column column)
  • SetColumn (object name, object value)
  • SetColumn (object name, object value, long unixTime)
  • SetColumn (object name, object value, int ttl)
  • SetColumn (object name, object value, long unixTime, int ttl)
  • SetColumnList (IEnumerable<Column> columnList)
  • SetColumnList (object obj)
  • AddColumn (Column column)
  • AddColumn (object name, object value)
  • AddColumn (object name, object value, long unixTime)
  • AddColumn (object name, object value, int ttl)
  • AddColumn (object name, object value, long unixTime, int ttl)
  • AddColumnList (IEnumerable<Column> columnList)
  • AddColumnList (object obj)
  • SetTtl (int ttl)

List<SuperColumn>

List<SuperColumn> Extension methods help for adding SuperColumn object.
  • Add (object name, Column column)
  • Add (object name, object columnName, object columnValue)
  • Add (object name, IEnumerable<Column> columnList)
  • Add (object name, object obj)
  • SetTtl (int ttl)

CounterColumn

CounterColumn Extension methods help for building CounterColumn object.
  • SetName (object name)
  • SetValue (long value)
  • SetNameValue (object name, long value)

List<CounterColumn>

List<CounterColumn> Extension methods help for adding CounterColumn object.
  • Add (object name, long value)

CounterSuperColumn

CounterSuperColumn Extension methods help for building CounterSuperColumn object.
  • SetName (object name)
  • SetColumn (CounterColumn column)
  • SetColumn (object name, long value)
  • SetColumnList (IEnumerable<CounterColumn> columnList)
  • AddColumn (CounterColumn column)
  • AddColumn (object name, long value)
  • AddColumnList (IEnumerable<CounterColumn> columnList)

List<CounterSuperColumn>

List<CounterSuperColumn> Extension methods help for adding CounterSuperColumn object.
  • Add (object name, CounterColumn column)
  • Add (object name, object columnName, long columnValue)
  • Add (object name, IEnumerable<CounterColumn> columnList)

ColumnOrSuperColumn

ColumnOrSuperColumn Extension methods get column name.
  • NameOrDefault ()

IEnumerable<CassandraEntity<T>>

IEnumerable<CassandraEntity<T>> Extension methods is used for LINQ.
You can specify 'Column, SuperColumn, List<Column>, List<SuperColumn> for T.
  • CountColumn ()
  • ReverseColumn ()
  • TakeColumn (int count)
  • FirstColumn ()
  • FirstOrDefaultColumn ()
  • LastColumn ()
  • LastOrDefaultColumn ()

IQueryable<CassandraEntity<T>>

IQueryable<CassandraEntity<T>> Extension methods is used for LINQ.
You can specify 'Column, SuperColumn, List<Column>, List<SuperColumn> for T.
  • CountColumn ()
  • ReverseColumn ()
  • TakeColumn (int count)
  • FirstColumn ()
  • FirstOrDefaultColumn ()
  • LastColumn ()
  • LastOrDefaultColumn ()

CqlResult

CqlResult Extension methods convert CqlResult to other object.
  • ToCassandraEntiry ()
  • ToObjectList<T> ()
  • ToFlatNameList<T> ()
  • ToFlatValueList<T> ()
  • ToObjectDictionary<TKey, TValue> ()
  • ToFlatDictionary<TKey, TValue> ()
  • ToFlatValueKeyDictionary<TKey, TValue> ()
  • ToNameListDictionary<TKey, TListItem> ()
  • ToValueListDictionary<TKey, TListItem> ()

Cassandra.Client

Cassandra.Client Extension methods is shortcut of inner TProtocol.
  • HostName ()
  • Close ()

TProtocol

TProtocol Extension methods is shortcut to get hostname.
  • HostName ()

Last edited Oct 6, 2011 at 9:12 PM by sabro, version 2

Comments

No comments yet.