command
Version:
v0.43.0
Opens a new window with list of versions in this module.
Published: Sep 5, 2026
License: AGPL-3.0
Opens a new window with license information.
Imports: 5
Opens a new window with list of imports.
Imported by: 0
Opens a new window with list of known importers.
README
¶
Array Driver Example
This example demonstrates how to use the array driver to query static or computed data using Neat's ORM.
Overview
The array driver is useful for:
- Static data like roles, statuses, or country lists.
- Mocking data for tests.
- Querying computed datasets as if they were in a real database.
How it works
- Define a struct that implements
contractsorm.ArraySource.
- Configure a connection using the
array driver.
- Use the query builder normally by passing the
ArraySource to .Model().
Neat will automatically:
- Infer the schema from the first row of data.
- Create an in-memory SQLite table.
- Populate the table with the provided rows.
- Execute your queries against this in-memory table.
Running the example
go run examples/array-driver/main.go
Documentation
¶
There is no documentation for this package.
Source Files
¶
Click to show internal directories.
Click to hide internal directories.