stmt

package
v0.0.0-...-91c5940 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Aug 16, 2017 License: GPL-3.0 Imports: 27 Imported by: 0

Documentation

Index

Constants

View Source
const (
	MESSAGE_NO_OBJECT_FOUND = "\nSHOW: object [%s] not found."
	MESSAGE_COUNT           = "\nelement count: %d"
)
View Source
const BULK_EXPORT_BYTE_BUFFER_DEFAULT_CAPACITY = 300
View Source
const READER_BUFSIZE = 32768
View Source
const WRITER_BUFSIZE = 32768

Variables

This section is empty.

Functions

func ALTER_AUTHORIZATION

func ALTER_AUTHORIZATION(context *rsql.Context, database_name string, change_owner_login string) *rsql.Error

func ALTER_DATABASE

func ALTER_DATABASE(context *rsql.Context, database_name string, changes dict.Database_params) *rsql.Error

func ALTER_INDEX

func ALTER_INDEX(context *rsql.Context, table_qname rsql.Object_qname_t, index_name string, change_index_name string, change_index_name_original string) *rsql.Error

func ALTER_LOGIN

func ALTER_LOGIN(context *rsql.Context, login_name string, changes dict.Login_params) *rsql.Error

func ALTER_ROLE

func ALTER_ROLE(context *rsql.Context, database_name string, role_name string, change_name string, add_member_name string, drop_member_name string) *rsql.Error

func ALTER_SERVER_PARAMETER

func ALTER_SERVER_PARAMETER(context *rsql.Context, param_id dict.Server_parameter_t, value_int int64, value_string string) *rsql.Error

func ALTER_TABLE

func ALTER_TABLE(context *rsql.Context, args dict.Table_params) *rsql.Error

func ALTER_USER

func ALTER_USER(context *rsql.Context, database_name string, user_name string, change_name string, change_login string) *rsql.Error

func ASSERT_

func ASSERT_(dataslot *data.BOOLEAN) *rsql.Error

func ASSERT_ERROR_

func ASSERT_ERROR_(dataslot rsql.IDataslot, error_suffix *data.VARCHAR) *rsql.Error

func ASSERT_NULL_

func ASSERT_NULL_(dataslot rsql.IDataslot) *rsql.Error

func BACKUP

func BACKUP(context *rsql.Context, database_name string, filename string, params rsql.Backup_params) (rsql_err *rsql.Error)

BACKUP DATABASE database_name

TO DISK =  'file_name'

Example:

BACKUP DATABASE mydb
  TO DISK = '/Backups/mydb.rbak'

func BEGIN_TRANSACTION

func BEGIN_TRANSACTION(context *rsql.Context) *rsql.Error

BEGIN_TRANSACTION is the start of an explicit transaction.

func BULK_EXPORT

func BULK_EXPORT(context *rsql.Context, curs csr.Cursor, filename string, params rsql.Bulk_export_params) (rsql_err *rsql.Error)

func BULK_INSERT

func BULK_INSERT(context *rsql.Context, table_qname rsql.Object_qname_t, filename string, params rsql.Bulk_insert_params, gtabledef *rsql.GTabledef, syslang *data.SYSLANGUAGE) *rsql.Error

func COMMIT_TRANSACTION

func COMMIT_TRANSACTION(context *rsql.Context) *rsql.Error

COMMIT_TRANSACTION is the end of an explicit transaction, and applies all changes to disk.

If transaction count <= 0, there is no corresponding BEGIN TRAN and an error is raised. If transaction count > 1, COMMIT is in a nested explicit transaction. It just decrements transaction count. If transaction count == 1, a real commit is performed and all changes are copied to the table files. Transaction count is reset to 0.

func CREATE_DATABASE

func CREATE_DATABASE(context *rsql.Context, database_name string) *rsql.Error

func CREATE_INDEX

func CREATE_INDEX(context *rsql.Context, args dict.Index_params) *rsql.Error

func CREATE_LOGIN

func CREATE_LOGIN(context *rsql.Context, login_name string, login_params dict.Login_params) *rsql.Error

func CREATE_ROLE

func CREATE_ROLE(context *rsql.Context, database_name string, role_name string) *rsql.Error

func CREATE_TABLE

func CREATE_TABLE(context *rsql.Context, database_name string, schema_name string, gtabledef *rsql.GTabledef) *rsql.Error

func CREATE_USER

func CREATE_USER(context *rsql.Context, database_name string, user_name string, login_name string) *rsql.Error

func DELETE

func DELETE(context *rsql.Context, curs csr.Cursor, target_cursor *csr.Cursor_table) *rsql.Error

func DENY

func DENY(context *rsql.Context, object_name rsql.Object_qname_t, permission rsql.Permission_t, list_of_principal_names []string) *rsql.Error

func DROP_DATABASE

func DROP_DATABASE(context *rsql.Context, database_name string) *rsql.Error

func DROP_INDEX

func DROP_INDEX(context *rsql.Context, table_qname rsql.Object_qname_t, index_name string) *rsql.Error

func DROP_LOGIN

func DROP_LOGIN(context *rsql.Context, login_name string) *rsql.Error

func DROP_ROLE

func DROP_ROLE(context *rsql.Context, database_name string, role_name string) *rsql.Error

func DROP_TABLE

func DROP_TABLE(context *rsql.Context, table_qname rsql.Object_qname_t) *rsql.Error

func DROP_USER

func DROP_USER(context *rsql.Context, database_name string, user_name string) *rsql.Error

func DUMP_DATABASE

