DatabaseHandle
特定のデータベースに対する操作を行うスコープ付きハンドル。
コンストラクター
Section titled “コンストラクター”コンストラクター
Section titled “コンストラクター”new DatabaseHandle(
client,name):DatabaseHandle
| パラメーター | タイプ |
|---|---|
client |
KasaneClient |
name |
string |
DatabaseHandle
プロパティ
Section titled “プロパティ”client
Section titled “client”
readonlyclient:KasaneClient
readonlyname:string
createTable()
Section titled “createTable()”createTable(
name,dataType,maxZoomLevel,options?):Promise<TableInfo>
テーブルを新規作成する。
| パラメーター | タイプ |
|---|---|
name |
string |
dataType |
TableDataType |
maxZoomLevel |
number |
options? |
{ constraints?: TableConstraints; description?: string; isTemporal?: boolean; } |
options.constraints? |
TableConstraints |
options.description? |
string |
options.isTemporal? |
boolean |
Promise<TableInfo>
delete()
Section titled “delete()”delete():
Promise<void>
データベースと配下のテーブルを削除する。
Promise<void>
info()
Section titled “info()”info():
Promise<DatabaseInfo>
データベースの詳細情報を取得する。
Promise<DatabaseInfo>
listTables()
Section titled “listTables()”listTables(
options?):Promise<TableInfo[]>
テーブル一覧を取得する。
| パラメーター | タイプ |
|---|---|
options? |
{ rpcCallOptions?: RpcCallOptions; } |
options.rpcCallOptions? |
RpcCallOptions |
Promise<TableInfo[]>
table()
Section titled “table()”table<
T>(tableName):TableHandle<T>
配下のテーブルハンドルを取得する。
型パラメーター
Section titled “型パラメーター”| 型パラメーター | デフォルトタイプ |
|---|---|
T extends PrimitiveValue |
PrimitiveValue |
| パラメーター | タイプ |
|---|---|
tableName |
string |
TableHandle<T>
update()
Section titled “update()”update(
options):Promise<DatabaseInfo>
データベースの名前または説明文を更新し、更新後の情報を返す。
| パラメーター | タイプ |
|---|---|
options |
{ description?: string | null; newName?: string; } |
options.description? |
string | null |
options.newName? |
string |
Promise<DatabaseInfo>