Skip to main content
Version: V1.1.0

fork - Fork a collection

fork() creates a copy of the current collection as a new collection with the same data.

info
  • This API is only available when you are connected using a client. For more information, see Client.

  • Supported only in seekdb (embedded and server mode) V1.1.0 and later. Not supported on OceanBase Database.

  • In seekdb V1.1.0, Fork Table (fork collection) is experimental. Avoid using it in production until it is declared stable in a later release.

Prerequisites

  • You have installed pyseekdb. For installation details, see Quick Start.

  • You are connected to the database. For connection details, see Client.

  • The collection you want to fork exists. If it does not exist, an error is returned.

Request parameters

fork(name)
ParameterTypeRequiredDescriptionExample value
namestringYesThe name of the new collection.my_collection_backup

Request example

import pyseekdb

# Create a client
client = pyseekdb.Client()

original = client.get_collection("my_collection")
forked = original.fork("my_collection_backup")

Response parameters

None