// Package postgres contains autogenerated code for postgres databases. // They are a couple of special paths in this directory: // * /_templates contains the gnorm templates for generations // * /gnorm.toml holds the gnorm configuration // * /migrations contains the logic to migrate the database // * /doc.go (this file) contains some instructions about this package // // All query and row definitions are autogenerated from the database, and // converted into static code. This eliminates the need for an ORM, makes // requests very fast and eliminates the possibilities of typos, syntax // errors, SQL injections and therefore runtime problems with the database. // // If you need to update the database logic however, this can be a little // tricky. As this approach takes the DB as the source of truth, start with // writing the up- and down migration (migrations can be found in the // assets/migrations/ dir). // apply the migrations and run `gnorm gen` in this package, this will // update all database related code. If there are compile time errors, the // changes were incompatible with the codebase and you need to adjust the // code a little (usually this is just a matter of minutes). package postgres