Class YdbSchemaOperations

java.lang.Object
tech.ydb.yoj.repository.ydb.client.YdbSchemaOperations

public class YdbSchemaOperations extends Object
  • Constructor Details

    • YdbSchemaOperations

      public YdbSchemaOperations(String tablespace, @NonNull @NonNull SessionManager sessionManager, com.yandex.ydb.core.grpc.GrpcTransport transport)
  • Method Details

    • setTablespace

      public void setTablespace(String tablespace)
    • createTablespace

      public void createTablespace()
    • tablespaceExists

      public boolean tablespaceExists()
    • createTable

      public void createTable(String name, List<tech.ydb.yoj.databind.schema.Schema.JavaField> columns, List<tech.ydb.yoj.databind.schema.Schema.JavaField> primaryKeys, YdbTableHint hint, List<tech.ydb.yoj.databind.schema.Schema.Index> globalIndexes, tech.ydb.yoj.databind.schema.Schema.TtlModifier ttlModifier, List<tech.ydb.yoj.databind.schema.Schema.Changefeed> changefeeds)
    • describeTable

      public YdbSchemaOperations.Table describeTable(String name, List<tech.ydb.yoj.databind.schema.Schema.JavaField> columns, List<tech.ydb.yoj.databind.schema.Schema.JavaField> primaryKeys, List<tech.ydb.yoj.databind.schema.Schema.Index> indexes)
    • hasTable

      public boolean hasTable(String name)
    • dropTable

      public void dropTable(String name)
    • getTableNames

      public List<String> getTableNames()
    • getTableNames

      public List<String> getTableNames(boolean recursive)
    • getDirectoryNames

      public List<String> getDirectoryNames()
    • getTables

      public List<YdbSchemaOperations.Table> getTables()
    • getTables

      public List<YdbSchemaOperations.Table> getTables(boolean recursive)
    • getTables

      public List<YdbSchemaOperations.Table> getTables(String basePath)
    • getTables

      public List<YdbSchemaOperations.Table> getTables(String basePath, boolean recursive)
    • describeTable

      public YdbSchemaOperations.Table describeTable(String tableName)
    • removeTablespace

      public void removeTablespace()
    • removeDirectoryRecursive

      public void removeDirectoryRecursive(String directory)
    • snapshot

      public void snapshot(String snapshotPath) throws SnapshotCreateException
      Throws:
      SnapshotCreateException
    • isSnapshotDirectory

      public boolean isSnapshotDirectory(String name)
    • copyTable

      protected void copyTable(String source, String destination)
    • mkdirs

      protected void mkdirs(String dir)
    • hasPath

      protected boolean hasPath(String path)