{"modulePath":"github.com/viant/structql","version":"v0.5.5","isLatest":true,"isStandardLibrary":false,"goos":"all","goarch":"all","docs":"# package sql\n\n## Functions\n\n```go\nfunc Register(aType *x.Type)\n```\n\n## Types\n\n```go\ntype Config struct {\n\tBaseURL string\n\turl.Values\n}\n```\nConfig represent Connection config\n\n```go\nfunc ParseDSN(dsn string) (*Config, error)\n```\nParseDSN parses the DSN string to a Config\n\n```go\ntype Connection struct {\n\t// contains filtered or unexported fields\n}\n```\nConnection represent connection\n\n```go\nfunc (c *Connection) Begin() (driver.Tx, error)\n```\nBegin starts and returns a new transaction.\n\n```go\nfunc (c *Connection) BeginTx(ctx context.Context, opts driver.TxOptions) (driver.Tx, error)\n```\nBeginTx starts and returns a new transaction.\n\n```go\nfunc (c *Connection) Close() error\n```\nClose closes Connection\n\n```go\nfunc (c *Connection) IsValid() bool\n```\nIsValid check is Connection is valid\n\n```go\nfunc (c *Connection) Ping(ctx context.Context) error\n```\nPing pings server\n\n```go\nfunc (c *Connection) Prepare(SQL string) (driver.Stmt, error)\n```\nPrepare returns a prepared statement, bound to this Connection.\n\n```go\nfunc (c *Connection) PrepareContext(ctx context.Context, SQL string) (driver.Stmt, error)\n```\nPrepareContext returns a prepared statement, bound to this Connection.\n\n```go\nfunc (c *Connection) ResetSession(ctx context.Context) error\n```\nResetSession resets session\n\n```go\ntype Driver struct{}\n```\nDriver is exported to make the driver directly accessible. In general the driver is used via the database/sql package.\n\n```go\nfunc (d Driver) Open(dsn string) (driver.Conn, error)\n```\nOpen new Connection. See [https://github.com/viant/structql#dsn-data-source-name](https://github.com/viant/structql#dsn-data-source-name) for how the DSN string is formatted\n\n```go\ntype Rows struct {\n\t// contains filtered or unexported fields\n}\n```\nRows represents rows driver\n\n```go\nfunc (r *Rows) Close() error\n```\nClose closes rows\n\n```go\nfunc (r *Rows) ColumnTypeDatabaseTypeName(index int) string\n```\nColumnTypeDatabaseTypeName returns column database type name\n\n```go\nfunc (r *Rows) ColumnTypeNullable(index int) (nullable, ok bool)\n```\nColumnTypeNullable returns if column is nullable\n\n```go\nfunc (r *Rows) ColumnTypeScanType(index int) reflect.Type\n```\nColumnTypeScanType returns column scan type\n\n```go\nfunc (r *Rows) Columns() []string\n```\nColumns returns query columns\n\n```go\nfunc (r *Rows) Next(dest []driver.Value) error\n```\nNext moves to next row\n\n```go\ntype Statement struct {\n\tBaseURL string\n\tSQL     string\n\tKind    sqlparser.Kind\n\t// contains filtered or unexported fields\n}\n```\nStatement abstraction implements database/sql driver.Statement interface\n\n```go\nfunc (s *Statement) CheckNamedValue(named *driver.NamedValue) error\n```\nCheckNamedValue checks supported globalTypes (all for now)\n\n```go\nfunc (s *Statement) Close() error\n```\nClose closes statement\n\n```go\nfunc (s *Statement) Exec(args []driver.Value) (driver.Result, error)\n```\nExec executes statements\n\n```go\nfunc (s *Statement) ExecContext(ctx context.Context, args []driver.NamedValue) (driver.Result, error)\n```\nExecContext executes statements\n\n```go\nfunc (s *Statement) NumInput() int\n```\nNumInput returns numinput\n\n```go\nfunc (s *Statement) Query(args []driver.Value) (driver.Rows, error)\n```\nQuery runs query\n\n```go\nfunc (s *Statement) QueryContext(ctx context.Context, args []driver.NamedValue) (driver.Rows, error)\n```\nQueryContext runs query\n\n","path":"github.com/viant/structql/sql","name":"sql","synopsis":"","isRedistributable":true}
