Comments (5)
No worries, I'll have a look at it sometime, but will keep you in the loop
from petrol.
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.
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.
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.
I'm afraid that might be biting more than I can chew...
from petrol.
Related Issues (7)
- Update opam package HOT 1
- Isolate Lwt/Async stuff HOT 4
- Example of join HOT 6
- Complete example? HOT 1
- Consider dual license HOT 4
- sqlite3: `expected BOOLEAN got BOOLEAN` HOT 1
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
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.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from petrol.