narsilc

package module
v0.3.0 Latest Latest
Warning

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

Go to latest
Published: Sep 14, 2026 License: MIT Imports: 4 Imported by: 0

README

narsilc

narsilc is a fork of sqlc that can scan query results into caller-owned structs via generic methods and andurel tags.

go install github.com/mbvlabs/narsilc/cmd/narsilc@v0.1.0
narsilc generate

Release archives are narsilc_<version>_<os>_<arch>.tar.gz on GitHub Releases.

sqlc: A SQL Compiler

go Go Report Card

sqlc generates type-safe code from SQL. Here's how it works:

  1. You write queries in SQL.
  2. You run sqlc to generate code with type-safe interfaces to those queries.
  3. You write application code that calls the generated code.

Check out an interactive example to see it in action, and the introductory blog post for the motivation behind sqlc.

Overview

Supported languages

Additional languages can be added via plugins.

Sponsors

Development is possible thanks to our sponsors. If you would like to support sqlc, please consider sponsoring on GitHub.

Coder.com Mint.fun Mux.com

Cyberax - NaNuNaNu - Stumble - WestfalNamur - alecthomas - cameronnewman - danielbprice - davherrmann - dvob - gilcrest - gzuidhof - jeffreylo - mmcloughlin - ryohei1216 - sgielen

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Scan

func Scan[T any](s Scanner, columns []string) (T, error)

Types

type Placeholder

type Placeholder struct{}

Placeholder lets the module be installed and run as github.com/mbvlabs/narsilc.

type Scanner

type Scanner interface {
	Scan(dest ...any) error
}

Directories

Path Synopsis
cmd
narsilc command
examples
internal
cache
Package cache implements sqlc's on-disk cache, designed after Bazel's local disk cache.
Package cache implements sqlc's on-disk cache, designed after Bazel's local disk cache.
cmd
core/seed
Package seed builds a core catalog for a SQL dialect from a declarative description of its type system: the types it defines, the operators and casts between them, and the functions it ships with.
Package seed builds a core catalog for a SQL dialect from a declarative description of its type system: the types it defines, the operators and casts between them, and the functions it ships with.
docs
Package docs validates the documentation content contract for docs/.
Package docs validates the documentation content contract for docs/.
ext
rpc
sql/ast/printer
Package printer implements the document renderer the SQL formatter prints through: a small Wadler-style engine, the model behind Prettier and ruff (via Biome's printer).
Package printer implements the document renderer the SQL formatter prints through: a small Wadler-style engine, the model behind Prettier and ruff (via Biome's printer).
sql/preprocess
Package preprocess rewrites sqlc's query syntax into native SQL before any engine parser sees a query.
Package preprocess rewrites sqlc's query syntax into native SQL before any engine parser sees a query.
sqlcdebug
Package sqlcdebug parses the SQLCDEBUG environment variable and exposes its key=value settings to the rest of the codebase.
Package sqlcdebug parses the SQLCDEBUG environment variable and exposes its key=value settings to the rest of the codebase.
sqlite3ext
Package sqlite3ext registers the SQLite extensions sqlc relies on with github.com/ncruces/go-sqlite3.
Package sqlite3ext registers the SQLite extensions sqlc relies on with github.com/ncruces/go-sqlite3.
vet
pkg
cli
package cli exposes the command-line interface for sqlc.
package cli exposes the command-line interface for sqlc.
build command
bump-version command

Jump to

Keyboard shortcuts

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