forked from LBRYCommunity/lbry-sdk
removed unused method and minor pylint fix
This commit is contained in:
parent
95cbdcb131
commit
944238d542
1 changed files with 4 additions and 12 deletions
|
@ -150,14 +150,6 @@ class SQLiteMixin:
|
|||
)
|
||||
return sql, values
|
||||
|
||||
@defer.inlineCallbacks
|
||||
def query_one_value(self, query, params=None, default=None):
|
||||
result = yield self.run_query(query, params)
|
||||
if result:
|
||||
return result[0][0] or default
|
||||
else:
|
||||
return default
|
||||
|
||||
@staticmethod
|
||||
def execute(t, sql, values):
|
||||
log.debug(sql)
|
||||
|
@ -454,10 +446,10 @@ class BaseDatabase(SQLiteMixin):
|
|||
|
||||
def add_keys(self, account, chain, keys):
|
||||
sql = (
|
||||
"insert into pubkey_address "
|
||||
"(address, account, chain, position, pubkey) "
|
||||
"values "
|
||||
) + ', '.join(['(?, ?, ?, ?, ?)'] * len(keys))
|
||||
"insert into pubkey_address "
|
||||
"(address, account, chain, position, pubkey) "
|
||||
"values "
|
||||
) + ', '.join(['(?, ?, ?, ?, ?)'] * len(keys))
|
||||
values = []
|
||||
for position, pubkey in keys:
|
||||
values.append(pubkey.address)
|
||||
|
|
Loading…
Reference in a new issue