Documentation ¶
Overview ¶
Package sqlutil provides utilities to SQL-related instrumentation modules.
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func DriverName ¶
DriverName returns the name of the driver, based on its type. If the driver name cannot be deduced, DriverName will return "generic".
Types ¶
type Scanner ¶
type Scanner struct {
// contains filtered or unexported fields
}
Scanner is the struct used to generate SQL tokens for the parser.
func (*Scanner) Scan ¶
Scan scans for the next token and returns true if one was found, false if the end of the input stream was reached. When Scan returns true, the token type can be obtained by calling the Token() method, and the text can be obtained by calling the Text() method.
type Token ¶
type Token int
Token represents a SQL token.
const ( OTHER Token = iota // anything we don't specifically care about COMMENT IDENT // includes unhandled keywords NUMBER // 123, 123.45, 123e+45 STRING // 'foo' PERIOD // . COMMA // , LPAREN // ( RPAREN // ) AS CALL DELETE FROM INSERT INTO OR REPLACE SELECT SET TABLE TRUNCATE // Cassandra/CQL-specific UPDATE )
The list of SQL tokens.
Click to show internal directories.
Click to hide internal directories.