Git Product home page Git Product logo

gendal's People

Contributors

0xjac avatar ammario avatar dgnorton avatar goblinlordx avatar ichiban avatar jcramb avatar mccolljr avatar megaturbo avatar natefinch avatar nathanleclaire avatar roflolilolmao avatar tgulacsi avatar traviss25 avatar turnkey-commerce avatar viswesr avatar

Stargazers

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

Watchers

 avatar  avatar  avatar

gendal's Issues

Cockroachdb Foreign Key Generation Not Always Working

I'm currently using the cockroachdb connection string against my cockroach db and during generation the foreignkey.go.tpl does not always generate all foreignkey relationship functions from the table. I have tested this on the postgres connection string against my postgres db and it works every time but going through cockroach it appears to be very random, sometimes it's generating half the foreignkey functions, sometimes 80% of them and sometimes all of them.

Anyone else using cockroachdb and getting this random behavior?

Command line arguments are ignored when a config file is present

Since version 1.2.7, command line arguments are ignored when a config file is present. The following scenarios happen:

  • when a config file is present and does not provide a DSN:
❯ gendal --version
error: Database DSN must be provided

❯ gendal "postgres://postgres@localhost/some_db"  [...]
error: Database DSN must be provided
  • when no config file can be found, the following happens:
❯ gendal --version
config file not found, using command line arguments
gendal version 1.2.7

❯ gendal "postgres://postgres@localhost/some_db" [...]
config file not found, using command line arguments
[gendal generates according to CLI arguments]
  • when a config file is present and provides a DSN:
❯ gendal --version
[gendal generates using the config file options; no CLI ouput as expected]

❯ gendal --suffix ".a_random_suffix"
[gendal generates but ignores the `suffix` option]

Release a new version with #18

Hey, we would be really pleased to use #18 in our project so for now we stick to commit version 13b932a but it would be cleaner on our side to point to a specific release version number.

Do you think it's possible to release a new version of gendal containing those changes ?

Thank you very much for your work.

Add an Option for a Configuration File

Will be good to have an option for a configuration file (preferably TOML) that will allow the user to make the settings for a particular project rather than rely only on command line arguments. That way the generation will be more repeatable, particularly for use cases involving custom types from custom queries. Also it will be easier to support concepts of ignoring tables or white-listing tables and ensuring consistent generation over the life of a project.

Switch to go module

gendal is still using dep.

It would be great to move to go modules.

I have the code ready and I'd be happy to submit a PR, but it is based on top of #10 and #11.
Do you prefer a PR with all 3 or shall I wait for you to merge those first.

You can have a look at the changes here.

Note: I am not fully familiar with deps/go mod yet, so any feedback is welcome.

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.