-
Notifications
You must be signed in to change notification settings - Fork 222
/
xormplus.go
38 lines (30 loc) · 1.03 KB
/
xormplus.go
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
package xorm
// "fmt"
const (
MSSQL_DRIVER string = "mssql"
MSSQL_ODBC_DRIVER string = "odbc"
MYSQL_DRIVER string = "mysql"
MYMYSQL_DRIVER string = "mymysql"
POSTGRESQL_DRIVER string = "postgres"
OCI8_DRIVER string = "oci8"
GORACLE_DRIVER string = "godror"
SQLITE3_DRIVER string = "sqlite3"
)
func NewOracle(driverName string, dataSourceName string) (*Engine, error) {
return NewEngine(driverName, dataSourceName)
}
func NewMSSQL(driverName string, dataSourceName string) (*Engine, error) {
return NewEngine(driverName, dataSourceName)
}
func NewMySQL(driverName string, dataSourceName string) (*Engine, error) {
return NewEngine(driverName, dataSourceName)
}
func NewPostgreSQL(dataSourceName string) (*Engine, error) {
return NewEngine(POSTGRESQL_DRIVER, dataSourceName)
}
func NewSqlite3(dataSourceName string) (*Engine, error) {
return NewEngine(SQLITE3_DRIVER, dataSourceName)
}
func NewDB(driverName string, dataSourceName string) (*Engine, error) {
return NewEngine(driverName, dataSourceName)
}