Oracle : Local Naming Method
#1515
Merged
lunny
merged 6 commits from tomoyamachi/xorm:fix-oracle-db
into master
3 years ago
Loading…
Reference in New Issue
There is no content yet.
Delete Branch 'tomoyamachi/xorm:fix-oracle-db'
Deleting a branch is permanent. It CANNOT be undone. Continue?
What did you implement:
Type : Bugfix
Before : Return
dbname is empty
error when using a Local Naming Method.After : Return
dbname is empty
error when dbhost is empty and not using a Local Naming Methoddescription
Oracle can set net service names.
https://docs.oracle.com/cd/B13789_01/network.101/b10775/naming.htm#i448220
tnsnames.ora
then,
user/pass@sales
is an alias foruser/pass@tcp(server:1521)/sample
.But, xorm can't parse
user/pass@sales
and return a error for now.How Has This Been Tested?
user/pass@server:1521/sample
user/pass@sample
dbname is empty
:user/pass@
@tomoyamachi Thanks for you contribution. Could you add your tests on the patch?
@lunny
Sorry for the late reply.
Currently,
xorm
does not have any tests for Oracle DB.An Oracle DB container image is over 5GB and we have to download tar files from official oracle site. It is difficult to use the same method so far.
Please let me know if you have any oracle database environments we can use.
@tomoyamachi In fact I have sent a PR #1463 to add a tests for oracle and in that PR I'm running an oralce container to tests xorm.
And for your PR, you just need a
TestParseOracleConnStr(t *testing.T)
that's OK.@lunny
Thank you for the reply.
I create a
TestParseOracleConnStr(t *testing.T)
.@tomoyamachi Thanks!
2ece3bacbb
.