Documentation
¶
Index ¶
- Constants
- func GoquDialectOptions() *sqlgen.SQLDialectOptions
- func GoquExpressions() *base.Expressions
- type Config
- type DB
- func (db *DB) ListSchemas(ctx context.Context, opts ...sqlconnect.Option) ([]sqlconnect.SchemaRef, error)
- func (db *DB) ListTables(ctx context.Context, schema sqlconnect.SchemaRef, opts ...sqlconnect.Option) ([]sqlconnect.RelationRef, error)
- func (db *DB) Ping() error
- func (db *DB) PingContext(ctx context.Context) error
- func (db *DB) SchemaExists(ctx context.Context, schemaRef sqlconnect.SchemaRef, opts ...sqlconnect.Option) (bool, error)
Constants ¶
View Source
const (
DatabaseType = "trino"
)
Variables ¶
This section is empty.
Functions ¶
func GoquDialectOptions ¶ added in v1.10.0
func GoquDialectOptions() *sqlgen.SQLDialectOptions
func GoquExpressions ¶ added in v1.10.0
func GoquExpressions() *base.Expressions
Types ¶
type Config ¶
type Config struct {
Host string `json:"host"`
Port int `json:"port"`
Catalog string `json:"catalog"`
User string `json:"user"`
Password string `json:"password"`
TunnelInfo *sshtunnel.Config `json:"tunnel_info,omitempty"`
// contains filtered or unexported fields
}
func (Config) ConnectionString ¶
type DB ¶
func NewDB ¶
func NewDB(configJSON json.RawMessage) (*DB, error)
NewDB creates a new trino db client
func (*DB) ListSchemas ¶ added in v1.25.0
func (db *DB) ListSchemas(ctx context.Context, opts ...sqlconnect.Option) ([]sqlconnect.SchemaRef, error)
ListSchemas overrides the base implementation to handle nonexistent catalog gracefully
func (*DB) ListTables ¶ added in v1.25.0
func (db *DB) ListTables(ctx context.Context, schema sqlconnect.SchemaRef, opts ...sqlconnect.Option) ([]sqlconnect.RelationRef, error)
ListTables overrides the base implementation to handle nonexistent catalog gracefully
func (*DB) SchemaExists ¶ added in v1.25.0
func (db *DB) SchemaExists(ctx context.Context, schemaRef sqlconnect.SchemaRef, opts ...sqlconnect.Option) (bool, error)
SchemaExists overrides the base implementation to handle nonexistent catalog gracefully
Click to show internal directories.
Click to hide internal directories.