func DUMP_DATABASE(context *rsql.Context, dump_params rsql.Dump_params) (rsql_err *rsql.Error)

func DUMP_LOGINS

func DUMP_LOGINS(context *rsql.Context, dump_params rsql.Dump_params) (rsql_err *rsql.Error)

func DUMP_PARAMETERS

func DUMP_PARAMETERS(context *rsql.Context, dump_params rsql.Dump_params) (rsql_err *rsql.Error)

func GRANT

func GRANT(context *rsql.Context, object_name rsql.Object_qname_t, permission rsql.Permission_t, list_of_principal_names []string) *rsql.Error

func INSERT_SELECT

func INSERT_SELECT(context *rsql.Context, table_qname rsql.Object_qname_t, gtabledef *rsql.GTabledef, params rsql.Insert_select_params) *rsql.Error

func INSERT_VALUES

func INSERT_VALUES(context *rsql.Context, table_qname rsql.Object_qname_t, gtabledef *rsql.GTabledef, list_rows []rsql.Row, explicit_IDENTITY_provided bool) *rsql.Error

func PRINT

func PRINT(context *rsql.Context, args []rsql.IDataslot) *rsql.Error

func RESTORE

func RESTORE(context *rsql.Context, database_name string, filename string, params rsql.Restore_params) (rsql_err *rsql.Error)

RESTORE DATABASE database_name

FROM DISK =  'file_name'

Example:

RESTORE DATABASE mydb
  FROM DISK = '/Backups/mydb.rbak'

func REVOKE

func REVOKE(context *rsql.Context, object_name rsql.Object_qname_t, permission rsql.Permission_t, list_of_principal_names []string, from_all bool) *rsql.Error

func ROLLBACK_TRANSACTION

func ROLLBACK_TRANSACTION(context *rsql.Context) *rsql.Error

ROLLBACK_TRANSACTION is the end of an explicit transaction, and don't apply any change to disk. No change is copied to the table files. Transaction count is forced to 0.

func SELECT_OR_UNION

func SELECT_OR_UNION(context *rsql.Context, curs csr.Cursor, curs_orderby *csr.Cursor_table, colname_list []string, params *rsql.Select_params) *rsql.Error

func SET_NOCOUNT

func SET_NOCOUNT(context *rsql.Context, arg bool) *rsql.Error

func SHOW_COLLATIONS

func SHOW_COLLATIONS(context *rsql.Context) *rsql.Error

func SHOW_DATABASE

func SHOW_DATABASE(context *rsql.Context, params rsql.Show_params) *rsql.Error

func SHOW_INFO

func SHOW_INFO(context *rsql.Context, params rsql.Show_info_params) *rsql.Error

func SHOW_LANGUAGES

func SHOW_LANGUAGES(context *rsql.Context) *rsql.Error

func SHOW_LOCKS

func SHOW_LOCKS(context *rsql.Context) *rsql.Error

func SHOW_LOGIN

func SHOW_LOGIN(context *rsql.Context, params rsql.Show_params) *rsql.Error

func SHOW_PARAMETER

func SHOW_PARAMETER(context *rsql.Context, params rsql.Show_params) *rsql.Error

func SHOW_ROLE

func SHOW_ROLE(context *rsql.Context, params rsql.Show_params) *rsql.Error

func SHOW_TABLE

func SHOW_TABLE(context *rsql.Context, params rsql.Show_params) *rsql.Error

func SHOW_USER

func SHOW_USER(context *rsql.Context, params rsql.Show_params) *rsql.Error

func SHOW_WORKERS

func SHOW_WORKERS(context *rsql.Context) *rsql.Error

func SHRINK_TABLE

func SHRINK_TABLE(context *rsql.Context, table_qname rsql.Object_qname_t, gtabledef *rsql.GTabledef) *rsql.Error

func SHUTDOWN

func SHUTDOWN(context *rsql.Context, nowait bool) *rsql.Error

func SIGTERM_handler

func SIGTERM_handler()

SIGTERM_handler is called when SIGTERM signal is received, indicating that the server should shutdown.

It is triggered by systemd, which sends SIGTERM to stop the server. In the unit file for the service, the option "TimeoutStopSec=" specifies when systemd should kill the server with SIGKILL signal, if the server is still running.

func SLEEP

func SLEEP(context *rsql.Context, duration float64) *rsql.Error

func THROW

func THROW(error_number *data.INT, message *data.VARCHAR, severity *data.INT, state *data.TINYINT) *rsql.Error

func TRUNCATE_TABLE

func TRUNCATE_TABLE(context *rsql.Context, table_qname rsql.Object_qname_t, gtabledef *rsql.GTabledef, shrink_file bool) *rsql.Error

func UPDATE

func UPDATE(context *rsql.Context, table_qname rsql.Object_qname_t, params rsql.Update_params) *rsql.Error

func USE

func USE(context *rsql.Context, database_name string, vars_OUT []rsql.IDataslot) *rsql.Error

func Windows_service_stop

func Windows_service_stop() (stopped bool)

Windows_service_stop is called by the Windows service handler, when a stop command is received.

Types

type Export_writer

type Export_writer struct {
	// contains filtered or unexported fields
}

Export_writer is the Writer for BULK EXPORT.

func (*Export_writer) Close

func (w *Export_writer) Close() error

Close tries hard to close the Writer. It flushes and closes underlying writers, except the file.

But you must close the file yourself.

func (*Export_writer) Write

func (w *Export_writer) Write(data []byte) (n int, err error)

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL