Skip to content

Releases: piotrkowalczuk/pqt

Version 0.1.0

20 Aug 08:17
Compare
Choose a tag to compare
Version 0.1.0 Pre-release
Pre-release

Changelog

  • array support - golang postgres driver do not support arrays natively, pqt comes with help:
  • sql generation
  • go generation - it includes:
    • entity - struct that reflects single row within the database
    • criteria - object that can be passed to the Find method, it allows to create complex queries
    • patch - structure used by UpdateBy<primary-key> methods to modify existing entity
    • iterator - structure used by FindIter methods as a result, it wraps sql.Rows
    • constants:
      • table names
      • column names
      • constraints - library generates exact names of each constraint and corresponding constant that allow to easily handle query errors using ErrorConstraint helper function
    • repository - data access layer that expose API to manipulate entities:
      • Count - returns number of entities for given criteria
      • Find - returns collection of entities that match given criteria
      • FindIter - works like Find but returns iterator
      • Insert - saves given entity into the database
      • FindOneBy<primary-key> - retrieves single entity
      • UpdateBy<primary-key> - modifies single entity
      • DeleteBy<primary-key> - modifies single entity
    • func Scan<Entity>Rows(rows *sql.Rows) ([]*<entity>Entity, error) { helper function
  • schema definition - allow to programmatically define database schema, that includes:
    • schemas
    • tables
    • columns
    • constraints
    • relationships

Version 0.2.0

25 Jun 22:46
Compare
Choose a tag to compare
Version 0.2.0 Pre-release
Pre-release

Changelog

Version 0.1.1

09 Jun 19:21
Compare
Choose a tag to compare
Version 0.1.1 Pre-release
Pre-release

Changelog

  • Now pqt.TypeJSON and pqt.TypeJSONB generates []byte by default .