xsql

package
v0.1.0 Latest Latest
Warning

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

Go to latest
Published: Sep 2, 2026 License: MIT Imports: 7 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func RewriteNamedQuery

func RewriteNamedQuery(query string, args map[string]any, d connsql.Dialect) (string, []any, error)

RewriteNamedQuery converts @name placeholders into target dialect placeholders and produces the ordered argument slice.

func ScanRows

func ScanRows(rows *sql.Rows) ([]map[string]any, error)

ScanRows dynamically scans *sql.Rows into a slice of maps with type normalization and error checking.

Types

type StepResult

type StepResult struct {
	Rows         []map[string]any
	Row          map[string]any
	RowsAffected int64
}

StepResult holds the extracted rows, single row pointer, and affected rows count.

func Execute

func Execute(ctx context.Context, pool *connsql.Pool, query string, args map[string]any) (*StepResult, error)

Execute runs a parameterized query or mutation on the connection pool and returns step exports.

Jump to

Keyboard shortcuts

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