Documentation
¶
Index ¶
Constants ¶
const SortDirectionAscending = "ASC"
SortDirectionAscending is the token that designates that records should be sorted lowest to highest
const SortDirectionDescending = "DESC"
SortDirectionDescending is the token that designates that records should be sorted highest to lowest
const TypeFields = "FIELDS"
TypeFields is the token that designates the fields to be returned
const TypeFirstRow = "FIRSTROW"
TypeFirstRow is the token that designates the "row number" to begin results.
const TypeMaxRows = "MAXROWS"
TypeMaxRows is the token that designates the maximum number of records to be returned
const TypeSort = "SORT"
TypeSort is the token that designates a Sort order
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type FieldsConfig ¶ added in v0.22.0
type FieldsConfig []string
FieldsConfig is a query option that limits the number of rows to be included in a dataset
func (FieldsConfig) Fields ¶ added in v0.22.0
func (fieldsConfig FieldsConfig) Fields() []string
Fields returns the maximum number of rows to include in a dataset
func (FieldsConfig) OptionType ¶ added in v0.22.0
func (fieldsConfig FieldsConfig) OptionType() string
OptionType identifies this record as a query option
type FirstRowConfig ¶
type FirstRowConfig struct{}
FirstRowConfig is a query option that sets the first row to be returned in a dataset
func (FirstRowConfig) OptionType ¶
func (firstRowConfig FirstRowConfig) OptionType() string
OptionType identifies this record as a query option
type MaxRowsConfig ¶
type MaxRowsConfig int64
MaxRowsConfig is a query option that limits the number of rows to be included in a dataset
func (MaxRowsConfig) MaxRows ¶
func (maxRowsConfig MaxRowsConfig) MaxRows() int64
MaxRows returns the maximum number of rows to include in a dataset
func (MaxRowsConfig) OptionType ¶
func (maxRowsConfig MaxRowsConfig) OptionType() string
OptionType identifies this record as a query option
type Option ¶
type Option interface {
OptionType() string
}
Option is an interface that wraps all of the query options that can be used to modify a database query.
func Fields ¶ added in v0.22.0
Fields returns a query option that will limit the query results to a certain number of rows
func FirstRow ¶
func FirstRow() Option
FirstRow returns a query option that will limit the query results to a certain number of rows
func MaxRows ¶
MaxRows returns a query option that will limit the query results to a certain number of rows
type SortConfig ¶
SortConfig identifies the field and direction to use when sorting a dataset
func (SortConfig) OptionType ¶
func (sortConfig SortConfig) OptionType() string
OptionType identifies this record as a query option