module

package
v0.0.0-...-7c50ef6 Latest Latest
Warning

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

Go to latest
Published: Jun 9, 2025 License: Apache-2.0 Imports: 2 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type TConnectOptions

type TConnectOptions struct {
	DatabaseDriver string `json:"database_driver,omitempty"`
	OptionName     string `json:"option_name"`
	DefaultValue   string `json:"default_value,omitempty"`
	ChoiceValues   string `json:"choice_values,omitempty"`
}

type TDataSource

type TDataSource struct {
	UserID             int32  `json:"user_id,omitempty"`
	DsId               int32  `json:"ds_id,omitempty"`
	DsName             string `json:"ds_name,omitempty"`
	MaxIdleTime        int32  `json:"max_idle_time,omitempty"`        //空闲连接超时时间
	MaxOpenConnections int32  `json:"max_open_connections,omitempty"` //最大连接数
	ConnMaxLifetime    int32  `json:"conn_max_lifetime,omitempty"`    //连接最大存活时间
	MaxIdleConnections int32  `json:"max_idle_connections,omitempty"` //最大空闲连接数
	DatabaseDriver     string `json:"database_driver,omitempty"`      //数据库驱动
	ConnectString      string `json:"connect_string,omitempty"`
}

func (*TDataSource) AddDataSource

func (ds *TDataSource) AddDataSource(key string) (int64, string, error)

func (*TDataSource) DeleteDataSource

func (ds *TDataSource) DeleteDataSource() error

func (*TDataSource) GetDataBaseDrivers

func (ds *TDataSource) GetDataBaseDrivers() ([]string, int64, error)

func (*TDataSource) GetDataSourceNames

func (ds *TDataSource) GetDataSourceNames() (map[int32]string, int64, error)

func (*TDataSource) GetOptions

func (ds *TDataSource) GetOptions() ([]TConnectOptions, int64, error)

func (*TDataSource) InitByID

func (ds *TDataSource) InitByID(key string) error

func (*TDataSource) QueryDataSource

func (ds *TDataSource) QueryDataSource(key string, pageSize int32, pageIndex int32) ([]TDataSource, int64, error)

func (*TDataSource) SetConnectStringByName

func (ds *TDataSource) SetConnectStringByName(key string) error

func (*TDataSource) UpdateDataSource

func (ds *TDataSource) UpdateDataSource(key string) error

Jump to

Keyboard shortcuts

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