Versions in this module Expand all Collapse all v1 v1.0.4 Jun 19, 2024 v1.0.3 Jun 18, 2024 Changes in this version + const CMD_ARRAY + const CMD_BLOB + const CMD_COMMAND + const CMD_COMPRESSED + const CMD_ERROR + const CMD_FLOAT + const CMD_INT + const CMD_JSON + const CMD_NULL + const CMD_PUBSUB + const CMD_RAWJSON + const CMD_RECONNECT + const CMD_ROWSET + const CMD_ROWSET_CHUNK + const CMD_STRING + const CMD_ZEROSTRING + const CompressModeLZ4 + const CompressModeNo + const NO_EXTCODE + const NO_OFFCODE + const OUTFORMAT_BOX + const OUTFORMAT_CSV + const OUTFORMAT_HTML + const OUTFORMAT_JSON + const OUTFORMAT_LINE + const OUTFORMAT_LIST + const OUTFORMAT_MARKDOWN + const OUTFORMAT_QUOTE + const OUTFORMAT_TABLE + const OUTFORMAT_TABS + const OUTFORMAT_XML + const ROWSET_TYPE_BASIC + const ROWSET_TYPE_DATA_ONLY + const ROWSET_TYPE_HEADER_ONLY + const ROWSET_TYPE_METADATA_v1 + const SQLiteCloudCA + const SQLiteDefaultPort + var OKResult = Result + func GetDefaultSeparatorForOutputFormat(Format int) (string, error) + func GetOutputFormatFromString(Format string) (int, error) + func ParseTlsString(tlsconf string) (secure bool, tlsInsecureSkipVerify bool, pem string) + func SQCloudEnquoteString(s string) string + type Chunk struct + DataBufferOffset uint64 + LEN uint64 + RAW []byte + func (this *Chunk) GetChunkSize() uint64 + func (this *Chunk) GetData() []byte + func (this *Chunk) GetType() byte + func (this *Chunk) IsCompressed() bool + func (this *Chunk) Uncompress() error + type Result struct + Autoinc []int32 + DbName []string + DeclType []string + MaxHeaderWidth uint64 + Name []string + Notnull []int32 + OrigName []string + PriKey []int32 + TblName []string + Width []uint64 + func (this *Result) Dump() + func (this *Result) DumpToScreen(MaxLineLength uint) + func (this *Result) DumpToWriter(Out *bufio.Writer, Format int, NoHeader bool, Separator string, ...) (int, error) + func (this *Result) Free() + func (this *Result) GetBuffer() []byte + func (this *Result) GetBufferLength() (uint64, error) + func (this *Result) GetError() (int, int, int, string, error) + func (this *Result) GetErrorAsString() string + func (this *Result) GetError_() (int, string) + func (this *Result) GetFirstRow() (*ResultRow, error) + func (this *Result) GetFloat32() (float32, error) + func (this *Result) GetFloat32Value(Row uint64, Column uint64) (float32, error) + func (this *Result) GetFloat32Value_(Row uint64, Column uint64) float32 + func (this *Result) GetFloat32_() float32 + func (this *Result) GetFloat64() (float64, error) + func (this *Result) GetFloat64Value(Row uint64, Column uint64) (float64, error) + func (this *Result) GetFloat64Value_(Row uint64, Column uint64) float64 + func (this *Result) GetFloat64_() float64 + func (this *Result) GetInt32() (int32, error) + func (this *Result) GetInt32Value(Row uint64, Column uint64) (int32, error) + func (this *Result) GetInt32Value_(Row uint64, Column uint64) int32 + func (this *Result) GetInt32_() int32 + func (this *Result) GetInt64() (int64, error) + func (this *Result) GetInt64Value(Row uint64, Column uint64) (int64, error) + func (this *Result) GetInt64Value_(Row uint64, Column uint64) int64 + func (this *Result) GetInt64_() int64 + func (this *Result) GetJSON() (object interface{}, err error) + func (this *Result) GetJSON_() (object interface{}) + func (this *Result) GetLastRow() (*ResultRow, error) + func (this *Result) GetMaxColumnWidth(Column uint64) (uint64, error) + func (this *Result) GetMaxNameWidth() uint64 + func (this *Result) GetName(Column uint64) (string, error) + func (this *Result) GetNameLength(Column uint64) (uint64, error) + func (this *Result) GetName_(Column uint64) string + func (this *Result) GetNumberOfColumns() uint64 + func (this *Result) GetNumberOfRows() uint64 + func (this *Result) GetRow(Row uint64) (*ResultRow, error) + func (this *Result) GetSQLDateTime(Row uint64, Column uint64) (time.Time, error) + func (this *Result) GetSQLDateTime_(Row uint64, Column uint64) time.Time + func (this *Result) GetString() (string, error) + func (this *Result) GetStringValue(Row uint64, Column uint64) (string, error) + func (this *Result) GetStringValue_(Row uint64, Column uint64) string + func (this *Result) GetString_() string + func (this *Result) GetType() byte + func (this *Result) GetUncompressedChuckSizeSum() uint64 + func (this *Result) GetValue(Row uint64, Column uint64) (*Value, error) + func (this *Result) GetValueType(Row uint64, Column uint64) (byte, error) + func (this *Result) GetValueType_(Row uint64, Column uint64) byte + func (this *Result) IsArray() bool + func (this *Result) IsBLOB() bool + func (this *Result) IsCommand() bool + func (this *Result) IsError() bool + func (this *Result) IsFloat() bool + func (this *Result) IsInteger() bool + func (this *Result) IsJSON() bool + func (this *Result) IsLiteral() bool + func (this *Result) IsNULL() bool + func (this *Result) IsOK() bool + func (this *Result) IsPSUB() bool + func (this *Result) IsReconnect() bool + func (this *Result) IsRowSet() bool + func (this *Result) IsString() bool + func (this *Result) IsText() bool + func (this *Result) Rows() []ResultRow + func (this *Result) ToJSON() string + type ResultRow struct + Columns []Value + Index uint64 + func (this *ResultRow) DumpToWriter(Out io.Writer, Format int, Separator string, NullValue string, NewLine string, ...) (int, error) + func (this *ResultRow) GetFloat32(Column uint64) (float32, error) + func (this *ResultRow) GetFloat64(Column uint64) (float64, error) + func (this *ResultRow) GetInt32(Column uint64) (int32, error) + func (this *ResultRow) GetInt64(Column uint64) (int64, error) + func (this *ResultRow) GetMaxNameLength() uint64 + func (this *ResultRow) GetMaxWidth(Column uint64) (uint64, error) + func (this *ResultRow) GetName(Column uint64) (string, error) + func (this *ResultRow) GetNameLength(Column uint64) (uint64, error) + func (this *ResultRow) GetNumberOfColumns() uint64 + func (this *ResultRow) GetSQLDateTime(Column uint64) (time.Time, error) + func (this *ResultRow) GetString(Column uint64) (string, error) + func (this *ResultRow) GetType(Column uint64) (byte, error) + func (this *ResultRow) GetValue(Column uint64) (*Value, error) + func (this *ResultRow) IsBLOB(Column uint64) bool + func (this *ResultRow) IsEOF() bool + func (this *ResultRow) IsFirst() bool + func (this *ResultRow) IsFloat(Column uint64) bool + func (this *ResultRow) IsInteger(Column uint64) bool + func (this *ResultRow) IsLast() bool + func (this *ResultRow) IsNULL(Column uint64) bool + func (this *ResultRow) IsString(Column uint64) bool + func (this *ResultRow) IsText(Column uint64) bool + func (this *ResultRow) Next() *ResultRow + func (this *ResultRow) Rewind() *ResultRow + func (this *ResultRow) ToJSON() ([]byte, error) + type SQCloud struct + Callback func(*SQCloud, string) + ErrorCode int + ErrorMessage string + ErrorOffset int + ExtErrorCode int + func Connect(ConnectionString string) (*SQCloud, error) + func New(config SQCloudConfig) *SQCloud + func (this *SQCloud) AddNode(Node string, Address string, Cluster string, Snapshot string, Learner bool) error + func (this *SQCloud) Auth(Username string, Password string) error + func (this *SQCloud) AuthWithKey(Key string) error + func (this *SQCloud) BeginTransaction() error + func (this *SQCloud) CheckConnectionParameter() error + func (this *SQCloud) Close() error + func (this *SQCloud) CloseConnection(ConnectionID string) error + func (this *SQCloud) Compress(CompressMode string) error + func (this *SQCloud) Connect() error + func (this *SQCloud) CreateChannel(Channel string, NoError bool) error + func (this *SQCloud) CreateDatabase(Database string, Key string, Encoding string, NoError bool) error + func (this *SQCloud) DisablePlugin(Plugin string) error + func (this *SQCloud) EnablePlugin(Plugin string) error + func (this *SQCloud) EndTransaction() error + func (this *SQCloud) Execute(SQL string) error + func (this *SQCloud) ExecuteArray(SQL string, values []interface{}) error + func (this *SQCloud) GetAutocompleteTokens() (tokens []string) + func (this *SQCloud) GetDatabase() (string, error) + func (this *SQCloud) GetError() (int, int, int, error) + func (this *SQCloud) GetErrorCode() int + func (this *SQCloud) GetErrorMessage() error + func (this *SQCloud) GetErrorOffset() int + func (this *SQCloud) GetExtErrorCode() int + func (this *SQCloud) GetInfo() (SQCloudInfo, error) + func (this *SQCloud) GetKey(Key string) (string, error) + func (this *SQCloud) GetPAuth() (string, string) + func (this *SQCloud) GetUUID() string + func (this *SQCloud) IsConnected() bool + func (this *SQCloud) IsError() bool + func (this *SQCloud) ListChannels() ([]string, error) + func (this *SQCloud) ListClientKeys() (map[string]string, error) + func (this *SQCloud) ListColumns(TableName string) (columns []string) + func (this *SQCloud) ListCommands() ([]string, error) + func (this *SQCloud) ListConnections() ([]SQCloudConnection, error) + func (this *SQCloud) ListDatabaseConnections(Database string) ([]SQCloudConnection, error) + func (this *SQCloud) ListDatabaseKeys(Database string) (map[string]string, error) + func (this *SQCloud) ListDatabases() ([]string, error) + func (this *SQCloud) ListKeys() (map[string]string, error) + func (this *SQCloud) ListNodes() ([]SQCloudNode, error) + func (this *SQCloud) ListPlugins() ([]SQCloudPlugin, error) + func (this *SQCloud) ListTables() ([]string, error) + func (this *SQCloud) Listen(Channel string) error + func (this *SQCloud) ListenTable(TableName string, DatabaseName string) error + func (this *SQCloud) Notify(Channel string) error + func (this *SQCloud) Ping() error + func (this *SQCloud) RemoveChannel(Channel string) error + func (this *SQCloud) RemoveDatabase(Database string, NoError bool) error + func (this *SQCloud) RemoveKey(Key string) error + func (this *SQCloud) RemoveNode(Node string) error + func (this *SQCloud) RollBackTransaction() error + func (this *SQCloud) Select(SQL string) (*Result, error) + func (this *SQCloud) SelectArray(SQL string, values []interface{}) (*Result, error) + func (this *SQCloud) SelectArrayKeyValues(SQL string, values []interface{}) (map[string]string, error) + func (this *SQCloud) SelectKeyValues(SQL string) (map[string]string, error) + func (this *SQCloud) SelectMap(SQL string) (map[string]interface{}, error) + func (this *SQCloud) SelectSingleInt64(SQL string) (int64, error) + func (this *SQCloud) SelectSingleString(SQL string) (string, error) + func (this *SQCloud) SelectStringList(SQL string) ([]string, error) + func (this *SQCloud) SelectStringListWithCol(SQL string, col uint64) ([]string, error) + func (this *SQCloud) SendBlob(data []byte) error + func (this *SQCloud) SendNotificationMessage(Channel string, Message string) error + func (this *SQCloud) SetKey(Key string, Value string) error + func (this *SQCloud) Unlisten(Channel string) error + func (this *SQCloud) UnlistenTable(TableName string, DatabaseName string) error + func (this *SQCloud) UnuseDatabase() error + func (this *SQCloud) UseDatabase(Database string) error + type SQCloudConfig struct + ApiKey string + CompressMode string + Compression bool + Create bool + Database string + Host string + MaxData int + MaxRows int + MaxRowset int + Memory bool + NoBlob bool + NonLinearizable bool + Password string + PasswordHashed bool + Pem string + Port int + Secure bool + Timeout time.Duration + TlsInsecureSkipVerify bool + Username string + Zerotext bool + func ParseConnectionString(ConnectionString string) (config *SQCloudConfig, err error) + type SQCloudConnection struct + Address string + ClientID int64 + ConnectionDate time.Time + Database string + LastActivity time.Time + Username string + type SQCloudInfo struct + SQCloudBuildDate time.Time + SQCloudGitHash string + SQCloudVersion string + SQLiteVersion string + SericeMultiplexAPI string + ServerArchitecture string + ServerCPUs int + ServerOS string + ServerTime time.Time + ServiceNocluster int + ServiceNodeID int + ServicePID int + ServicePort int + ServiceStart time.Time + TLS string + TLSConnAlpnSelected string + TLSConnCipher string + TLSConnCipherStrength int + TLSConnServername string + TLSConnVersion string + TLSPeerCertHash string + TLSPeerCertIssuer string + TLSPeerCertNotAfter time.Time + TLSPeerCertNotBefore time.Time + TLSPeerCertProvided int + TLSPeerCertSubject string + type SQCloudNode struct + ClusterInterface string + LastActivity time.Time + Match int64 + NodeID int64 + NodeInterface string + Progress SQCloudNodeProgress + Status SQCloudNodeStatus + type SQCloudNodeProgress int64 + const Probe + const Replicate + const Snapshot + const Unknown + type SQCloudNodeStatus int64 + const Candidate + const Follower + const Leader + const Learner + type SQCloudPlugin struct + Copyright string + Description string + Enabled bool + Name string + Type string + Version string + type Value struct + Buffer []byte + Type byte + func (this *Value) GetBuffer() []byte + func (this *Value) GetError() (int, int, int, string, error) + func (this *Value) GetFloat32() (float32, error) + func (this *Value) GetFloat64() (float64, error) + func (this *Value) GetInt32() (int32, error) + func (this *Value) GetInt64() (int64, error) + func (this *Value) GetLength() uint64 + func (this *Value) GetSQLDateTime() (time.Time, error) + func (this *Value) GetString() string + func (this *Value) GetType() byte + func (this *Value) IsArray() bool + func (this *Value) IsBLOB() bool + func (this *Value) IsCommand() bool + func (this *Value) IsError() bool + func (this *Value) IsFloat() bool + func (this *Value) IsInteger() bool + func (this *Value) IsJSON() bool + func (this *Value) IsNULL() bool + func (this *Value) IsOK() bool + func (this *Value) IsPSUB() bool + func (this *Value) IsReconnect() bool + func (this *Value) IsRowSet() bool + func (this *Value) IsSet() bool + func (this *Value) IsString() bool + func (this *Value) IsText() bool