Documentation
¶
Index ¶
- type Batch
- type BatchCondition
- type BatchResult
- type BatchStep
- type Column
- type Error
- type NamedArg
- type PipelineRequest
- type PipelineResponse
- type Stmt
- type StmtResult
- type StreamRequest
- func BatchStream(sqls []string, params []shared.Params, wantRows bool) (*StreamRequest, error)
- func CloseStoredSqlStream(sqlId int32) StreamRequest
- func CloseStream() StreamRequest
- func ExecuteStoredStream(sqlId int32, params shared.Params, wantRows bool) (*StreamRequest, error)
- func ExecuteStream(sql string, params shared.Params, wantRows bool) (*StreamRequest, error)
- func StoreSqlStream(sql string, sqlId int32) StreamRequest
- type StreamResponse
- type StreamResult
- type Value
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type BatchCondition ¶
type BatchCondition struct {
Type string `json:"type"`
Step *int32 `json:"step,omitempty"`
Cond *BatchCondition `json:"cond,omitempty"`
Conds []BatchCondition `json:"conds,omitempty"`
}
type BatchResult ¶
type BatchResult struct {
StepResults []*StmtResult `json:"step_results"`
StepErrors []*Error `json:"step_errors"`
}
type BatchStep ¶
type BatchStep struct {
Stmt Stmt `json:"stmt"`
Condition *BatchCondition `json:"condition,omitempty"`
}
type PipelineRequest ¶
type PipelineRequest struct {
Baton string `json:"baton,omitempty"`
Requests []StreamRequest `json:"requests"`
}
func (*PipelineRequest) Add ¶
func (pr *PipelineRequest) Add(request StreamRequest)
type PipelineResponse ¶
type PipelineResponse struct {
Baton string `json:"baton,omitempty"`
BaseUrl string `json:"base_url,omitempty"`
Results []StreamResult `json:"results"`
}
type Stmt ¶
type Stmt struct {
Sql *string `json:"sql,omitempty"`
SqlId *int32 `json:"sql_id,omitempty"`
Args []Value `json:"args,omitempty"`
NamedArgs []NamedArg `json:"named_args,omitempty"`
WantRows bool `json:"want_rows"`
}
func (*Stmt) AddPositionalArgs ¶
type StmtResult ¶
type StmtResult struct {
Cols []Column `json:"cols"`
Rows [][]Value `json:"rows"`
AffectedRowCount int32 `json:"affected_row_count"`
LastInsertRowId *string `json:"last_insert_rowid"`
}
func (*StmtResult) GetLastInsertRowId ¶
func (r *StmtResult) GetLastInsertRowId() int64
type StreamRequest ¶
type StreamRequest struct {
Type string `json:"type"`
Stmt *Stmt `json:"stmt,omitempty"`
Batch *Batch `json:"batch,omitempty"`
Sql *string `json:"sql,omitempty"`
SqlId *int32 `json:"sql_id,omitempty"`
}
func BatchStream ¶
func CloseStoredSqlStream ¶
func CloseStoredSqlStream(sqlId int32) StreamRequest
func CloseStream ¶
func CloseStream() StreamRequest
func ExecuteStoredStream ¶
func ExecuteStream ¶
func StoreSqlStream ¶
func StoreSqlStream(sql string, sqlId int32) StreamRequest
type StreamResponse ¶
type StreamResponse struct {
Type string `json:"type"`
Result json.RawMessage `json:"result,omitempty"`
}
func (*StreamResponse) BatchResult ¶
func (r *StreamResponse) BatchResult() (*BatchResult, error)
func (*StreamResponse) ExecuteResult ¶
func (r *StreamResponse) ExecuteResult() (*StmtResult, error)
type StreamResult ¶
type StreamResult struct {
Type string `json:"type"`
Response *StreamResponse `json:"response,omitempty"`
Error *Error `json:"error,omitempty"`
}
Click to show internal directories.
Click to hide internal directories.