Documentation
¶
Overview ¶
Package firebird provides database/sql driver for Firebird RDBMS.
Index ¶
- Constants
- Variables
- func GetServiceInfoSPBPreamble() []byte
- func NewErrOpResonse(opRCode int32) error
- type BackupManager
- type BackupOption
- func WithConvertExternalTablesToInternalTables() BackupOption
- func WithExpand() BackupOption
- func WithGarbageCollect() BackupOption
- func WithIgnoreChecksums() BackupOption
- func WithIgnoreLimboTransactions() BackupOption
- func WithMetadataOnly() BackupOption
- func WithTransportable() BackupOption
- func WithoutConvertExternalTablesToInternalTables() BackupOption
- func WithoutExpand() BackupOption
- func WithoutGarbageCollect() BackupOption
- func WithoutIgnoreChecksums() BackupOption
- func WithoutIgnoreLimboTransactions() BackupOption
- func WithoutMetadataOnly() BackupOption
- func WithoutTransportable() BackupOption
- type BackupOptions
- type ErrOpResponse
- type Event
- type EventHandler
- type FbEvent
- func (e *FbEvent) Close() error
- func (e *FbEvent) Count() int
- func (e *FbEvent) IsClosed() bool
- func (e *FbEvent) PostEvent(name string) error
- func (e *FbEvent) Subscribe(events []string, cb EventHandler) (*Subscription, error)
- func (e *FbEvent) SubscribeChan(events []string, chEvent chan Event) (*Subscription, error)
- func (e *FbEvent) Subscribers() []*Subscription
- type FirebirdVersion
- type MaintenanceManager
- func (mm *MaintenanceManager) ActivateShadow(shadow string) error
- func (mm *MaintenanceManager) CommitTransaction(database string, transaction int64) error
- func (mm *MaintenanceManager) GetLimboTransactions(database string) ([]int64, error)
- func (mm *MaintenanceManager) KillShadow(database string) error
- func (mm *MaintenanceManager) Mend(database string) error
- func (mm *MaintenanceManager) NoLinger(database string) error
- func (mm *MaintenanceManager) Online(database string) error
- func (mm *MaintenanceManager) OnlineEx(database string, operationMode OperationMode) error
- func (mm *MaintenanceManager) RollbackTransaction(database string, transaction int64) error
- func (mm *MaintenanceManager) SetAccessModeReadOnly(database string) error
- func (mm *MaintenanceManager) SetAccessModeReadWrite(database string) error
- func (mm *MaintenanceManager) SetDialect(database string, dialect int) error
- func (mm *MaintenanceManager) SetPageBuffers(database string, pageCount int) error
- func (mm *MaintenanceManager) SetPageFillNoReserve(database string) error
- func (mm *MaintenanceManager) SetPageFillReserve(database string) error
- func (mm *MaintenanceManager) SetSweepInterval(database string, transactions uint) error
- func (mm *MaintenanceManager) SetWriteModeAsync(database string) error
- func (mm *MaintenanceManager) SetWriteModeSync(database string) error
- func (mm *MaintenanceManager) Shutdown(database string, shutdownMode ShutdownMode, timeout uint) error
- func (mm *MaintenanceManager) ShutdownEx(database string, operationMode OperationMode, shutdownModeEx ShutdownModeEx, ...) error
- func (mm *MaintenanceManager) Sweep(database string) error
- func (mm *MaintenanceManager) Validate(database string, options int) error
- type NBackupManager
- func (bm *NBackupManager) Backup(database string, backup string, options NBackupOptions, verbose chan string) error
- func (bm *NBackupManager) Fixup(database string, options NBackupOptions, verbose chan string) error
- func (bm *NBackupManager) Restore(backups []string, database string, options NBackupOptions, verbose chan string) error
- type NBackupOption
- func WithDBTriggers() NBackupOption
- func WithGuid(guid string) NBackupOption
- func WithInPlaceRestore() NBackupOption
- func WithLevel(level int) NBackupOption
- func WithPlaceRestore() NBackupOption
- func WithPreserveSequence() NBackupOption
- func WithoutDBTriggers() NBackupOption
- func WithoutPreserveSequence() NBackupOption
- type NBackupOptions
- type OperationMode
- type RestoreOption
- func WithCacheBuffers(cacheBuffers int32) RestoreOption
- func WithCommitAfterEachTable() RestoreOption
- func WithDeactivateIndexes() RestoreOption
- func WithEnforceConstraints() RestoreOption
- func WithPageSize(pageSize int32) RestoreOption
- func WithReplace() RestoreOption
- func WithRestoreShadows() RestoreOption
- func WithUseAllPageSpace() RestoreOption
- func WithoutCommitAfterEachTable() RestoreOption
- func WithoutEnforceConstraints() RestoreOption
- func WithoutReplace() RestoreOption
- func WithoutRestoreShadows() RestoreOption
- func WithoutUseAllPageSpace() RestoreOption
- type RestoreOptions
- type ServiceManager
- func (svc *ServiceManager) Close() (err error)
- func (svc *ServiceManager) GetArchitecture() (string, error)
- func (svc *ServiceManager) GetDbStats(database string, options StatisticsOptions, result chan string) error
- func (svc *ServiceManager) GetDbStatsString(database string, options StatisticsOptions) (string, error)
- func (svc *ServiceManager) GetFbLog(result chan string) error
- func (svc *ServiceManager) GetFbLogString() (string, error)
- func (svc *ServiceManager) GetHomeDir() (string, error)
- func (svc *ServiceManager) GetLockFileDir() (string, error)
- func (svc *ServiceManager) GetMsgFileDir() (string, error)
- func (svc *ServiceManager) GetSecurityDatabasePath() (string, error)
- func (svc *ServiceManager) GetServerVersion() (FirebirdVersion, error)
- func (svc *ServiceManager) GetServerVersionString() (string, error)
- func (svc *ServiceManager) GetServiceInfo(spb []byte, srb []byte, bufferLength int32) ([]byte, error)
- func (svc *ServiceManager) GetServiceInfoInt(item byte) (int16, error)
- func (svc *ServiceManager) GetServiceInfoString(item byte) (string, error)
- func (svc *ServiceManager) GetString() (result string, end bool, err error)
- func (svc *ServiceManager) GetSvrDbInfo() (*SrvDbInfo, error)
- func (svc *ServiceManager) IsRunning() (bool, error)
- func (svc *ServiceManager) ServiceAttach(spb []byte, verbose chan string) error
- func (svc *ServiceManager) ServiceAttachBuffer(spb []byte, verbose chan []byte) error
- func (svc *ServiceManager) ServiceStart(spb []byte) error
- func (svc *ServiceManager) Wait() error
- func (svc *ServiceManager) WaitBuffer(stream chan []byte) error
- func (svc *ServiceManager) WaitString() (string, error)
- func (svc *ServiceManager) WaitStrings(result chan string) error
- type ServiceManagerOption
- type ServiceManagerOptions
- type ShutdownMode
- type ShutdownModeEx
- type SrvDbInfo
- type StatisticsOption
- func WithOnlyHeaderPages() StatisticsOption
- func WithRecordVersions() StatisticsOption
- func WithSystemRelationsAndIndexes() StatisticsOption
- func WithTables(tables []string) StatisticsOption
- func WithUserDataPages() StatisticsOption
- func WithUserIndexPages() StatisticsOption
- func WithoutIndexPages() StatisticsOption
- func WithoutOnlyHeaderPages() StatisticsOption
- func WithoutRecordVersions() StatisticsOption
- func WithoutSystemRelationsAndIndexes() StatisticsOption
- func WithoutUserDataPages() StatisticsOption
- type StatisticsOptions
- type Subscription
- type TraceManager
- type TraceSession
- type User
- type UserManager
- func (um *UserManager) AddUser(user User) error
- func (um *UserManager) Close() error
- func (um *UserManager) DeleteUser(user User) error
- func (um *UserManager) DropAdminRoleMapping() error
- func (um *UserManager) GetUsers() ([]User, error)
- func (um *UserManager) ModifyUser(user User) error
- func (um *UserManager) SetAdminRoleMapping() error
- type UserManagerOption
- type UserManagerOptions
- type UserOption
- func WithAdmin() UserOption
- func WithFirstName(firstname string) UserOption
- func WithGroupId(groupId int32) UserOption
- func WithLastName(lastname string) UserOption
- func WithMiddleName(middlename string) UserOption
- func WithPassword(password string) UserOption
- func WithUserId(userId int32) UserOption
- func WithUsername(username string) UserOption
- func WithoutAdmin() UserOption
- type XPBReader
- func (pb *XPBReader) End() bool
- func (pb *XPBReader) Get() byte
- func (pb *XPBReader) GetInt16() int16
- func (pb *XPBReader) GetInt32() int32
- func (pb *XPBReader) GetInt64() int64
- func (pb *XPBReader) GetString() string
- func (pb *XPBReader) Next() (have bool, value byte)
- func (pb *XPBReader) Reset()
- func (pb *XPBReader) Skip(count int)
- type XPBWriter
- func (pb *XPBWriter) Bytes() []byte
- func (pb *XPBWriter) PutByte(tag byte, val byte) *XPBWriter
- func (pb *XPBWriter) PutBytes(bytes []byte) *XPBWriter
- func (pb *XPBWriter) PutInt16(tag byte, val int16) *XPBWriter
- func (pb *XPBWriter) PutInt32(tag byte, val int32) *XPBWriter
- func (pb *XPBWriter) PutInt64(tag byte, val int64) *XPBWriter
- func (pb *XPBWriter) PutString(tag byte, val string) *XPBWriter
- func (pb *XPBWriter) PutTag(tag byte) *XPBWriter
- func (pb *XPBWriter) Reset() *XPBWriter
Constants ¶
View Source
const ( ISC_TIME_SECONDS_PRECISION = 10000 // Protocol Version PROTOCOL_VERSION13 = 13 PROTOCOL_VERSION16 = 16 CNCT_user = 1 CNCT_passwd = 2 CNCT_host = 4 CNCT_group = 5 CNCT_user_verification = 6 CNCT_specific_data = 7 CNCT_plugin_name = 8 CNCT_login = 9 CNCT_plugin_list = 10 CNCT_client_crypt = 11 )
View Source
const ( ISOLATION_LEVEL_READ_COMMITED_LEGACY = iota ISOLATION_LEVEL_READ_COMMITED ISOLATION_LEVEL_REPEATABLE_READ ISOLATION_LEVEL_SERIALIZABLE ISOLATION_LEVEL_READ_COMMITED_RO )
View Source
const ( SRP_KEY_SIZE = 128 SRP_SALT_SIZE = 32 DEBUG_PRIVATE_KEY = "60975527035CF2AD1989806F0407210BC81EDC04E2762A56AFD529DDDA2D4393" DEBUG_SRP = false )
View Source
const ( SessionStopped = iota SessionRunning SessionPaused )
View Source
const ( PLUGIN_LIST = "Srp256,Srp,Legacy_Auth" BUFFER_LEN = 1024 MAX_CHAR_LENGTH = 32767 BLOB_SEGMENT_SIZE = 32000 )
View Source
const ( SQL_TYPE_TEXT = 452 SQL_TYPE_VARYING = 448 SQL_TYPE_SHORT = 500 SQL_TYPE_LONG = 496 SQL_TYPE_FLOAT = 482 SQL_TYPE_DOUBLE = 480 SQL_TYPE_D_FLOAT = 530 SQL_TYPE_TIMESTAMP = 510 SQL_TYPE_BLOB = 520 SQL_TYPE_ARRAY = 540 SQL_TYPE_QUAD = 550 SQL_TYPE_TIME = 560 SQL_TYPE_DATE = 570 SQL_TYPE_INT64 = 580 SQL_TYPE_INT128 = 32752 SQL_TYPE_TIMESTAMP_TZ = 32754 SQL_TYPE_TIME_TZ = 32756 SQL_TYPE_DEC_FIXED = 32758 SQL_TYPE_DEC64 = 32760 SQL_TYPE_DEC128 = 32762 SQL_TYPE_BOOLEAN = 32764 SQL_TYPE_NULL = 32766 )
View Source
const (
EPB_version1 = 1
)
Event
Variables ¶
View Source
var ( ErrAlreadySubscribe = errors.New("already subscribe") ErrFbEventClosed = errors.New("fbevent already closed") )
Errors
View Source
var ( ErrEventAlreadyRunning = errors.New("events are already running") ErrEventNeed = errors.New("at least one event is needed") ErrWrongLengthEvent = errors.New("length name events are longer than 255") ErrEventBufferLarge = errors.New("whole events buffer is bigger than 65535") )
View Source
var ErrDsnUserUnknown = errors.New("User unknown")
View Source
var ErrOpSqlResponse = errors.New("Error op_sql_response")
View Source
var FirebirdVersionPattern = regexp.MustCompile(`((\w{2})-(\w)(\d+)\.(\d+)\.(\d+)\.(\d+)(?:-\S+)?) (.+)`)
Functions ¶
func GetServiceInfoSPBPreamble ¶ added in v0.9.12
func GetServiceInfoSPBPreamble() []byte
Types ¶
type BackupManager ¶ added in v0.9.12
type BackupManager struct {
// contains filtered or unexported fields
}
func NewBackupManager ¶ added in v0.9.12
func NewBackupManager(addr string, user string, password string, options ServiceManagerOptions) (*BackupManager, error)
func (*BackupManager) Backup ¶ added in v0.9.12
func (bm *BackupManager) Backup(database string, backup string, options BackupOptions, verbose chan string) error
func (*BackupManager) Restore ¶ added in v0.9.12
func (bm *BackupManager) Restore(backup string, database string, options RestoreOptions, verbose chan string) error
type BackupOption ¶ added in v0.9.12
type BackupOption func(*BackupOptions)
func WithConvertExternalTablesToInternalTables ¶ added in v0.9.12
func WithConvertExternalTablesToInternalTables() BackupOption
func WithExpand ¶ added in v0.9.12
func WithExpand() BackupOption
func WithGarbageCollect ¶ added in v0.9.12
func WithGarbageCollect() BackupOption
func WithIgnoreChecksums ¶ added in v0.9.12
func WithIgnoreChecksums() BackupOption
func WithIgnoreLimboTransactions ¶ added in v0.9.12
func WithIgnoreLimboTransactions() BackupOption
func WithMetadataOnly ¶ added in v0.9.12
func WithMetadataOnly() BackupOption
func WithTransportable ¶ added in v0.9.12
func WithTransportable() BackupOption
func WithoutConvertExternalTablesToInternalTables ¶ added in v0.9.12
func WithoutConvertExternalTablesToInternalTables() BackupOption
func WithoutExpand ¶ added in v0.9.12
func WithoutExpand() BackupOption
func WithoutGarbageCollect ¶ added in v0.9.12
func WithoutGarbageCollect() BackupOption
func WithoutIgnoreChecksums ¶ added in v0.9.12
func WithoutIgnoreChecksums() BackupOption
func WithoutIgnoreLimboTransactions ¶ added in v0.9.12
func WithoutIgnoreLimboTransactions() BackupOption
func WithoutMetadataOnly ¶ added in v0.9.12
func WithoutMetadataOnly() BackupOption
func WithoutTransportable ¶ added in v0.9.12
func WithoutTransportable() BackupOption
type BackupOptions ¶ added in v0.9.12
type BackupOptions struct { IgnoreChecksums bool IgnoreLimboTransactions bool MetadataOnly bool GarbageCollect bool Transportable bool ConvertExternalTablesToInternalTables bool Expand bool }
func GetDefaultBackupOptions ¶ added in v0.9.12
func GetDefaultBackupOptions() BackupOptions
func NewBackupOptions ¶ added in v0.9.12
func NewBackupOptions(opts ...BackupOption) BackupOptions
type ErrOpResponse ¶
type ErrOpResponse struct {
// contains filtered or unexported fields
}
ErrOpResponse operation request error
func (*ErrOpResponse) Error ¶
func (e *ErrOpResponse) Error() string
type FbEvent ¶
type FbEvent struct {
// contains filtered or unexported fields
}
FbEvent allows you to subscribe to events, also stores subscribers. It is possible to send events to the database.
func NewFBEvent ¶
NewFBEvent returns FbEvent for event subscription
func (*FbEvent) Subscribe ¶
func (e *FbEvent) Subscribe(events []string, cb EventHandler) (*Subscription, error)
Subscribe subscribe to events using the callback function
func (*FbEvent) SubscribeChan ¶
func (e *FbEvent) SubscribeChan(events []string, chEvent chan Event) (*Subscription, error)
SubscribeChan subscribe to events using the channel
func (*FbEvent) Subscribers ¶
func (e *FbEvent) Subscribers() []*Subscription
Subscribers returns slice of all subscribers
type FirebirdVersion ¶ added in v0.9.12
type FirebirdVersion struct { Platform string Type string Full string Major int Minor int Patch int BuildNumber int Raw string }
func ParseFirebirdVersion ¶ added in v0.9.12
func ParseFirebirdVersion(rawVersionString string) FirebirdVersion
func (FirebirdVersion) EqualOrGreater ¶ added in v0.9.12
func (v FirebirdVersion) EqualOrGreater(major int, minor int) bool
func (FirebirdVersion) EqualOrGreaterPatch ¶ added in v0.9.12
func (v FirebirdVersion) EqualOrGreaterPatch(major int, minor int, patch int) bool
type MaintenanceManager ¶ added in v0.9.12
type MaintenanceManager struct {
// contains filtered or unexported fields
}
func NewMaintenanceManager ¶ added in v0.9.12
func NewMaintenanceManager(addr string, user string, password string, options ServiceManagerOptions) (*MaintenanceManager, error)
func (*MaintenanceManager) ActivateShadow ¶ added in v0.9.12
func (mm *MaintenanceManager) ActivateShadow(shadow string) error
func (*MaintenanceManager) CommitTransaction ¶ added in v0.9.12
func (mm *MaintenanceManager) CommitTransaction(database string, transaction int64) error
func (*MaintenanceManager) GetLimboTransactions ¶ added in v0.9.12
func (mm *MaintenanceManager) GetLimboTransactions(database string) ([]int64, error)
func (*MaintenanceManager) KillShadow ¶ added in v0.9.12
func (mm *MaintenanceManager) KillShadow(database string) error
func (*MaintenanceManager) Mend ¶ added in v0.9.12
func (mm *MaintenanceManager) Mend(database string) error
func (*MaintenanceManager) NoLinger ¶ added in v0.9.12
func (mm *MaintenanceManager) NoLinger(database string) error
func (*MaintenanceManager) Online ¶ added in v0.9.12
func (mm *MaintenanceManager) Online(database string) error
func (*MaintenanceManager) OnlineEx ¶ added in v0.9.12
func (mm *MaintenanceManager) OnlineEx(database string, operationMode OperationMode) error
func (*MaintenanceManager) RollbackTransaction ¶ added in v0.9.12
func (mm *MaintenanceManager) RollbackTransaction(database string, transaction int64) error
func (*MaintenanceManager) SetAccessModeReadOnly ¶ added in v0.9.12
func (mm *MaintenanceManager) SetAccessModeReadOnly(database string) error
func (*MaintenanceManager) SetAccessModeReadWrite ¶ added in v0.9.12
func (mm *MaintenanceManager) SetAccessModeReadWrite(database string) error
func (*MaintenanceManager) SetDialect ¶ added in v0.9.12
func (mm *MaintenanceManager) SetDialect(database string, dialect int) error
func (*MaintenanceManager) SetPageBuffers ¶ added in v0.9.12
func (mm *MaintenanceManager) SetPageBuffers(database string, pageCount int) error
func (*MaintenanceManager) SetPageFillNoReserve ¶ added in v0.9.12
func (mm *MaintenanceManager) SetPageFillNoReserve(database string) error
func (*MaintenanceManager) SetPageFillReserve ¶ added in v0.9.12
func (mm *MaintenanceManager) SetPageFillReserve(database string) error
func (*MaintenanceManager) SetSweepInterval ¶ added in v0.9.12
func (mm *MaintenanceManager) SetSweepInterval(database string, transactions uint) error
func (*MaintenanceManager) SetWriteModeAsync ¶ added in v0.9.12
func (mm *MaintenanceManager) SetWriteModeAsync(database string) error
func (*MaintenanceManager) SetWriteModeSync ¶ added in v0.9.12
func (mm *MaintenanceManager) SetWriteModeSync(database string) error
func (*MaintenanceManager) Shutdown ¶ added in v0.9.12
func (mm *MaintenanceManager) Shutdown(database string, shutdownMode ShutdownMode, timeout uint) error
func (*MaintenanceManager) ShutdownEx ¶ added in v0.9.12
func (mm *MaintenanceManager) ShutdownEx(database string, operationMode OperationMode, shutdownModeEx ShutdownModeEx, timeout uint) error
func (*MaintenanceManager) Sweep ¶ added in v0.9.12
func (mm *MaintenanceManager) Sweep(database string) error
type NBackupManager ¶ added in v0.9.12
type NBackupManager struct {
// contains filtered or unexported fields
}
func NewNBackupManager ¶ added in v0.9.12
func NewNBackupManager(addr string, user string, password string, options ServiceManagerOptions) (*NBackupManager, error)
func (*NBackupManager) Backup ¶ added in v0.9.12
func (bm *NBackupManager) Backup(database string, backup string, options NBackupOptions, verbose chan string) error
func (*NBackupManager) Fixup ¶ added in v0.9.12
func (bm *NBackupManager) Fixup(database string, options NBackupOptions, verbose chan string) error
func (*NBackupManager) Restore ¶ added in v0.9.12
func (bm *NBackupManager) Restore(backups []string, database string, options NBackupOptions, verbose chan string) error
type NBackupOption ¶ added in v0.9.12
type NBackupOption func(*NBackupOptions)
func WithDBTriggers ¶ added in v0.9.12
func WithDBTriggers() NBackupOption
func WithGuid ¶ added in v0.9.12
func WithGuid(guid string) NBackupOption
func WithInPlaceRestore ¶ added in v0.9.12
func WithInPlaceRestore() NBackupOption
func WithLevel ¶ added in v0.9.12
func WithLevel(level int) NBackupOption
func WithPlaceRestore ¶ added in v0.9.12
func WithPlaceRestore() NBackupOption
func WithPreserveSequence ¶ added in v0.9.12
func WithPreserveSequence() NBackupOption
func WithoutDBTriggers ¶ added in v0.9.12
func WithoutDBTriggers() NBackupOption
func WithoutPreserveSequence ¶ added in v0.9.12
func WithoutPreserveSequence() NBackupOption
type NBackupOptions ¶ added in v0.9.12
type NBackupOptions struct { Level int32 Guid string NoDBTriggers bool InPlaceRestore bool PreserveSequence bool }
func GetDefaultNBackupOptions ¶ added in v0.9.12
func GetDefaultNBackupOptions() NBackupOptions
func NewNBackupOptions ¶ added in v0.9.12
func NewNBackupOptions(opts ...NBackupOption) NBackupOptions
func (NBackupOptions) GetOptionsMask ¶ added in v0.9.12
func (o NBackupOptions) GetOptionsMask() int32
type OperationMode ¶ added in v0.9.12
type OperationMode byte
const ( OperationModeNormal OperationMode = isc_spb_prp_sm_normal OperationModeMulti OperationMode = isc_spb_prp_sm_multi OperationModeSingle OperationMode = isc_spb_prp_sm_single OperationModeFull OperationMode = isc_spb_prp_sm_full )
type RestoreOption ¶ added in v0.9.12
type RestoreOption func(*RestoreOptions)
func WithCacheBuffers ¶ added in v0.9.12
func WithCacheBuffers(cacheBuffers int32) RestoreOption
func WithCommitAfterEachTable ¶ added in v0.9.12
func WithCommitAfterEachTable() RestoreOption
func WithDeactivateIndexes ¶ added in v0.9.12
func WithDeactivateIndexes() RestoreOption
func WithEnforceConstraints ¶ added in v0.9.12
func WithEnforceConstraints() RestoreOption
func WithPageSize ¶ added in v0.9.12
func WithPageSize(pageSize int32) RestoreOption
func WithReplace ¶ added in v0.9.12
func WithReplace() RestoreOption
func WithRestoreShadows ¶ added in v0.9.12
func WithRestoreShadows() RestoreOption
func WithUseAllPageSpace ¶ added in v0.9.12
func WithUseAllPageSpace() RestoreOption
func WithoutCommitAfterEachTable ¶ added in v0.9.12
func WithoutCommitAfterEachTable() RestoreOption
func WithoutEnforceConstraints ¶ added in v0.9.12
func WithoutEnforceConstraints() RestoreOption
func WithoutReplace ¶ added in v0.9.12
func WithoutReplace() RestoreOption
func WithoutRestoreShadows ¶ added in v0.9.12
func WithoutRestoreShadows() RestoreOption
func WithoutUseAllPageSpace ¶ added in v0.9.12
func WithoutUseAllPageSpace() RestoreOption
type RestoreOptions ¶ added in v0.9.12
type RestoreOptions struct { Replace bool DeactivateIndexes bool RestoreShadows bool EnforceConstraints bool CommitAfterEachTable bool UseAllPageSpace bool PageSize int32 CacheBuffers int32 }
func GetDefaultRestoreOptions ¶ added in v0.9.12
func GetDefaultRestoreOptions() RestoreOptions
func NewRestoreOptions ¶ added in v0.9.12
func NewRestoreOptions(opts ...RestoreOption) RestoreOptions
type ServiceManager ¶ added in v0.9.12
type ServiceManager struct {
// contains filtered or unexported fields
}
func NewServiceManager ¶ added in v0.9.12
func NewServiceManager(addr string, user string, password string, options ServiceManagerOptions) (*ServiceManager, error)
func (*ServiceManager) Close ¶ added in v0.9.12
func (svc *ServiceManager) Close() (err error)
func (*ServiceManager) GetArchitecture ¶ added in v0.9.12
func (svc *ServiceManager) GetArchitecture() (string, error)
func (*ServiceManager) GetDbStats ¶ added in v0.9.12
func (svc *ServiceManager) GetDbStats(database string, options StatisticsOptions, result chan string) error
func (*ServiceManager) GetDbStatsString ¶ added in v0.9.12
func (svc *ServiceManager) GetDbStatsString(database string, options StatisticsOptions) (string, error)
func (*ServiceManager) GetFbLog ¶ added in v0.9.12
func (svc *ServiceManager) GetFbLog(result chan string) error
func (*ServiceManager) GetFbLogString ¶ added in v0.9.12
func (svc *ServiceManager) GetFbLogString() (string, error)
func (*ServiceManager) GetHomeDir ¶ added in v0.9.12
func (svc *ServiceManager) GetHomeDir() (string, error)
func (*ServiceManager) GetLockFileDir ¶ added in v0.9.12
func (svc *ServiceManager) GetLockFileDir() (string, error)
func (*ServiceManager) GetMsgFileDir ¶ added in v0.9.12
func (svc *ServiceManager) GetMsgFileDir() (string, error)
func (*ServiceManager) GetSecurityDatabasePath ¶ added in v0.9.12
func (svc *ServiceManager) GetSecurityDatabasePath() (string, error)
func (*ServiceManager) GetServerVersion ¶ added in v0.9.12
func (svc *ServiceManager) GetServerVersion() (FirebirdVersion, error)
func (*ServiceManager) GetServerVersionString ¶ added in v0.9.12
func (svc *ServiceManager) GetServerVersionString() (string, error)
func (*ServiceManager) GetServiceInfo ¶ added in v0.9.12
func (*ServiceManager) GetServiceInfoInt ¶ added in v0.9.12
func (svc *ServiceManager) GetServiceInfoInt(item byte) (int16, error)
func (*ServiceManager) GetServiceInfoString ¶ added in v0.9.12
func (svc *ServiceManager) GetServiceInfoString(item byte) (string, error)
func (*ServiceManager) GetString ¶ added in v0.9.12
func (svc *ServiceManager) GetString() (result string, end bool, err error)
func (*ServiceManager) GetSvrDbInfo ¶ added in v0.9.12
func (svc *ServiceManager) GetSvrDbInfo() (*SrvDbInfo, error)
func (*ServiceManager) IsRunning ¶ added in v0.9.12
func (svc *ServiceManager) IsRunning() (bool, error)
func (*ServiceManager) ServiceAttach ¶ added in v0.9.12
func (svc *ServiceManager) ServiceAttach(spb []byte, verbose chan string) error
func (*ServiceManager) ServiceAttachBuffer ¶ added in v0.9.12
func (svc *ServiceManager) ServiceAttachBuffer(spb []byte, verbose chan []byte) error
func (*ServiceManager) ServiceStart ¶ added in v0.9.12
func (svc *ServiceManager) ServiceStart(spb []byte) error
func (*ServiceManager) Wait ¶ added in v0.9.12
func (svc *ServiceManager) Wait() error
func (*ServiceManager) WaitBuffer ¶ added in v0.9.12
func (svc *ServiceManager) WaitBuffer(stream chan []byte) error
func (*ServiceManager) WaitString ¶ added in v0.9.12
func (svc *ServiceManager) WaitString() (string, error)
func (*ServiceManager) WaitStrings ¶ added in v0.9.12
func (svc *ServiceManager) WaitStrings(result chan string) error
type ServiceManagerOption ¶ added in v0.9.12
type ServiceManagerOption func(*ServiceManagerOptions)
func WithAuthPlugin ¶ added in v0.9.12
func WithAuthPlugin(authPlugin string) ServiceManagerOption
func WithWireCrypt ¶ added in v0.9.12
func WithWireCrypt() ServiceManagerOption
func WithoutWireCrypt ¶ added in v0.9.12
func WithoutWireCrypt() ServiceManagerOption
type ServiceManagerOptions ¶ added in v0.9.12
func GetDefaultServiceManagerOptions ¶ added in v0.9.12
func GetDefaultServiceManagerOptions() ServiceManagerOptions
func NewServiceManagerOptions ¶ added in v0.9.12
func NewServiceManagerOptions(opts ...ServiceManagerOption) ServiceManagerOptions
func (ServiceManagerOptions) WithAuthPlugin ¶ added in v0.9.12
func (sm ServiceManagerOptions) WithAuthPlugin(authPlugin string) ServiceManagerOptions
func (ServiceManagerOptions) WithWireCrypt ¶ added in v0.9.12
func (sm ServiceManagerOptions) WithWireCrypt() ServiceManagerOptions
func (ServiceManagerOptions) WithoutWireCrypt ¶ added in v0.9.12
func (sm ServiceManagerOptions) WithoutWireCrypt() ServiceManagerOptions
type ShutdownMode ¶ added in v0.9.12
type ShutdownMode byte
const ( //ShutdownModeForce Wait for N seconds then shutdown ShutdownModeForce ShutdownMode = isc_spb_prp_shutdown_db //ShutdownModeDenyNewAttachments Disable new attachments for N seconds then shutdown ShutdownModeDenyNewAttachments ShutdownMode = isc_spb_prp_deny_new_attachments //ShutdownModeDenyNewTransactions Disable new transactions for N seconds then shutdown ShutdownModeDenyNewTransactions ShutdownMode = isc_spb_prp_deny_new_transactions )
type ShutdownModeEx ¶ added in v0.9.12
type ShutdownModeEx byte
const ( //ShutdownModeExForce Wait for N seconds then shutdown ShutdownModeExForce ShutdownModeEx = isc_spb_prp_force_shutdown //ShutdownModeExDenyNewAttachments Disable new attachments for N seconds then shutdown ShutdownModeExDenyNewAttachments ShutdownModeEx = isc_spb_prp_attachments_shutdown //ShutdownModeExDenyNewTransactions Disable new transactions for N seconds then shutdown ShutdownModeExDenyNewTransactions ShutdownModeEx = isc_spb_prp_transactions_shutdown )
type StatisticsOption ¶ added in v0.9.12
type StatisticsOption func(*StatisticsOptions)
func WithOnlyHeaderPages ¶ added in v0.9.12
func WithOnlyHeaderPages() StatisticsOption
func WithRecordVersions ¶ added in v0.9.12
func WithRecordVersions() StatisticsOption
func WithSystemRelationsAndIndexes ¶ added in v0.9.12
func WithSystemRelationsAndIndexes() StatisticsOption
func WithTables ¶ added in v0.9.12
func WithTables(tables []string) StatisticsOption
func WithUserDataPages ¶ added in v0.9.12
func WithUserDataPages() StatisticsOption
func WithUserIndexPages ¶ added in v0.9.12
func WithUserIndexPages() StatisticsOption
func WithoutIndexPages ¶ added in v0.9.12
func WithoutIndexPages() StatisticsOption
func WithoutOnlyHeaderPages ¶ added in v0.9.12
func WithoutOnlyHeaderPages() StatisticsOption
func WithoutRecordVersions ¶ added in v0.9.12
func WithoutRecordVersions() StatisticsOption
func WithoutSystemRelationsAndIndexes ¶ added in v0.9.12
func WithoutSystemRelationsAndIndexes() StatisticsOption
func WithoutUserDataPages ¶ added in v0.9.12
func WithoutUserDataPages() StatisticsOption
type StatisticsOptions ¶ added in v0.9.12
type StatisticsOptions struct { UserDataPages bool UserIndexPages bool OnlyHeaderPages bool SystemRelationsAndIndexes bool RecordVersions bool Tables []string }
func GetDefaultStatisticsOptions ¶ added in v0.9.12
func GetDefaultStatisticsOptions() StatisticsOptions
func NewStatisticsOptions ¶ added in v0.9.12
func NewStatisticsOptions(opts ...StatisticsOption) StatisticsOptions
type Subscription ¶
type Subscription struct {
// contains filtered or unexported fields
}
func (*Subscription) Close ¶
func (s *Subscription) Close() error
func (*Subscription) IsClose ¶
func (s *Subscription) IsClose() bool
func (*Subscription) NotifyClose ¶
func (s *Subscription) NotifyClose(receiver chan error)
func (*Subscription) Unsubscribe ¶
func (s *Subscription) Unsubscribe() error
type TraceManager ¶ added in v0.9.12
type TraceManager struct {
// contains filtered or unexported fields
}
func NewTraceManager ¶ added in v0.9.12
func NewTraceManager(addr string, user string, password string, options ServiceManagerOptions) (*TraceManager, error)
func (*TraceManager) List ¶ added in v0.9.12
func (t *TraceManager) List() (string, error)
func (*TraceManager) Start ¶ added in v0.9.12
func (t *TraceManager) Start(config string) (*TraceSession, error)
func (*TraceManager) StartWithName ¶ added in v0.9.12
func (t *TraceManager) StartWithName(name string, config string) (*TraceSession, error)
type TraceSession ¶ added in v0.9.12
type TraceSession struct {
// contains filtered or unexported fields
}
func (*TraceSession) Close ¶ added in v0.9.12
func (ts *TraceSession) Close() (err error)
func (*TraceSession) Pause ¶ added in v0.9.12
func (ts *TraceSession) Pause() (err error)
func (*TraceSession) Resume ¶ added in v0.9.12
func (ts *TraceSession) Resume() (err error)
func (*TraceSession) Stop ¶ added in v0.9.12
func (ts *TraceSession) Stop() (err error)
func (*TraceSession) Wait ¶ added in v0.9.12
func (ts *TraceSession) Wait() (err error)
func (*TraceSession) WaitStrings ¶ added in v0.9.12
func (ts *TraceSession) WaitStrings(result chan string) (err error)
type User ¶ added in v0.9.12
type User struct { Username *string Password *string FirstName *string MiddleName *string LastName *string UserId int32 GroupId int32 Admin *bool }
func NewUser ¶ added in v0.9.12
func NewUser(opts ...UserOption) User
type UserManager ¶ added in v0.9.12
type UserManager struct {
// contains filtered or unexported fields
}
func NewUserManager ¶ added in v0.9.12
func NewUserManager(addr string, user string, password string, smo ServiceManagerOptions, umo UserManagerOptions) (*UserManager, error)
func (*UserManager) AddUser ¶ added in v0.9.12
func (um *UserManager) AddUser(user User) error
func (*UserManager) Close ¶ added in v0.9.12
func (um *UserManager) Close() error
func (*UserManager) DeleteUser ¶ added in v0.9.12
func (um *UserManager) DeleteUser(user User) error
func (*UserManager) DropAdminRoleMapping ¶ added in v0.9.12
func (um *UserManager) DropAdminRoleMapping() error
func (*UserManager) GetUsers ¶ added in v0.9.12
func (um *UserManager) GetUsers() ([]User, error)
func (*UserManager) ModifyUser ¶ added in v0.9.12
func (um *UserManager) ModifyUser(user User) error
func (*UserManager) SetAdminRoleMapping ¶ added in v0.9.12
func (um *UserManager) SetAdminRoleMapping() error
type UserManagerOption ¶ added in v0.9.12
type UserManagerOption func(*UserManagerOptions)
func WithSecurityDB ¶ added in v0.9.12
func WithSecurityDB(securityDB string) UserManagerOption
type UserManagerOptions ¶ added in v0.9.12
type UserManagerOptions struct {
SecurityDB string
}
func GetDefaultUserManagerOptions ¶ added in v0.9.12
func GetDefaultUserManagerOptions() UserManagerOptions
func NewUserManagerOptions ¶ added in v0.9.12
func NewUserManagerOptions(opts ...UserManagerOption) UserManagerOptions
type UserOption ¶ added in v0.9.12
type UserOption func(*User)
func WithAdmin ¶ added in v0.9.12
func WithAdmin() UserOption
func WithFirstName ¶ added in v0.9.12
func WithFirstName(firstname string) UserOption
func WithGroupId ¶ added in v0.9.12
func WithGroupId(groupId int32) UserOption
func WithLastName ¶ added in v0.9.12
func WithLastName(lastname string) UserOption
func WithMiddleName ¶ added in v0.9.12
func WithMiddleName(middlename string) UserOption
func WithPassword ¶ added in v0.9.12
func WithPassword(password string) UserOption
func WithUserId ¶ added in v0.9.12
func WithUserId(userId int32) UserOption
func WithUsername ¶ added in v0.9.12
func WithUsername(username string) UserOption
func WithoutAdmin ¶ added in v0.9.12
func WithoutAdmin() UserOption
type XPBReader ¶ added in v0.9.12
type XPBReader struct {
// contains filtered or unexported fields
}
func NewXPBReader ¶ added in v0.9.12
type XPBWriter ¶ added in v0.9.12
type XPBWriter struct {
// contains filtered or unexported fields
}
func NewXPBWriter ¶ added in v0.9.12
func NewXPBWriter() *XPBWriter
func NewXPBWriterFromBytes ¶ added in v0.9.12
func NewXPBWriterFromTag ¶ added in v0.9.12
Source Files
¶
- backup_manager.go
- connection.go
- consts.go
- decfloat.go
- driver.go
- driver_go18.go
- dsn.go
- errmsgs.go
- errors.go
- event.go
- eventmanager.go
- firebird_version.go
- maintenance_manager.go
- nbackup_manager.go
- remoteEvent.go
- result.go
- rows.go
- service_manager.go
- srp.go
- statement.go
- subscriber.go
- timezonemap.go
- trace_manager.go
- transaction.go
- user_manager.go
- utils.go
- wirechannel.go
- wireprotocol.go
- xpb.go
- xsqlvar.go
Click to show internal directories.
Click to hide internal directories.