C# 클래스 Scalien.Table

Table is a convenience class for encapsulating table related operations.

ScalienDB uses databases and tables to manage key value namespaces.

파일 보기 프로젝트 열기: scalien/scaliendb 1 사용 예제들

Private Properties

프로퍼티 타입 설명

공개 메소드들

메소드 설명
Add ( byte key, long number ) : long

Add a number to a value, assuming the value is also a number. If the key does not exist, this operation will create it and set the number, as if the value was 0 before.

Add ( string key, long number ) : long

Add a number to a value, assuming the value is also a number. If the key does not exist, this operation will create it and set the number, as if the value was 0 before.

Count ( ByteRangeParams ps ) : ulong

Return the number of matching keys in the table.

Count ( StringRangeParams ps ) : ulong

Return the number of matching keys in the table.

Delete ( byte key ) : void

Delete a key-value pair by key in the table.

Delete ( string key ) : void

Delete a key-value pair by key in the table.

DeleteTable ( ) : void

Delete the table.

Get ( byte key ) : byte[]

Retrieve a value by key from the table. Returns null if not found.

Get ( byte key, byte defval ) : byte[]

Retrieve a value by key from the table. Returns defval if not found.

Get ( string key ) : string

Retrieve a value by key from the table. Returns null if not found.

Get ( string key, string defval ) : string

Retrieve a value by key from the table. Returns defval if not found.

GetKeyIterator ( ByteRangeParams ps ) : ByteKeyIterator

Return an iterator that will return only keys.

GetKeyIterator ( StringRangeParams ps ) : StringKeyIterator

Return an iterator that will return only keys.

GetKeyValueIterator ( ByteRangeParams ps ) : ByteKeyValueIterator

Return an iterator that will return keys and values as a System.Collections.Generic.KeyValuePair{T, T}.

GetKeyValueIterator ( StringRangeParams ps ) : StringKeyValueIterator

Return an iterator that will return keys and values as a System.Collections.Generic.KeyValuePair{T, T}.

GetSequence ( byte key ) : Sequence

Retrieve a Scalien.Sequence backed by a key-value in this table.

GetSequence ( string key ) : Sequence

Retrieve a Scalien.Sequence backed by a key-value in this table.

RenameTable ( string newName ) : void

Rename the table.

Set ( byte key, byte value ) : void

Set a key-value in the table.

Set ( string key, string value ) : void

Set a key-value in the table.

Table ( Scalien.Client client, Database database, ulong tableID, string name ) : System

Table constructor.

TruncateTable ( ) : void

Truncate the table. This means all key-values in the table are dropped.

메소드 상세

Add() 공개 메소드

Add a number to a value, assuming the value is also a number. If the key does not exist, this operation will create it and set the number, as if the value was 0 before.
public Add ( byte key, long number ) : long
key byte The key.
number long The number.
리턴 long

Add() 공개 메소드

Add a number to a value, assuming the value is also a number. If the key does not exist, this operation will create it and set the number, as if the value was 0 before.
public Add ( string key, long number ) : long
key string The key.
number long The number.
리턴 long

Count() 공개 메소드

Return the number of matching keys in the table.
public Count ( ByteRangeParams ps ) : ulong
ps ByteRangeParams The filter parameters.
리턴 ulong

Count() 공개 메소드

Return the number of matching keys in the table.
public Count ( StringRangeParams ps ) : ulong
ps StringRangeParams The filter parameters.
리턴 ulong

Delete() 공개 메소드

Delete a key-value pair by key in the table.
public Delete ( byte key ) : void
key byte The key.
리턴 void

Delete() 공개 메소드

Delete a key-value pair by key in the table.
public Delete ( string key ) : void
key string The key.
리턴 void

DeleteTable() 공개 메소드

Delete the table.
public DeleteTable ( ) : void
리턴 void

Get() 공개 메소드

Retrieve a value by key from the table. Returns null if not found.
public Get ( byte key ) : byte[]
key byte The key to look for.
리턴 byte[]

Get() 공개 메소드

Retrieve a value by key from the table. Returns defval if not found.
public Get ( byte key, byte defval ) : byte[]
key byte The key to look for.
defval byte The default return value.
리턴 byte[]

Get() 공개 메소드

Retrieve a value by key from the table. Returns null if not found.
public Get ( string key ) : string
key string The key to look for.
리턴 string

Get() 공개 메소드

Retrieve a value by key from the table. Returns defval if not found.
public Get ( string key, string defval ) : string
key string The key to look for.
defval string The default return value.
리턴 string

GetKeyIterator() 공개 메소드

Return an iterator that will return only keys.
public GetKeyIterator ( ByteRangeParams ps ) : ByteKeyIterator
ps ByteRangeParams The parameters of iteration, as a .
리턴 ByteKeyIterator

GetKeyIterator() 공개 메소드

Return an iterator that will return only keys.
public GetKeyIterator ( StringRangeParams ps ) : StringKeyIterator
ps StringRangeParams The parameters of iteration, as a .
리턴 StringKeyIterator

GetKeyValueIterator() 공개 메소드

Return an iterator that will return keys and values as a System.Collections.Generic.KeyValuePair{T, T}.
public GetKeyValueIterator ( ByteRangeParams ps ) : ByteKeyValueIterator
ps ByteRangeParams The parameters of iteration, as a .
리턴 ByteKeyValueIterator

GetKeyValueIterator() 공개 메소드

Return an iterator that will return keys and values as a System.Collections.Generic.KeyValuePair{T, T}.
public GetKeyValueIterator ( StringRangeParams ps ) : StringKeyValueIterator
ps StringRangeParams The parameters of iteration, as a .
리턴 StringKeyValueIterator

GetSequence() 공개 메소드

Retrieve a Scalien.Sequence backed by a key-value in this table.
public GetSequence ( byte key ) : Sequence
key byte The key backing the sequence.
리턴 Sequence

GetSequence() 공개 메소드

Retrieve a Scalien.Sequence backed by a key-value in this table.
public GetSequence ( string key ) : Sequence
key string The key backing the sequence.
리턴 Sequence

RenameTable() 공개 메소드

Rename the table.
public RenameTable ( string newName ) : void
newName string The new name of the table.
리턴 void

Set() 공개 메소드

Set a key-value in the table.
public Set ( byte key, byte value ) : void
key byte The key.
value byte The value.
리턴 void

Set() 공개 메소드

Set a key-value in the table.
public Set ( string key, string value ) : void
key string The key.
value string The value.
리턴 void

Table() 공개 메소드

Table constructor.
public Table ( Scalien.Client client, Database database, ulong tableID, string name ) : System
client Scalien.Client The client object.
database Database The database this table is in.
tableID ulong The unique ID of the table.
name string The name of the table.
리턴 System

TruncateTable() 공개 메소드

Truncate the table. This means all key-values in the table are dropped.
public TruncateTable ( ) : void
리턴 void