gooq

package module
v0.0.0-...-903d4a7 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Jul 14, 2015 License: Apache-2.0 Imports: 0 Imported by: 0

README

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

Documentation

Overview

Package gooq contains functions for working with databases

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Condition

type Condition interface {
}

type Field

type Field interface {
	Equal(f Field) Condition
}

func NewField

func NewField(s string) Field

func Val

func Val(i int) Field

type Query

type Query interface {
	GetSQL() string
}

type ResultQuery

type ResultQuery interface {
	Fetch() []string
}

type SelectConditionStep

type SelectConditionStep interface {
	Query
	ResultQuery
}

type SelectFromStep

type SelectFromStep interface {
	From(t Table) SelectJoinStep
}

type SelectJoinStep

type SelectJoinStep interface {
	Join(t Table) SelectOnStep
}

type SelectOnConditionStep

type SelectOnConditionStep interface {
	SelectWhereStep
}

type SelectOnStep

type SelectOnStep interface {
	On(c Condition) SelectOnConditionStep
}

type SelectSelectStep

type SelectSelectStep interface {
	SelectFromStep
}

func Select

func Select(f ...Field) SelectSelectStep

type SelectWhereStep

type SelectWhereStep interface {
	Where(c Condition) SelectConditionStep
}

type Table

type Table interface {
}

func NewTable

func NewTable(s string) Table

Directories

Path Synopsis
dslgen

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL