Commit 54a9ba4b authored by Lukáš Lalinský's avatar Lukáš Lalinský

Stop using the camelCase style in phoenixdb.avatica

parent da4f392c
This diff is collapsed.
...@@ -61,7 +61,7 @@ class Connection(object): ...@@ -61,7 +61,7 @@ class Connection(object):
def open(self): def open(self):
"""Opens the connection.""" """Opens the connection."""
self._id = str(uuid.uuid4()) self._id = str(uuid.uuid4())
self._client.openConnection(self._id, info=self._connection_args) self._client.open_connection(self._id, info=self._connection_args)
def close(self): def close(self):
"""Closes the connection. """Closes the connection.
...@@ -77,7 +77,7 @@ class Connection(object): ...@@ -77,7 +77,7 @@ class Connection(object):
cursor = cursor_ref() cursor = cursor_ref()
if cursor is not None and not cursor._closed: if cursor is not None and not cursor._closed:
cursor.close() cursor.close()
self._client.closeConnection(self._id) self._client.close_connection(self._id)
self._client.close() self._client.close()
self._closed = True self._closed = True
...@@ -125,7 +125,7 @@ class Connection(object): ...@@ -125,7 +125,7 @@ class Connection(object):
props['autoCommit'] = bool(autocommit) props['autoCommit'] = bool(autocommit)
if readonly is not None: if readonly is not None:
props['readOnly'] = bool(readonly) props['readOnly'] = bool(readonly)
props = self._client.connectionSync(self._id, props) props = self._client.connection_sync(self._id, props)
self._autocommit = props.auto_commit self._autocommit = props.auto_commit
self._readonly = props.read_only self._readonly = props.read_only
self._transactionisolation = props.transaction_isolation self._transactionisolation = props.transaction_isolation
...@@ -139,7 +139,7 @@ class Connection(object): ...@@ -139,7 +139,7 @@ class Connection(object):
def autocommit(self, value): def autocommit(self, value):
if self._closed: if self._closed:
raise ProgrammingError('the connection is already closed') raise ProgrammingError('the connection is already closed')
props = self._client.connectionSync(self._id, {'autoCommit': bool(value)}) props = self._client.connection_sync(self._id, {'autoCommit': bool(value)})
self._autocommit = props.auto_commit self._autocommit = props.auto_commit
@property @property
...@@ -151,7 +151,7 @@ class Connection(object): ...@@ -151,7 +151,7 @@ class Connection(object):
def readonly(self, value): def readonly(self, value):
if self._closed: if self._closed:
raise ProgrammingError('the connection is already closed') raise ProgrammingError('the connection is already closed')
props = self._client.connectionSync(self._id, {'readOnly': bool(value)}) props = self._client.connection_sync(self._id, {'readOnly': bool(value)})
self._readonly = props.read_only self._readonly = props.read_only
@property @property
...@@ -162,7 +162,7 @@ class Connection(object): ...@@ -162,7 +162,7 @@ class Connection(object):
def transactionisolation(self, value): def transactionisolation(self, value):
if self._closed: if self._closed:
raise ProgrammingError('the connection is already closed') raise ProgrammingError('the connection is already closed')
props = self._client.connectionSync(self._id, {'transactionIsolation': bool(value)}) props = self._client.connection_sync(self._id, {'transactionIsolation': bool(value)})
self._transactionisolation = props.transaction_isolation self._transactionisolation = props.transaction_isolation
for name in errors.__all__: for name in errors.__all__:
......
...@@ -92,7 +92,7 @@ class Cursor(object): ...@@ -92,7 +92,7 @@ class Cursor(object):
if self._closed: if self._closed:
raise ProgrammingError('the cursor is already closed') raise ProgrammingError('the cursor is already closed')
if self._id is not None: if self._id is not None:
self._connection._client.closeStatement(self._connection._id, self._id) self._connection._client.close_statement(self._connection._id, self._id)
self._id = None self._id = None
self._signature = None self._signature = None
self._column_data_types = [] self._column_data_types = []
...@@ -124,7 +124,7 @@ class Cursor(object): ...@@ -124,7 +124,7 @@ class Cursor(object):
def _set_id(self, id): def _set_id(self, id):
if self._id is not None and self._id != id: if self._id is not None and self._id != id:
self._connection._client.closeStatement(self._connection._id, self._id) self._connection._client.close_statement(self._connection._id, self._id)
self._id = id self._id = id
def _set_signature(self, signature): def _set_signature(self, signature):
...@@ -196,8 +196,8 @@ class Cursor(object): ...@@ -196,8 +196,8 @@ class Cursor(object):
self._set_frame(None) self._set_frame(None)
if parameters is None: if parameters is None:
if self._id is None: if self._id is None:
self._set_id(self._connection._client.createStatement(self._connection._id)) self._set_id(self._connection._client.create_statement(self._connection._id))
results = self._connection._client.prepareAndExecute(self._connection._id, self._id, results = self._connection._client.prepare_and_execute(self._connection._id, self._id,
operation, first_frame_max_size=self.itersize) operation, first_frame_max_size=self.itersize)
self._process_results(results) self._process_results(results)
else: else:
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment