importutil

package
v0.22.1 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Mar 8, 2026 License: Apache-2.0 Imports: 3 Imported by: 0

Documentation

Overview

Package importutil provides shared helpers for metadata import operations across all database backends (sqlite, postgres, mysql).

Index

Constants

View Source
const RefetchChunkSize = 500

RefetchChunkSize limits the number of tx_ids in a single WHERE IN clause to stay within database variable limits (e.g. SQLite's SQLITE_MAX_VARIABLE_NUMBER, PostgreSQL's 65535 parameter limit).

Variables

This section is empty.

Functions

func BatchRefetchUtxoIDs

func BatchRefetchUtxoIDs(
	db *gorm.DB,
	utxos []models.Utxo,
) error

BatchRefetchUtxoIDs resolves IDs for UTxOs whose ID was not populated by GORM after an ON CONFLICT DO NOTHING insert. It replaces per-UTxO SELECT queries with chunked batch lookups.

Types

This section is empty.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL