Documentation ¶
Index ¶
Constants ¶
View Source
const ( DefaultPort = "8080" DefaultCatalog = "hive" DefaultSchema = "default" DefaultUsername = "prestgo" TimestampFormat = "2006-01-02 15:04:05.000" )
Default data source parameters
View Source
const ( // This type captures boolean values true and false Boolean = "boolean" // A 64-bit signed two’s complement integer with a minimum value of -2^63 and a maximum value of 2^63 - 1. BigInt = "bigint" // Integer assumed to be an alias for BigInt. Integer = "integer" // A double is a 64-bit inexact, variable-precision implementing the IEEE Standard 754 for Binary Floating-Point Arithmetic. Double = "double" // Variable length character data. VarChar = "varchar" // Variable length binary data. VarBinary = "varbinary" // Variable length json data. JSON = "json" // Calendar date (year, month, day). // Example: DATE '2001-08-22' Date = "date" // Time of day (hour, minute, second, millisecond) without a time zone. Values of this type are parsed and rendered in the session time zone. // Example: TIME '01:02:03.456' Time = "time" // Instant in time that includes the date and time of day without a time zone. Values of this type are parsed and rendered in the session time zone. // Example: TIMESTAMP '2001-08-22 03:04:05.321' Timestamp = "timestamp" // Instant in time that includes the date and time of day with a time zone. Values of this type are parsed and rendered in the provided time zone. // Example: TIMESTAMP '2001-08-22 03:04:05.321' AT TIME ZONE 'America/Los_Angeles' TimestampWithTimezone = "timestamp with time zone" // MapVarchar is a map from string-keys to string-values. MapVarchar = "map(varchar,varchar)" // Array of variable length character data. ArrayVarchar = "array(varchar)" )
View Source
const ( QueryStateQueued = "QUEUED" QueryStatePlanning = "PLANNING" QueryStateStarting = "STARTING" QueryStateRunning = "RUNNING" QueryStateFinished = "FINISHED" QueryStateCanceled = "CANCELED" QueryStateFailed = "FAILED" )
View Source
const DriverName = "prestgo"
Name of the driver to use when calling `sql.Open`
Variables ¶
View Source
var ( // ErrNotSupported is returned when an unsupported feature is requested. ErrNotSupported = errors.New(DriverName + ": not supported") // ErrQueryFailed indicates that a network or server failure prevented the driver obtaining a query result. ErrQueryFailed = errors.New(DriverName + ": query failed") // ErrQueryCanceled indicates that a query was canceled before results could be retrieved. ErrQueryCanceled = errors.New(DriverName + ": query canceled") )
Functions ¶
func ClientOpen ¶
ClientOpen creates a connection to the specified data source name using the supplied HTTP client. The data source name should be of the form "presto://hostname:port/catalog/schema?source=x&session=y".
Types ¶
This section is empty.
Click to show internal directories.
Click to hide internal directories.