GithubHelp home page GithubHelp logo

gooq's Introduction

CircleCI

Golang Object Oriented Querying

Maintainers (in alphabetical order)

  • @ppong
  • @ScottyFillups

Contributors (in alphabetical order)

  • @arnold-yip
  • @CatastrophiClam
  • @ctuong
  • @daanielww
  • @erikterwiel
  • @JerryXie98
  • @joeldomjjd
  • @marceloneil
  • @MingjiaNi
  • @tigsss
  • @zahin-mohammad

gooq's People

Contributors

abanka27 avatar brosentreter avatar ctuong avatar jaxonl avatar philipjscott avatar ppong avatar ppongbitgo avatar sandra-wang-bitgo avatar zahin-mohammad avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar

gooq's Issues

Change of product name

Hi there.

I'm happy to see that you apparently liked jOOQ so much that you decided to create a clone in Go.

There's absolutely nothing wrong with porting a library / idea to some other platform, but I can't say I like your product being called "gOOQ". jOOQ is a registered trademark (in some countries), and your spelling, and also your spelled out name "Golang Object Oriented Querying" infringes this trademark.

The fact that you're calling your product gOOQ makes it seem as though I had anything to do with it, or even endorse it, which I don't. Think of it this way: I spent the last 11 years building this brand, and it's not OK to use this brand without my permission.

It's not too late yet. I think it would be a good idea to rename your product to something of your own creation.

Thanks,
Lukas

Set Dockerize flag to false by default

Currently running gooq generate-database-models will try to run a "dockerized" database. This behaviour is usually only desirable for testing purposes, and should not be the default.

Installing package via "go get" saves binary as cmd

Running go get github.com/lumina-tech/gooq/cmd installs the gOOQ generator binary as cmd.

The name of the binary is determined by last item in the URI path. Other projects work (such as go-ethereum) around this by having the following directory structure: repo/cmd/mycli/main.go

Fix coming soon.

JSON field marshaling improvements

Currently marshaling models that have jsonb fields outputs the base64 encoding of those fields. To output json instead:

nullable.Jsonb should implement MarshalJSON/UnmarshalJSON and non-nullable jsonb columns should be generated as json.RawMessage rather than []byte.

https://github.com/lumina-tech/gOOQ/blob/e7f49a8e89eb11e7b9de65b17a23e2b7c8d28303/pkg/nullable/jsonb.go

DataTypeJSONB = DataType{Name: "Jsonb", Literal: "[]byte", NullableLiteral: "nullable.Jsonb"}

Support multiple VALUES in INSERT statement

INSERT INTO public.table1 (column1, column2, column3, column4) VALUES ($1, $2, $3, $4) ($5, $6, $7, $8)

From https://github.com/lumina-tech/gOOQ/blob/master/pkg/gooq/insert_test.go#L25 is supposed to be

INSERT INTO public.table1 (column1, column2, column3, column4) VALUES ($1, $2, $3, $4), ($5, $6, $7, $8)

(See https://www.postgresqltutorial.com/postgresql-insert-multiple-rows/)

I think the issue can be fixed by just changing " " to ", " here: https://github.com/lumina-tech/gOOQ/blob/master/pkg/gooq/insert.go#L256

I'll experiment and make an MR some time

Improve gOOQ/README.md

  • add section on Getting Started to ensure smooth onboarding
  • add section explaining how code generation work
  • add section explaining benefit of having type safe SQL

Make model package name match directory name for in `gooq.yml`

Users can specify what folder should store the generated tables and the models (i.e. modelPath and tablePath in gooq.yml).

The package names for the generated files are hardcoded to model and table; if a user sets the modelPath to, say, models, then there will be a mismatch between the directory name and the package name.

Ideally if the gooq.yml has the following key set:

modelPath: "models"

Then the files in the models/ directory should be in a package called models.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.