2023-08-07 18:45:23 +01:00
|
|
|
# nimbus-eth1
|
2025-02-17 02:51:56 +01:00
|
|
|
# Copyright (c) 2023-2025 Status Research & Development GmbH
|
2023-08-07 18:45:23 +01:00
|
|
|
# Licensed under either of
|
|
|
|
# * Apache License, version 2.0, ([LICENSE-APACHE](LICENSE-APACHE) or
|
|
|
|
# http://www.apache.org/licenses/LICENSE-2.0)
|
|
|
|
# * MIT license ([LICENSE-MIT](LICENSE-MIT) or
|
|
|
|
# http://opensource.org/licenses/MIT)
|
|
|
|
# at your option. This file may not be copied, modified, or distributed
|
|
|
|
# except according to those terms.
|
|
|
|
|
|
|
|
## Aristo DB -- Transaction interface
|
|
|
|
## ==================================
|
|
|
|
##
|
|
|
|
{.push raises: [].}
|
|
|
|
|
|
|
|
import
|
2025-02-14 09:40:22 +01:00
|
|
|
./[aristo_desc, aristo_tx_frame]
|
2023-08-07 18:45:23 +01:00
|
|
|
|
|
|
|
# ------------------------------------------------------------------------------
|
2024-04-29 20:17:17 +00:00
|
|
|
# Public functions: save to database
|
2023-08-07 18:45:23 +01:00
|
|
|
# ------------------------------------------------------------------------------
|
|
|
|
|
2024-04-29 20:17:17 +00:00
|
|
|
proc persist*(
|
2025-02-17 02:51:56 +01:00
|
|
|
db: AristoDbRef;
|
2025-02-14 09:40:22 +01:00
|
|
|
batch: PutHdlRef;
|
2025-02-17 02:51:56 +01:00
|
|
|
txFrame: AristoTxRef;
|
2025-02-14 09:40:22 +01:00
|
|
|
) =
|
2025-02-17 02:51:56 +01:00
|
|
|
db.txFramePersist(batch, txFrame)
|
2023-08-07 18:45:23 +01:00
|
|
|
|
|
|
|
# ------------------------------------------------------------------------------
|
|
|
|
# End
|
|
|
|
# ------------------------------------------------------------------------------
|