txo (claim_id) column index
This commit is contained in:
parent
73519f8c6a
commit
ad13282494
2 changed files with 6 additions and 2 deletions
|
@ -92,7 +92,7 @@ def maybe_paginate(get_records: Callable, get_record_count: Callable,
|
||||||
})
|
})
|
||||||
return {
|
return {
|
||||||
"items": (yield get_records(**constraints)),
|
"items": (yield get_records(**constraints)),
|
||||||
"total_pages": ((yield get_record_count(**constraints)) + (page_size-1)) / page_size,
|
"total_pages": int(((yield get_record_count(**constraints)) + (page_size-1)) / page_size),
|
||||||
"page": page, "page_size": page_size
|
"page": page, "page_size": page_size
|
||||||
}
|
}
|
||||||
return (yield get_records(**constraints))
|
return (yield get_records(**constraints))
|
||||||
|
|
|
@ -22,13 +22,17 @@ class WalletDatabase(BaseDatabase):
|
||||||
is_buy boolean not null default 0,
|
is_buy boolean not null default 0,
|
||||||
is_sell boolean not null default 0
|
is_sell boolean not null default 0
|
||||||
);
|
);
|
||||||
|
create index txo_claim_id_idx on txo (claim_id);
|
||||||
"""
|
"""
|
||||||
|
|
||||||
CREATE_TABLES_QUERY = (
|
CREATE_TABLES_QUERY = (
|
||||||
BaseDatabase.CREATE_TX_TABLE +
|
BaseDatabase.CREATE_TX_TABLE +
|
||||||
BaseDatabase.CREATE_PUBKEY_ADDRESS_TABLE +
|
BaseDatabase.CREATE_PUBKEY_ADDRESS_TABLE +
|
||||||
|
BaseDatabase.CREATE_PUBKEY_ADDRESS_INDEX +
|
||||||
CREATE_TXO_TABLE +
|
CREATE_TXO_TABLE +
|
||||||
BaseDatabase.CREATE_TXI_TABLE
|
BaseDatabase.CREATE_TXO_INDEX +
|
||||||
|
BaseDatabase.CREATE_TXI_TABLE +
|
||||||
|
BaseDatabase.CREATE_TXI_INDEX
|
||||||
)
|
)
|
||||||
|
|
||||||
def txo_to_row(self, tx, address, txo):
|
def txo_to_row(self, tx, address, txo):
|
||||||
|
|
Loading…
Add table
Reference in a new issue