OceanBase
English日本語简体中文
ドキュメントホーム
製品
エコシステム
リリース

データベース

OceanBase CloudOceanBaseデータベース

データベース

OceanBase CloudOceanBaseデータベース
OceanBase CloudOceanBaseデータベース

OceanBaseデータベース

KV - V4.4.2
  • OBKVの概要
  • OBKVのアーキテクチャ
  • OBKV-Table
    • OBKV-Table概要
      • OBKV-Tableの概要
      • OBKV-Tableのコア機能
      • OBKV-Tableデプロイの概要
    • シンプルなKey-Valueストレージのクイックスタート(Java)
    • OBKV-Table Javaクライアントを使ったアプリケーション開発
      • OBKV-Table Java開発ガイド
      • OBKV-Table開発の準備
      • OBKV-Table Javaクライアントを使用してクラスタに接続する
      • OBKV-Table操作例
        • OBKV-Tableへのデータ書き込み
        • OBKV-Tableによるデータのクエリ
        • OBKV-Tableでのデータ更新
        • OBKV-Tableによるデータの削除
      • OBKV-Table Javaクライアントのパラメータ設定
    • OBKV-Table管理
      • OBKV-Table管理の概要
      • OBKV-Tableの高可用性
      • OBKV-Tableのセキュリティ権限
      • OBKV-Tableモニタリングメトリクス
    • OBKV-Tableリファレンス
      • OBKV-Tableのデータモデル
      • OBKV-Tableの操作タイプ
      • OBKV-Tableがサポートするデータ型
      • OBKV-Table全文インデックス
      • OBKV-Tableのグローバルインデックスの使用範囲と例
      • OBKV-Tableの期限切れデータ削除
      • OBKV-Tableのグループコミット
      • OBKV-Tableの弱い整合性読み取りと最寄りデータセンターからの読み取り
      • OBKV-Table関連ビュー
    • OBKV-Table よくある質問
  • OBKV-HBase
    • OBKV-HBaseの概要
    • OBKV-HBaseのコア機能
    • OBKV-HBaseのデプロイ
    • OBKV-HBaseによるアプリケーション開発
      • OBKV-HBase アプリケーション開発の概要
      • OBKV-HBase Javaクライアントを使用したクラスタへの接続
      • HBaseの業務コードをOBKV-HBaseに移行する
      • OBKV-HBase データ操作の例
    • OBKV-HBase 移行ガイド
    • OBKV-HBase管理
      • OBKV-HBase管理の概要
      • OBKV-HBaseの高可用性
      • OBKV-HBaseのセキュリティ権限
      • OBKV-HBaseモニタリングメトリクス
    • OBKV-HBaseクエリの最適化
    • OBKV-HBaseの性能テスト
    • OBKV-HBaseリファレンス
      • OBKV-HBaseデータモデル
      • OBKV-HBaseのデータスキーマ
      • HBaseとの互換インターフェース
      • HBaseと互換性のあるフィルター
      • OBKV-HBaseの自動パーティション分割
      • OBKV-HBaseにおける期限切れデータの削除
      • OBKV-HBaseの弱い整合性読み取りと最寄りデータセンターからの読み取り
      • OBKV-HBase関連ビュー
    • OBKV-HBaseエコシステム統合
      • Flink連携
        • Flinkコネクタを使用してOBKV-HBaseにデータを同期する
        • ネイティブFlinkによるOBKV-HBaseへのアクセス
      • HiveによるOBKV-HBaseへのアクセス
      • SparkによるOBKV-HBaseへのアクセス
  • OBKVリリースノート
    • OBKV Enterprise版

PDF をダウンロード

このページには現在中国語/日本語版がなく、英語版を表示しています。
ドキュメントフィードバック
  1. ドキュメントセンター
  2. OceanBaseデータベース
  3. KV
  4. V4.4.2

Overview of the Go client

最終更新:2026-09-04 10:25:15

Client API
Columns

Client API

The syntax is as follows:

type Client interface {
    // Insert a record by rowKey.
    Insert(ctx context.Context, tableName string, rowKey []*table.Column, mutateColumns []*table.Column, opts ...option.ObOperationOption) (int64, error)
    // Update a record by rowKey.
    Update(ctx context.Context, tableName string, rowKey []*table.Column, mutateColumns []*table.Column, opts ...option.ObOperationOption) (int64, error)
    // InsertOrUpdate insert or update a record by rowKey.
    // insert if the primary key does not exist, update if it does.
    InsertOrUpdate(ctx context.Context, tableName string, rowKey []*table.Column, mutateColumns []*table.Column, opts ...option.ObOperationOption) (int64, error)
    // Replace a record by rowKey.
    Replace(ctx context.Context, tableName string, rowKey []*table.Column, mutateColumns []*table.Column, opts ...option.ObOperationOption) (int64, error)
    // Increment a record by rowKey.
    Increment(ctx context.Context, tableName string, rowKey []*table.Column, mutateColumns []*table.Column, opts ...option.ObOperationOption) (SingleResult, error)
    // Append a record by rowKey.
    Append(ctx context.Context, tableName string, rowKey []*table.Column, mutateColumns []*table.Column, opts ...option.ObOperationOption) (SingleResult, error)
    // Delete a record by rowKey.
    Delete(ctx context.Context, tableName string, rowKey []*table.Column, opts ...option.ObOperationOption) (int64, error)
    // Get a record by rowKey.
    Get(ctx context.Context, tableName string, rowKey []*table.Column, getColumns []string, opts ...option.ObOperationOption) (SingleResult, error)
    // Query records by rangePairs.
    Query(ctx context.Context, tableName string, rangePairs []*table.RangePair, opts ...option.ObQueryOption) (QueryResultIterator, error)
    // NewBatchExecutor create a batch executor.
    NewBatchExecutor(tableName string, opts ...option.ObBatchOption) BatchExecutor
    // NewAggExecutor create an aggregate executor.
    NewAggExecutor(tableName string, rangePairs []*table.RangePair, opts ...option.ObQueryOption) AggExecutor
    // Close closes the client.
    // close will disconnect all connections and exit all goroutines.
    Close()
}

Input parameters:

  • Insert: inserts a record.
  • Update: updates a record.
  • InsertOrUpdate: inserts a record if no primary key exists or updates a record if a primary key exists.
  • Replace: replaces a record.
  • Increment: increments specific integer columns in the record. mutateColumns specifies the delta value for increment. The value obtained after the increment can be obtained by using the func WithReturnAffectedEntity(returnAffectedEntity bool) ObkvOption method. The delta value must be of the signed type.
  • Append: appends a string to specific string columns in the record. mutateColumns specifies the delta value to be appended. The value obtained after the appending can be obtained by using the func WithReturnAffectedEntity(returnAffectedEntity bool) ObkvOption method.
  • Delete: deletes a record.
  • Get: obtains a record.
  • Query: obtains multiple records in a batch.
  • NewBatchExecutor: creates a batch executor.
  • NewAggExecutor: obtains an aggregate operation executor.
  • Close: closes the client.

Columns

A column in a table has two attributes: column name and column value.

The syntax is as follows:

type Column struct {
    name  string
    value interface{}
}

You can construct a column by using the following method:

func NewColumn(name string, value interface{}) *Column {
    return &Column{name: name, value: value}
}

次のトピック

OBKVの概要
次へ
このページの内容
Client API
Columns