Skip to content
This repository has been archived by the owner on Oct 25, 2024. It is now read-only.

v0.24.0

Compare
Choose a tag to compare
@lostman lostman released this 29 Nov 22:52
· 14 commits to develop since this release
d628f39

What's Changed

New functionality 🎉

Connect to beta networks more easily

fuel-indexer run --run-migrations --network beta-4

New ORM functionality

Including support for find(), find_many(), order_by(), and limit()

extern crate alloc;
use fuel_indexer_utils::prelude::*;

mod indexer_mod {
    fn handle_data(order: Order) {
        // Find a single item and order results
        let found_order = Order::find(
            Order::amount()
                .gt(order.amount)
                .and(Order::address().eq(0x001))
                .order_by(Order::time().asc()),
        );
        if let Some(o) = found_order {
            info!("I find the order! {order:#?}");
        }

        // Find multiple orders and limit the result set
        let found_orders = Order::find_many(
            Order::amount()
                .gt(order.amount)
                .limit(10)
                .order_by(Order::time().asc()),
        );
        info!("Found {} orders matching the query", found_orders.len());
        assert!(found_orders.len() <= 10);
    }
}

Full Changelog: v0.23.0...v0.24.0