sqlexport

package
v0.40.4 Latest Latest
Warning

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

Go to latest
Published: May 19, 2022 License: Apache-2.0 Imports: 12 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type BatchSqlExportWriter

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

SqlExportWriter is a TableWriter that writes SQL drop, create and insert statements to re-create a dolt table in a SQL database.

func OpenBatchedSQLExportWriter

func OpenBatchedSQLExportWriter(ctx context.Context, wr io.WriteCloser, root *doltdb.RootValue, tableName string, sch schema.Schema, editOpts editor.Options) (*BatchSqlExportWriter, error)

OpenBatchedSQLExportWriter returns a new SqlWriter for the table with the writer given.

func (*BatchSqlExportWriter) Close

func (w *BatchSqlExportWriter) Close(ctx context.Context) error

Close should flush all writes, release resources being held

func (*BatchSqlExportWriter) GetSchema

func (w *BatchSqlExportWriter) GetSchema() schema.Schema

GetSchema returns the schema of this TableWriter.

func (*BatchSqlExportWriter) WriteRow

func (w *BatchSqlExportWriter) WriteRow(ctx context.Context, r row.Row) error

WriteRow will write a row to a table

func (*BatchSqlExportWriter) WriteSqlRow

func (w *BatchSqlExportWriter) WriteSqlRow(ctx context.Context, r sql.Row) error

type SqlExportWriter

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

SqlExportWriter is a TableWriter that writes SQL drop, create and insert statements to re-create a dolt table in a SQL database.

func OpenSQLExportWriter

func OpenSQLExportWriter(ctx context.Context, wr io.WriteCloser, root *doltdb.RootValue, tableName string, sch schema.Schema, editOpts editor.Options) (*SqlExportWriter, error)

OpenSQLExportWriter returns a new SqlWriter for the table with the writer given.

func (*SqlExportWriter) Close

func (w *SqlExportWriter) Close(ctx context.Context) error

Close should flush all writes, release resources being held

func (*SqlExportWriter) GetSchema

func (w *SqlExportWriter) GetSchema() schema.Schema

GetSchema returns the schema of this TableWriter.

func (*SqlExportWriter) WriteRow

func (w *SqlExportWriter) WriteRow(ctx context.Context, r row.Row) error

WriteRow will write a row to a table

func (*SqlExportWriter) WriteSqlRow

func (w *SqlExportWriter) WriteSqlRow(ctx context.Context, r sql.Row) error

Jump to

Keyboard shortcuts

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