Documentation ¶
Index ¶
- Constants
- func ALTER_AUTHORIZATION(context *rsql.Context, database_name string, change_owner_login string) *rsql.Error
- func ALTER_DATABASE(context *rsql.Context, database_name string, changes dict.Database_params) *rsql.Error
- func ALTER_INDEX(context *rsql.Context, table_qname rsql.Object_qname_t, index_name string, ...) *rsql.Error
- func ALTER_LOGIN(context *rsql.Context, login_name string, changes dict.Login_params) *rsql.Error
- func ALTER_ROLE(context *rsql.Context, database_name string, role_name string, ...) *rsql.Error
- func ALTER_SERVER_PARAMETER(context *rsql.Context, param_id dict.Server_parameter_t, value_int int64, ...) *rsql.Error
- func ALTER_TABLE(context *rsql.Context, args dict.Table_params) *rsql.Error
- func ALTER_USER(context *rsql.Context, database_name string, user_name string, ...) *rsql.Error
- func ASSERT_(dataslot *data.BOOLEAN) *rsql.Error
- func ASSERT_ERROR_(dataslot rsql.IDataslot, error_suffix *data.VARCHAR) *rsql.Error
- func ASSERT_NULL_(dataslot rsql.IDataslot) *rsql.Error
- func BACKUP(context *rsql.Context, database_name string, filename string, ...) (rsql_err *rsql.Error)
- func BEGIN_TRANSACTION(context *rsql.Context) *rsql.Error
- func BULK_EXPORT(context *rsql.Context, curs csr.Cursor, filename string, ...) (rsql_err *rsql.Error)
- func BULK_INSERT(context *rsql.Context, table_qname rsql.Object_qname_t, filename string, ...) *rsql.Error
- func COMMIT_TRANSACTION(context *rsql.Context) *rsql.Error
- func CREATE_DATABASE(context *rsql.Context, database_name string) *rsql.Error
- func CREATE_INDEX(context *rsql.Context, args dict.Index_params) *rsql.Error
- func CREATE_LOGIN(context *rsql.Context, login_name string, login_params dict.Login_params) *rsql.Error
- func CREATE_ROLE(context *rsql.Context, database_name string, role_name string) *rsql.Error
- func CREATE_TABLE(context *rsql.Context, database_name string, schema_name string, ...) *rsql.Error
- func CREATE_USER(context *rsql.Context, database_name string, user_name string, ...) *rsql.Error
- func DELETE(context *rsql.Context, curs csr.Cursor, target_cursor *csr.Cursor_table) *rsql.Error
- func DENY(context *rsql.Context, object_name rsql.Object_qname_t, ...) *rsql.Error
- func DROP_DATABASE(context *rsql.Context, database_name string) *rsql.Error
- func DROP_INDEX(context *rsql.Context, table_qname rsql.Object_qname_t, index_name string) *rsql.Error
- func DROP_LOGIN(context *rsql.Context, login_name string) *rsql.Error
- func DROP_ROLE(context *rsql.Context, database_name string, role_name string) *rsql.Error
- func DROP_TABLE(context *rsql.Context, table_qname rsql.Object_qname_t) *rsql.Error
- func DROP_USER(context *rsql.Context, database_name string, user_name string) *rsql.Error
- func DUMP_DATABASE(context *rsql.Context, dump_params rsql.Dump_params) (rsql_err *rsql.Error)
- func DUMP_LOGINS(context *rsql.Context, dump_params rsql.Dump_params) (rsql_err *rsql.Error)
- func DUMP_PARAMETERS(context *rsql.Context, dump_params rsql.Dump_params) (rsql_err *rsql.Error)
- func GRANT(context *rsql.Context, object_name rsql.Object_qname_t, ...) *rsql.Error
- func INSERT_SELECT(context *rsql.Context, table_qname rsql.Object_qname_t, ...) *rsql.Error
- func INSERT_VALUES(context *rsql.Context, table_qname rsql.Object_qname_t, ...) *rsql.Error
- func PRINT(context *rsql.Context, args []rsql.IDataslot) *rsql.Error
- func RESTORE(context *rsql.Context, database_name string, filename string, ...) (rsql_err *rsql.Error)
- func REVOKE(context *rsql.Context, object_name rsql.Object_qname_t, ...) *rsql.Error
- func ROLLBACK_TRANSACTION(context *rsql.Context) *rsql.Error
- func SELECT_OR_UNION(context *rsql.Context, curs csr.Cursor, curs_orderby *csr.Cursor_table, ...) *rsql.Error
- func SET_NOCOUNT(context *rsql.Context, arg bool) *rsql.Error
- func SHOW_COLLATIONS(context *rsql.Context) *rsql.Error
- func SHOW_DATABASE(context *rsql.Context, params rsql.Show_params) *rsql.Error
- func SHOW_INFO(context *rsql.Context, params rsql.Show_info_params) *rsql.Error
- func SHOW_LANGUAGES(context *rsql.Context) *rsql.Error
- func SHOW_LOCKS(context *rsql.Context) *rsql.Error
- func SHOW_LOGIN(context *rsql.Context, params rsql.Show_params) *rsql.Error
- func SHOW_PARAMETER(context *rsql.Context, params rsql.Show_params) *rsql.Error
- func SHOW_ROLE(context *rsql.Context, params rsql.Show_params) *rsql.Error
- func SHOW_TABLE(context *rsql.Context, params rsql.Show_params) *rsql.Error
- func SHOW_USER(context *rsql.Context, params rsql.Show_params) *rsql.Error
- func SHOW_WORKERS(context *rsql.Context) *rsql.Error
- func SHRINK_TABLE(context *rsql.Context, table_qname rsql.Object_qname_t, ...) *rsql.Error
- func SHUTDOWN(context *rsql.Context, nowait bool) *rsql.Error
- func SIGTERM_handler()
- func SLEEP(context *rsql.Context, duration float64) *rsql.Error
- func THROW(error_number *data.INT, message *data.VARCHAR, severity *data.INT, ...) *rsql.Error
- func TRUNCATE_TABLE(context *rsql.Context, table_qname rsql.Object_qname_t, ...) *rsql.Error
- func UPDATE(context *rsql.Context, table_qname rsql.Object_qname_t, ...) *rsql.Error
- func USE(context *rsql.Context, database_name string, vars_OUT []rsql.IDataslot) *rsql.Error
- func Windows_service_stop() (stopped bool)
- type Export_writer
Constants ¶
const ( MESSAGE_NO_OBJECT_FOUND = "\nSHOW: object [%s] not found." MESSAGE_COUNT = "\nelement count: %d" )
const BULK_EXPORT_BYTE_BUFFER_DEFAULT_CAPACITY = 300
const READER_BUFSIZE = 32768
const WRITER_BUFSIZE = 32768
Variables ¶
This section is empty.
Functions ¶
func ALTER_AUTHORIZATION ¶
func ALTER_DATABASE ¶
func ALTER_INDEX ¶
func ALTER_LOGIN ¶
func ALTER_ROLE ¶
func ALTER_SERVER_PARAMETER ¶
func ALTER_TABLE ¶
func ALTER_USER ¶
func ASSERT_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 ¶
BEGIN_TRANSACTION is the start of an explicit transaction.
func BULK_EXPORT ¶
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 ¶
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_INDEX ¶
func CREATE_LOGIN ¶
func CREATE_ROLE ¶
func CREATE_TABLE ¶
func CREATE_USER ¶
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_INDEX ¶
func DROP_TABLE ¶
func DUMP_DATABASE ¶
func DUMP_LOGINS ¶
func DUMP_PARAMETERS ¶
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 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 ¶
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 SHOW_DATABASE ¶
func SHOW_LOGIN ¶
func SHOW_PARAMETER ¶
func SHOW_TABLE ¶
func SHRINK_TABLE ¶
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 TRUNCATE_TABLE ¶
func UPDATE ¶
func UPDATE(context *rsql.Context, table_qname rsql.Object_qname_t, params rsql.Update_params) *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.
Source Files ¶
- stmt_ASSERT.go
- stmt_PRINT.go
- stmt_SET_NOCOUNT.go
- stmt_SHUTDOWN.go
- stmt_SLEEP.go
- stmt_THROW.go
- stmt_misc.go
- stmt_sql_BACKUP.go
- stmt_sql_BULK_EXPORT.go
- stmt_sql_CREATE_DROP_LOGIN_USER_DB.go
- stmt_sql_CREATE_DROP_TABLE.go
- stmt_sql_DELETE.go
- stmt_sql_DUMP.go
- stmt_sql_INSERT.go
- stmt_sql_RESTORE.go
- stmt_sql_SELECT.go
- stmt_sql_SHOW.go
- stmt_sql_SHRINK.go
- stmt_sql_TRUNCATE.go
- stmt_sql_UPDATE.go