347 std::reference_wrapper<SettingsProviderType const> settingsProvider_;
348 std::reference_wrapper<Handle const> handle_;
358 : settingsProvider_{settingsProvider}, handle_{std::cref(handle)}
366 PreparedStatement insertObject = [
this]() {
367 return handle_.get().prepare(
371 (key, sequence, object)
379 PreparedStatement insertTransaction = [
this]() {
380 return handle_.get().prepare(
384 (hash, ledger_sequence, date, transaction, metadata)
385 VALUES (?, ?, ?, ?, ?)
392 PreparedStatement insertLedgerTransaction = [
this]() {
393 return handle_.get().prepare(
397 (ledger_sequence, hash)
405 PreparedStatement insertSuccessor = [
this]() {
406 return handle_.get().prepare(
418 PreparedStatement insertDiff = [
this]() {
419 return handle_.get().prepare(
431 PreparedStatement insertAccountTx = [
this]() {
432 return handle_.get().prepare(
436 (account, seq_idx, hash)
444 PreparedStatement insertNFT = [
this]() {
445 return handle_.get().prepare(
449 (token_id, sequence, owner, is_burned)
457 PreparedStatement insertIssuerNFT = [
this]() {
458 return handle_.get().prepare(
462 (issuer, taxon, token_id)
470 PreparedStatement insertNFTURI = [
this]() {
471 return handle_.get().prepare(
475 (token_id, sequence, uri)
483 PreparedStatement insertNFTTx = [
this]() {
484 return handle_.get().prepare(
488 (token_id, seq_idx, hash)
496 PreparedStatement insertMPTHolder = [
this]() {
497 return handle_.get().prepare(
509 PreparedStatement insertLedgerHeader = [
this]() {
510 return handle_.get().prepare(
522 PreparedStatement insertLedgerHash = [
this]() {
523 return handle_.get().prepare(
539 PreparedStatement deleteLedgerRange = [
this]() {
540 return handle_.get().prepare(
545 WHERE is_latest = False
552 PreparedStatement insertMigratorStatus = [
this]() {
553 return handle_.get().prepare(
557 (migrator_name, status)
565 PreparedStatement updateClioNodeMessage = [
this]() {
566 return handle_.get().prepare(
582 PreparedStatement selectSuccessor = [
this]() {
583 return handle_.get().prepare(
598 PreparedStatement selectDiff = [
this]() {
599 return handle_.get().prepare(
611 PreparedStatement selectObject = [
this]() {
612 return handle_.get().prepare(
615 SELECT object, sequence
619 ORDER BY sequence DESC
627 PreparedStatement selectTransaction = [
this]() {
628 return handle_.get().prepare(
631 SELECT transaction, metadata, ledger_sequence, date
640 PreparedStatement selectAllTransactionHashesInLedger = [
this]() {
641 return handle_.get().prepare(
646 WHERE ledger_sequence = ?
653 PreparedStatement getToken = [
this]() {
654 return handle_.get().prepare(
667 PreparedStatement selectAccountTx = [
this]() {
668 return handle_.get().prepare(
682 PreparedStatement selectAccountTxForward = [
this]() {
683 return handle_.get().prepare(
698 PreparedStatement selectNFT = [
this]() {
699 return handle_.get().prepare(
702 SELECT sequence, owner, is_burned
706 ORDER BY sequence DESC
714 PreparedStatement selectNFTURI = [
this]() {
715 return handle_.get().prepare(
722 ORDER BY sequence DESC
730 PreparedStatement selectNFTTx = [
this]() {
731 return handle_.get().prepare(
738 ORDER BY seq_idx DESC
746 PreparedStatement selectNFTTxForward = [
this]() {
747 return handle_.get().prepare(
762 PreparedStatement selectNFTIDsByIssuerTaxon = [
this]() {
763 return handle_.get().prepare(
771 ORDER BY taxon ASC, token_id ASC
779 PreparedStatement selectMPTHolders = [
this]() {
780 return handle_.get().prepare(
795 PreparedStatement selectLedgerByHash = [
this]() {
796 return handle_.get().prepare(
809 PreparedStatement selectLedgerBySeq = [
this]() {
810 return handle_.get().prepare(
822 PreparedStatement selectLatestLedger = [
this]() {
823 return handle_.get().prepare(
828 WHERE is_latest = True
835 PreparedStatement selectLedgerRange = [
this]() {
836 return handle_.get().prepare(
841 WHERE is_latest in (True, False)
848 PreparedStatement selectMigratorStatus = [
this]() {
849 return handle_.get().prepare(
854 WHERE migrator_name = ?
861 PreparedStatement selectClioNodesData = [
this]() {
862 return handle_.get().prepare(
865 SELECT node_id, message