Documentation ¶
Overview ¶
Package withddl allows you to automatically ensure the tables against which you want to apply statements are up-to-date.
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type WithDDL ¶
type WithDDL struct {
// contains filtered or unexported fields
}
WithDDL allows you to execute statements against tables whose schema may not be up-to-date. If the tables don't exist or result in a schema error, it can apply a series of idempotent DDLs that will create or bring the tables to the desired state and retry.
func (*WithDDL) Exec ¶
Exec executes the query using the supplied function. If there are any schema errors, it applies the DDLs and retries. Funcs can be any of these types: func(query string) (*sqltypes.Result, error) func(query string, maxrows int) (*sqltypes.Result, error) func(query string, maxrows int, wantfields bool) (*sqltypes.Result, error) func(ctx context.Context, query string, maxrows int, wantfields bool) (*sqltypes.Result, error)