Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Iterx ¶
type Iterx struct {
// contains filtered or unexported fields
}
Iterx is the implementation for IterxI. This allows iterating over the results from SELECT query.
type IterxI ¶
IterxI allows iterating over the results from SELECT query. This can also be used for paging the results.
type Query ¶
type Query struct {
// contains filtered or unexported fields
}
Query is the query-handler implementation for database-session.
func (*Query) GetPageSize ¶
GetPageSize returns the current page-size
func (*Query) GoCqlQuery ¶ added in v1.1.1
GoCqlQuery returns the embedded GoCql query.
func (*Query) Release ¶
func (q *Query) Release()
Release releases the query. Released queries cannot be reused.
func (*Query) SetPageSize ¶
SetPageSize tells the iterator to fetch the result in pages of size n. This is useful for iterating over large result sets, but setting the page size too low might decrease the performance. This feature is only available in Cassandra 2 and onwards.
type QueryI ¶
type QueryI interface { GoCqlQuery() *cql.Query Exec() error GetPageSize() uint SetPageSize(n uint) QueryI Release() Statement() string }
QueryI is the query-handler for database-session.
type Queryx ¶
type Queryx struct { ColumnNames []string // contains filtered or unexported fields }
Queryx is the implementation for QueryxI.
func (*Queryx) BindStruct ¶
BindStruct binds query named parameters to values from arg using mapper. If value cannot be found an error is reported.
func (*Queryx) ExecRelease ¶
ExecRelease executes and releases the query, a released query cannot be reused.
type QueryxI ¶
type QueryxI interface { BindMap(map[string]interface{}) QueryxI BindStruct(interface{}) QueryxI ExecRelease() error Query() QueryI Statement() string }
QueryxI is a wrapper around gocql.Query which adds and gocqlx.Queryx struct binding capabilities.
type Session ¶
type Session struct {
// contains filtered or unexported fields
}
Session is the database-session implementation.
func NewSession ¶
NewSession creates a new database-session.
func (*Session) GoCqlSession ¶ added in v1.1.1
GoCqlSession returns the original wrapped GoCql-Session object.
func (*Session) Query ¶
Query prepates the specified prepared-statement with given column-name values.
func (*Session) SetPageSize ¶
SetPageSize sets the default page size for this session. A value <= 0 will disable paging. This setting can also be changed on a per-query basis.