Exemplo n.º 1
0
        public override Void Execute()
        {
            var schema = ColumnFamily.GetSchema();

            var parent = new CassandraColumnParent {
                ColumnFamily = ColumnFamily.FamilyName,
            };

            if (SuperColumnName != null)
            {
                parent.SuperColumn = SuperColumnName.GetValue(schema.SuperColumnNameType);
            }

            var column = new CassandraColumn {
                Name      = ColumnName.GetValue(schema.ColumnNameType),
                Value     = ColumnValue,
                Timestamp = Timestamp,
                Ttl       = TimeToLive
            };

            Session.GetClient().insert(
                Key,
                parent,
                column,
                Session.WriteConsistency
                );

            return(new Void());
        }