Skip to content
GitLab
Explore
Sign in
Register
Primary navigation
Search or go to…
Project
P
postgres-lambda-diff
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
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
Jakob Huber
postgres-lambda-diff
Commits
881390ff
Commit
881390ff
authored
22 years ago
by
Dave Cramer
Browse files
Options
Downloads
Patches
Plain Diff
patch to allow insertRow on an empty resultSet
parent
6a5168a7
No related branches found
No related tags found
No related merge requests found
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
src/interfaces/jdbc/org/postgresql/jdbc2/AbstractJdbc2ResultSet.java
+20
-10
20 additions, 10 deletions
...ces/jdbc/org/postgresql/jdbc2/AbstractJdbc2ResultSet.java
with
20 additions
and
10 deletions
src/interfaces/jdbc/org/postgresql/jdbc2/AbstractJdbc2ResultSet.java
+
20
−
10
View file @
881390ff
...
...
@@ -15,7 +15,7 @@ import org.postgresql.util.PGbytea;
import
org.postgresql.util.PSQLException
;
/* $Header: /cvsroot/pgsql/src/interfaces/jdbc/org/postgresql/jdbc2/Attic/AbstractJdbc2ResultSet.java,v 1.
5
2002/0
8/23
2
0
:4
5:49 barry
Exp $
/* $Header: /cvsroot/pgsql/src/interfaces/jdbc/org/postgresql/jdbc2/Attic/AbstractJdbc2ResultSet.java,v 1.
6
2002/0
9/01
2
3
:4
0:36 davec
Exp $
* This class defines methods of the jdbc2 specification. This class extends
* org.postgresql.jdbc1.AbstractJdbc1ResultSet which provides the jdbc1
* methods. The real Statement class (for jdbc2) is org.postgresql.jdbc2.Jdbc2ResultSet
...
...
@@ -191,10 +191,12 @@ public abstract class AbstractJdbc2ResultSet extends org.postgresql.jdbc1.Abstra
}
public
boolean
first
()
throws
SQLException
{
public
boolean
first
()
throws
SQLException
{
if
(
rows
.
size
()
<=
0
)
return
false
;
onInsertRow
=
false
;
current_row
=
0
;
this_row
=
(
byte
[][])
rows
.
elementAt
(
current_row
);
...
...
@@ -449,8 +451,10 @@ public abstract class AbstractJdbc2ResultSet extends org.postgresql.jdbc1.Abstra
}
public
synchronized
void
cancelRowUpdates
()
throws
SQLException
{
if
(
doingUpdates
)
{
public
synchronized
void
cancelRowUpdates
()
throws
SQLException
{
if
(
doingUpdates
)
{
doingUpdates
=
false
;
clearRowBuffer
();
...
...
@@ -458,7 +462,8 @@ public abstract class AbstractJdbc2ResultSet extends org.postgresql.jdbc1.Abstra
}
public
synchronized
void
deleteRow
()
throws
SQLException
{
public
synchronized
void
deleteRow
()
throws
SQLException
{
if
(
!
isUpdateable
()
)
{
throw
new
PSQLException
(
"postgresql.updateable.notupdateable"
);
}
...
...
@@ -593,12 +598,15 @@ public abstract class AbstractJdbc2ResultSet extends org.postgresql.jdbc1.Abstra
}
public
synchronized
void
moveToInsertRow
()
throws
SQLException
{
if
(!
updateable
)
{
public
synchronized
void
moveToInsertRow
()
throws
SQLException
{
if
(
!
isUpdateable
()
)
{
throw
new
PSQLException
(
"postgresql.updateable.notupdateable"
);
}
if
(
insertStatement
!=
null
)
{
if
(
insertStatement
!=
null
)
{
insertStatement
=
null
;
}
...
...
@@ -612,7 +620,8 @@ public abstract class AbstractJdbc2ResultSet extends org.postgresql.jdbc1.Abstra
}
private
synchronized
void
clearRowBuffer
()
throws
SQLException
{
private
synchronized
void
clearRowBuffer
()
throws
SQLException
{
// rowBuffer is the temporary storage for the row
rowBuffer
=
new
byte
[
fields
.
length
][];
...
...
@@ -1180,7 +1189,8 @@ public abstract class AbstractJdbc2ResultSet extends org.postgresql.jdbc1.Abstra
* Is this ResultSet updateable?
*/
boolean
isUpdateable
()
throws
SQLException
{
boolean
isUpdateable
()
throws
SQLException
{
if
(
updateable
)
return
true
;
...
...
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