Blockflow Docs
AppBlog
CLI
CLI
  • Getting Started
    • Installation
    • Quickstart Guide
    • Project Structure
  • Building Blocks
    • Configuring YAML
    • Setting up Database Schema
    • Setting up Handlers
  • Writing handlers
    • Database Operations
      • Instance
      • API
      • Native
    • Indexing Factory Contracts
  • Production
    • Testing
    • Deployment
    • Query The Database
    • Building REST API
    • Building GraphQL APIs
  • Advanced
    • Migrate Subgraph
    • CLI Cheatsheet
    • Console Account
    • Logging
  • Hands-on Project
    • CCTP Protocol
    • ERC-4626
    • Credit-Debit
    • Avocado
    • ENS
    • SolverScan
    • xERC20
    • Snapshot
  • Glossary
    • IEventContext
    • IFunctionContext
    • ILog
    • ITransaction
    • IBlock
Powered by GitBook
On this page
  1. Writing handlers
  2. Database Operations

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.

PreviousAPINextIndexing Factory Contracts

Last updated 6 months ago