Namespace: go.std.database.sql.driver
v1.0Contents
Summary
Provides a low-level interface to the database/sql/driver package.
Package driver defines interfaces to be implemented by database
drivers as used by package sql.
Most code should use package sql.
The driver interface has evolved over time. Drivers should implement
Connector and DriverContext interfaces.
The Connector.Connect and Driver.Open methods should never return ErrBadConn.
ErrBadConn should only be returned from Validator, SessionResetter, or
a query method if the connection is already in an invalid (e.g. closed) state.
All Conn implementations should implement the following interfaces:
Pinger, SessionResetter, and Validator.
If named parameters or context are supported, the driver's Conn should implement:
ExecerContext, QueryerContext, ConnPrepareContext, and ConnBeginTx.
To support custom data types, implement NamedValueChecker. NamedValueChecker
also allows queries to accept per-query options as a parameter by returning
ErrRemoveArgument from CheckNamedValue.
If multiple result sets are supported, Rows should implement RowsNextResultSet.
If the driver knows how to describe the types present in the returned result
it should implement the following interfaces: RowsColumnTypeScanType,
RowsColumnTypeDatabaseTypeName, RowsColumnTypeLength, RowsColumnTypeNullable,
and RowsColumnTypePrecisionScale. A given row value may also return a Rows
type, which may represent a database cursor value.
Before a connection is returned to the connection pool after use, IsValid is
called if implemented. Before a connection is reused for another query,
ResetSession is called if implemented. If a connection is never returned to the
connection pool but immediately reused, then ResetSession is called prior to
reuse but IsValid is not called.
Index
- *IsolationLevel
- *NamedValue
- *NotNull
- *Null
- *RowsAffected
- *TxOptions
- Bool
- ColumnConverter
- Conn
- ConnBeginTx
- ConnPrepareContext
- Connector
- DefaultParameterConverter
- Driver
- DriverContext
- ErrBadConn
- ErrRemoveArgument
- ErrSkip
- Execer
- ExecerContext
- Int32
- IsScanValue
- IsValue
- IsolationLevel
- NamedValue
- NamedValueChecker
- NotNull
- Null
- Pinger
- Queryer
- QueryerContext
- Result
- ResultNoRows
- Rows
- RowsAffected
- RowsColumnTypeDatabaseTypeName
- RowsColumnTypeLength
- RowsColumnTypeNullable
- RowsColumnTypePrecisionScale
- RowsColumnTypeScanType
- RowsNextResultSet
- SessionResetter
- Stmt
- StmtExecContext
- StmtQueryContext
- String
- Tx
- TxOptions
- Validator
- Value
- ValueConverter
- Valuer
- arrayOfColumnConverter
- arrayOfConn
- arrayOfConnBeginTx
- arrayOfConnPrepareContext
- arrayOfConnector
- arrayOfDriver
- arrayOfDriverContext
- arrayOfExecer
- arrayOfExecerContext
- arrayOfIsolationLevel
- arrayOfNamedValue
- arrayOfNamedValueChecker
- arrayOfNotNull
- arrayOfNull
- arrayOfPinger
- arrayOfQueryer
- arrayOfQueryerContext
- arrayOfResult
- arrayOfRows
- arrayOfRowsAffected
- arrayOfRowsColumnTypeDatabaseTypeName
- arrayOfRowsColumnTypeLength
- arrayOfRowsColumnTypeNullable
- arrayOfRowsColumnTypePrecisionScale
- arrayOfRowsColumnTypeScanType
- arrayOfRowsNextResultSet
- arrayOfSessionResetter
- arrayOfStmt
- arrayOfStmtExecContext
- arrayOfStmtQueryContext
- arrayOfTx
- arrayOfTxOptions
- arrayOfValidator
- arrayOfValue
- arrayOfValueConverter
- arrayOfValuer
Legend
- 
      Constant
      Variable
      Function
      Macro
      Special form
      Type
      GoVar
      Receiver/Method
    
Constants
Constants are variables with :const true in their metadata. Joker currently does not recognize them as special; as such, it allows redefining them or their values.- 
      (None.)
    
Variables
- 
  BoolVar v1.0Bool is a ValueConverter that converts input values to bools. 
 
 The conversion rules are:
 - booleans are returned unchanged
 - for integer types,
 1 is true
 0 is false,
 other integers are an error
 - for strings and []byte, same rules as strconv.ParseBool
 - all other types are an error
 
- 
  DefaultParameterConverterVar v1.0DefaultParameterConverter is the default implementation of 
 ValueConverter that's used when a Stmt doesn't implement
 ColumnConverter.
 
 DefaultParameterConverter returns its argument directly if
 IsValue(arg). Otherwise, if the argument implements Valuer, its
 Value method is used to return a Value. As a fallback, the provided
 argument's underlying type is used to convert it to a Value:
 underlying integer types are converted to int64, floats to float64,
 bool, string, and []byte to themselves. If the argument is a nil
 pointer, ConvertValue returns a nil Value. If the argument is a
 non-nil pointer, it is dereferenced and ConvertValue is called
 recursively. Other types are an error.
 
- 
  ErrBadConnVar v1.0ErrBadConn should be returned by a driver to signal to the sql 
 package that a driver.Conn is in a bad state (such as the server
 having earlier closed the connection) and the sql package should
 retry on a new connection.
 
 To prevent duplicate operations, ErrBadConn should NOT be returned
 if there's a possibility that the database server might have
 performed the operation. Even if the server sends back an error,
 you shouldn't return ErrBadConn.
 
 Errors will be checked using errors.Is. An error may
 wrap ErrBadConn or implement the Is(error) bool method.
 
- 
  ErrRemoveArgumentVar v1.0ErrRemoveArgument may be returned from NamedValueChecker to instruct the 
 sql package to not pass the argument to the driver query interface.
 Return when accepting query specific options or structures that aren't
 SQL query arguments.
 
- 
  ErrSkipVar v1.0ErrSkip may be returned by some optional interfaces' methods to 
 indicate at runtime that the fast path is unavailable and the sql
 package should continue as if the optional interface was not
 implemented. ErrSkip is only supported where explicitly
 documented.
 
- 
  Int32Var v1.0Int32 is a ValueConverter that converts input values to int64, 
 respecting the limits of an int32 value.
 
- 
  ResultNoRowsVar v1.0ResultNoRows is a pre-defined Result for drivers to return when a DDL 
 command (such as a CREATE TABLE) succeeds. It returns an error for both
 LastInsertId and RowsAffected.
 
- 
  StringVar v1.0String is a ValueConverter that converts its input to a string. 
 If the value is already a string or []byte, it's unchanged.
 If the value is of another type, conversion to string is done
 with fmt.Sprintf("%v", v).
 
Functions, Macros, and Special Forms
- 
  IsScanValueFunction v1.0(IsScanValue v)IsScanValue is equivalent to IsValue. 
 It exists for compatibility.
 
 Go input arguments: (v any)
 
 Go returns: bool
 
 Joker input arguments: [^GoObject v]
 
 Joker returns: ^Boolean
- 
  IsValueFunction v1.0(IsValue v)IsValue reports whether v is a valid Value parameter type. 
 
 Go input arguments: (v any)
 
 Go returns: bool
 
 Joker input arguments: [^GoObject v]
 
 Joker returns: ^Boolean
Types
- 
  *IsolationLevelConcrete Type v1.0IsolationLevel is the transaction isolation level stored in TxOptions. 
 
 This type should be considered identical to sql.IsolationLevel along
 with any values defined on it.
 
- 
  *NamedValueConcrete Type v1.0NamedValue holds both the value name and value. 
 
- 
  *NotNullConcrete Type v1.0NotNull is a type that implements ValueConverter by disallowing nil 
 values but otherwise delegating to another ValueConverter.
 
- 
  *NullConcrete Type v1.0Null is a type that implements ValueConverter by allowing nil 
 values but otherwise delegating to another ValueConverter.
 
- 
  *RowsAffectedConcrete Type v1.0RowsAffected implements Result for an INSERT or UPDATE operation 
 which mutates a number of rows.
 
- 
  *TxOptionsConcrete Type v1.0TxOptions holds the transaction options. 
 
 This type should be considered identical to sql.TxOptions.
 
- 
  ColumnConverterAbstract Type v1.0ColumnConverter may be optionally implemented by Stmt if the 
 statement is aware of its own columns' types and can convert from
 any type to a driver Value.
 
 Deprecated: Drivers should implement NamedValueChecker.
 
- 
    ColumnConverterMethod for ColumnConverter v1.0([idx])
- 
  ConnAbstract Type v1.0Conn is a connection to a database. It is not used concurrently 
 by multiple goroutines.
 
 Conn is assumed to be stateful.
 
- 
    BeginMethod for Conn v1.0([])
- 
    CloseMethod for Conn v1.0([])
- 
    PrepareMethod for Conn v1.0([query])
- 
  ConnBeginTxAbstract Type v1.0ConnBeginTx enhances the Conn interface with context and TxOptions. 
 
- 
    BeginTxMethod for ConnBeginTx v1.0([ctx opts])
- 
  ConnPrepareContextAbstract Type v1.0ConnPrepareContext enhances the Conn interface with context. 
 
- 
    PrepareContextMethod for ConnPrepareContext v1.0([ctx query])
- 
  ConnectorAbstract Type v1.0A Connector represents a driver in a fixed configuration 
 and can create any number of equivalent Conns for use
 by multiple goroutines.
 
 A Connector can be passed to sql.OpenDB, to allow drivers
 to implement their own sql.DB constructors, or returned by
 DriverContext's OpenConnector method, to allow drivers
 access to context and to avoid repeated parsing of driver
 configuration.
 
 If a Connector implements io.Closer, the sql package's DB.Close
 method will call Close and return error (if any).
 
- 
    ConnectMethod for Connector v1.0([arg1])
- 
    DriverMethod for Connector v1.0([])
- 
  DriverAbstract Type v1.0Driver is the interface that must be implemented by a database 
 driver.
 
 Database drivers may implement DriverContext for access
 to contexts and to parse the name only once for a pool of connections,
 instead of once per connection.
 
- 
    OpenMethod for Driver v1.0([name])
- 
  DriverContextAbstract Type v1.0If a Driver implements DriverContext, then sql.DB will call 
 OpenConnector to obtain a Connector and then invoke
 that Connector's Connect method to obtain each needed connection,
 instead of invoking the Driver's Open method for each connection.
 The two-step sequence allows drivers to parse the name just once
 and also provides access to per-Conn contexts.
 
- 
    OpenConnectorMethod for DriverContext v1.0([name])
- 
  ExecerAbstract Type v1.0Execer is an optional interface that may be implemented by a Conn. 
 
 If a Conn implements neither ExecerContext nor Execer,
 the sql package's DB.Exec will first prepare a query, execute the statement,
 and then close the statement.
 
 Exec may return ErrSkip.
 
 Deprecated: Drivers should implement ExecerContext instead.
 
- 
    ExecMethod for Execer v1.0([query args])
- 
  ExecerContextAbstract Type v1.0ExecerContext is an optional interface that may be implemented by a Conn. 
 
 If a Conn does not implement ExecerContext, the sql package's DB.Exec
 will fall back to Execer; if the Conn does not implement Execer either,
 DB.Exec will first prepare a query, execute the statement, and then
 close the statement.
 
 ExecContext may return ErrSkip.
 
 ExecContext must honor the context timeout and return when the context is canceled.
 
- 
    ExecContextMethod for ExecerContext v1.0([ctx query args])
- 
  IsolationLevelConcrete Type v1.0IsolationLevel is the transaction isolation level stored in TxOptions. 
 
 This type should be considered identical to sql.IsolationLevel along
 with any values defined on it.
 
- 
  NamedValueConcrete Type v1.0NamedValue holds both the value name and value. 
 
- 
  NamedValueCheckerAbstract Type v1.0NamedValueChecker may be optionally implemented by Conn or Stmt. It provides 
 the driver more control to handle Go and database types beyond the default
 Values types allowed.
 
 The sql package checks for value checkers in the following order,
 stopping at the first found match: Stmt.NamedValueChecker, Conn.NamedValueChecker,
 Stmt.ColumnConverter, DefaultParameterConverter.
 
 If CheckNamedValue returns ErrRemoveArgument, the NamedValue will not be included in
 the final query arguments. This may be used to pass special options to
 the query itself.
 
 If ErrSkip is returned the column converter error checking
 path is used for the argument. Drivers may wish to return ErrSkip after
 they have exhausted their own special cases.
 
- 
    CheckNamedValueMethod for NamedValueChecker v1.0([arg1])
- 
  NotNullConcrete Type v1.0NotNull is a type that implements ValueConverter by disallowing nil 
 values but otherwise delegating to another ValueConverter.
 
- 
    ConvertValueReceiver for NotNull v1.0([v])
- 
  NullConcrete Type v1.0Null is a type that implements ValueConverter by allowing nil 
 values but otherwise delegating to another ValueConverter.
 
- 
    ConvertValueReceiver for Null v1.0([v])
- 
  PingerAbstract Type v1.0Pinger is an optional interface that may be implemented by a Conn. 
 
 If a Conn does not implement Pinger, the sql package's DB.Ping and
 DB.PingContext will check if there is at least one Conn available.
 
 If Conn.Ping returns ErrBadConn, DB.Ping and DB.PingContext will remove
 the Conn from pool.
 
- 
    PingMethod for Pinger v1.0([ctx])
- 
  QueryerAbstract Type v1.0Queryer is an optional interface that may be implemented by a Conn. 
 
 If a Conn implements neither QueryerContext nor Queryer,
 the sql package's DB.Query will first prepare a query, execute the statement,
 and then close the statement.
 
 Query may return ErrSkip.
 
 Deprecated: Drivers should implement QueryerContext instead.
 
- 
    QueryMethod for Queryer v1.0([query args])
- 
  QueryerContextAbstract Type v1.0QueryerContext is an optional interface that may be implemented by a Conn. 
 
 If a Conn does not implement QueryerContext, the sql package's DB.Query
 will fall back to Queryer; if the Conn does not implement Queryer either,
 DB.Query will first prepare a query, execute the statement, and then
 close the statement.
 
 QueryContext may return ErrSkip.
 
 QueryContext must honor the context timeout and return when the context is canceled.
 
- 
    QueryContextMethod for QueryerContext v1.0([ctx query args])
- 
  ResultAbstract Type v1.0Result is the result of a query execution. 
 
- 
    LastInsertIdMethod for Result v1.0([])
- 
    RowsAffectedMethod for Result v1.0([])
- 
  RowsAbstract Type v1.0Rows is an iterator over an executed query's results. 
 
- 
    CloseMethod for Rows v1.0([])
- 
    ColumnsMethod for Rows v1.0([])
- 
    NextMethod for Rows v1.0([dest])
- 
  RowsAffectedConcrete Type v1.0RowsAffected implements Result for an INSERT or UPDATE operation 
 which mutates a number of rows.
 
- 
    LastInsertIdReceiver for RowsAffected v1.0([])
- 
    RowsAffectedReceiver for RowsAffected v1.0([])
- 
  RowsColumnTypeDatabaseTypeNameAbstract Type v1.0RowsColumnTypeDatabaseTypeName may be implemented by Rows. It should return the 
 database system type name without the length. Type names should be uppercase.
 Examples of returned types: "VARCHAR", "NVARCHAR", "VARCHAR2", "CHAR", "TEXT",
 "DECIMAL", "SMALLINT", "INT", "BIGINT", "BOOL", "[]BIGINT", "JSONB", "XML",
 "TIMESTAMP".
 
- 
    CloseMethod for RowsColumnTypeDatabaseTypeName v1.0([])
- 
    ColumnTypeDatabaseTypeNameMethod for RowsColumnTypeDatabaseTypeName v1.0([index])
- 
    ColumnsMethod for RowsColumnTypeDatabaseTypeName v1.0([])
- 
    NextMethod for RowsColumnTypeDatabaseTypeName v1.0([dest])
- 
  RowsColumnTypeLengthAbstract Type v1.0RowsColumnTypeLength may be implemented by Rows. It should return the length 
 of the column type if the column is a variable length type. If the column is
 not a variable length type ok should return false.
 If length is not limited other than system limits, it should return math.MaxInt64.
 The following are examples of returned values for various types:
 
 TEXT (math.MaxInt64, true)
 varchar(10) (10, true)
 nvarchar(10) (10, true)
 decimal (0, false)
 int (0, false)
 bytea(30) (30, true)
 
- 
    CloseMethod for RowsColumnTypeLength v1.0([])
- 
    ColumnTypeLengthMethod for RowsColumnTypeLength v1.0([index])
- 
    ColumnsMethod for RowsColumnTypeLength v1.0([])
- 
    NextMethod for RowsColumnTypeLength v1.0([dest])
- 
  RowsColumnTypeNullableAbstract Type v1.0RowsColumnTypeNullable may be implemented by Rows. The nullable value should 
 be true if it is known the column may be null, or false if the column is known
 to be not nullable.
 If the column nullability is unknown, ok should be false.
 
- 
    CloseMethod for RowsColumnTypeNullable v1.0([])
- 
    ColumnTypeNullableMethod for RowsColumnTypeNullable v1.0([index])
- 
    ColumnsMethod for RowsColumnTypeNullable v1.0([])
- 
    NextMethod for RowsColumnTypeNullable v1.0([dest])
- 
  RowsColumnTypePrecisionScaleAbstract Type v1.0RowsColumnTypePrecisionScale may be implemented by Rows. It should return 
 the precision and scale for decimal types. If not applicable, ok should be false.
 The following are examples of returned values for various types:
 
 decimal(38, 4) (38, 4, true)
 int (0, 0, false)
 decimal (math.MaxInt64, math.MaxInt64, true)
 
- 
    CloseMethod for RowsColumnTypePrecisionScale v1.0([])
- 
    ColumnTypePrecisionScaleMethod for RowsColumnTypePrecisionScale v1.0([index])
- 
    ColumnsMethod for RowsColumnTypePrecisionScale v1.0([])
- 
    NextMethod for RowsColumnTypePrecisionScale v1.0([dest])
- 
  RowsColumnTypeScanTypeAbstract Type v1.0RowsColumnTypeScanType may be implemented by Rows. It should return 
 the value type that can be used to scan types into. For example, the database
 column type "bigint" this should return "reflect.TypeOf(int64(0))".
 
- 
    CloseMethod for RowsColumnTypeScanType v1.0([])
- 
    ColumnTypeScanTypeMethod for RowsColumnTypeScanType v1.0([index])
- 
    ColumnsMethod for RowsColumnTypeScanType v1.0([])
- 
    NextMethod for RowsColumnTypeScanType v1.0([dest])
- 
  RowsNextResultSetAbstract Type v1.0RowsNextResultSet extends the Rows interface by providing a way to signal 
 the driver to advance to the next result set.
 
- 
    CloseMethod for RowsNextResultSet v1.0([])
- 
    ColumnsMethod for RowsNextResultSet v1.0([])
- 
    HasNextResultSetMethod for RowsNextResultSet v1.0([])
- 
    NextMethod for RowsNextResultSet v1.0([dest])
- 
    NextResultSetMethod for RowsNextResultSet v1.0([])
- 
  SessionResetterAbstract Type v1.0SessionResetter may be implemented by Conn to allow drivers to reset the 
 session state associated with the connection and to signal a bad connection.
 
- 
    ResetSessionMethod for SessionResetter v1.0([ctx])
- 
  StmtAbstract Type v1.0Stmt is a prepared statement. It is bound to a Conn and not 
 used by multiple goroutines concurrently.
 
- 
    CloseMethod for Stmt v1.0([])
- 
    ExecMethod for Stmt v1.0([args])
- 
    NumInputMethod for Stmt v1.0([])
- 
    QueryMethod for Stmt v1.0([args])
- 
  StmtExecContextAbstract Type v1.0StmtExecContext enhances the Stmt interface by providing Exec with context. 
 
- 
    ExecContextMethod for StmtExecContext v1.0([ctx args])
- 
  StmtQueryContextAbstract Type v1.0StmtQueryContext enhances the Stmt interface by providing Query with context. 
 
- 
    QueryContextMethod for StmtQueryContext v1.0([ctx args])
- 
  TxAbstract Type v1.0Tx is a transaction. 
 
- 
    CommitMethod for Tx v1.0([])
- 
    RollbackMethod for Tx v1.0([])
- 
  TxOptionsConcrete Type v1.0TxOptions holds the transaction options. 
 
 This type should be considered identical to sql.TxOptions.
 
- 
  ValidatorAbstract Type v1.0Validator may be implemented by Conn to allow drivers to 
 signal if a connection is valid or if it should be discarded.
 
 If implemented, drivers may return the underlying error from queries,
 even if the connection should be discarded by the connection pool.
 
- 
    IsValidMethod for Validator v1.0([])
- 
  ValueAbstract Type v1.0Value is a value that drivers must be able to handle. 
 It is either nil, a type handled by a database driver's NamedValueChecker
 interface, or an instance of one of these types:
 
 int64
 float64
 bool
 []byte
 string
 time.Time
 
 If the driver supports cursors, a returned Value may also implement the Rows interface
 in this package. This is used, for example, when a user selects a cursor
 such as "select cursor(select * from my_table) from dual". If the Rows
 from the select is closed, the cursor Rows will also be closed.
 
- 
  ValueConverterAbstract Type v1.0ValueConverter is the interface providing the ConvertValue method. 
 
 Various implementations of ValueConverter are provided by the
 driver package to provide consistent implementations of conversions
 between drivers. The ValueConverters have several uses:
 
 - converting from the Value types as provided by the sql package
 into a database table's specific column type and making sure it
 fits, such as making sure a particular int64 fits in a
 table's uint16 column.
 
 - converting a value as given from the database into one of the
 driver Value types.
 
 - by the sql package, for converting from a driver's Value type
 to a user's type in a scan.
 
- 
    ConvertValueMethod for ValueConverter v1.0([v])
- 
  ValuerAbstract Type v1.0Valuer is the interface providing the Value method. 
 
 Types implementing Valuer interface are able to convert
 themselves to a driver Value.
 
- 
    ValueMethod for Valuer v1.0([])
- 
  arrayOfColumnConverterConcrete Type v1.0ColumnConverter may be optionally implemented by Stmt if the 
 statement is aware of its own columns' types and can convert from
 any type to a driver Value.
 
 Deprecated: Drivers should implement NamedValueChecker.
 
- 
  arrayOfConnConcrete Type v1.0Conn is a connection to a database. It is not used concurrently 
 by multiple goroutines.
 
 Conn is assumed to be stateful.
 
- 
  arrayOfConnBeginTxConcrete Type v1.0ConnBeginTx enhances the Conn interface with context and TxOptions. 
 
- 
  arrayOfConnPrepareContextConcrete Type v1.0ConnPrepareContext enhances the Conn interface with context. 
 
- 
  arrayOfConnectorConcrete Type v1.0A Connector represents a driver in a fixed configuration 
 and can create any number of equivalent Conns for use
 by multiple goroutines.
 
 A Connector can be passed to sql.OpenDB, to allow drivers
 to implement their own sql.DB constructors, or returned by
 DriverContext's OpenConnector method, to allow drivers
 access to context and to avoid repeated parsing of driver
 configuration.
 
 If a Connector implements io.Closer, the sql package's DB.Close
 method will call Close and return error (if any).
 
- 
  arrayOfDriverConcrete Type v1.0Driver is the interface that must be implemented by a database 
 driver.
 
 Database drivers may implement DriverContext for access
 to contexts and to parse the name only once for a pool of connections,
 instead of once per connection.
 
- 
  arrayOfDriverContextConcrete Type v1.0If a Driver implements DriverContext, then sql.DB will call 
 OpenConnector to obtain a Connector and then invoke
 that Connector's Connect method to obtain each needed connection,
 instead of invoking the Driver's Open method for each connection.
 The two-step sequence allows drivers to parse the name just once
 and also provides access to per-Conn contexts.
 
- 
  arrayOfExecerConcrete Type v1.0Execer is an optional interface that may be implemented by a Conn. 
 
 If a Conn implements neither ExecerContext nor Execer,
 the sql package's DB.Exec will first prepare a query, execute the statement,
 and then close the statement.
 
 Exec may return ErrSkip.
 
 Deprecated: Drivers should implement ExecerContext instead.
 
