Categorygithub.com/dochang/sqlconv
repositorypackage
0.0.0-20240922094154-785c02498be1
Repository: https://github.com/dochang/sqlconv.git
Documentation: pkg.go.dev

# README

sqlconv

CI CircleCI codecov Go Reference

sqlconv is a Go library converts between Go values and SQL values.

Installation

go get github.com/dochang/sqlconv

Usage

Currently, sqlconv provides a interface ScannerConverter, which is used to convert SQL values to Go values.

type ScannerConverter interface {
	ScanConvert(dest, src any) error
}

ScanConvert converts SQL value src to Go value, then writes the Go value into dest.

A predefined variable DefaultScannerConverter converts SQL values based on the rules defined by the function "database/sql".convertAssign.