adapter

package
v0.0.0-...-0571e71 Latest Latest
Warning

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

Go to latest
Published: Apr 18, 2021 License: MIT Imports: 2 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Adapter

type Adapter interface {
	Connect(dsn string) error
	Disconnect() error
	Exec(query string, args ...interface{}) (sql.Result, error)
	Query(query string, args ...interface{}) (*sql.Rows, error)
	Placeholder() PlaceholderStyle
	SpatialType() SpatialExtension
	DatabaseType() DbType
}

type AdapterInfo

type AdapterInfo interface {
	Placeholder() PlaceholderStyle
	SpatialType() SpatialExtension
	DatabaseType() DbType
}

type DbType

type DbType string
const PostgreSQL DbType = "POSTGRESQL_DBTYPE"

type PlaceholderStyle

type PlaceholderStyle string
const DollarPlaceholder PlaceholderStyle = "DOLLAR_PLACEHOLDER"
const QuestionPlaceholder PlaceholderStyle = "QUESTION_PLACEHOLDER"

type PostgresAdapter

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

func (*PostgresAdapter) Connect

func (p *PostgresAdapter) Connect(dsn string) error

func (PostgresAdapter) DatabaseType

func (p PostgresAdapter) DatabaseType() DbType

func (*PostgresAdapter) Disconnect

func (p *PostgresAdapter) Disconnect() error

func (*PostgresAdapter) Exec

func (p *PostgresAdapter) Exec(query string, args ...interface{}) (result sql.Result, err error)

func (PostgresAdapter) Placeholder

func (p PostgresAdapter) Placeholder() PlaceholderStyle

func (*PostgresAdapter) Query

func (p *PostgresAdapter) Query(query string, args ...interface{}) (rows *sql.Rows, err error)

func (PostgresAdapter) SpatialType

func (p PostgresAdapter) SpatialType() SpatialExtension

type SpatialExtension

type SpatialExtension string
const PostGisExtension SpatialExtension = "POSTGIS_EXTENSION"

Jump to

Keyboard shortcuts

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