Documentation
¶
Overview ¶
Package prisma provides runtime functions for generated Prisma clients. Users should not have to interact with it directly.
Index ¶
- type BatchPayload
- type BatchPayloadExec
- type Client
- func (client *Client) Create(params interface{}, typeNames [2]string, instrName string, typeFields []string) *Exec
- func (client *Client) Delete(params interface{}, typeNames [2]string, instrName string, typeFields []string) *Exec
- func (client *Client) DeleteMany(params interface{}, typeName string, instrName string) *BatchPayloadExec
- func (client *Client) GetMany(base *Exec, params *WhereParams, typeNames [3]string, instrName string, ...) *Exec
- func (client *Client) GetOne(base *Exec, params interface{}, typeNames [2]string, instrName string, ...) *Exec
- func (client *Client) GraphQL(ctx context.Context, query string, variables map[string]interface{}) (map[string]interface{}, error)
- func (client *Client) ProcessInstructions(stack []instruction) string
- func (client *Client) Update(params UpdateParams, typeNames [3]string, instrName string, ...) *Exec
- func (client *Client) UpdateMany(params UpdateParams, typeNames [2]string, instrName string) *BatchPayloadExec
- func (client *Client) Upsert(params *UpsertParams, typeNames [4]string, instrName string, ...) *Exec
- type Exec
- type UpdateParams
- type UpsertParams
- type WhereParams
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type BatchPayload ¶
type BatchPayload struct {
Count int64 `json:"count"`
}
type BatchPayloadExec ¶
type BatchPayloadExec struct {
// contains filtered or unexported fields
}
func (*BatchPayloadExec) Exec ¶
func (exec *BatchPayloadExec) Exec(ctx context.Context) (BatchPayload, error)
type Client ¶
type Client struct {
Endpoint string
Secret string
// TODO(dh): find a better name for this field
GQLClient *graphql.Client
}
func (*Client) DeleteMany ¶
func (client *Client) DeleteMany(params interface{}, typeName string, instrName string) *BatchPayloadExec
func (*Client) GraphQL ¶
func (client *Client) GraphQL(ctx context.Context, query string, variables map[string]interface{}) (map[string]interface{}, error)
GraphQL Send a GraphQL operation request
func (*Client) ProcessInstructions ¶
func (*Client) UpdateMany ¶
func (client *Client) UpdateMany(params UpdateParams, typeNames [2]string, instrName string) *BatchPayloadExec
type UpdateParams ¶
type UpdateParams struct {
Data interface{}
Where interface{}
}
type UpsertParams ¶
type UpsertParams struct {
Where interface{}
Create interface{}
Update interface{}
}
type WhereParams ¶
type WhereParams struct {
Where interface{} `json:"where,omitempty"`
OrderBy *string `json:"orderBy,omitempty"`
Skip *int32 `json:"skip,omitempty"`
After *string `json:"after,omitempty"`
Before *string `json:"before,omitempty"`
First *int32 `json:"first,omitempty"`
Last *int32 `json:"last,omitempty"`
}
Click to show internal directories.
Click to hide internal directories.