{"repo":"bool64/sqluct","free":true,"listed":false,"github":"https://github.com/bool64/sqluct","clone":"git clone https://github.com/bool64/sqluct.git","description":"Struct-based database access layer for Go","language":"Go","stars":11,"topics":["go","database","sql","query-builder","hacktoberfest"],"license":"MIT","category":"databases-storage","readme_excerpt":"Struct-based database access layer for Go This module integrates github.com/Masterminds/squirrel query builder and github.com/jmoiron/sqlx to allow seamless operation based on field tags of row structure. All three libraries collaborate with standard database/sql and do not take away low level control from user. This library helps to eliminate literal string column references (e.g. \"created at\" ) and use field references instead (e.g. rf.Ref(&row.CreatedAt) and other mapping functions). Field tags ( db by default) act as a source of truth for column names to allow better maintainability and fewer errors. Components Storage is a high level service that provides query building, query executing and result fetching facilities as easy to use facades. StorageOf[V any] typed query builder and scanner for specific table(s). Mapper is a lower level tool that focuses on managing squirrel query builder with row structures. Referencer helps to build complex statements by providing fully qualified and properly escaped names for participating columns. Simple CRUD Referencing Fields In Complex Statements Typed Storage sqluct.TableRowType creates a type-safe storage accessor to a table with RowType . This accessor can help to retrieve or store data. Columns from multiple tables can be joined using field pointers. Please check features overview in an example below. Omitting Zero Values When building WHERE conditions from row structure it is often needed skip empty fields from condition. Behav","default_branch":null,"files":null,"tree":[],"storefront":"/r/bool64","claimed":false,"request_supported":{"post":"https://gitbuyer.com/r/bool64/sqluct/request-supported","requests":0},"note":"indexed from public GitHub; nothing is for sale on this page. Clone it from GitHub. Paid listings live at /search."}