Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func GetDBDriverName ¶
GetDBDriverName get db driver name string of sql.db
func GetDBPlaceholder ¶
func GetDBPlaceholder(db *sql.DB) protosql.SQLPlaceholder
GetDBPlaceholder get placeholder of sql.db
Types ¶
type TDBDialect ¶
type TDBDialect int
const ( Unknown TDBDialect = 0 Postgres TDBDialect = 1 Mysql TDBDialect = 2 SQLite TDBDialect = 3 Oracle TDBDialect = 4 )
func GetDBDialect ¶
func GetDBDialect(db *sql.DB) (dialect TDBDialect)
GetDBDialect get db dialect of sql.db
func (TDBDialect) Placeholder ¶
func (this TDBDialect) Placeholder() protosql.SQLPlaceholder
Placeholder get placeholder of db dialect
type TDBDialectCacheItem ¶
type TDBDialectCacheItem struct { DB *sql.DB Placeholder protosql.SQLPlaceholder CacheTime time.Time }
func GetDBPlaceholderCache ¶
func GetDBPlaceholderCache(db *sql.DB) (protosql.SQLPlaceholder, TDBDialectCacheItem)
GetDBPlaceholder get placeholder of sql.db
Click to show internal directories.
Click to hide internal directories.