Giter Site home page Giter Site logo

UUID is not correctly overridden about sqlc HOT 3 CLOSED

alimoli avatar alimoli commented on May 18, 2024
UUID is not correctly overridden

from sqlc.

Comments (3)

andrewmbenton avatar andrewmbenton commented on May 18, 2024 1

Taking a look and can hopefully have a fix up soon.

from sqlc.

andrewmbenton avatar andrewmbenton commented on May 18, 2024 1

It's a bit confusing, but the issue is that your foreign key field can be null so you'll need an additional override for nullable uuids.

Note that a single db_type override configuration applies to either nullable or non-nullable columns, but not both. If you want the same Go type to override in both cases, you’ll need to configure two overrides.

Here's a playground link showing how to make it work: https://play.sqlc.dev/p/1f1d7940f4143a4635f7a8afc805416449ed7c7daf65d93b4f39989d64d24976

from sqlc.

alimoli avatar alimoli commented on May 18, 2024

It is quite blocking, is there anyone that can help?
@kyleconroy @andrewmbenton @victoraugustolls

from sqlc.

Related Issues (20)

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.