good morning!!!!
Skip to content
GitLab
Explore
Sign in
Register
Primary navigation
Search or go to…
Project
U
upper
Manage
Activity
Members
Labels
Plan
Issues
0
Issue boards
Milestones
Iterations
Wiki
Requirements
Code
Merge requests
1
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Locked files
Build
Pipelines
Jobs
Pipeline schedules
Test cases
Artifacts
Deploy
Releases
Package Registry
Container Registry
Harbor Registry
Model registry
Operate
Environments
Terraform modules
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Code review analytics
Issue analytics
Insights
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
This is an archived project. Repository and other project resources are read-only.
Show more breadcrumbs
open
upper
Commits
1a7c267f
Commit
1a7c267f
authored
10 years ago
by
José Carlos Nieto
Browse files
Options
Downloads
Patches
Plain Diff
Using a row variable for holding rows for QueryRow().
parent
06da7349
No related branches found
Branches containing commit
No related tags found
Tags containing commit
No related merge requests found
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
postgresql/database.go
+5
-2
5 additions, 2 deletions
postgresql/database.go
with
5 additions
and
2 deletions
postgresql/database.go
+
5
−
2
View file @
1a7c267f
...
...
@@ -172,6 +172,7 @@ func (self *Source) doQuery(stmt sqlgen.Statement, args ...interface{}) (*sql.Ro
func
(
self
*
Source
)
doQueryRow
(
stmt
sqlgen
.
Statement
,
args
...
interface
{})
(
*
sql
.
Row
,
error
)
{
var
query
string
var
row
*
sql
.
Row
var
err
error
defer
func
()
{
...
...
@@ -190,10 +191,12 @@ func (self *Source) doQueryRow(stmt sqlgen.Statement, args ...interface{}) (*sql
}
if
self
.
tx
!=
nil
{
return
self
.
tx
.
QueryRow
(
query
,
args
...
),
nil
row
=
self
.
tx
.
QueryRow
(
query
,
args
...
)
}
else
{
row
=
self
.
session
.
QueryRow
(
query
,
args
...
)
}
return
self
.
session
.
QueryRow
(
query
,
args
...
),
nil
return
row
,
err
}
// Returns the string name of the database.
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment