Interface IKdbDataStore
Stipulates a contract for KDBDataStore
Inherited Members
Namespace: Azos.Sky.Kdb
Assembly: Azos.Sky.dll
Syntax
public interface IKdbDataStore : IDataStore, IApplicationComponent
Methods
Delete(String, Byte[])
Deletes a row of data under the specified key returning true if deletion succeeded
Declaration
bool Delete(string table, byte[] key)
Parameters
Type | Name | Description |
---|---|---|
System.String | table | Table. Required must be non-null valid identifier string less than 32 chars |
System.Byte[] | key | Byte array key, must be non-null array with at least one element |
Returns
Type | Description |
---|---|
System.Boolean |
Get(String, Byte[])
Gets a row of data by key, or null if row with such key was not found or data is not Row
Declaration
Doc Get(string table, byte[] key)
Parameters
Type | Name | Description |
---|---|---|
System.String | table | Table. Required must be non-null valid identifier string less than 32 chars |
System.Byte[] | key | Byte array key, must be non-null array with at least one element |
Returns
Type | Description |
---|---|
Doc |
Get<TDoc>(String, Byte[], Boolean)
Gets data doc projected in the specified typed model, or null if doc with such key was not found or data is not Doc
Declaration
KdbRecord<TDoc> Get<TDoc>(string table, byte[] key, bool dontToch = false)
where TDoc : Doc
Parameters
Type | Name | Description |
---|---|---|
System.String | table | Table. Required must be non-null valid identifier string less than 32 chars |
System.Byte[] | key | Byte array key, must be non-null array with at least one element |
System.Boolean | dontToch | If true then does not update the item's last use time |
Returns
Type | Description |
---|---|
KdbRecord<TDoc> |
Type Parameters
Name | Description |
---|---|
TDoc |
GetRaw(String, Byte[], Boolean)
Gets a raw byte[] of data or null if data does not exist or data is not raw byte[] but Row
Declaration
KdbRecord<byte[]> GetRaw(string table, byte[] key, bool dontToch = false)
Parameters
Type | Name | Description |
---|---|---|
System.String | table | Table. Required must be non-null valid identifier string less than 32 chars |
System.Byte[] | key | Byte array key, must be non-null array with at least one element |
System.Boolean | dontToch | If true then does not update the item's last use time |
Returns
Type | Description |
---|---|
KdbRecord<System.Byte[]> |
Put(String, Byte[], Doc, Int32, Nullable<DateTime>)
Puts a row of data under the specified key
Declaration
void Put(string table, byte[] key, Doc value, int slidingExpirationDays = -1, DateTime? absoluteExpirationDateUtc = default(DateTime? ))
Parameters
Type | Name | Description |
---|---|---|
System.String | table | Table. Required must be non-null valid identifier string less than 32 chars |
System.Byte[] | key | Byte array key, must be non-null array with at least one element |
Doc | value | Data object must be non-null |
System.Int32 | slidingExpirationDays | When set, specifies the sliding expiration of the entry in days. The system DOES NOT guarantee the instantaneous deletion of expired data |
System.Nullable<System.DateTime> | absoluteExpirationDateUtc | When set, specifies when garbage collector should auto-delete the value. It does not guarantee that the value is deleted right at that date |
PutRaw(String, Byte[], Byte[], Int32, Nullable<DateTime>)
Puts a raw byte[] value under the specified key
Declaration
void PutRaw(string table, byte[] key, byte[] value, int slidingExpirationDays = -1, DateTime? absoluteExpirationDateUtc = default(DateTime? ))
Parameters
Type | Name | Description |
---|---|---|
System.String | table | Table. Required must be non-null valid identifier string less than 32 chars |
System.Byte[] | key | Byte array key, must be non-null array with at least one element |
System.Byte[] | value | byte[] must be non-null |
System.Int32 | slidingExpirationDays | When set, specifies the sliding expiration of the entry in days. The system DOES NOT guarantee the instantaneous deletion of expired data |
System.Nullable<System.DateTime> | absoluteExpirationDateUtc | When set, specifies when garbage collector should auto-delete the value. It does not guarantee that the value is deleted right at that date |