[NEWIMPORT] Move db insert into SQL.py (store_hand)
This commit is contained in:
parent
843bd754f6
commit
1fc015b09f
|
@ -1383,41 +1383,7 @@ class Database:
|
||||||
|
|
||||||
def storeHand(self, p):
|
def storeHand(self, p):
|
||||||
#stores into table hands:
|
#stores into table hands:
|
||||||
q = """INSERT INTO Hands (
|
q = self.sql.query['store_hand']
|
||||||
tablename,
|
|
||||||
gametypeid,
|
|
||||||
sitehandno,
|
|
||||||
handstart,
|
|
||||||
importtime,
|
|
||||||
seats,
|
|
||||||
maxseats,
|
|
||||||
texture,
|
|
||||||
playersVpi,
|
|
||||||
boardcard1,
|
|
||||||
boardcard2,
|
|
||||||
boardcard3,
|
|
||||||
boardcard4,
|
|
||||||
boardcard5,
|
|
||||||
playersAtStreet1,
|
|
||||||
playersAtStreet2,
|
|
||||||
playersAtStreet3,
|
|
||||||
playersAtStreet4,
|
|
||||||
playersAtShowdown,
|
|
||||||
street0Raises,
|
|
||||||
street1Raises,
|
|
||||||
street2Raises,
|
|
||||||
street3Raises,
|
|
||||||
street4Raises,
|
|
||||||
street1Pot,
|
|
||||||
street2Pot,
|
|
||||||
street3Pot,
|
|
||||||
street4Pot,
|
|
||||||
showdownPot
|
|
||||||
)
|
|
||||||
VALUES
|
|
||||||
(%s, %s, %s, %s, %s, %s, %s, %s, %s, %s,
|
|
||||||
%s, %s, %s, %s, %s, %s, %s, %s, %s, %s,
|
|
||||||
%s, %s, %s, %s, %s, %s, %s, %s, %s)"""
|
|
||||||
|
|
||||||
q = q.replace('%s', self.sql.query['placeholder'])
|
q = q.replace('%s', self.sql.query['placeholder'])
|
||||||
|
|
||||||
|
|
|
@ -3110,6 +3110,44 @@ class Sql:
|
||||||
self.query['handsPlayersTTypeId_joiner'] = " OR TourneysPlayersId+0="
|
self.query['handsPlayersTTypeId_joiner'] = " OR TourneysPlayersId+0="
|
||||||
self.query['handsPlayersTTypeId_joiner_id'] = " OR id="
|
self.query['handsPlayersTTypeId_joiner_id'] = " OR id="
|
||||||
|
|
||||||
|
self.query['store_hand'] = """INSERT INTO Hands (
|
||||||
|
tablename,
|
||||||
|
gametypeid,
|
||||||
|
sitehandno,
|
||||||
|
handstart,
|
||||||
|
importtime,
|
||||||
|
seats,
|
||||||
|
maxseats,
|
||||||
|
texture,
|
||||||
|
playersVpi,
|
||||||
|
boardcard1,
|
||||||
|
boardcard2,
|
||||||
|
boardcard3,
|
||||||
|
boardcard4,
|
||||||
|
boardcard5,
|
||||||
|
playersAtStreet1,
|
||||||
|
playersAtStreet2,
|
||||||
|
playersAtStreet3,
|
||||||
|
playersAtStreet4,
|
||||||
|
playersAtShowdown,
|
||||||
|
street0Raises,
|
||||||
|
street1Raises,
|
||||||
|
street2Raises,
|
||||||
|
street3Raises,
|
||||||
|
street4Raises,
|
||||||
|
street1Pot,
|
||||||
|
street2Pot,
|
||||||
|
street3Pot,
|
||||||
|
street4Pot,
|
||||||
|
showdownPot
|
||||||
|
)
|
||||||
|
VALUES
|
||||||
|
(%s, %s, %s, %s, %s, %s, %s, %s, %s, %s,
|
||||||
|
%s, %s, %s, %s, %s, %s, %s, %s, %s, %s,
|
||||||
|
%s, %s, %s, %s, %s, %s, %s, %s, %s)"""
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
if db_server == 'mysql':
|
if db_server == 'mysql':
|
||||||
|
|
Loading…
Reference in New Issue
Block a user