Documentation ¶
Index ¶
- Variables
- func NewError(text string) error
- func NewXError(text string, arg interface{}) error
- type AdvancedDriver
- type AggregatedNullFloat64
- type AutoExcludedNullInt64
- type Conn
- type CreateViewStmt
- type DescribeStmt
- type Dsn
- type Error
- type Execer
- type NullString
- type PercentNullFloat64
- type Queryer
- type Result
- type Rows
- type SelectStmt
- type ShowStmt
- type Stmt
- type Time
Constants ¶
This section is empty.
Variables ¶
var ( ErrMultipleQueries = NewError("unsupported multi queries") ErrQuery = NewError("unsupported query") ErrOutRange = NewError("out of scope of view") )
Error messages.
Functions ¶
Types ¶
type AdvancedDriver ¶
type AdvancedDriver struct{}
AdvancedDriver implements all methods to pretend as a sql database driver. It is an advanced version of Awql driver. It adds cache, the possibility to get database details.
func (*AdvancedDriver) Open ¶
func (d *AdvancedDriver) Open(dsn string) (driver.Conn, error)
Open returns a new connection to the database. @see DatabaseDir:CacheDir:WithCache|AdwordsId[:ApiVersion:SupportsZeroImpressions]|DeveloperToken[|ClientId][|ClientSecret][|RefreshToken] @example /data/base/dir:/cache/dir:false|123-456-7890:v201607:true|dEve1op3er7okeN|1234567890-c1i3n7iD.com|c1ien753cr37|1/R3Fr35h-70k3n
type AggregatedNullFloat64 ¶ added in v1.3.0
type AggregatedNullFloat64 struct { NullFloat64 sql.NullFloat64 Precision int Layout string }
AggregatedNullFloat64 represents a float64 that may be null and rounded by using its precision.
type AutoExcludedNullInt64 ¶ added in v1.1.1
AutoExcludedNullInt64 represents a int64 that may be null or defined as auto valuer.
type Conn ¶
type Conn struct {
// contains filtered or unexported fields
}
Conn represents a connection to a database and implements driver.Conn.
type CreateViewStmt ¶
type CreateViewStmt struct {
*Stmt
}
CreateViewStmt represents a Create statement.
type DescribeStmt ¶
type DescribeStmt struct {
*Stmt
}
DescribeStmt represents a Describe statement.
type Error ¶
type Error struct {
// contains filtered or unexported fields
}
Error represents a internal error.
type Execer ¶
Execer is an interface that may be implemented by a CreateViewStmt.
func NewCreateViewStmt ¶
NewCreateViewStmt returns an instance of CreateViewStmt. It implements Queryer interface.
type NullString ¶
NullString represents a string that may be null.
type PercentNullFloat64 ¶ added in v1.1.0
type PercentNullFloat64 struct { NullFloat64 sql.NullFloat64 Almost, Percent bool }
PercentNullFloat64 represents a float64 that may be a percentage.
type Queryer ¶
Queryer is an interface that should be implemented by a Stmt with rows as result.
func NewDescribeStmt ¶
NewDescribeStmt returns an instance of DescribeStmt. It implements Queryer interface.
func NewSelectStmt ¶
NewSelectStmt returns an instance of SelectStmt. It implements Queryer interface.
func NewShowStmt ¶
NewShowStmt returns an instance of ShowStmt. It implements Queryer interface.
type Result ¶
type Result struct {
// contains filtered or unexported fields
}
Result is the result of a query execution.
func (*Result) LastInsertId ¶
LastInsertId returns the database's auto-generated ID after, for example, an INSERT into a table with primary key.
func (*Result) RowsAffected ¶
RowsAffected returns the number of rows affected by the query.
type Rows ¶
type Rows struct {
// contains filtered or unexported fields
}
Rows is an iterator over an executed query's results. It implements sort and driver.Rows interfaces.
type SelectStmt ¶
type SelectStmt struct {
*Stmt
}
SelectStmt represents a Select statement.
func (*SelectStmt) Hash ¶
func (s *SelectStmt) Hash() string
Hash builds a unique hash for this query and this Adwords ID.
type Stmt ¶
type Stmt struct {
// contains filtered or unexported fields
}
Stmt is a prepared statement.