sql

package module
v0.0.0-...-b9f3045 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Apr 8, 2026 License: Apache-2.0 Imports: 9 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func SetCustomNameMysql

func SetCustomNameMysql(customName string, customDatasourceName string)

func SetCustomNamePostgre

func SetCustomNamePostgre(customName string, customDatasourceName string)

func SetCustomNameSqlite

func SetCustomNameSqlite(customName string, customDatasourceName string)

func SinkCreatorMysql

func SinkCreatorMysql() (string, sink.Sink, *string, []params.Params)

func SinkCreatorPostgre

func SinkCreatorPostgre() (string, sink.Sink, *string, []params.Params)

func SinkCreatorSqlite

func SinkCreatorSqlite() (string, sink.Sink, *string, []params.Params)

Types

type Sink

type Sink struct {
	// contains filtered or unexported fields
}

func (*Sink) Close

func (s *Sink) Close() error

Close 负责关闭数据库连接池,释放所有底层连接

func (*Sink) Open

func (s *Sink) Open(ctx context.Context, config map[string]string, columnMapping map[string]string, dataSource datasource.Datasource) error

Open 负责解析配置并初始化数据库连接设置

func (*Sink) Write

func (s *Sink) Write(ctx context.Context, _ string, records []record.Record) error

Write 将一批记录通过构建一个大的 INSERT 语句在事务中批量写入数据库

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL