Documentation ¶
Index ¶
Constants ¶
const ( TCPProtocol = "tcp" // TCPProtocol is the protocol for TCP connections. SocketProtocol = "unix" // SocketProtocol is the protocol for unix socket connections. )
Variables ¶
var ErrTypeNotFound = errors.New("type not found") // ErrTypeNotFound is returned when a type is not found.
Functions ¶
Types ¶
type ArrayType ¶
type ArrayType struct { data.BaseValueType // contains filtered or unexported fields }
ArrayType is a type for array.
func (*ArrayType) GetTypeKind ¶
GetTypeKind returns the kind of the type.
func (*ArrayType) GetTypeName ¶
GetTypeName returns the name of the type.
func (*ArrayType) GetTypeSize ¶
func (*ArrayType) GetValueSize ¶
GetValueSize returns the size of the value in bytes.
type BitType ¶
type BitType struct { data.BaseValueType // contains filtered or unexported fields }
func (*BitType) GetTypeKind ¶
func (*BitType) GetTypeName ¶
func (*BitType) GetTypeSize ¶
func (*BitType) GetValueSize ¶
type BoolType ¶
type BoolType struct { data.BaseValueType // contains filtered or unexported fields }
func (*BoolType) GetTypeKind ¶
func (*BoolType) GetTypeName ¶
func (*BoolType) GetTypeSize ¶
func (*BoolType) GetValueSize ¶
type BytesType ¶
type BytesType struct { data.BaseValueType // contains filtered or unexported fields }
func (*BytesType) GetTypeKind ¶
func (*BytesType) GetTypeName ¶
func (*BytesType) GetValueSize ¶
type Cockroach ¶
type Cockroach struct{}
Cockroach is a driver for CockroachDB.
func (*Cockroach) GetDriverName ¶
GetDriverName returns the name of the driver.
func (*Cockroach) IsReadable ¶
func (*Cockroach) IsWritable ¶
type Config ¶
type Config struct { Host string Port int Username string Password string Database string Options url.Values Protocol string }
Config is the configuration for a cockroach database.
type Connection ¶
type Connection struct { driver.DefaultFilterBuilder driver.DefaultSortBuilder // contains filtered or unexported fields }
Connection is a connection to a CockroachDB database.
func (*Connection) Close ¶
func (c *Connection) Close() error
Close closes the connection to the database.
func (*Connection) GetDetails ¶
func (c *Connection) GetDetails(ctx context.Context) (driver.DatabaseDetail, error)
GetDetails returns the details of the database.
func (*Connection) IsClosed ¶
func (c *Connection) IsClosed() bool
IsClosed returns the status of the connection.
func (*Connection) Ping ¶
func (c *Connection) Ping() error
type DateType ¶
type DateType struct { data.BaseValueType // contains filtered or unexported fields }
func (*DateType) GetTypeKind ¶
func (*DateType) GetTypeName ¶
func (*DateType) GetValueSize ¶
type IntType ¶
type IntType struct { data.BaseValueType // contains filtered or unexported fields }
IntType is a type for INT.
func (*IntType) GetTypeKind ¶
GetTypeKind returns the kind of the type.
func (*IntType) GetTypeName ¶
GetTypeName returns the name of the type.
func (*IntType) GetTypeSize ¶
GetTypeSize returns the size of the type in bytes.
func (*IntType) GetValueSize ¶
GetValueSize returns the size of the value in bytes.
type JSONBType ¶
type JSONBType struct { data.BaseValueType // contains filtered or unexported fields }
JSONBType is a type for jsonb.
func (*JSONBType) GetTypeKind ¶
GetTypeKind returns the kind of the type.
func (*JSONBType) GetTypeName ¶
GetTypeName returns the name of the type.
func (*JSONBType) GetValueSize ¶
GetValueSize returns the size of the value in bytes.
type StringType ¶
type StringType struct { data.BaseValueType // contains filtered or unexported fields }
StringType is a type for string.
func (*StringType) GetTypeKind ¶
func (t *StringType) GetTypeKind() data.Kind
GetTypeKind returns the kind of the type.
func (*StringType) GetTypeName ¶
func (t *StringType) GetTypeName() string
GetTypeName returns the name of the type.
func (*StringType) GetTypeSize ¶
func (t *StringType) GetTypeSize() uint64
GetTypeSize returns the size of the type in bytes.
func (*StringType) GetValue ¶
func (t *StringType) GetValue() any
GetValue returns the value stored in the receiver.
func (*StringType) GetValueSize ¶
func (t *StringType) GetValueSize() uint64
GetValueSize returns the size of the value in bytes.
func (*StringType) Parse ¶
func (t *StringType) Parse(v any) error
Parse parses the value and stores it in the receiver.
type TimestampType ¶
type TimestampType struct { data.BaseValueType // contains filtered or unexported fields }
TimestampType is a type for TIMESTAMP.
func (*TimestampType) GetTypeKind ¶
func (t *TimestampType) GetTypeKind() data.Kind
GetTypeKind returns the kind of the type.
func (*TimestampType) GetTypeName ¶
func (t *TimestampType) GetTypeName() string
GetTypeName returns the name of the type.
func (*TimestampType) GetTypeSize ¶
func (t *TimestampType) GetTypeSize() uint64
GetTypeSize returns the size of the type in bytes.
func (*TimestampType) GetValue ¶
func (t *TimestampType) GetValue() any
GetValue returns the value stored in the receiver.
func (*TimestampType) GetValueSize ¶
func (t *TimestampType) GetValueSize() uint64
GetValueSize returns the size of the value in bytes.
func (*TimestampType) Parse ¶
func (t *TimestampType) Parse(v any) error
Parse parses the value and stores it in the receiver.
type UUIDType ¶
type UUIDType struct { data.BaseValueType // contains filtered or unexported fields }
UUIDType is a type for UUID.
func (*UUIDType) GetTypeKind ¶
GetTypeKind returns the kind of the type.
func (*UUIDType) GetTypeName ¶
GetTypeName returns the name of the type.
func (*UUIDType) GetTypeSize ¶
GetTypeSize returns the size of the type in bytes.
func (*UUIDType) GetValueSize ¶
GetValueSize returns the size of the value in bytes.