Native

If you are working with databases that are not reorg-aware and simply want to dump raw blockchain data without reorg handling, NativeDBOperations are the go-to choice. This client supports all possible database operations and is suited for scenarios where reorgs are not a concern, offering a straightforward way to store and manage data without the overhead of reorg processing.

import { Native } from "@blockflow-labs/sdk";

Operations

The Native client offers all standard database operations, ensuring comprehensive data management capabilities. These operations include:

  1. aggregate: Primarily for MongoDB databases, allowing you to perform complex aggregation pipelines.

  2. create: Inserts new records into the database.

  3. delete: Removes records from the database based on given conditions.

  4. update: Modifies existing records in the database.

  5. find: Retrieves all matching records from the database, with support for filtering, limiting, and more.

  6. findOne: Returns the most recent record that meets the specified criteria.

With Native, you have full control over your data management, offering flexibility for projects where raw data needs to be processed without worrying about the complexities of blockchain reorgs.

Last updated