328 std::reference_wrapper<SettingsProviderType const> settingsProvider_;
329 std::reference_wrapper<Handle const> handle_;
339 : settingsProvider_{settingsProvider}, handle_{std::cref(handle)}
347 PreparedStatement insertObject = [
this]() {
348 return handle_.get().prepare(
352 (key, sequence, object)
360 PreparedStatement insertTransaction = [
this]() {
361 return handle_.get().prepare(
365 (hash, ledger_sequence, date, transaction, metadata)
366 VALUES (?, ?, ?, ?, ?)
373 PreparedStatement insertLedgerTransaction = [
this]() {
374 return handle_.get().prepare(
378 (ledger_sequence, hash)
386 PreparedStatement insertSuccessor = [
this]() {
387 return handle_.get().prepare(
399 PreparedStatement insertDiff = [
this]() {
400 return handle_.get().prepare(
412 PreparedStatement insertAccountTx = [
this]() {
413 return handle_.get().prepare(
417 (account, seq_idx, hash)
425 PreparedStatement insertNFT = [
this]() {
426 return handle_.get().prepare(
430 (token_id, sequence, owner, is_burned)
438 PreparedStatement insertIssuerNFT = [
this]() {
439 return handle_.get().prepare(
443 (issuer, taxon, token_id)
451 PreparedStatement insertNFTURI = [
this]() {
452 return handle_.get().prepare(
456 (token_id, sequence, uri)
464 PreparedStatement insertNFTTx = [
this]() {
465 return handle_.get().prepare(
469 (token_id, seq_idx, hash)
477 PreparedStatement insertMPTHolder = [
this]() {
478 return handle_.get().prepare(
490 PreparedStatement insertLedgerHeader = [
this]() {
491 return handle_.get().prepare(
503 PreparedStatement insertLedgerHash = [
this]() {
504 return handle_.get().prepare(
520 PreparedStatement deleteLedgerRange = [
this]() {
521 return handle_.get().prepare(
526 WHERE is_latest = False
533 PreparedStatement insertMigratorStatus = [
this]() {
534 return handle_.get().prepare(
538 (migrator_name, status)
546 PreparedStatement updateClioNodeMessage = [
this]() {
547 return handle_.get().prepare(
563 PreparedStatement selectSuccessor = [
this]() {
564 return handle_.get().prepare(
579 PreparedStatement selectDiff = [
this]() {
580 return handle_.get().prepare(
592 PreparedStatement selectObject = [
this]() {
593 return handle_.get().prepare(
596 SELECT object, sequence
600 ORDER BY sequence DESC
608 PreparedStatement selectTransaction = [
this]() {
609 return handle_.get().prepare(
612 SELECT transaction, metadata, ledger_sequence, date
621 PreparedStatement selectAllTransactionHashesInLedger = [
this]() {
622 return handle_.get().prepare(
627 WHERE ledger_sequence = ?
634 PreparedStatement getToken = [
this]() {
635 return handle_.get().prepare(
648 PreparedStatement selectAccountTx = [
this]() {
649 return handle_.get().prepare(
663 PreparedStatement selectAccountTxForward = [
this]() {
664 return handle_.get().prepare(
679 PreparedStatement selectNFT = [
this]() {
680 return handle_.get().prepare(
683 SELECT sequence, owner, is_burned
687 ORDER BY sequence DESC
695 PreparedStatement selectNFTURI = [
this]() {
696 return handle_.get().prepare(
703 ORDER BY sequence DESC
711 PreparedStatement selectNFTTx = [
this]() {
712 return handle_.get().prepare(
719 ORDER BY seq_idx DESC
727 PreparedStatement selectNFTTxForward = [
this]() {
728 return handle_.get().prepare(
743 PreparedStatement selectNFTIDsByIssuerTaxon = [
this]() {
744 return handle_.get().prepare(
752 ORDER BY taxon ASC, token_id ASC
760 PreparedStatement selectMPTHolders = [
this]() {
761 return handle_.get().prepare(
776 PreparedStatement selectLedgerByHash = [
this]() {
777 return handle_.get().prepare(
790 PreparedStatement selectLedgerBySeq = [
this]() {
791 return handle_.get().prepare(
803 PreparedStatement selectLatestLedger = [
this]() {
804 return handle_.get().prepare(
809 WHERE is_latest = True
816 PreparedStatement selectLedgerRange = [
this]() {
817 return handle_.get().prepare(
822 WHERE is_latest in (True, False)
829 PreparedStatement selectMigratorStatus = [
this]() {
830 return handle_.get().prepare(
835 WHERE migrator_name = ?
842 PreparedStatement selectClioNodesData = [
this]() {
843 return handle_.get().prepare(
846 SELECT node_id, message