- 
  arrayOfExecerContextConcrete Type v1.0ExecerContext is an optional interface that may be implemented by a Conn. 
 
 If a Conn does not implement ExecerContext, the sql package's DB.Exec
 will fall back to Execer; if the Conn does not implement Execer either,
 DB.Exec will first prepare a query, execute the statement, and then
 close the statement.
 
 ExecContext may return ErrSkip.
 
 ExecContext must honor the context timeout and return when the context is canceled.
 
- 
  arrayOfIsolationLevelConcrete Type v1.0IsolationLevel is the transaction isolation level stored in TxOptions. 
 
 This type should be considered identical to sql.IsolationLevel along
 with any values defined on it.
 
- 
  arrayOfNamedValueConcrete Type v1.0NamedValue holds both the value name and value. 
 
- 
  arrayOfNamedValueCheckerConcrete Type v1.0NamedValueChecker may be optionally implemented by Conn or Stmt. It provides 
 the driver more control to handle Go and database types beyond the default
 Values types allowed.
 
 The sql package checks for value checkers in the following order,
 stopping at the first found match: Stmt.NamedValueChecker, Conn.NamedValueChecker,
 Stmt.ColumnConverter, DefaultParameterConverter.
 
 If CheckNamedValue returns ErrRemoveArgument, the NamedValue will not be included in
 the final query arguments. This may be used to pass special options to
 the query itself.
 
 If ErrSkip is returned the column converter error checking
 path is used for the argument. Drivers may wish to return ErrSkip after
 they have exhausted their own special cases.
 
- 
  arrayOfNotNullConcrete Type v1.0NotNull is a type that implements ValueConverter by disallowing nil 
 values but otherwise delegating to another ValueConverter.
 
- 
  arrayOfNullConcrete Type v1.0Null is a type that implements ValueConverter by allowing nil 
 values but otherwise delegating to another ValueConverter.
 
- 
  arrayOfPingerConcrete Type v1.0Pinger is an optional interface that may be implemented by a Conn. 
 
 If a Conn does not implement Pinger, the sql package's DB.Ping and
 DB.PingContext will check if there is at least one Conn available.
 
 If Conn.Ping returns ErrBadConn, DB.Ping and DB.PingContext will remove
 the Conn from pool.
 
- 
  arrayOfQueryerConcrete Type v1.0Queryer is an optional interface that may be implemented by a Conn. 
 
 If a Conn implements neither QueryerContext nor Queryer,
 the sql package's DB.Query will first prepare a query, execute the statement,
 and then close the statement.
 
 Query may return ErrSkip.
 
 Deprecated: Drivers should implement QueryerContext instead.
 
- 
  arrayOfQueryerContextConcrete Type v1.0QueryerContext is an optional interface that may be implemented by a Conn. 
 
 If a Conn does not implement QueryerContext, the sql package's DB.Query
 will fall back to Queryer; if the Conn does not implement Queryer either,
 DB.Query will first prepare a query, execute the statement, and then
 close the statement.
 
 QueryContext may return ErrSkip.
 
 QueryContext must honor the context timeout and return when the context is canceled.
 
- 
  arrayOfResultConcrete Type v1.0Result is the result of a query execution. 
 
- 
  arrayOfRowsConcrete Type v1.0Rows is an iterator over an executed query's results. 
 
- 
  arrayOfRowsAffectedConcrete Type v1.0RowsAffected implements Result for an INSERT or UPDATE operation 
 which mutates a number of rows.
 
- 
  arrayOfRowsColumnTypeDatabaseTypeNameConcrete Type v1.0RowsColumnTypeDatabaseTypeName may be implemented by Rows. It should return the 
 database system type name without the length. Type names should be uppercase.
 Examples of returned types: "VARCHAR", "NVARCHAR", "VARCHAR2", "CHAR", "TEXT",
 "DECIMAL", "SMALLINT", "INT", "BIGINT", "BOOL", "[]BIGINT", "JSONB", "XML",
 "TIMESTAMP".
 
