/gOOQ

Schema generated go-lang interfaces coupled with type-safe query language. (aka, a handicapped jOOQ ripoff for go)

Primary LanguageGoApache License 2.0Apache-2.0

gOOQ

Schema generated go-lang interfaces coupled with type-safe query language. (aka, a handicapped jOOQ ripoff for go)

this project is currently under design.

I'm going to have to abandon this project until I find a way to use go's mixins and structs to accomplish my goal of static typing grammars in Go.

For nulls, go has a comma ok idiom, which is why each field access will need to be a method.

Go does not have constructors, so need to use factory methods.

For schema APIs, methods will be collected into interfaces.

Since go doesn't have generics, a schema specific version of the query dsl will be need to be created.

Current Plan:

  1. Do a pass by hand.
  2. Use jOOQ's manual's db
  3. Create go apis as close to their manual as go will allow.
  4. Do a SQL-gen prototype.
  5. A manual Java to Go like rsc's c2go of jOOQ's apache licensed stuff.
  6. minimial required to get api done previously executing.
  7. Do a code-gen prototype.
  8. Connect to MySQL setup of the db from 1 and get the api written generated.
  9. Polish up code-gen prototype with WebERP's schema
  10. Polish up the SQL-gen with queries translated from WebERP's PHP.
  11. Implement preparedStatment caches, batching, connection pooling and other performance items.

Notes:

  • go get github.com/libliflin/gooq
  • go build ./...
  • go test

URLs:

Effective Go

libliflin/gOOQ

How to Write Go Code

The jOOQ User Manual. Single Page.

DSL (jOOQ 3.6.2 API)

Getting Started - Go

The Go Programming Language Specification