array-driver

command
v0.60.1 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Oct 31, 2026 License: AGPL-3.0 Imports: 5 Imported by: 0 modules, 0 packages

The first number is the count of modules that contain a package that imports this one. The module count is a better indicator of popularity than the package count. A module with 100 importing packages is counted only once instead of 100 times, reflecting the fact that the choice to use the package was likely made only once, not 100 times.
A '?' means that the value hasn't been computed yet.

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

  1. Define a struct that implements contractsorm.ArraySource.
  2. Configure a connection using the array driver.
  3. 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

The Go Gopher

There is no documentation for this package.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL