I'm CengSin, Java&Golang Developer, Most of the time is spent on web back-end development
cengsin / oracle Goto Github PK
View Code? Open in Web Editor NEWGORM oracle driver
License: Other
GORM oracle driver
License: Other
在本地更新godror依赖版本后,gorm批量插入的速度更快了
请问可以自动注册表吗?我测试的时候好像是不可以的
Ahem.
Fuck Oracle Database🖕
Right?
Trying to connect oracle with this URL )
But got this instead
[error] failed to initialize database, got error params=user=Soracle password="SECRET-z4Enewm1A2k="
timezone=local poolIncrement=1 poolMaxSessions=1000 poolMinSessions=1 poolSessionMaxLifetime=1h0m0s
poolSessionTimeout=5m0s poolWaitTimeout=30s extAuth=0: ORA-12154: TNS:could not resolve the connect identifier specified
2021/02/11 13:44:06 params=user=Soracle password="SECRET-z4Enewm1A2k=" [email protected]:1521/tibret
timezone=local poolIncrement=1 poolMaxSessions=1000 poolMinSessions=1 poolSessionMaxLifetime=1h0m0s
poolSessionTimeout=5m0s poolWaitTimeout=30s extAuth=0: ORA-12154: TNS:could not resolve the connect identifier specified
exit status 1
2020/10/07 14:48:17 initial database connect……
2020/10/07 14:48:17 ORA-00000: DPI-1047: Cannot locate a 64-bit Oracle Client library: "The specified module could not be found". See https://oracle.github.io/odpi/doc/installation.html#windows for help
I start with documentation,but error coming ,please help me ,
I have already installed oracle and set the PATH ~
But it still can't solve this problem
go get github.com/cengsin/oracle
# github.com/cengsin/oracle
../../../../../pkg/mod/github.com/cengsin/[email protected]/oracle.go:53:59: unknown field 'WithReturning' in struct literal of type callbacks.Config
err = db.Where("ID=?",1).First(&info).Error
报错,dpiStmt_execute:ORA-00933:SQL command not properly ended
Can I use it in a production environment?
type Project struct {
ID int `json:"id" gorm:"column:id;primaryKey;autoIncrement"`
Status int `json:"status" gorm:"column:status"`
Product string `json:"product" gorm:"column:product"`
Name string `json:"name" gorm:"column:name"`
DbName string `json:"db_name" gorm:"column:db_name"`
OnlineServiceName string `json:"online_service_name" gorm:"column:online_service_name"`
InTime time.Time `json:"in_time" gorm:"autoCreateTime"`
UpdateTime time.Time `json:"update_time" gorm:"autoUpdateTime"`
// 公共属性
Pid int `json:"pid" gorm:"column:pid"`
Bid int `json:"bid" gorm:"column:bid"`
Mid int `json:"mid" gorm:"column:mid"`
BusID string `json:"busid" gorm:"column:bus_id"`
Biid string `json:"biid" gorm:"column:biid"`
PublicKey string `json:"public_key" gorm:"column:public_key"`
PrivateKey string `json:"private_key" gorm:"column:private_key"`
ApiGetUrl string `json:"api_get_url" gorm:"column:api_get_url"`
ApiPostUrl string `json:"api_post_url" gorm:"column:api_post_url"`
JavaGetURL string `json:"java_get_url" gorm:"column:java_get_url"`
PmuInfo string `json:"pmu_info" gorm:"column:pmu_info;size:2000"`
AdaptorURL string `json:"adaptor_url" gorm:"column:adaptor_url"`
NameServerURL string `json:"name_server_url" gorm:"column:name_server_url"`
BotConfigs string `json:"bot_configs" gorm:"column:bot_configs"`
}
func (t *Project) TableName() string {
return "project"
}
func main(){
db,_:=utils.GetHealthAIotDB()
//db.Logger.LogMode()
var list []Project
db.Debug().Find(&list)
fmt.Println(list)
}
输出
2021/06/28 10:59:03 D:/go/src/awesomeProject2/main.go:43
[3.990ms] [rows:1] SELECT * FROM project
[{1 0 2021-06-28 10:08:32.444365 +0800 CST 2021-06-28 10:08:32.444365 +0800 CST 0 0 0 }]
....\pkg\mod\github.com\cengsin\[email protected]\oracle.go:53:59: unknown field 'WithReturning' in struct literal of type callbacks.Config
Hi,
Thx for the effort.
I cannot fetch Varchar2 fields, dates, integers and booleans are all OK, but varchar2 fields are missing.
How can we fix it?
Thx
Thx for the effort.
You need to add Toupper to hasTable, etc...
In Oracle table names are always upper case.
Thx.
A declarative, efficient, and flexible JavaScript library for building user interfaces.
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google ❤️ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.