dapi

package
v1.0.1 Latest Latest
Warning

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

Go to latest
Published: Nov 22, 2021 License: MIT Imports: 14 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func NewOpen

func NewOpen(opts ...Option) (*sql.DB, error)

Types

type Conn

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

func (*Conn) Begin

func (c *Conn) Begin() (driver.Tx, error)

func (*Conn) BeginTx

func (c *Conn) BeginTx(ctx context.Context, _ driver.TxOptions) (driver.Tx, error)

func (*Conn) Close

func (c *Conn) Close() error

func (*Conn) ExecContext

func (c *Conn) ExecContext(ctx context.Context, query string, args []driver.NamedValue) (driver.Result, error)

func (*Conn) Prepare

func (c *Conn) Prepare(query string) (driver.Stmt, error)

func (*Conn) PrepareContext

func (c *Conn) PrepareContext(ctx context.Context, query string) (driver.Stmt, error)

func (*Conn) QueryContext

func (c *Conn) QueryContext(ctx context.Context, query string, args []driver.NamedValue) (driver.Rows, error)

type DbEngine

type DbEngine int

DbEngine 크롤링 사이트 ENUM( mysql postgres )

const (
	// DbEngineMysql is a DbEngine of type Mysql.
	DbEngineMysql DbEngine = iota
	// DbEnginePostgres is a DbEngine of type Postgres.
	DbEnginePostgres
)

func ParseDbEngine

func ParseDbEngine(name string) (DbEngine, error)

ParseDbEngine attempts to convert a string to a DbEngine

func (DbEngine) MarshalText

func (x DbEngine) MarshalText() ([]byte, error)

MarshalText implements the text marshaller method

func (*DbEngine) Scan

func (x *DbEngine) Scan(value interface{}) (err error)

Scan implements the Scanner interface.

func (DbEngine) String

func (x DbEngine) String() string

String implements the Stringer interface.

func (*DbEngine) UnmarshalText

func (x *DbEngine) UnmarshalText(text []byte) error

UnmarshalText implements the text unmarshaller method

func (DbEngine) Value

func (x DbEngine) Value() (driver.Value, error)

Value implements the driver Valuer interface.

type Driver

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

func (*Driver) Open

func (d *Driver) Open(_ string) (driver.Conn, error)

type NullDbEngine

type NullDbEngine struct {
	DbEngine DbEngine
	Valid    bool
	Set      bool
}

func NewNullDbEngine

func NewNullDbEngine(val interface{}) (x NullDbEngine)

func (NullDbEngine) MarshalJSON

func (n NullDbEngine) MarshalJSON() ([]byte, error)

MarshalJSON correctly serializes a NullDbEngine to JSON.

func (*NullDbEngine) Scan

func (x *NullDbEngine) Scan(value interface{}) (err error)

Scan implements the Scanner interface.

func (*NullDbEngine) UnmarshalJSON

func (n *NullDbEngine) UnmarshalJSON(b []byte) error

UnmarshalJSON correctly deserializes a NullDbEngine from JSON.

func (NullDbEngine) Value

func (x NullDbEngine) Value() (driver.Value, error)

Value implements the driver Valuer interface.

type Option

type Option interface {
	// contains filtered or unexported methods
}

func WithContinueAfterTimeout

func WithContinueAfterTimeout(c bool) Option

func WithDataServiceApiOption

func WithDataServiceApiOption(dataServiceApi rdsdataserviceiface.RDSDataServiceAPI) Option

func WithDatabase

func WithDatabase(c string) Option

func WithDbEngine

func WithDbEngine(c DbEngine) Option

func WithResourceArn

func WithResourceArn(c string) Option

func WithSchema

func WithSchema(c string) Option

func WithSecretArn

func WithSecretArn(c string) Option

type Result

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

func (*Result) Close

func (r *Result) Close() error

func (*Result) Columns

func (r *Result) Columns() []string

func (*Result) LastInsertId

func (r *Result) LastInsertId() (int64, error)

func (*Result) Next

func (r *Result) Next(dest []driver.Value) error

func (*Result) RowsAffected

func (r *Result) RowsAffected() (int64, error)

type Stmt

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

func (*Stmt) Close

func (s *Stmt) Close() error

func (*Stmt) Exec

func (s *Stmt) Exec(_ []driver.Value) (driver.Result, error)

func (*Stmt) ExecContext

func (s *Stmt) ExecContext(ctx context.Context, args []driver.NamedValue) (driver.Result, error)

func (*Stmt) NumInput

func (s *Stmt) NumInput() int

NumInput returns the number of placeholder parameters.

If NumInput returns >= 0, the sql package will sanity check argument counts from callers and return errors to the caller before the statement's Exec or Query methods are called.

NumInput may also return -1, if the driver doesn't know its number of placeholders. In that case, the sql package will not sanity check Exec or Query argument counts.

func (*Stmt) Query

func (s *Stmt) Query(_ []driver.Value) (driver.Rows, error)

func (*Stmt) QueryContext

func (s *Stmt) QueryContext(_ context.Context, _ []driver.NamedValue) (driver.Rows, error)

type Tx

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

func (*Tx) Commit

func (t *Tx) Commit() error

func (*Tx) Rollback

func (t *Tx) Rollback() error

Jump to

Keyboard shortcuts

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