Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions rgsync/Connectors/sql_connectors.py
Original file line number Diff line number Diff line change
Expand Up @@ -125,7 +125,7 @@ def WriteData(self, data):
self.conn = self.connection.Connect()
if self.exactlyOnceTableName is not None:
shardId = 'shard-%s' % hashtag()
result = self.conn.execute(self.sqlText('select val from %s where id=:id' % self.exactlyOnceTableName, {'id':shardId}))
result = self.conn.execute(self.sqlText('select val from %s where id=:id' % self.exactlyOnceTableName), {'id':shardId})
Comment thread
MeirShpilraien marked this conversation as resolved.
res = result.first()
if res is not None:
self.exactlyOnceLastId = str(res['val'])
Expand Down Expand Up @@ -207,7 +207,7 @@ def GetUpdateQuery(tableName, mappings, pk):
self.addQuery = GetUpdateQuery(self.tableName, mappings, self.pk)
self.delQuery = 'delete from %s where %s=:%s' % (self.tableName, self.pk, self.pk)
if self.exactlyOnceTableName is not None:
self.exactlyOnceQuery = GetUpdateQuery(self.exactlyOnceTableName, {'val', 'val'}, 'id')
self.exactlyOnceQuery = GetUpdateQuery(self.exactlyOnceTableName, {'val': 'val'}, 'id')
Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Nice catch 👍


class SQLiteConnector(MySqlConnector):
def __init__(self, connection, tableName, pk, exactlyOnceTableName=None):
Expand Down