Categorygithub.com/nbs-go/nsql
modulepackage
0.18.0
Repository: https://github.com/nbs-go/nsql.git
Documentation: pkg.go.dev

# README

nsql

Go Report Card GitHub license codecov

SQL Utility for Golang. Compatible with jmoiron/sqlx. Features:

  • Query Builder (PostgreSQL / MySQL)

Installing

WARNING

API is not yet stable and we might introduce breaking changes until we reached version v1.0.0. See Breaking Changes section for deprecation notes.

go get -u github.com/nbs-go/nsql

Usage

TODO

Breaking Changes

v0.13.0

  • From() and Join() option setter option.As() is deprecated. Use schema.New() option setter schema.As() instead.
    // <= v0.12.0
    person := schema.New(schema.FromModelRef(Person{}))
    query.Select(query.Column("*")).
        From(person, option.As("p")) // <- Set table alias with option.As()
    
    // >= v0.13.0
    person := schema.New(schema.FromModelRef(Person{}), schema.As("p")) // <- Set table alias with schema.As()
    query.Select(query.Column("*")).From(person)
    

Contributors

contributors

# Packages

No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author

# Functions

ScanJSON is a generic scanner function that can be added to a struct that implements sql.Scanner.

# Constants

No description provided by the author

# Interfaces

No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
FromWriter must be implemented by part of query that will generate query in FROM.
No description provided by the author
No description provided by the author
SchemaReference must be implemented by part of query that may not require defining schema, but will be set later.
No description provided by the author
SelectWriter must be implemented by part of query that will generate query in SELECT.
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author

# Type aliases

No description provided by the author