database

package
v0.3.9 Latest Latest
Warning

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

Go to latest
Published: Jan 16, 2025 License: MIT, Apache-2.0 Imports: 3 Imported by: 9

Documentation

Index

Constants

View Source
const (
	Mysql    = "mysql"
	Postgres = "postgres"
	Sqlite   = "sqlite"
)

Variables

This section is empty.

Functions

func ExistsByFilterExpressions added in v0.3.8

func ExistsByFilterExpressions(db *sql.DB, tableName string, filters sql2.FilterExprs) (bool, error)

func StringConvertFor added in v0.3.8

func StringConvertFor[T any](str string) (T, error)

func TableName

func TableName(name string, id uint64) string

Types

type Config

type Config struct {
	Type, Charset, Database, TimeZone string
	Host                              string `flag:"name:db_host;usage:数据库host"`
	User, Password                    string
	TimeFormat                        string
	MaxIdleConns, MaxOpenConns        int
	Port                              int32
}

Jump to

Keyboard shortcuts

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