Documentation ¶
Overview ¶
Copyright © 2020 Marvin
Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License.
Copyright © 2020 Marvin ¶
Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License.
Copyright © 2020 Marvin ¶
Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License.
Copyright © 2020 Marvin ¶
Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License.
Index ¶
- type Database
- func (d *Database) Close() error
- func (d *Database) ExecContext(ctx context.Context, query string, args ...any) (sql.Result, error)
- func (d *Database) FilterDatabaseTable(sourceSchema string, includeTableS, excludeTableS []string) ([]string, error)
- func (d *Database) FindDatabaseTableBestColumn(schemaNameS, tableNameS, columnNameS string) ([]string, error)
- func (d *Database) GeDatabaseInstance() ([]map[string]string, error)
- func (d *Database) GeneralQuery(query string) ([]string, []map[string]string, error)
- func (d *Database) GetDatabaseCharset() (string, error)
- func (d *Database) GetDatabaseClusteredTable(schemaName string) ([]string, error)
- func (d *Database) GetDatabaseCollation() (string, error)
- func (d *Database) GetDatabaseConsistentPos() (uint64, error)
- func (d *Database) GetDatabaseGlobalName() (string, error)
- func (d *Database) GetDatabaseMaterializedView(schemaName string) ([]string, error)
- func (d *Database) GetDatabaseParameters() (string, string, string, string, error)
- func (d *Database) GetDatabasePartitionTable(schemaName string) ([]string, error)
- func (d *Database) GetDatabasePlatformName() (string, string, string, error)
- func (d *Database) GetDatabaseRole() (string, error)
- func (d *Database) GetDatabaseSchema() ([]string, error)
- func (d *Database) GetDatabaseSchemaCodeObject(schemaName []string) ([]map[string]string, error)
- func (d *Database) GetDatabaseSchemaCollation(schemaName string) (string, error)
- func (d *Database) GetDatabaseSchemaColumnDataDefaultCounts(schemaName []string) ([]map[string]string, error)
- func (d *Database) GetDatabaseSchemaColumnTypeCounts(schemaName []string) ([]map[string]string, error)
- func (d *Database) GetDatabaseSchemaConstraintTypeCounts(schemaName []string) ([]map[string]string, error)
- func (d *Database) GetDatabaseSchemaIndexTypeCounts(schemaName []string) ([]map[string]string, error)
- func (d *Database) GetDatabaseSchemaMaterializedViewObject(schemaName []string) ([]map[string]string, error)
- func (d *Database) GetDatabaseSchemaNameALL() ([]string, error)
- func (d *Database) GetDatabaseSchemaNameSingle(schemaNameS string) (string, error)
- func (d *Database) GetDatabaseSchemaObjectTypeCounts(schemaName []string) ([]map[string]string, error)
- func (d *Database) GetDatabaseSchemaPartitionTableCountsOverLimit(schemaName []string, limit int) ([]map[string]string, error)
- func (d *Database) GetDatabaseSchemaPartitionTableType(schemaName []string) ([]map[string]string, error)
- func (d *Database) GetDatabaseSchemaPartitionTypeCounts(schemaName []string) ([]map[string]string, error)
- func (d *Database) GetDatabaseSchemaSubPartitionTypeCounts(schemaName []string) ([]map[string]string, error)
- func (d *Database) GetDatabaseSchemaSynonymObject(schemaName []string) ([]map[string]string, error)
- func (d *Database) GetDatabaseSchemaTableAvgRowLengthOverLimitMB(schemaName []string, limitMB int) ([]map[string]string, error)
- func (d *Database) GetDatabaseSchemaTableAvgRowLengthTOP(schemaName []string, top int) ([]map[string]string, error)
- func (d *Database) GetDatabaseSchemaTableColumnCountsOverLimit(schemaName []string, limit int) ([]map[string]string, error)
- func (d *Database) GetDatabaseSchemaTableColumnNameLengthOverLimit(schemaName []string, limit int) ([]map[string]string, error)
- func (d *Database) GetDatabaseSchemaTableIndexCountsOverLimit(schemaName []string, limit int) ([]map[string]string, error)
- func (d *Database) GetDatabaseSchemaTableIndexLengthOverLimit(schemaName []string, limit int) ([]map[string]string, error)
- func (d *Database) GetDatabaseSchemaTableIndexNameLengthOverLimit(schemaName []string, limit int) ([]map[string]string, error)
- func (d *Database) GetDatabaseSchemaTableIndexOverview(schemaNameS []string) ([]map[string]string, error)
- func (d *Database) GetDatabaseSchemaTableNameLengthOverLimit(schemaName []string, limit int) ([]map[string]string, error)
- func (d *Database) GetDatabaseSchemaTableRowsTOP(schemaName []string, top int) ([]map[string]string, error)
- func (d *Database) GetDatabaseSchemaTableSequenceNameLengthOverLimit(schemaName []string, limit int) ([]map[string]string, error)
- func (d *Database) GetDatabaseSchemaTableSpecialDatatype(schemaName []string, specialDatatype string) ([]map[string]string, error)
- func (d *Database) GetDatabaseSchemaTableTypeCounts(schemaName []string) ([]map[string]string, error)
- func (d *Database) GetDatabaseSchemaTableViewNameLengthOverLimit(schemaName []string, limit int) ([]map[string]string, error)
- func (d *Database) GetDatabaseSchemaTemporaryTableTypeCounts(schemaName []string) ([]map[string]string, error)
- func (d *Database) GetDatabaseSchemaViewTypeCounts(schemaName []string) ([]map[string]string, error)
- func (d *Database) GetDatabaseSequence(schemaName string) ([]map[string]string, error)
- func (d *Database) GetDatabaseServerMemorySize() (string, error)
- func (d *Database) GetDatabaseServerNumCPU() (string, error)
- func (d *Database) GetDatabaseSessionMaxActiveCount() ([]map[string]string, error)
- func (d *Database) GetDatabaseSize() (string, error)
- func (d *Database) GetDatabaseSoftVersion() (string, error)
- func (d *Database) GetDatabaseTable(schemaName string) ([]string, error)
- func (d *Database) GetDatabaseTableCharset(schemaName string, tableName string) (string, error)
- func (d *Database) GetDatabaseTableCheckKey(schemaName string, tableName string) ([]map[string]string, error)
- func (d *Database) GetDatabaseTableChunkData(querySQL string, batchSize, callTimeout int, ...) error
- func (d *Database) GetDatabaseTableChunkTask(taskName, schemaName, tableName string, chunkSize uint64, callTimeout uint64) ([]map[string]string, error)
- func (d *Database) GetDatabaseTableCollation(schemaName, tableName string) (string, error)
- func (d *Database) GetDatabaseTableColumnAttribute(schemaNameS, tableNameS, columnNameS string, collationS bool) ([]map[string]string, error)
- func (d *Database) GetDatabaseTableColumnBucket(schemaNameS, tableNameS string, columnNameS, datatypeS string) ([]string, error)
- func (d *Database) GetDatabaseTableColumnComment(schemaName string, tableName string) ([]map[string]string, error)
- func (d *Database) GetDatabaseTableColumnInfo(schemaName string, tableName string, collation bool) ([]map[string]string, error)
- func (d *Database) GetDatabaseTableColumnNameSqlDimensions(sqlStr string) ([]string, map[string]string, map[string]string, error)
- func (d *Database) GetDatabaseTableColumnNameTableDimensions(schemaName, tableName string) ([]string, error)
- func (d *Database) GetDatabaseTableComment(schemaName string, tableName string) ([]map[string]string, error)
- func (d *Database) GetDatabaseTableCompareData(querySQL string, callTimeout int, dbCharsetS, dbCharsetT string) ([]string, uint32, map[string]int64, error)
- func (d *Database) GetDatabaseTableCsvData(querySQL string, callTimeout int, ...) error
- func (d *Database) GetDatabaseTableForeignKey(schemaName string, tableName string) ([]map[string]string, error)
- func (d *Database) GetDatabaseTableNormalIndex(schemaName string, tableName string) ([]map[string]string, error)
- func (d *Database) GetDatabaseTableOriginStruct(schemaName, tableName, tableType string) (string, error)
- func (d *Database) GetDatabaseTablePartitionExpress(schemaName string, tableName string) ([]map[string]string, error)
- func (d *Database) GetDatabaseTablePrimaryKey(schemaName string, tableName string) ([]map[string]string, error)
- func (d *Database) GetDatabaseTableRows(schemaName, tableName string) (uint64, error)
- func (d *Database) GetDatabaseTableSize(schemaName, tableName string) (float64, error)
- func (d *Database) GetDatabaseTableType(schemaName string) (map[string]string, error)
- func (d *Database) GetDatabaseTableUniqueIndex(schemaName string, tableName string) ([]map[string]string, error)
- func (d *Database) GetDatabaseTableUniqueKey(schemaName string, tableName string) ([]map[string]string, error)
- func (d *Database) GetDatabaseTemporaryTable(schemaName string) ([]string, error)
- func (d *Database) GetDatabaseUsernameLengthOverLimit(schemaName []string, limit int) ([]map[string]string, error)
- func (d *Database) GetDatabaseVersion() (string, error)
- func (d *Database) PingDatabaseConnection() error
- func (d *Database) PrepareContext(ctx context.Context, sqlStr string) (*sql.Stmt, error)
- func (d *Database) QueryContext(ctx context.Context, query string, args ...any) (*sql.Rows, error)
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Database ¶
func NewDatabase ¶
func NewDatabase(ctx context.Context, datasource *datasource.Datasource) (*Database, error)