341 std::reference_wrapper<SettingsProviderType const> settingsProvider_;
342 std::reference_wrapper<Handle const> handle_;
352 : settingsProvider_{settingsProvider}, handle_{std::cref(handle)}
360 PreparedStatement insertObject = [
this]() {
361 return handle_.get().prepare(
365 (key, sequence, object)
373 PreparedStatement insertTransaction = [
this]() {
374 return handle_.get().prepare(
378 (hash, ledger_sequence, date, transaction, metadata)
379 VALUES (?, ?, ?, ?, ?)
386 PreparedStatement insertLedgerTransaction = [
this]() {
387 return handle_.get().prepare(
391 (ledger_sequence, hash)
399 PreparedStatement insertSuccessor = [
this]() {
400 return handle_.get().prepare(
412 PreparedStatement insertDiff = [
this]() {
413 return handle_.get().prepare(
425 PreparedStatement insertAccountTx = [
this]() {
426 return handle_.get().prepare(
430 (account, seq_idx, hash)
438 PreparedStatement insertNFT = [
this]() {
439 return handle_.get().prepare(
443 (token_id, sequence, owner, is_burned)
451 PreparedStatement insertIssuerNFT = [
this]() {
452 return handle_.get().prepare(
456 (issuer, taxon, token_id)
464 PreparedStatement insertNFTURI = [
this]() {
465 return handle_.get().prepare(
469 (token_id, sequence, uri)
477 PreparedStatement insertNFTTx = [
this]() {
478 return handle_.get().prepare(
482 (token_id, seq_idx, hash)
490 PreparedStatement insertMPTHolder = [
this]() {
491 return handle_.get().prepare(
503 PreparedStatement insertLedgerHeader = [
this]() {
504 return handle_.get().prepare(
516 PreparedStatement insertLedgerHash = [
this]() {
517 return handle_.get().prepare(
533 PreparedStatement deleteLedgerRange = [
this]() {
534 return handle_.get().prepare(
539 WHERE is_latest = False
546 PreparedStatement insertMigratorStatus = [
this]() {
547 return handle_.get().prepare(
551 (migrator_name, status)
559 PreparedStatement updateClioNodeMessage = [
this]() {
560 return handle_.get().prepare(
576 PreparedStatement selectSuccessor = [
this]() {
577 return handle_.get().prepare(
592 PreparedStatement selectDiff = [
this]() {
593 return handle_.get().prepare(
605 PreparedStatement selectObject = [
this]() {
606 return handle_.get().prepare(
609 SELECT object, sequence
613 ORDER BY sequence DESC
621 PreparedStatement selectTransaction = [
this]() {
622 return handle_.get().prepare(
625 SELECT transaction, metadata, ledger_sequence, date
634 PreparedStatement selectAllTransactionHashesInLedger = [
this]() {
635 return handle_.get().prepare(
640 WHERE ledger_sequence = ?
647 PreparedStatement getToken = [
this]() {
648 return handle_.get().prepare(
661 PreparedStatement selectAccountTx = [
this]() {
662 return handle_.get().prepare(
676 PreparedStatement selectAccountTxForward = [
this]() {
677 return handle_.get().prepare(
692 PreparedStatement selectNFT = [
this]() {
693 return handle_.get().prepare(
696 SELECT sequence, owner, is_burned
700 ORDER BY sequence DESC
708 PreparedStatement selectNFTURI = [
this]() {
709 return handle_.get().prepare(
716 ORDER BY sequence DESC
724 PreparedStatement selectNFTTx = [
this]() {
725 return handle_.get().prepare(
732 ORDER BY seq_idx DESC
740 PreparedStatement selectNFTTxForward = [
this]() {
741 return handle_.get().prepare(
756 PreparedStatement selectNFTIDsByIssuerTaxon = [
this]() {
757 return handle_.get().prepare(
765 ORDER BY taxon ASC, token_id ASC
773 PreparedStatement selectMPTHolders = [
this]() {
774 return handle_.get().prepare(
789 PreparedStatement selectLedgerByHash = [
this]() {
790 return handle_.get().prepare(
803 PreparedStatement selectLedgerBySeq = [
this]() {
804 return handle_.get().prepare(
816 PreparedStatement selectLatestLedger = [
this]() {
817 return handle_.get().prepare(
822 WHERE is_latest = True
829 PreparedStatement selectLedgerRange = [
this]() {
830 return handle_.get().prepare(
835 WHERE is_latest in (True, False)
842 PreparedStatement selectMigratorStatus = [
this]() {
843 return handle_.get().prepare(
848 WHERE migrator_name = ?
855 PreparedStatement selectClioNodesData = [
this]() {
856 return handle_.get().prepare(
859 SELECT node_id, message