Documentation
¶
Index ¶
- Constants
- type Changeset
- type ClusteringExpression
- type Column
- type ColumnDefinition
- type ColumnModel
- type ColumnUpdate
- type Datacenter
- type DocumentResponseWrapper
- type Error
- type Filter
- type GetResponseWrapper
- type Keyspace
- type PrimaryKey
- type Query
- type ResponseWrapper
- type RowAdd
- type RowUpdate
- type Rows
- type RowsResponse
- type SuccessResponse
- type Table
- type TableAdd
- type TableOptions
- type WriteDocResponse
Constants ¶
const ( // ClusteringExpressionOrderAsc captures enum value "asc" ClusteringExpressionOrderAsc string = "asc" // ClusteringExpressionOrderDesc captures enum value "desc" ClusteringExpressionOrderDesc string = "desc" )
const ( // FilterOperatorEq captures enum value "eq" FilterOperatorEq string = "eq" // FilterOperatorNotEq captures enum value "notEq" FilterOperatorNotEq string = "notEq" // FilterOperatorGt captures enum value "gt" FilterOperatorGt string = "gt" // FilterOperatorGte captures enum value "gte" FilterOperatorGte string = "gte" // FilterOperatorLt captures enum value "lt" FilterOperatorLt string = "lt" // FilterOperatorLte captures enum value "lte" FilterOperatorLte string = "lte" // FilterOperatorIn captures enum value "in" FilterOperatorIn string = "in" )
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Changeset ¶
type Changeset struct {
// Name of the column to update.
// Required: true
Column *string `json:"column"`
// The value to update in the column for all matching rows.
// Required: true
Value *string `json:"value"`
}
Changeset changeset
swagger:model Changeset
func (*Changeset) MarshalBinary ¶
MarshalBinary interface implementation
func (*Changeset) UnmarshalBinary ¶
UnmarshalBinary interface implementation
type ClusteringExpression ¶
type ClusteringExpression struct {
// The name of the column to order by
// Required: true
Column *string `json:"column"`
// The clustering order
// Required: true
// Read Only: true
// Enum: [asc desc]
Order string `json:"order"`
}
ClusteringExpression clustering expression
swagger:model ClusteringExpression
func (*ClusteringExpression) MarshalBinary ¶
func (m *ClusteringExpression) MarshalBinary() ([]byte, error)
MarshalBinary interface implementation
func (*ClusteringExpression) UnmarshalBinary ¶
func (m *ClusteringExpression) UnmarshalBinary(b []byte) error
UnmarshalBinary interface implementation
type Column ¶
type Column struct {
// clustering key
ClusteringKey bool `json:"clusteringKey,omitempty"`
// collection
Collection bool `json:"collection,omitempty"`
// frozen collection
FrozenCollection bool `json:"frozenCollection,omitempty"`
// partition key
PartitionKey bool `json:"partitionKey,omitempty"`
// primary key component
PrimaryKeyComponent bool `json:"primaryKeyComponent,omitempty"`
}
Column column
swagger:model Column
func (*Column) MarshalBinary ¶
MarshalBinary interface implementation
func (*Column) UnmarshalBinary ¶
UnmarshalBinary interface implementation
type ColumnDefinition ¶
type ColumnDefinition struct {
// Name for the column, which must be unique.
// Required: true
Name *string `json:"name"`
// Denotes whether the column is shared by all rows of a partition.
Static bool `json:"static,omitempty"`
// The type of data allowed in the column.
// Required: true
TypeDefinition *string `json:"typeDefinition"`
}
ColumnDefinition column definition
swagger:model ColumnDefinition
func (*ColumnDefinition) MarshalBinary ¶
func (m *ColumnDefinition) MarshalBinary() ([]byte, error)
MarshalBinary interface implementation
func (*ColumnDefinition) UnmarshalBinary ¶
func (m *ColumnDefinition) UnmarshalBinary(b []byte) error
UnmarshalBinary interface implementation
type ColumnModel ¶
type ColumnModel struct {
// Name for the column, which must be unique.
// Required: true
Name *string `json:"name"`
// The type of data allowed in the column.
// Required: true
Value *string `json:"value"`
}
ColumnModel column model
swagger:model ColumnModel
func (*ColumnModel) MarshalBinary ¶
func (m *ColumnModel) MarshalBinary() ([]byte, error)
MarshalBinary interface implementation
func (*ColumnModel) UnmarshalBinary ¶
func (m *ColumnModel) UnmarshalBinary(b []byte) error
UnmarshalBinary interface implementation
type ColumnUpdate ¶
type ColumnUpdate struct {
// The new name of the column.
NewName string `json:"newName,omitempty"`
}
ColumnUpdate Changes the name of a primary key column and preserves the existing values.
swagger:model ColumnUpdate
func (*ColumnUpdate) MarshalBinary ¶
func (m *ColumnUpdate) MarshalBinary() ([]byte, error)
MarshalBinary interface implementation
func (*ColumnUpdate) UnmarshalBinary ¶
func (m *ColumnUpdate) UnmarshalBinary(b []byte) error
UnmarshalBinary interface implementation
type Datacenter ¶
type Datacenter struct {
// The name of the datacenter.
// Required: true
Name *string `json:"name"`
// The number of replicas in the datacenter. In other words, the number of copies of each row in the datacenter.
// Required: true
Replicas *int32 `json:"replicas"`
}
Datacenter datacenter
swagger:model Datacenter
func (*Datacenter) MarshalBinary ¶
func (m *Datacenter) MarshalBinary() ([]byte, error)
MarshalBinary interface implementation
func (*Datacenter) UnmarshalBinary ¶
func (m *Datacenter) UnmarshalBinary(b []byte) error
UnmarshalBinary interface implementation
type DocumentResponseWrapper ¶
type DocumentResponseWrapper struct {
// The data returned by the request
Data interface{} `json:"data,omitempty"`
// The id of the document
DocumentID string `json:"documentId,omitempty"`
// A string representing the paging state to be used on future paging requests.
PageState string `json:"pageState,omitempty"`
}
DocumentResponseWrapper document response wrapper
swagger:model DocumentResponseWrapper
func (*DocumentResponseWrapper) MarshalBinary ¶
func (m *DocumentResponseWrapper) MarshalBinary() ([]byte, error)
MarshalBinary interface implementation
func (*DocumentResponseWrapper) UnmarshalBinary ¶
func (m *DocumentResponseWrapper) UnmarshalBinary(b []byte) error
UnmarshalBinary interface implementation
type Error ¶
type Error struct {
// The internal number referencing the error state
Code int32 `json:"code,omitempty"`
// A human readable description of the error state
Description string `json:"description,omitempty"`
// internal tx Id
InternalTxID string `json:"internalTxId,omitempty"`
}
Error A description of an error state
swagger:model Error
func (*Error) MarshalBinary ¶
MarshalBinary interface implementation
func (*Error) UnmarshalBinary ¶
UnmarshalBinary interface implementation
type Filter ¶
type Filter struct {
// The column name to apply the filter to.
ColumnName string `json:"columnName,omitempty"`
// The comparison operator to use in the filter.
// Enum: [eq notEq gt gte lt lte in]
Operator string `json:"operator,omitempty"`
// An array of values to use in the filter. The full array will only be used for the `in` operation, for all others only the first element will be considered.
Value []interface{} `json:"value"`
}
Filter filter
swagger:model Filter
func (*Filter) MarshalBinary ¶
MarshalBinary interface implementation
func (*Filter) UnmarshalBinary ¶
UnmarshalBinary interface implementation
type GetResponseWrapper ¶
type GetResponseWrapper struct {
// The count of records returned
Count int32 `json:"count,omitempty"`
// The data returned by the request
Data interface{} `json:"data,omitempty"`
// A string representing the paging state to be used on future paging requests.
PageState string `json:"pageState,omitempty"`
}
GetResponseWrapper get response wrapper
swagger:model GetResponseWrapper
func (*GetResponseWrapper) MarshalBinary ¶
func (m *GetResponseWrapper) MarshalBinary() ([]byte, error)
MarshalBinary interface implementation
func (*GetResponseWrapper) UnmarshalBinary ¶
func (m *GetResponseWrapper) UnmarshalBinary(b []byte) error
UnmarshalBinary interface implementation
type Keyspace ¶
type Keyspace struct {
// The datacenters within a keyspace. Only applies for those keyspaces created with NetworkTopologyStrategy.
Datacenters []*Datacenter `json:"datacenters"`
// The name of the keyspace.
// Required: true
Name *string `json:"name"`
}
Keyspace keyspace
swagger:model Keyspace
func (*Keyspace) MarshalBinary ¶
MarshalBinary interface implementation
func (*Keyspace) UnmarshalBinary ¶
UnmarshalBinary interface implementation
type PrimaryKey ¶
type PrimaryKey struct {
// Name of the column or columns that constitute the clustering key.
ClusteringKey []string `json:"clusteringKey"`
// Name of the column(s) that constitute the partition key.
// Required: true
PartitionKey []string `json:"partitionKey"`
}
PrimaryKey Defines a column list for the primary key. Can be either a single column, compound primary key, or composite partition key. Provide multiple columns for the partition key to define a composite partition key.
swagger:model PrimaryKey
func (*PrimaryKey) MarshalBinary ¶
func (m *PrimaryKey) MarshalBinary() ([]byte, error)
MarshalBinary interface implementation
func (*PrimaryKey) UnmarshalBinary ¶
func (m *PrimaryKey) UnmarshalBinary(b []byte) error
UnmarshalBinary interface implementation
type Query ¶
type Query struct {
// A list of column names to return in the result set. An empty array returns all columns.
ColumnNames []string `json:"columnNames"`
// An array of filters to return results for, separated by `AND`. For example, `a > 1 AND b != 1`.
// Required: true
Filters []*Filter `json:"filters"`
// The clustering order for rows returned.
OrderBy *ClusteringExpression `json:"orderBy,omitempty"`
// The size of the page to return in the result set.
PageSize int32 `json:"pageSize,omitempty"`
// A string returned from previous query requests representing the paging state.
PageState string `json:"pageState,omitempty"`
}
Query query
swagger:model Query
func (*Query) MarshalBinary ¶
MarshalBinary interface implementation
func (*Query) UnmarshalBinary ¶
UnmarshalBinary interface implementation
type ResponseWrapper ¶
type ResponseWrapper struct {
// Response data returned by the request.
Data interface{} `json:"data,omitempty"`
}
ResponseWrapper response wrapper
swagger:model ResponseWrapper
func (*ResponseWrapper) MarshalBinary ¶
func (m *ResponseWrapper) MarshalBinary() ([]byte, error)
MarshalBinary interface implementation
func (*ResponseWrapper) UnmarshalBinary ¶
func (m *ResponseWrapper) UnmarshalBinary(b []byte) error
UnmarshalBinary interface implementation
type RowAdd ¶
type RowAdd struct {
// The column definitions belonging to the row to add.
// Required: true
Columns []*ColumnModel `json:"columns"`
}
RowAdd row add
swagger:model RowAdd
func (*RowAdd) MarshalBinary ¶
MarshalBinary interface implementation
func (*RowAdd) UnmarshalBinary ¶
UnmarshalBinary interface implementation
type RowUpdate ¶
type RowUpdate struct {
// The values for the named parameters used in the setExpression field
// Required: true
Changeset []*Changeset `json:"changeset"`
}
RowUpdate row update
swagger:model RowUpdate
func (*RowUpdate) MarshalBinary ¶
MarshalBinary interface implementation
func (*RowUpdate) UnmarshalBinary ¶
UnmarshalBinary interface implementation
type Rows ¶
type Rows struct {
// Number of records being returned by the request.
// Read Only: true
Count int32 `json:"count,omitempty"`
// A string representing the paging state to be used on future paging requests.
// Read Only: true
PageState string `json:"pageState,omitempty"`
// The rows returned by the request.
// Read Only: true
Rows []map[string]interface{} `json:"rows"`
}
Rows rows
swagger:model Rows
func (*Rows) MarshalBinary ¶
MarshalBinary interface implementation
func (*Rows) UnmarshalBinary ¶
UnmarshalBinary interface implementation
type RowsResponse ¶
type RowsResponse struct {
// Number of rows modified/added by the request.
// Read Only: true
RowsModified int32 `json:"rowsModified,omitempty"`
// Whether the request was successful.
// Read Only: true
Success *bool `json:"success,omitempty"`
}
RowsResponse rows response
swagger:model RowsResponse
func (*RowsResponse) MarshalBinary ¶
func (m *RowsResponse) MarshalBinary() ([]byte, error)
MarshalBinary interface implementation
func (*RowsResponse) UnmarshalBinary ¶
func (m *RowsResponse) UnmarshalBinary(b []byte) error
UnmarshalBinary interface implementation
type SuccessResponse ¶
type SuccessResponse struct {
// Whether the request was successful.
// Required: true
Success *bool `json:"success"`
}
SuccessResponse success response
swagger:model SuccessResponse
func (*SuccessResponse) MarshalBinary ¶
func (m *SuccessResponse) MarshalBinary() ([]byte, error)
MarshalBinary interface implementation
func (*SuccessResponse) UnmarshalBinary ¶
func (m *SuccessResponse) UnmarshalBinary(b []byte) error
UnmarshalBinary interface implementation
type Table ¶
type Table struct {
// optional index columns
// Unique: true
OptionalIndexColumns []*Column `json:"optionalIndexColumns"`
// required index columns
// Unique: true
RequiredIndexColumns []*Column `json:"requiredIndexColumns"`
}
Table table
swagger:model Table
func (*Table) MarshalBinary ¶
MarshalBinary interface implementation
func (*Table) UnmarshalBinary ¶
UnmarshalBinary interface implementation
type TableAdd ¶
type TableAdd struct {
// Definition of columns that belong to the table to be added.
// Required: true
ColumnDefinitions []*ColumnDefinition `json:"columnDefinitions"`
// Determines whether to create a new table if a table with the same name exists. Attempting to create an existing table returns an error unless this option is true.
IfNotExists bool `json:"ifNotExists,omitempty"`
// The name of the table to add.
// Required: true
Name *string `json:"name"`
// The primary key definition of the table, consisting of partition and clustering keys.
// Required: true
PrimaryKey *PrimaryKey `json:"primaryKey"`
// The set of table options to apply to the table when creating.
TableOptions *TableOptions `json:"tableOptions,omitempty"`
}
TableAdd table add
swagger:model TableAdd
func (*TableAdd) MarshalBinary ¶
MarshalBinary interface implementation
func (*TableAdd) UnmarshalBinary ¶
UnmarshalBinary interface implementation
type TableOptions ¶
type TableOptions struct {
// Order rows storage to make use of the on-disk sorting of columns. Specifying order can make query results more efficient.
ClusteringExpression []*ClusteringExpression `json:"clusteringExpression"`
// Defines the Time To Live (TTL), which determines the time period (in seconds) to expire data. If the value is >0, TTL is enabled for the entire table and an expiration timestamp is added to each column. The maximum value is 630720000 (20 years). A new TTL timestamp is calculated each time the data is updated and the row is removed after the data expires.
DefaultTimeToLive int32 `json:"defaultTimeToLive,omitempty"`
}
TableOptions table options
swagger:model TableOptions
func (*TableOptions) MarshalBinary ¶
func (m *TableOptions) MarshalBinary() ([]byte, error)
MarshalBinary interface implementation
func (*TableOptions) UnmarshalBinary ¶
func (m *TableOptions) UnmarshalBinary(b []byte) error
UnmarshalBinary interface implementation
type WriteDocResponse ¶
type WriteDocResponse struct {
// document Id
DocumentID string `json:"documentId,omitempty"`
}
WriteDocResponse write doc response
swagger:model WriteDocResponse
func (*WriteDocResponse) MarshalBinary ¶
func (m *WriteDocResponse) MarshalBinary() ([]byte, error)
MarshalBinary interface implementation
func (*WriteDocResponse) UnmarshalBinary ¶
func (m *WriteDocResponse) UnmarshalBinary(b []byte) error
UnmarshalBinary interface implementation
Source Files
¶
- changeset.go
- clustering_expression.go
- column.go
- column_definition.go
- column_model.go
- column_update.go
- datacenter.go
- document_response_wrapper.go
- error.go
- filter.go
- get_response_wrapper.go
- keyspace.go
- primary_key.go
- query.go
- response_wrapper.go
- row_add.go
- row_update.go
- rows.go
- rows_response.go
- success_response.go
- table.go
- table_add.go
- table_options.go
- write_doc_response.go