Versions in this module Expand all Collapse all v1 v1.8.0 Sep 11, 2026 v1.7.4 Sep 11, 2026 Changes in this version + const ArtifactStorageLocal + const ConnSourceInline + const ConnSourceMemory + const ConnSourceProvider + const ConnSourceStore + const DetailKindFunction + const DetailKindProcedure + const DetailKindTable + const DetailKindView + const ErrClientClosed + const ErrConnFailed + const ErrConnNotFound + const ErrConnNotSpecified + const ErrCryptoFailed + const ErrExecFailed + const ErrExpOutDir + const ErrFileType + const ErrInternalServer + const ErrNoArtifact + const ErrNotImplemented + const ErrParamsInvalid + const ErrStoreUnavailable + const ErrTaskInvalid + const ErrTaskNotFound + const ErrUnsupportedType + const FormatJSON + const FormatSQL + const ResetDrop + const ResetNone + const ResetTruncate + const StoreExternal + const StoreNone + const StoreSQLite + func AsSvcErr(err error, target **SvcError) bool + func IsArtifactLogicalPath(p string) bool + func RelayoutDir(srcDir, dstDir string, rules []LayoutRule, dropUnmatched bool) error + func RelayoutDirWithMap(srcDir, dstDir string, rules []LayoutRule, dropUnmatched bool, ...) error + func RenderRowsSQL(cli *cydb.DBCli, table string, rows []map[string]any) (string, error) + func StripSQLDBPrefix(isMySQL bool, sql string, knownDBs ...string) string + func WithLangCtx(ctx context.Context, lang string) context.Context + type AIConfig = service.AIConfig + type ArtifactRef struct + Ref string + Size int64 + Storage string + type Client struct + func New(opts ...Option) (*Client, error) + func (c *Client) AddConnection(ctx context.Context, rec ConnRecord) (ConnRecord, error) + func (c *Client) CancelTask(taskID string) error + func (c *Client) Close() error + func (c *Client) CompareSnapshot(ctx context.Context, snap *Snapshot, target *DBConnInfo, ...) (*CompareResult, error) + func (c *Client) CreateSnapshot(ctx context.Context, connKey string, dbs []string, opts SnapshotParams, ...) (*Snapshot, error) + func (c *Client) Databases(ctx context.Context, connKey string, force bool) ([]string, error) + func (c *Client) DeleteConnection(key string) error + func (c *Client) DeleteTableRows(ctx context.Context, connKey, db, table string, pkColumns []string, ...) (int64, error) + func (c *Client) GenerateSQL(ctx context.Context, connKey, db string, p GenSQLParams) (string, error) + func (c *Client) GetCellValue(ctx context.Context, connKey, db, table, column string, pkColumns []string, ...) (any, error) + func (c *Client) InsertTableRow(ctx context.Context, connKey, db string, p InsertRowParams) (int64, error) + func (c *Client) ListConnections() []ConnInfo + func (c *Client) LoadSnapshot(path string) (*Snapshot, error) + func (c *Client) ObjectDDL(ctx context.Context, connKey, db, objType, name string) (*ObjectDDLResult, error) + func (c *Client) Objects(ctx context.Context, connKey, db, schema string, force bool) (*DBSchema, error) + func (c *Client) PingConnection(ctx context.Context, connKey string) (int64, error) + func (c *Client) QueryTablePage(ctx context.Context, connKey, db, table string, p PageParams) (*TablePageResult, error) + func (c *Client) RunCompare(ctx context.Context, opts CompareOptions, cb ProgressFunc) (*CompareResult, error) + func (c *Client) RunDictionary(ctx context.Context, opts DictionaryOptions, cb ProgressFunc) (*ArtifactRef, error) + func (c *Client) RunExport(ctx context.Context, opts ExportOptions, cb ProgressFunc) (*ArtifactRef, error) + func (c *Client) RunImport(ctx context.Context, opts ImportOptions, cb ProgressFunc) (*ImportResult, error) + func (c *Client) RunMigrate(ctx context.Context, opts MigrateOptions, cb ProgressFunc) error + func (c *Client) RunSQLScript(ctx context.Context, connKey, db, sql string, p ScriptParams) ([]*SQLQueryResult, error) + func (c *Client) Schemas(ctx context.Context, connKey, db string, force bool) ([]SchemaSummary, error) + func (c *Client) Service() *service.Service + func (c *Client) StoreMode() StoreMode + func (c *Client) TableColumns(ctx context.Context, connKey, db, table string) ([]TableColumnInfo, error) + func (c *Client) TestConnection(ctx context.Context, conn DBConnInfo) error + func (c *Client) UpdateTableCell(ctx context.Context, connKey, db string, p UpdateCellParams) (int64, error) + type ColumnFilter = engine.ColumnFilter + type CompareDBPair = engine.CompareDBPair + type CompareOptions = service.CompareOptions + type CompareResult = service.CompareResult + type ConnHooks = service.ConnHooks + type ConnInfo = service.ConnInfo + type ConnProvider = service.ConnProvider + type ConnRecord = service.ConnRecord + type ConnSource = service.ConnSource + type Contributor = service.Contributor + type ContributorImportRequest = service.ContributorImportRequest + type ContributorRequest = service.ContributorRequest + type ContributorResult = service.ContributorResult + type DBConnInfo = service.DBConnInfo + func NewConn(dbType, host string, port int, user, pwd, dbName string) DBConnInfo + type DBSchema = engine.DBSchema + type DBTables = engine.DBTables + type DataEntry = service.DataEntry + type DataPackage = service.DataPackage + func LoadDataPackage(data []byte) (*DataPackage, error) + type DataPrepareRequest = service.DataPrepareRequest + type DataPreparer = service.DataPreparer + type DeleteRowParams = engine.DeleteRowParams + type DictionaryOptions = service.DictionaryOptions + type ExportDetail = engine.ExportDetail + type ExportFormat = service.ExportFormat + type ExportOptions = service.ExportOptions + type GenSQLParams = engine.GenSQLParams + type ImportOptions = service.ImportOptions + type ImportResult struct + RollbackRef *ArtifactRef + SkippedTables []string + TotalDatabases int + TotalStmts int64 + Unrollback []string + type InsertRowParams = engine.InsertRowParams + type LayoutRule struct + Dest string + Match string + type MigrateOptions = service.MigrateOptions + type ObjectDDLResult = service.ObjectDDLResult + type Option func(*options) + func WithAIConfig(ai AIConfig) Option + func WithArtifactStore(store *cystore.Store, bucket string) Option + func WithCacheClient(rc *cydist.RedisClient) Option + func WithCacheRedis(addr, pwd string) Option + func WithConfigFile(path string) Option + func WithConnHooks(hooks ConnHooks) Option + func WithConnProvider(p ConnProvider) Option + func WithContributors(ctbs ...Contributor) Option + func WithDataDir(dir string) Option + func WithDataPreparers(preparers map[string]DataPreparer) Option + func WithInlineConns(conns ...ConnInfo) Option + func WithLang(lang string) Option + func WithMinio(endpoint, accessKey, secretKey, bucket string) Option + func WithQueryHooks(hooks QueryHooks) Option + func WithS3(region, bucket string) Option + func WithStoreConn(conn def.DBConnection) Option + func WithStoreDB(cli *cydb.DBCli) Option + func WithTaskHooks(h TaskHooks) Option + type PageParams struct + ExcludeColumns []string + Filters []ColumnFilter + Page int + PageSize int + SortSpecs []SortSpec + type ProgressFunc = service.ProgressFunc + type ProgressInfo = service.ProgressInfo + type QueryHooks = service.QueryHooks + type SQLQueryResult = engine.SQLQueryResult + type SchemaSummary = engine.SchemaSummary + type ScriptParams struct + Limit int + Mode string + Offset int + type Snapshot = service.Snapshot + type SnapshotCompareOptions = service.SnapshotCompareOptions + type SnapshotInfo = service.SnapshotInfo + type SnapshotParams struct + Description string + IncludeSamples bool + Name string + SampleLimit int + type SortSpec = engine.SortSpec + type StoreMode = service.StoreMode + type SvcError = service.SvcError + type TableAlias = service.TableAlias + type TableColumnInfo = engine.TableColumnInfo + type TableCondition = service.TableCondition + type TablePageResult = engine.TablePageResult + type TaskHooks = service.TaskHooks + type TaskStartInfo = service.TaskStartInfo + type UpdateCellParams = engine.UpdateCellParams