Skip to content

Commit

Permalink
Merge pull request #12 from pmakowski/master
Browse files Browse the repository at this point in the history
fix str params bug and add read committed read only
  • Loading branch information
nakagami committed Sep 13, 2011
2 parents 2b2999d + bc849fe commit ce62ddf
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 3 deletions.
1 change: 1 addition & 0 deletions firebirdsql/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -50,4 +50,5 @@ def __init__(self):
paramstyle, cursor, connect, create_database, service_mgr,
ISOLATION_LEVEL_READ_UNCOMMITTED, ISOLATION_LEVEL_READ_COMMITED,
ISOLATION_LEVEL_REPEATABLE_READ, ISOLATION_LEVEL_SERIALIZABLE,
ISOLATION_LEVEL_READ_COMMITED_READ_ONLY
)
1 change: 1 addition & 0 deletions firebirdsql/consts.py
Original file line number Diff line number Diff line change
Expand Up @@ -96,6 +96,7 @@
ISOLATION_LEVEL_READ_COMMITED = 1
ISOLATION_LEVEL_REPEATABLE_READ = 2
ISOLATION_LEVEL_SERIALIZABLE = 3
ISOLATION_LEVEL_READ_COMMITED_READ_ONLY = 4

isc_tpb_version1 = 1
isc_tpb_version3 = 3
Expand Down
7 changes: 4 additions & 3 deletions firebirdsql/fbcore.py
Original file line number Diff line number Diff line change
Expand Up @@ -38,6 +38,8 @@ def bs(byte_array):
bs([isc_tpb_version3, isc_tpb_write, isc_tpb_wait, isc_tpb_concurrency]),
# ISOLATION_LEVEL_SERIALIZABLE
bs([isc_tpb_version3, isc_tpb_write, isc_tpb_wait, isc_tpb_consistency]),
# ISOLATION_LEVEL_READ_COMMITED_READ_ONLY
bs([isc_tpb_version3, isc_tpb_read, isc_tpb_wait, isc_tpb_read_committed, isc_tpb_no_rec_version]),
]

INFO_SQL_STMT_TYPE = bs([0x15])
Expand Down Expand Up @@ -404,9 +406,8 @@ def _execute(self, query, params):
for param in params: # Convert str/bytes parameter to blob id
if type(param) == str:
param = self.connection.str_to_bytes(param)
else:
cooked_params.append(param)
continue
cooked_params.append(param)
continue
self.connection._op_create_blob2()
(blob_handle, blob_id, buf2) = self.connection._op_response()
seg_size = self.connection.buffer_length
Expand Down

0 comments on commit ce62ddf

Please sign in to comment.