Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
P
Postgres FD Implementation
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Analytics
Analytics
CI / CD
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Abuhujair Javed
Postgres FD Implementation
Commits
881390ff
Commit
881390ff
authored
Sep 01, 2002
by
Dave Cramer
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
patch to allow insertRow on an empty resultSet
parent
6a5168a7
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
20 additions
and
10 deletions
+20
-10
src/interfaces/jdbc/org/postgresql/jdbc2/AbstractJdbc2ResultSet.java
...ces/jdbc/org/postgresql/jdbc2/AbstractJdbc2ResultSet.java
+20
-10
No files found.
src/interfaces/jdbc/org/postgresql/jdbc2/AbstractJdbc2ResultSet.java
View file @
881390ff
...
@@ -15,7 +15,7 @@ import org.postgresql.util.PGbytea;
...
@@ -15,7 +15,7 @@ import org.postgresql.util.PGbytea;
import
org.postgresql.util.PSQLException
;
import
org.postgresql.util.PSQLException
;
/* $Header: /cvsroot/pgsql/src/interfaces/jdbc/org/postgresql/jdbc2/Attic/AbstractJdbc2ResultSet.java,v 1.
5 2002/08/23 20:45:49 barry
Exp $
/* $Header: /cvsroot/pgsql/src/interfaces/jdbc/org/postgresql/jdbc2/Attic/AbstractJdbc2ResultSet.java,v 1.
6 2002/09/01 23:40:36 davec
Exp $
* This class defines methods of the jdbc2 specification. This class extends
* This class defines methods of the jdbc2 specification. This class extends
* org.postgresql.jdbc1.AbstractJdbc1ResultSet which provides the jdbc1
* org.postgresql.jdbc1.AbstractJdbc1ResultSet which provides the jdbc1
* methods. The real Statement class (for jdbc2) is org.postgresql.jdbc2.Jdbc2ResultSet
* 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
...
@@ -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
)
if
(
rows
.
size
()
<=
0
)
return
false
;
return
false
;
onInsertRow
=
false
;
current_row
=
0
;
current_row
=
0
;
this_row
=
(
byte
[][])
rows
.
elementAt
(
current_row
);
this_row
=
(
byte
[][])
rows
.
elementAt
(
current_row
);
...
@@ -449,8 +451,10 @@ public abstract class AbstractJdbc2ResultSet extends org.postgresql.jdbc1.Abstra
...
@@ -449,8 +451,10 @@ public abstract class AbstractJdbc2ResultSet extends org.postgresql.jdbc1.Abstra
}
}
public
synchronized
void
cancelRowUpdates
()
throws
SQLException
{
public
synchronized
void
cancelRowUpdates
()
throws
SQLException
if
(
doingUpdates
)
{
{
if
(
doingUpdates
)
{
doingUpdates
=
false
;
doingUpdates
=
false
;
clearRowBuffer
();
clearRowBuffer
();
...
@@ -458,7 +462,8 @@ public abstract class AbstractJdbc2ResultSet extends org.postgresql.jdbc1.Abstra
...
@@ -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
()
)
{
if
(
!
isUpdateable
()
)
{
throw
new
PSQLException
(
"postgresql.updateable.notupdateable"
);
throw
new
PSQLException
(
"postgresql.updateable.notupdateable"
);
}
}
...
@@ -593,12 +598,15 @@ public abstract class AbstractJdbc2ResultSet extends org.postgresql.jdbc1.Abstra
...
@@ -593,12 +598,15 @@ public abstract class AbstractJdbc2ResultSet extends org.postgresql.jdbc1.Abstra
}
}
public
synchronized
void
moveToInsertRow
()
throws
SQLException
{
public
synchronized
void
moveToInsertRow
()
throws
SQLException
if
(!
updateable
)
{
{
if
(
!
isUpdateable
()
)
{
throw
new
PSQLException
(
"postgresql.updateable.notupdateable"
);
throw
new
PSQLException
(
"postgresql.updateable.notupdateable"
);
}
}
if
(
insertStatement
!=
null
)
{
if
(
insertStatement
!=
null
)
{
insertStatement
=
null
;
insertStatement
=
null
;
}
}
...
@@ -612,7 +620,8 @@ public abstract class AbstractJdbc2ResultSet extends org.postgresql.jdbc1.Abstra
...
@@ -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 is the temporary storage for the row
rowBuffer
=
new
byte
[
fields
.
length
][];
rowBuffer
=
new
byte
[
fields
.
length
][];
...
@@ -1180,7 +1189,8 @@ public abstract class AbstractJdbc2ResultSet extends org.postgresql.jdbc1.Abstra
...
@@ -1180,7 +1189,8 @@ public abstract class AbstractJdbc2ResultSet extends org.postgresql.jdbc1.Abstra
* Is this ResultSet updateable?
* Is this ResultSet updateable?
*/
*/
boolean
isUpdateable
()
throws
SQLException
{
boolean
isUpdateable
()
throws
SQLException
{
if
(
updateable
)
return
true
;
if
(
updateable
)
return
true
;
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment