Documentation
¶
Overview ¶
The monetdb mapi server handshake needs the crypt algorithm.
Package monet implements the database/sql/driver interfaces for the monetdb database (http://monetdb.org).
example:
import ( "database/sql" "monet" "time" ) db, err := sql.Open(monet.DRV_NAME, monet.ConnectionString("localhost", "50000", "monetdb", "monetdb", "voc", time.Second*10)) ...
Currently only default driver.Value data types are supported. Server implements the mapi protocol as defined for the monetdb. You usually don't need it. Placeholders currently only work for driver.Value. The Server has a global logger for all connections. By default nothing is logged. You can switch globally to another logger:
monet.MapiLogger = syslog.New(...)
or
monet.MapiLogger = monet.DebugToStderr
or
monet.MapiLogger = monet.New(writer, prefix, logFlags, logLevel)
Index ¶
Constants ¶
const ( SQLPlaceholder = "%s" RowsSize = 100 )
const ( CHAR = "char" // (L) character string with length L VARCHAR = "varchar" // (L) string with atmost length L CLOB = "clob" BLOB = "blob" DECIMAL = "decimal" // (P,S) SMALLINT = "smallint" // 16 bit integer INT = "int" // 32 bit integer BIGINT = "bigint" // 64 bit integer SERIAL = "serial" // special 64 bit integer (sequence generator) REAL = "real" // 32 bit floating point DOUBLE = "double" // 64 bit floating point BOOLEAN = "boolean" //DATE = "date" //TIME = "time" // (T) time of day TIMESTAMP = "timestamp" // (T) date concatenated with unique time //MONTH_INTERVAL = "month_interval" //SEC_INTERVAL = "sec_interval" WRD = "wrd" TINYINT = "tinyint" SHORTINT = "shortint" MEDIUMINT = "mediumint" LONGINT = "longint" FLOAT = "float" )
type codes in comments currently not supported by go driver
const (
DRV_NAME = "monet"
)
const (
MAX_PACKAGE_LENGTH = (1024 * 8) - 2
)
const TimeLayout = "2006-01-02 15:04:05.000000"
Variables ¶
This section is empty.
Functions ¶
Types ¶
type LogWriter ¶
type LogWriter interface { Err(m string) (err error) Warning(m string) (err error) Info(m string) (err error) Debug(m string) (err error) }
The logger for the monetdb driver Server instance. *syslog.Writer is compliant to this interface.
Logs everything to stderr and can be plugged in via
monet.MapiLogger = DebugToStderr