Documentation
¶
Index ¶
Constants ¶
View Source
const ( TuplesOK = "TuplesOk" CommandOK = "CommandOk" )
Constants defined for SQL response
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Args ¶
type Args struct {
SQL string `json:"sql,omitempty"`
Table interface{} `json:"table,omitempty"`
Columns interface{} `json:"columns,omitempty"`
Where interface{} `json:"where,omitempty"`
OrderBy interface{} `json:"order_by,omitempty"`
Objects []interface{} `json:"objects,omitempty"`
Limit int `json:"limit,omitempty"`
Returning []string `json:"returning,omitempty"`
Set interface{} `json:"$set,omitempty"`
OnConflict `json:"on_conflict,omitempty"`
}
Args for a query
type Client ¶
type Client struct {
Endpoint string
Headers map[string]string
// contains filtered or unexported fields
}
Client can execute queries against an endpoint
type Error ¶
type Error struct {
Path string `json:"path"`
Err string `json:"error"`
Internal *InternalError `json:"internal,omitempty"`
Message string `json:"message,omitempty"`
Code string `json:"code"`
}
Error is a Hasura erro response structure;e
type InternalError ¶
type InternalError struct {
Arguments []string `json:"arguments"`
Error PostgresError `json:"error"`
Prepared bool `json:"prepared"`
Statement string `json:"statement"`
}
InternalError is thrown when SQL execution fails
type OnConflict ¶
type OnConflict struct {
// action: one of update or ignore
Action string `json:"action"`
Constraint string `json:"constraint,omitempty"`
ConstraintOn []string `json:"constraint_on,omitempty"`
}
OnConflict argument
type OrderBy ¶
type OrderBy struct {
Column string `json:"column,omitempty"`
Type string `json:"type,omitempty"`
Nulls string `json:"nulls,omitempty"`
}
OrderBy is the Hasura order_by expression
type PostgresError ¶
type PostgresError struct {
StatusCode string `json:"status_code"`
ExecStatus string `json:"exec_status"`
Message string `json:"message"`
Description string `json:"description"`
Hint string `json:"hint"`
}
PostgresError is the error thrown by Postgres
type RelatedColumn ¶
type RelatedColumn struct {
Name string `json:"name"`
Columns interface{} `json:"columns,omitempty"`
}
RelatedColumn is a relationship expression in a select query
type RunSQLResponse ¶
type RunSQLResponse struct {
ResultType string `json:"result_type"`
Result [][]string `json:"result"`
}
RunSQLResponse is the structured response obtained when SQL is executed
Click to show internal directories.
Click to hide internal directories.