Fetch the repository succeeded.
This action will force synchronization from springrain/dm, which will overwrite any changes that you have made since you forked the repository, and can not be recovered!!!
Synchronous operation will process in the background and will refresh the page when finishing processing. Please be patient.
/*
* Copyright (c) 2000-2018, 达梦数据库有限公司.
* All rights reserved.
*/
package dm
import (
"context"
"database/sql"
"database/sql/driver"
"sync"
"gitee.com/chunanyong/dm/i18n"
)
// 发版标记
var version = "8.1.2.174"
var build_date = "2022.11.21"
var svn = "13574"
var globalDmDriver = newDmDriver()
func init() {
sql.Register("dm", globalDmDriver)
}
func driverInit(svcConfPath string) {
load(svcConfPath)
if GlobalProperties != nil && GlobalProperties.Len() > 0 {
setDriverAttributes(GlobalProperties)
}
globalDmDriver.createFilterChain(nil, GlobalProperties)
switch Locale {
case 0:
i18n.InitConfig(i18n.Messages_zh_CN)
case 1:
i18n.InitConfig(i18n.Messages_en_US)
case 2:
i18n.InitConfig(i18n.Messages_zh_TW)
}
}
type DmDriver struct {
filterable
readPropMutex sync.Mutex
}
func newDmDriver() *DmDriver {
d := new(DmDriver)
d.idGenerator = dmDriverIDGenerator
return d
}
/*************************************************************
** PUBLIC METHODS AND FUNCTIONS
*************************************************************/
func (d *DmDriver) Open(dsn string) (driver.Conn, error) {
return d.open(dsn)
}
func (d *DmDriver) OpenConnector(dsn string) (driver.Connector, error) {
return d.openConnector(dsn)
}
func (d *DmDriver) open(dsn string) (*DmConnection, error) {
c, err := d.openConnector(dsn)
if err != nil {
return nil, err
}
return c.connect(context.Background())
}
func (d *DmDriver) openConnector(dsn string) (*DmConnector, error) {
connector := new(DmConnector).init()
connector.url = dsn
connector.dmDriver = d
d.readPropMutex.Lock()
err := connector.mergeConfigs(dsn)
d.readPropMutex.Unlock()
if err != nil {
return nil, err
}
connector.createFilterChain(connector, nil)
return connector, nil
}
此处可能存在不合适展示的内容,页面不予展示。您可通过相关编辑功能自查并修改。
如您确认内容无涉及 不当用语 / 纯广告导流 / 暴力 / 低俗色情 / 侵权 / 盗版 / 虚假 / 无价值内容或违法国家有关法律法规的内容,可点击提交进行申诉,我们将尽快为您处理。