- 
  arrayOfRowsColumnTypeLengthConcrete Type v1.0RowsColumnTypeLength may be implemented by Rows. It should return the length 
 of the column type if the column is a variable length type. If the column is
 not a variable length type ok should return false.
 If length is not limited other than system limits, it should return math.MaxInt64.
 The following are examples of returned values for various types:
 
 TEXT (math.MaxInt64, true)
 varchar(10) (10, true)
 nvarchar(10) (10, true)
 decimal (0, false)
 int (0, false)
 bytea(30) (30, true)
 
- 
  arrayOfRowsColumnTypeNullableConcrete Type v1.0RowsColumnTypeNullable may be implemented by Rows. The nullable value should 
 be true if it is known the column may be null, or false if the column is known
 to be not nullable.
 If the column nullability is unknown, ok should be false.
 
- 
  arrayOfRowsColumnTypePrecisionScaleConcrete Type v1.0RowsColumnTypePrecisionScale may be implemented by Rows. It should return 
 the precision and scale for decimal types. If not applicable, ok should be false.
 The following are examples of returned values for various types:
 
 decimal(38, 4) (38, 4, true)
 int (0, 0, false)
 decimal (math.MaxInt64, math.MaxInt64, true)
 
- 
  arrayOfRowsColumnTypeScanTypeConcrete Type v1.0RowsColumnTypeScanType may be implemented by Rows. It should return 
 the value type that can be used to scan types into. For example, the database
 column type "bigint" this should return "reflect.TypeOf(int64(0))".
 
- 
  arrayOfRowsNextResultSetConcrete Type v1.0RowsNextResultSet extends the Rows interface by providing a way to signal 
 the driver to advance to the next result set.
 
- 
  arrayOfSessionResetterConcrete Type v1.0SessionResetter may be implemented by Conn to allow drivers to reset the 
 session state associated with the connection and to signal a bad connection.
 
- 
  arrayOfStmtConcrete Type v1.0Stmt is a prepared statement. It is bound to a Conn and not 
 used by multiple goroutines concurrently.
 
- 
  arrayOfStmtExecContextConcrete Type v1.0StmtExecContext enhances the Stmt interface by providing Exec with context. 
 
- 
  arrayOfStmtQueryContextConcrete Type v1.0StmtQueryContext enhances the Stmt interface by providing Query with context. 
 
- 
  arrayOfTxConcrete Type v1.0Tx is a transaction. 
 
- 
  arrayOfTxOptionsConcrete Type v1.0TxOptions holds the transaction options. 
 
 This type should be considered identical to sql.TxOptions.
 
- 
  arrayOfValidatorConcrete Type v1.0Validator may be implemented by Conn to allow drivers to 
 signal if a connection is valid or if it should be discarded.
 
 If implemented, drivers may return the underlying error from queries,
 even if the connection should be discarded by the connection pool.
 
- 
  arrayOfValueConcrete Type v1.0Value is a value that drivers must be able to handle. 
 It is either nil, a type handled by a database driver's NamedValueChecker
 interface, or an instance of one of these types:
 
 int64
 float64
 bool
 []byte
 string
 time.Time
 
 If the driver supports cursors, a returned Value may also implement the Rows interface
 in this package. This is used, for example, when a user selects a cursor
 such as "select cursor(select * from my_table) from dual". If the Rows
 from the select is closed, the cursor Rows will also be closed.
 
- 
  arrayOfValueConverterConcrete Type v1.0ValueConverter is the interface providing the ConvertValue method. 
 
 Various implementations of ValueConverter are provided by the
 driver package to provide consistent implementations of conversions
 between drivers. The ValueConverters have several uses:
 
 - converting from the Value types as provided by the sql package
 into a database table's specific column type and making sure it
 fits, such as making sure a particular int64 fits in a
 table's uint16 column.
 
 - converting a value as given from the database into one of the
 driver Value types.
 
 - by the sql package, for converting from a driver's Value type
 to a user's type in a scan.
 
- 
  arrayOfValuerConcrete Type v1.0Valuer is the interface providing the Value method. 
 
 Types implementing Valuer interface are able to convert
 themselves to a driver Value.