Giter Site home page Giter Site logo

Comments (2)

samonzeweb avatar samonzeweb commented on June 20, 2024

Hi Erkan,

Sorry for the delay, but I was contaminated. I hope you're fine.

Godb is not designed to work this way, because it does not allocate nested structures, only the root one if needed (it depends on the target, slice of object, or slice of pointers to objects). This kind of job is closer to what will do a more featured tools like an ORM.

The way to cope with this is using only SQL.NullXXXX for fields on the optional part of the DB response.

I have to admit that it could be a problem with JSON serialisation. But using the same structure for both DB access and HTTP response is not a good practice for real products (expect simple ones).

Changing the way it works will not be a trivial thing.

Sam.

from godb.

derkan avatar derkan commented on June 20, 2024

Thank you for response and I wish you get well soon.
About me, I'm fine thanks, we're locked in.
You are right about using same structure for DB and HTTP response but otherwise code gets lots of overhead. I'll check a way around. Closing this issue for now.

from godb.

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.