Giter VIP home page Giter VIP logo

Comments (5)

kiranandcode avatar kiranandcode commented on September 28, 2024 1

No worries, I'll have a look at it sometime, but will keep you in the loop

from petrol.

kiranandcode avatar kiranandcode commented on September 28, 2024 1

User extensible types are now possible! See Petrol.Type.custom. Of course, to be most useful, it would also be nice to allow users to declare additional functions, but I haven't implemented that yet.

from petrol.

beajeanm avatar beajeanm commented on September 28, 2024

Now I think about it, Petrol has to generate a DDL valid for all the drivers, but Caqti encode timestamp using different SQL types depending on the underlying drivers... so it might be tricky 🤔

from petrol.

kiranandcode avatar kiranandcode commented on September 28, 2024

Making the types extensible is a goal that I want to explore - currently Petrol's DSL is designed around sqlite3's types and functions, but ideally, it would be nice to make the core types an extensible variant, and then allow users to import modules that extend the types for their particular SQL backends.

If you're interested in looking into it, there's an interesting type-level programming challenge in implementing this, because part of the way in which Petrol implements caching is by computing equality witnesses, but I'm not sure exactly how that would work with a user-extensible type. (I have some ideas for now, but need to try them out).

from petrol.

beajeanm avatar beajeanm commented on September 28, 2024

I'm afraid that might be biting more than I can chew...

from petrol.

Related Issues (7)

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.