Skip to content
GitLab
Explore
Sign in
Register
Primary navigation
Search or go to…
Project
pike
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Container registry
Model registry
Operate
Environments
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
GitLab community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
pikelang
pike
Commits
c22eb211
Commit
c22eb211
authored
20 years ago
by
Martin Nilsson
Browse files
Options
Downloads
Patches
Plain Diff
Try harder to figure out correct _sprintf information.
Rev: lib/modules/Sql.pmod/sql_result.pike:1.15
parent
67582ff2
No related branches found
No related tags found
No related merge requests found
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
lib/modules/Sql.pmod/sql_result.pike
+11
-6
11 additions, 6 deletions
lib/modules/Sql.pmod/sql_result.pike
with
11 additions
and
6 deletions
lib/modules/Sql.pmod/sql_result.pike
+
11
−
6
View file @
c22eb211
/*
/*
* $Id: sql_result.pike,v 1.1
4
2005/04/1
0
0
3:50:27
nilsson Exp $
* $Id: sql_result.pike,v 1.1
5
2005/04/1
2
0
0:39:19
nilsson Exp $
*
*
* Implements the generic result module of the SQL-interface
* Implements the generic result module of the SQL-interface
*
*
...
@@ -14,7 +14,8 @@
...
@@ -14,7 +14,8 @@
//! The actual result.
//! The actual result.
mixed master_res;
mixed master_res;
//! This is the number of the current row. (0 <= @[index] < @[num_rows()])
//! This is the number of the current row. The actual semantics
//! differs between different databases.
int index;
int index;
//! Create a new Sql.sql_result object
//! Create a new Sql.sql_result object
...
@@ -25,9 +26,13 @@ static void create(mixed res);
...
@@ -25,9 +26,13 @@ static void create(mixed res);
static string _sprintf(int type, mapping|void flags)
static string _sprintf(int type, mapping|void flags)
{
{
int f;
int f = num_fields();
return type=='O' && master_res && sprintf("%O(/* row %d/%d, %d field%s */)",
int r = num_rows();
this_program, index, num_rows(),
int e = eof();
return type=='O' && master_res &&
sprintf("%O(/* row %d/%s, %d field%s */)",
this_program, index,
(index==r && !e)?"?":(string)num_rows(),
f=num_fields(), f>1?"s":"");
f=num_fields(), f>1?"s":"");
}
}
...
...
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