package
0.0.0-20240508074659-3ee83473c6d3
Repository: https://github.com/as-tool/as-etl-storage.git
Documentation: pkg.go.dev
# Functions
NewBaseFetchHandler Create Basic Record Handler.
NewBaseField: Creates a new base field based on the column name and column type.
NewBaseFieldType: Gets the field type.
NewBaseParam Generate basic parameters through table and transaction parameters txOps.
NewBaseSource Generate a basic data source from the JSON configuration file conf.
NewBaseTable, acquire the basic table through instance name, schema name, and table name.
NewConfig retrieves the database connection configuration 'c' from a JSON configuration 'err' refers to an error where the JSON configuration cannot be converted into a database connection configuration.
NewDB Acquire Database Connection Pool from Data Source source.
NewGoValuer: Generates a new Valuer using the GoType, primarily done through the field 'f' and the incoming column value 'c'.
NewInsertParam Generate insert parameters through table and transaction parameters txOps.
NewSource Obtain the corresponding data source by the name of the database dialect.
NewTableQueryParam Generate table structure query parameters from Table.
Open can acquire a reusable database connection pool wrapper through the database name and JSON configuration conf, similar to a smart pointer.
RegisterDialect Registers a database dialect.
UnregisterAllDialects Unregisters all database dialects.
# Constants
Default Parameters.
Default Parameters.
Boolean type.
Byte stream type.
Float64 type.
Int64 type.
String type.
Time type.
Unknown type.
Write to Database Schema.
# Variables
Error indicating that the interface is not a ValuerGoType.
# Structs
BaseConfig is the configuration for the base table.
BaseConfigSetter is the setter for the base table configuration.
BaseFetchHandler Basic Record Handler Acquisition.
BaseField: Represents a basic field, primarily storing the column name and column type.
BaseFieldType: Represents the basic type of a field, embedding implementations for various database field types.
BaseParam Basic parameters, used to embed SQL parameters for various databases.
BaseScanner: Represents a basic scanner, embedding implementations for various database scanners.
BaseSource Basic data source for storing JSON configuration files Used to embed Source, facilitating the implementation of various database Fields.
BaseTable Basic table, used to embed implementations of various database tables.
Config is the basic configuration for database connections, typically used for sql.DB configurations.
DB User Maintains Database Connection Pool.
DBWrapper is a wrapper for database connection pools, used to reuse relevant database connection pools (from unit to instance: user).
GoValuer: Generates a Valuer using the GoType.
InsertParam Insert parameters.
ParameterOptions Options for parameters.
PoolConfig is the configuration for the database connection pool Generally, the maximum number of open connections should be the same as the maximum number of idle connections, otherwise it can lead to insufficient file resources due to unreleased connections.
TableQueryParam Table structure query parameters.
# Interfaces
ColumnType: Represents the type of a column, abstracting sql.ColumnType and facilitating custom implementations.
ConfigSetter is an additional method for Table, used to set the JSON configuration file.
Dialect Database Dialect.
ExecParameter Supplementary method for Table, used to get the method to generate SQL statements for write mode.
FetchHandler Acquire Record Handler.
Field refers to a database field.
FieldAdder Supplementary method for Table, used to add columns to a table.
FieldsFetcher Supplementary method for Table, used to specially fetch all columns of a table.
FieldType: Represents the type of a field.
Judger Error evaluator.
Parameter Execution parameters for SQL statements with table, transaction mode, and SQL.
Scanner: Data scanner for columns.
Source Data Source, containing driver information, package information, configuration files, and connection information.
Table Table structure.
Valuer: Converts corresponding data into database driver values.
No description provided by the author
WithConnector Data Source with Connection, the data source prefers to call this method to generate a data connection pool DB.
# Type aliases
GoType refers to the type in the Golang language.