Documentation ¶
Index ¶
- type AccountAPI
- type ClearAllCacheRequest
- type CreatePartitionedTableRequest
- func (c *CreatePartitionedTableRequest) SetCompressMethods(compressMethods map[string]string) *CreatePartitionedTableRequest
- func (c *CreatePartitionedTableRequest) SetKeepDuplicates(keepDuplicates string) *CreatePartitionedTableRequest
- func (c *CreatePartitionedTableRequest) SetPartitionColumns(partitionColumns []string) *CreatePartitionedTableRequest
- func (c *CreatePartitionedTableRequest) SetPartitionedTableName(name string) *CreatePartitionedTableRequest
- func (c *CreatePartitionedTableRequest) SetSortColumns(sortColumns []string) *CreatePartitionedTableRequest
- func (c *CreatePartitionedTableRequest) SetSrcTable(name string) *CreatePartitionedTableRequest
- type CreateTableRequest
- type DBConnectionPool
- type Database
- type DatabaseAPI
- type DatabaseRequest
- func (d *DatabaseRequest) SetAtomic(atomic string) *DatabaseRequest
- func (d *DatabaseRequest) SetDBHandle(dbHandle string) *DatabaseRequest
- func (d *DatabaseRequest) SetDirectory(directory string) *DatabaseRequest
- func (d *DatabaseRequest) SetEngine(engine string) *DatabaseRequest
- func (d *DatabaseRequest) SetLocations(locations string) *DatabaseRequest
- func (d *DatabaseRequest) SetPartitionScheme(partitionScheme string) *DatabaseRequest
- func (d *DatabaseRequest) SetPartitionType(partitionType string) *DatabaseRequest
- type DolphinDB
- type DropDatabaseRequest
- type DropPartitionRequest
- func (d *DropPartitionRequest) SetDBHandle(dbHandle string) *DropPartitionRequest
- func (d *DropPartitionRequest) SetDBPath(path string) *DropPartitionRequest
- func (d *DropPartitionRequest) SetPartitionPaths(partitionPaths string) *DropPartitionRequest
- func (d *DropPartitionRequest) SetTableName(name string) *DropPartitionRequest
- type DropTableRequest
- type ExistsDatabaseRequest
- type ExistsTableRequest
- type LoadTableBySQLRequest
- func (l *LoadTableBySQLRequest) SetDBHandle(dbHandle string) *LoadTableBySQLRequest
- func (l *LoadTableBySQLRequest) SetDBPath(path string) *LoadTableBySQLRequest
- func (l *LoadTableBySQLRequest) SetSQL(sql string) *LoadTableBySQLRequest
- func (l *LoadTableBySQLRequest) SetTableName(tableName string) *LoadTableBySQLRequest
- type LoadTableRequest
- type LoadTextRequest
- type LoginRequest
- type PartitionedTableAppender
- type PartitionedTableAppenderOption
- type PloadTextRequest
- type PoolOption
- type SaveTableRequest
- func (s *SaveTableRequest) SetAppending(appending bool) *SaveTableRequest
- func (s *SaveTableRequest) SetCompression(compression bool) *SaveTableRequest
- func (s *SaveTableRequest) SetDBHandle(name string) *SaveTableRequest
- func (s *SaveTableRequest) SetDBPath(path string) *SaveTableRequest
- func (s *SaveTableRequest) SetTable(path string) *SaveTableRequest
- func (s *SaveTableRequest) SetTableName(name string) *SaveTableRequest
- type SaveTextRequest
- type Table
- type TableAPI
- type TableAppender
- type TableAppenderOption
- type TableParam
- type TableRequest
- type TableWithCapacityRequest
- func (t *TableWithCapacityRequest) SetCapacity(capacity int32) *TableWithCapacityRequest
- func (t *TableWithCapacityRequest) SetColNames(colNames []string) *TableWithCapacityRequest
- func (t *TableWithCapacityRequest) SetColTypes(colTypes []string) *TableWithCapacityRequest
- func (t *TableWithCapacityRequest) SetSize(size int32) *TableWithCapacityRequest
- func (t *TableWithCapacityRequest) SetTableName(name string) *TableWithCapacityRequest
- type Task
- type UndefRequest
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type AccountAPI ¶
type AccountAPI interface { // Login dolphindb. // See DolphinDB function `login`: https://www.dolphindb.cn/cn/help/130/FunctionsandCommands/CommandsReferences/l/login.html?highlight=login Login(l *LoginRequest) error // Logout dolphindb. // See DolphinDB function `logout`: https://www.dolphindb.cn/cn/help/130/FunctionsandCommands/CommandsReferences/l/logout.html?highlight=logout Logout() error }
AccountAPI interface declares apis about account.
type ClearAllCacheRequest ¶
type ClearAllCacheRequest struct {
IsDFS bool
}
ClearAllCacheRequest is the request struct of ClearAllCache api.
func (*ClearAllCacheRequest) SetIsDFS ¶
func (l *ClearAllCacheRequest) SetIsDFS(isDFS bool) *ClearAllCacheRequest
SetIsDFS sets the IsDFS value of ClearAllCacheRequest.
type CreatePartitionedTableRequest ¶
type CreatePartitionedTableRequest struct { SrcTable string PartitionedTableName string PartitionColumns []string CompressMethods map[string]string SortColumns []string KeepDuplicates string }
CreatePartitionedTableRequest is the request struct of CreatePartitionedTable api.
func (*CreatePartitionedTableRequest) SetCompressMethods ¶
func (c *CreatePartitionedTableRequest) SetCompressMethods(compressMethods map[string]string) *CreatePartitionedTableRequest
SetCompressMethods sets the CompressMethods value of CreatePartitionedTableRequest.
func (*CreatePartitionedTableRequest) SetKeepDuplicates ¶
func (c *CreatePartitionedTableRequest) SetKeepDuplicates(keepDuplicates string) *CreatePartitionedTableRequest
SetKeepDuplicates sets the KeepDuplicates value of CreatePartitionedTableRequest.
func (*CreatePartitionedTableRequest) SetPartitionColumns ¶
func (c *CreatePartitionedTableRequest) SetPartitionColumns(partitionColumns []string) *CreatePartitionedTableRequest
SetPartitionColumns sets the PartitionColumns value of CreatePartitionedTableRequest.
func (*CreatePartitionedTableRequest) SetPartitionedTableName ¶
func (c *CreatePartitionedTableRequest) SetPartitionedTableName(name string) *CreatePartitionedTableRequest
SetPartitionedTableName sets the PartitionedTableName value of CreatePartitionedTableRequest.
func (*CreatePartitionedTableRequest) SetSortColumns ¶
func (c *CreatePartitionedTableRequest) SetSortColumns(sortColumns []string) *CreatePartitionedTableRequest
SetSortColumns sets the SortColumns value of CreatePartitionedTableRequest.
func (*CreatePartitionedTableRequest) SetSrcTable ¶
func (c *CreatePartitionedTableRequest) SetSrcTable(name string) *CreatePartitionedTableRequest
SetSrcTable sets the SrcTable value of CreatePartitionedTableRequest.
type CreateTableRequest ¶
CreateTableRequest is the request struct of CreateTable api.
func (*CreateTableRequest) SetDimensionTableName ¶
func (c *CreateTableRequest) SetDimensionTableName(name string) *CreateTableRequest
SetDimensionTableName sets the DimensionTableName value of ClearAllCacheRequest.
func (*CreateTableRequest) SetSortColumns ¶
func (c *CreateTableRequest) SetSortColumns(cols []string) *CreateTableRequest
SetSortColumns sets the SortColumns value of CreateTableRequest.
func (*CreateTableRequest) SetSrcTable ¶
func (c *CreateTableRequest) SetSrcTable(name string) *CreateTableRequest
SetSrcTable sets the SrcTable value of ClearAllCacheRequest.
type DBConnectionPool ¶
type DBConnectionPool struct {
// contains filtered or unexported fields
}
DBConnectionPool is the client which helps you to handle tasks with connections.
func NewDBConnectionPool ¶
func NewDBConnectionPool(opt *PoolOption) (*DBConnectionPool, error)
NewDBConnectionPool inits a DBConnectionPool object and configures it with opt, finally returns it.
func (*DBConnectionPool) Close ¶
func (d *DBConnectionPool) Close() error
Close closes all connections in DBConnectionPool.
func (*DBConnectionPool) Execute ¶
func (d *DBConnectionPool) Execute(tasks []*Task) error
Execute executes all task by connections with DBConnectionPool.
func (*DBConnectionPool) GetPoolSize ¶
func (d *DBConnectionPool) GetPoolSize() int
GetPoolSize return the size of DBConnectionPool.
func (*DBConnectionPool) IsClosed ¶
func (d *DBConnectionPool) IsClosed() bool
IsClosed checks whether the DBConnectionPool is closed.
type Database ¶
type Database struct { Name string // contains filtered or unexported fields }
Database is used to call table api based on the name of db.
func (*Database) CreatePartitionedTable ¶
func (c *Database) CreatePartitionedTable(p *CreatePartitionedTableRequest) (*Table, error)
CreatePartitionedTable creates a partitioned table in the database and returns the table instance.
func (*Database) CreateTable ¶
func (c *Database) CreateTable(t *CreateTableRequest) (*Table, error)
CreateTable creates an in-memory table in the database and returns the table instance.
func (*Database) GetSession ¶
GetSession returns the sessionID of the session.
type DatabaseAPI ¶
type DatabaseAPI interface { // ExistsDatabase checks whether the database already exists. // See DolphinDB function `existsDatabase`:https://www.dolphindb.cn/cn/help/130/FunctionsandCommands/FunctionReferences/e/existsDatabase.html?highlight=existsdatabase ExistsDatabase(e *ExistsDatabaseRequest) (bool, error) // Database creates a database // See DolphinDB function `database`:https://www.dolphindb.cn/cn/help/130/FunctionsandCommands/FunctionReferences/d/database.html?highlight=database Database(d *DatabaseRequest) (*Database, error) // DropDatabase drops a database. // See DolphinDB function `dropDatabase`: https://www.dolphindb.cn/cn/help/130/FunctionsandCommands/CommandsReferences/d/dropDatabase.html?highlight=dropdatabase DropDatabase(d *DropDatabaseRequest) error }
DatabaseAPI interface declares apis about database.
type DatabaseRequest ¶
type DatabaseRequest struct { DBHandle string Directory string PartitionType string PartitionScheme string Locations string Engine string Atomic string }
DatabaseRequest is the request struct of Database api.
func (*DatabaseRequest) SetAtomic ¶
func (d *DatabaseRequest) SetAtomic(atomic string) *DatabaseRequest
SetAtomic sets the Atomic value of DatabaseRequest.
func (*DatabaseRequest) SetDBHandle ¶
func (d *DatabaseRequest) SetDBHandle(dbHandle string) *DatabaseRequest
SetDBHandle sets the DBHandle value of DatabaseRequest.
func (*DatabaseRequest) SetDirectory ¶
func (d *DatabaseRequest) SetDirectory(directory string) *DatabaseRequest
SetDirectory sets the Directory value of DatabaseRequest.
func (*DatabaseRequest) SetEngine ¶
func (d *DatabaseRequest) SetEngine(engine string) *DatabaseRequest
SetEngine sets the Engine value of DatabaseRequest.
func (*DatabaseRequest) SetLocations ¶
func (d *DatabaseRequest) SetLocations(locations string) *DatabaseRequest
SetLocations sets the Locations value of DatabaseRequest.
func (*DatabaseRequest) SetPartitionScheme ¶
func (d *DatabaseRequest) SetPartitionScheme(partitionScheme string) *DatabaseRequest
SetPartitionScheme sets the PartitionScheme value of DatabaseRequest.
func (*DatabaseRequest) SetPartitionType ¶
func (d *DatabaseRequest) SetPartitionType(partitionType string) *DatabaseRequest
SetPartitionType sets the PartitionType value of DatabaseRequest.
type DolphinDB ¶
type DolphinDB interface { dialer.Conn AccountAPI DatabaseAPI TableAPI }
DolphinDB interface declares functions to communicate with the dolphindb server.
func NewDolphinDBClient ¶
func NewDolphinDBClient(ctx context.Context, addr string, flags *dialer.BehaviorOptions) (DolphinDB, error)
NewDolphinDBClient returns an instance of DolphinDB according to the addr and the flags which will affect the subsequent api calls.
type DropDatabaseRequest ¶
type DropDatabaseRequest struct {
Directory string
}
DropDatabaseRequest is the request struct of DropDatabase api.
func (*DropDatabaseRequest) SetDirectory ¶
func (d *DropDatabaseRequest) SetDirectory(directory string) *DropDatabaseRequest
SetDirectory sets the Directory value of DropDatabaseRequest.
type DropPartitionRequest ¶
type DropPartitionRequest struct { DBHandle string DBPath string TableName string PartitionPaths string }
DropPartitionRequest is the request struct of DropPartition api. If you have declared a DBHandle before, you can set it, or you should set the DBPath.
func (*DropPartitionRequest) SetDBHandle ¶
func (d *DropPartitionRequest) SetDBHandle(dbHandle string) *DropPartitionRequest
SetDBHandle sets the DBHandle value of DropPartitionRequest.
func (*DropPartitionRequest) SetDBPath ¶
func (d *DropPartitionRequest) SetDBPath(path string) *DropPartitionRequest
SetDBPath sets the DBPath value of DropPartitionRequest.
func (*DropPartitionRequest) SetPartitionPaths ¶
func (d *DropPartitionRequest) SetPartitionPaths(partitionPaths string) *DropPartitionRequest
SetPartitionPaths sets the PartitionPaths value of DropPartitionRequest.
func (*DropPartitionRequest) SetTableName ¶
func (d *DropPartitionRequest) SetTableName(name string) *DropPartitionRequest
SetTableName sets the TableName value of DropPartitionRequest.
type DropTableRequest ¶
DropTableRequest is the request struct of DropTable api. If you have declared a DBHandle before, you can set it, or you should set the DBPath.
func (*DropTableRequest) SetDBHandle ¶
func (d *DropTableRequest) SetDBHandle(dbHandle string) *DropTableRequest
SetDBHandle sets the DBHandle value of DropTableRequest.
func (*DropTableRequest) SetDBPath ¶
func (d *DropTableRequest) SetDBPath(path string) *DropTableRequest
SetDBPath sets the DBPath value of DropTableRequest.
func (*DropTableRequest) SetTableName ¶
func (d *DropTableRequest) SetTableName(name string) *DropTableRequest
SetTableName sets the TableName value of DropTableRequest.
type ExistsDatabaseRequest ¶
type ExistsDatabaseRequest struct {
Path string
}
ExistsDatabaseRequest is the request struct of ExistsDatabase api.
func (*ExistsDatabaseRequest) SetPath ¶
func (e *ExistsDatabaseRequest) SetPath(path string) *ExistsDatabaseRequest
SetPath sets the Path value of ExistsDatabaseRequest.
type ExistsTableRequest ¶
ExistsTableRequest is the request struct of ExistsTable api.
func (*ExistsTableRequest) SetDBPath ¶
func (e *ExistsTableRequest) SetDBPath(path string) *ExistsTableRequest
SetDBPath sets the DBPath value of ExistsTableRequest.
func (*ExistsTableRequest) SetTableName ¶
func (e *ExistsTableRequest) SetTableName(name string) *ExistsTableRequest
SetTableName sets the TableName value of ExistsTableRequest.
type LoadTableBySQLRequest ¶
LoadTableBySQLRequest is the request struct of LoadTableBySQL api. If you have declared a DBHandle before, you can set it, or you should set the DBPath.
func (*LoadTableBySQLRequest) SetDBHandle ¶
func (l *LoadTableBySQLRequest) SetDBHandle(dbHandle string) *LoadTableBySQLRequest
SetDBHandle sets the DBHandle value of LoadTableBySQLRequest.
func (*LoadTableBySQLRequest) SetDBPath ¶
func (l *LoadTableBySQLRequest) SetDBPath(path string) *LoadTableBySQLRequest
SetDBPath sets the DBPath value of LoadTableBySQLRequest.
func (*LoadTableBySQLRequest) SetSQL ¶
func (l *LoadTableBySQLRequest) SetSQL(sql string) *LoadTableBySQLRequest
SetSQL sets the SQL value of LoadTableBySQLRequest.
func (*LoadTableBySQLRequest) SetTableName ¶
func (l *LoadTableBySQLRequest) SetTableName(tableName string) *LoadTableBySQLRequest
SetTableName sets the TableName value of LoadTableBySQLRequest.
type LoadTableRequest ¶
LoadTableRequest is the request struct of LoadTable api.
func (*LoadTableRequest) SetDatabase ¶
func (l *LoadTableRequest) SetDatabase(database string) *LoadTableRequest
SetDatabase sets the Database value of LoadTableRequest.
func (*LoadTableRequest) SetMemoryMode ¶
func (l *LoadTableRequest) SetMemoryMode(memoryMode bool) *LoadTableRequest
SetMemoryMode sets the MemoryMode value of LoadTableRequest.
func (*LoadTableRequest) SetPartitions ¶
func (l *LoadTableRequest) SetPartitions(data string) *LoadTableRequest
SetPartitions sets the Partitions value of LoadTableRequest.
func (*LoadTableRequest) SetTableName ¶
func (l *LoadTableRequest) SetTableName(name string) *LoadTableRequest
SetTableName sets the TableName value of LoadTableRequest.
type LoadTextRequest ¶
LoadTextRequest is the request struct of LoadText api.
func (*LoadTextRequest) SetDelimiter ¶
func (l *LoadTextRequest) SetDelimiter(delimiter string) *LoadTextRequest
SetDelimiter sets the Delimiter value of LoadTextRequest.
func (*LoadTextRequest) SetFileName ¶
func (l *LoadTextRequest) SetFileName(filename string) *LoadTextRequest
SetFileName sets the FileName value of LoadTextRequest.
type LoginRequest ¶
LoginRequest is the request struct of Login api.
func (*LoginRequest) SetPassword ¶
func (l *LoginRequest) SetPassword(password string) *LoginRequest
SetPassword sets the Password value of LoginRequest.
func (*LoginRequest) SetUserID ¶
func (l *LoginRequest) SetUserID(name string) *LoginRequest
SetUserID sets the UserID value of LoginRequest.
type PartitionedTableAppender ¶
type PartitionedTableAppender struct {
// contains filtered or unexported fields
}
PartitionedTableAppender is used to append tables into a partitioned table.
func NewPartitionedTableAppender ¶
func NewPartitionedTableAppender(opt *PartitionedTableAppenderOption) (*PartitionedTableAppender, error)
NewPartitionedTableAppender instantiates a new PartitionedTableAppender according to the option.
func (*PartitionedTableAppender) Append ¶
func (p *PartitionedTableAppender) Append(tb *model.Table) (int, error)
Append appends the table to the partitioned table which has been set when calling NewPartitionedTableAppender.
func (*PartitionedTableAppender) Close ¶
func (p *PartitionedTableAppender) Close() error
Close closes the connection pool.
type PartitionedTableAppenderOption ¶
type PartitionedTableAppenderOption struct { // DBPath of partitioned table DBPath string // Name of partitioned table TableName string // the partitioning column name PartitionCol string // the method used to append the table AppendFunction string // object of DBConnectionPool Pool *DBConnectionPool }
PartitionedTableAppenderOption is the options of PartitionedTableAppender.
type PloadTextRequest ¶
PloadTextRequest is the request struct of PloadText api.
func (*PloadTextRequest) SetDelimiter ¶
func (p *PloadTextRequest) SetDelimiter(delimiter string) *PloadTextRequest
SetDelimiter sets the Delimiter value of PloadTextRequest.
func (*PloadTextRequest) SetFileName ¶
func (p *PloadTextRequest) SetFileName(filename string) *PloadTextRequest
SetFileName sets the FileName value of PloadTextRequest.
type PoolOption ¶
type PoolOption struct { // the server address Address string // the user ID UserID string // password of the user Password string // the size of connection pool // only takes effect when LoadBalance is false PoolSize int // Whether to enable load balancing. // If true, getClusterLiveDataNodes will be called to get all available datanode addresses // and connection to every address will be created. // If the addresses are not available, you can set LoadBalanceAddresses instead. LoadBalance bool // Whether to enable high availability. // If true, when the address is unrearched, another address in HighAvailabilitySites will be connected. EnableHighAvailability bool // Available only if EnableHighAvailability is true. HighAvailabilitySites []string // addresses of load balance LoadBalanceAddresses []string }
PoolOption helps you to configure DBConnectionPool by calling NewDBConnectionPool.
type SaveTableRequest ¶
type SaveTableRequest struct { DBHandle string DBPath string TableName string Table string Appending bool Compression bool }
SaveTableRequest is the request struct of SaveTable api. If you have declared a DBHandle before, you can set it, or you should set the DBPath.
func (*SaveTableRequest) SetAppending ¶
func (s *SaveTableRequest) SetAppending(appending bool) *SaveTableRequest
SetAppending sets the Appending value of SaveTableRequest.
func (*SaveTableRequest) SetCompression ¶
func (s *SaveTableRequest) SetCompression(compression bool) *SaveTableRequest
SetCompression sets the Compression value of SaveTableRequest.
func (*SaveTableRequest) SetDBHandle ¶
func (s *SaveTableRequest) SetDBHandle(name string) *SaveTableRequest
SetDBHandle sets the DBHandle value of SaveTableRequest.
func (*SaveTableRequest) SetDBPath ¶
func (s *SaveTableRequest) SetDBPath(path string) *SaveTableRequest
SetDBPath sets the DBPath value of SaveTableRequest.
func (*SaveTableRequest) SetTable ¶
func (s *SaveTableRequest) SetTable(path string) *SaveTableRequest
SetTable sets the Table value of SaveTableRequest.
func (*SaveTableRequest) SetTableName ¶
func (s *SaveTableRequest) SetTableName(name string) *SaveTableRequest
SetTableName sets the TableName value of SaveTableRequest.
type SaveTextRequest ¶
SaveTextRequest is the request struct of SaveText api.
func (*SaveTextRequest) SetFileName ¶
func (l *SaveTextRequest) SetFileName(filename string) *SaveTextRequest
SetFileName sets the FileName value of SaveTextRequest.
func (*SaveTextRequest) SetObj ¶
func (l *SaveTextRequest) SetObj(objName string) *SaveTextRequest
SetObj sets the Obj value of SaveTextRequest.
type Table ¶
type Table struct { // Handle is the handle of Table which has been defined on server Handle string // Data is the real value of Table Data *model.Table // contains filtered or unexported fields }
Table is the client of table script. TODO: supports table script.
func (*Table) GetHandle ¶
GetHandle returns the variable name of Table which has been defined on server.
func (*Table) GetSession ¶
GetSession returns the session id of the connection to dolphindb.
type TableAPI ¶
type TableAPI interface { // ExistsTable checks whether the table is existed. // See DolphinDB function `existsTable`:https://www.dolphindb.cn/cn/help/130/FunctionsandCommands/FunctionReferences/e/existsTable.html?highlight=existstable ExistsTable(e *ExistsTableRequest) (bool, error) // Table creates an in-memory table with columns. // See DolphinDB function `table`:https://www.dolphindb.cn/cn/help/130/FunctionsandCommands/FunctionReferences/t/table.html?highlight=table Table(t *TableRequest) (*Table, error) // TableWithCapacity creates an in-memory table with a specific capacity. // See DolphinDB function `table`:https://www.dolphindb.cn/cn/help/130/FunctionsandCommands/FunctionReferences/t/table.html?highlight=table TableWithCapacity(t *TableWithCapacityRequest) (*Table, error) // SaveTable saves a table. // See DolphinDB function `saveTable`:https://www.dolphindb.cn/cn/help/130/FunctionsandCommands/CommandsReferences/s/saveTable.html?highlight=savetable SaveTable(s *SaveTableRequest) error // LoadTable loads a table into memory. // See DolphinDB function `loadTable`:https://www.dolphindb.cn/cn/help/130/FunctionsandCommands/FunctionReferences/l/loadTable.html?highlight=loadtable LoadTable(l *LoadTableRequest) (*Table, error) // LoadText loads text from a file. // See DolphinDB function `loadText`:https://www.dolphindb.cn/cn/help/130/FunctionsandCommands/FunctionReferences/l/loadText.html?highlight=loadtext LoadText(l *LoadTextRequest) (*Table, error) // SaveText saves text into a file. // See DolphinDB function `saveText`:https://www.dolphindb.cn/cn/help/130/FunctionsandCommands/CommandsReferences/s/saveText.html?highlight=savetext SaveText(l *SaveTextRequest) error // PloadText loads text from a file. // See DolphinDB function `pLoadText`:https://www.dolphindb.cn/cn/help/130/FunctionsandCommands/FunctionReferences/p/ploadText.html?highlight=ploadtext PloadText(l *PloadTextRequest) (*Table, error) // LoadTableBySQL loads a table using a SQL query. // See DolphinDB function `loadTableBySQL`:https://www.dolphindb.cn/cn/help/130/FunctionsandCommands/FunctionReferences/l/loadTableBySQL.html?highlight=loadtablebysql LoadTableBySQL(l *LoadTableBySQLRequest) (*Table, error) // DropPartition drops the specified partition from a database. // See DolphinDB function `dropPartition`:https://www.dolphindb.cn/cn/help/130/FunctionsandCommands/CommandsReferences/d/dropPartition.html?highlight=droppartition DropPartition(l *DropPartitionRequest) error // DropTable drops a table. // See DolphinDB function `dropTable`:https://www.dolphindb.cn/cn/help/130/FunctionsandCommands/CommandsReferences/d/dropTable.html?highlight=droptable DropTable(d *DropTableRequest) error // Undef releases the specified objects // See DolphinDB function `undef`:https://www.dolphindb.cn/cn/help/130/FunctionsandCommands/CommandsReferences/u/undef.html?highlight=unde Undef(u *UndefRequest) error // UndefAll releases all objects // See DolphinDB function `undefAll`:https://www.dolphindb.cn/cn/help/130/FunctionsandCommands/CommandsReferences/u/undef.html?highlight=unde UndefAll() error // ClearAllCache clears all cache. // See DolphinDB function `clearAllCache`:https://www.dolphindb.cn/cn/help/130/FunctionsandCommands/CommandsReferences/c/clearAllCache.html?highlight=clearallcache ClearAllCache(r *ClearAllCacheRequest) error }
TableAPI interface declares apis about table.
type TableAppender ¶
type TableAppender struct { // DBPath of database DBPath string // Name of table TableName string // conn which has connected to and logged in the dolphindb server Conn dialer.Conn // contains filtered or unexported fields }
TableAppender is used to append tables into another.
func NewTableAppender ¶
func NewTableAppender(opt *TableAppenderOption) *TableAppender
NewTableAppender instantiates a new TableAppender object according to the option.
func (*TableAppender) Append ¶
Append appends a table to the table which has been set when calling NewTableAppender.
func (*TableAppender) IsClosed ¶
func (p *TableAppender) IsClosed() bool
IsClosed checks whether the TableAppender is closed.
type TableAppenderOption ¶
type TableAppenderOption struct { // DBPath of table DBPath string // Name of table TableName string // Conn which has connected to and logged in the dolphindb server Conn dialer.Conn }
TableAppenderOption helps you to init TableAppender.
type TableParam ¶
TableParam stores the params for Table api.
type TableRequest ¶
type TableRequest struct { TableName string TableParams []TableParam }
TableRequest is the request struct of Table api.
func (*TableRequest) AddTableParam ¶
func (t *TableRequest) AddTableParam(key, value string) *TableRequest
AddTableParam adds an element to the TableParams value of TableRequest.
func (*TableRequest) SetTableName ¶
func (t *TableRequest) SetTableName(name string) *TableRequest
SetTableName sets the TableName value of TableRequest.
func (*TableRequest) SetTableParams ¶
func (t *TableRequest) SetTableParams(params []TableParam) *TableRequest
SetTableParams sets the TableParams value of TableRequest.
type TableWithCapacityRequest ¶
type TableWithCapacityRequest struct { TableName string Capacity int32 Size int32 ColNames []string ColTypes []string }
TableWithCapacityRequest is the request struct of TableWithCapacity api.
func (*TableWithCapacityRequest) SetCapacity ¶
func (t *TableWithCapacityRequest) SetCapacity(capacity int32) *TableWithCapacityRequest
SetCapacity sets the Capacity value of TableWithCapacityRequest.
func (*TableWithCapacityRequest) SetColNames ¶
func (t *TableWithCapacityRequest) SetColNames(colNames []string) *TableWithCapacityRequest
SetColNames sets the ColNames value of TableWithCapacityRequest.
func (*TableWithCapacityRequest) SetColTypes ¶
func (t *TableWithCapacityRequest) SetColTypes(colTypes []string) *TableWithCapacityRequest
SetColTypes sets the ColTypes value of TableWithCapacityRequest.
func (*TableWithCapacityRequest) SetSize ¶
func (t *TableWithCapacityRequest) SetSize(size int32) *TableWithCapacityRequest
SetSize sets the Size value of TableWithCapacityRequest.
func (*TableWithCapacityRequest) SetTableName ¶
func (t *TableWithCapacityRequest) SetTableName(name string) *TableWithCapacityRequest
SetTableName sets the TableName value of TableWithCapacityRequest.
type Task ¶
type Task struct { // Script is required Script string // Args is optional, if you set it, the task will be executed by RunFunc or by RunScript Args []model.DataForm // contains filtered or unexported fields }
Task is the unit of work that is executed in the DBConnectionPool.
type UndefRequest ¶
UndefRequest is the request struct of Undef api.
func (*UndefRequest) SetObj ¶
func (l *UndefRequest) SetObj(obj string) *UndefRequest
SetObj sets the Obj value of UndefRequest.
func (*UndefRequest) SetObjType ¶
func (l *UndefRequest) SetObjType(objType string) *UndefRequest
SetObjType sets the ObjType value of UndefRequest.