private void CheckColumnHasTimestampValue(RawColumn column) { if (!cassandraClusterSettings.AllowNullTimestamp && !column.Timestamp.HasValue) { throw new ArgumentException("Timestamp should be filled."); } }
public bool TryGetColumn(byte[] key, byte[] columnName, out RawColumn result) { result = null; var getCommand = new GetCommand(keyspaceName, columnFamilyName, key, readConsistencyLevel, columnName); commandExecutor.Execute(getCommand); if (getCommand.Output == null) { return(false); } result = getCommand.Output; return(true); }
public InsertCommand(string keyspace, string columnFamily, byte[] rowKey, ConsistencyLevel consistencyLevel, RawColumn column) : base(keyspace, columnFamily) { PartitionKey = rowKey; this.consistencyLevel = consistencyLevel; this.column = column; }
public void AddColumn(byte[] key, RawColumn column) { var command = CreateInsertCommand(0, attempt => new KeyColumnPair <byte[], RawColumn>(key, column)); commandExecutor.Execute(command); }