ansi

package
v0.0.8-b Latest Latest
Warning

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

Go to latest
Published: Apr 24, 2022 License: MIT Imports: 7 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type ConnectionStatements

type ConnectionStatements interface {
	ExecContext(context.Context, string, ...interface{}) (sql.Result, error)
	QueryContext(context.Context, string, ...interface{}) (*sql.Rows, error)
}

type DatabaseStatements

type DatabaseStatements struct {
	Conn ConnectionStatements
}

func (*DatabaseStatements) ExecDelete

func (*DatabaseStatements) ExecInsert

func (s *DatabaseStatements) ExecInsert(ctx context.Context, op *activerecord.InsertOperation) (
	id interface{}, err error,
)

func (*DatabaseStatements) ExecQuery

func (s *DatabaseStatements) ExecQuery(
	ctx context.Context, op *activerecord.QueryOperation, cb func(Hash) bool,
) (
	err error,
)

func (*DatabaseStatements) ExecUpdate

type SchemaStatements

type SchemaStatements struct {
	Conn ConnectionStatements
}

func (*SchemaStatements) AddForeignKey

func (s *SchemaStatements) AddForeignKey(ctx context.Context, owner, target string) error

func (*SchemaStatements) ColumnDefinitions

func (s *SchemaStatements) ColumnDefinitions(ctx context.Context, tableName string) (
	[]activerecord.ColumnDefinition, error,
)

func (*SchemaStatements) ColumnType

func (s *SchemaStatements) ColumnType(typeName string) (activerecord.Type, error)

func (*SchemaStatements) CreateTable

func (s *SchemaStatements) CreateTable(ctx context.Context, table *activerecord.Table) error

Jump to

Keyboard shortcuts

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