This website works better with JavaScript.
Home
Explore
Help
Sign In
tgo
/
dbquery
Watch
6
Star
0
Fork
0
Code
Issues
0
Pull Requests
0
Projects
0
Releases
37
Wiki
Activity
Browse Source
修改查询
master
v0.4.1
guzeng
3 years ago
parent
f0254c8655
commit
c1a82cf1b0
1 changed files
with
16 additions
and
2 deletions
Split View
Diff Options
Show Stats
Download Patch File
Download Diff File
+16
-2
chain.go
+ 16
- 2
chain.go
View File
@ -29,9 +29,23 @@ type Query struct {
conn
*
sql
.
DB
}
func
NewQuery
(
)
*
Query
{
func
NewQuery
(
t
...
string
)
*
Query
{
var
conn_type
*
sql
.
DB
=
DB
if
len
(
t
)
>
0
{
switch
t
[
0
]
{
case
"mysql"
:
conn_type
=
DB
case
"mssql"
:
//sql server
conn_type
=
MSDB_CONNDB
}
}
return
&
Query
{
conn
:
DB
,
conn
:
conn_type
,
}
}
Write
Preview
Loading…
Cancel
Save