예제 #1
0
func NewRuntimeConfig() *RuntimeConfig {
	c := &RuntimeConfig{
		Sources: datasource.DataSourcesRegistry(),
	}

	return c
}
예제 #2
0
	_ driver.Driver  = (*qlbdriver)(nil)
	_ driver.Execer  = (*qlbConn)(nil)
	_ driver.Queryer = (*qlbConn)(nil)
	_ driver.Result  = (*qlbResult)(nil)
	_ driver.Rows    = (*qlbRows)(nil)
	_ driver.Stmt    = (*qlbStmt)(nil)
	//_ driver.Tx      = (*driverConn)(nil)

	// Create an instance of our driver
	qlbd          = &qlbdriver{}
	qlbDriverOnce sync.Once

	// Runtime Schema Config as in in-mem data structure of the
	//  datasources, tables, etc.   Sources must be registered
	//  as this is not persistent
	registry = datasource.DataSourcesRegistry()

	_ = u.EMPTY
)

const (
	MysqlTimeFormat = "2006-01-02 15:04:05.000000000"
)

func RegisterSqlDriver() {
	qlbDriverOnce.Do(func() {
		sql.Register("qlbridge", qlbd)
	})
}

func DisableRecover() {