{"repo":"fraenky8/tables-to-go","free":true,"listed":false,"github":"https://github.com/fraenky8/tables-to-go","clone":"git clone https://github.com/fraenky8/tables-to-go.git","description":"Easily convert your database tables to structs.","language":"Go","stars":244,"topics":["golang-application","developer-tools","golang","golang-structs","golang-sql-mapper-util","go","golang-cli","golang-sql","mysql","postgresql"],"license":"MIT","category":"databases-storage","readme_excerpt":"Tables-to-Go convert your database tables to structs easily A small and convenient tool supporting development against a changing database schema. Tables change, run the tool, get your structs! Requirements - Go 1.26+ Install This project provides a make file but can also simply be installed with the go-install command. Get the latest stable release version: Get the latest changes from master: Getting Started This gets all tables of a local running PostgreSQL database. Therefore, it uses the database postgres , schema public and user postgres with no password. Flag -v is verbose mode, -of is the output file path where the go files containing the structs will get created (default: current working directory). Features convert your tables to structs table with name a foo bar will become file AFooBar.go with struct AFooBar properly formatted files with imports optional generated file header via -gen-header following Go's Code generated ... DO NOT EDIT. convention optional generation of table and column comments via -comments= -comments=line writes comments above structs and fields -comments=inline writes column comments inline on the field line -comments=off disables comments generation Not supported and hence a NOOP for SQLite. automatically typed struct fields, either with sql.Null or primitive builtinType pointer types struct fields with db -tags for ready to use in database code currently supported : PostgreSQL (10, 11, 12, 17, 18 tested) MySQL (5.5+, 8, 9 tested) SQLite (3 t","default_branch":null,"files":null,"tree":[],"storefront":"/r/fraenky8","claimed":false,"request_supported":{"post":"https://gitbuyer.com/r/fraenky8/tables-to-go/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."}