Comments (7)
We have it on our roadmap, can't provide an ETA yet, though. Stay tuned 🙂
In the meantime, you can just use raw SQL to work with them, like this:
db.run(sql`call proc_name()`);
const rows = db.all<{ col1: string; col2: number; }>(sql`select func_name()`);
To create procedures/functions in migrations, you can just manually add them to one of the migration files. We're working to support first-class custom migrations as well.
from drizzle-orm.
@shah thanks!
view
support is currently next big thing to be released, so we are currently working on it
Regarding your contribution - we are open to any suggestions. I guess best way would be to join our Discord channel and send us your suggestions on how you see PG stored procedures / function in drizzle. We can continue our discussion with you from there
from drizzle-orm.
Excellent idea, will use raw SQL for now.
Having first-class support for procs/functions/domains (especially with auto-generated migrations like for tables) would be fantastic.
I have implemented some of these Typescript template literal procedure/func/domain generators in my own library and would love to discuss how I can contribute that work to integrate into Drizzle. It would be easier to discuss on a video call so if there's a chance to speak to one or more of the core team members about that I would appreciate the opportunity (at your convenience).
Thanks!
from drizzle-orm.
I saw v0.20.1 drop today, great job with the with
addition! I was curious if you had any updates for when the view
or when type-safe PG stored procedures / function calls might land. :-)
from drizzle-orm.
Hello! Since quite some time has passed I figured I'd ask whether there is a rough ETA for RPC's/functions or whether it's still unknown. We rely quite a lot on the reusability and performance of RPCs so would love to see first class support. Thanks and keep up the great work!
from drizzle-orm.
Excellent idea, will use raw SQL for now.
Having first-class support for procs/functions/domains (especially with auto-generated migrations like for tables) would be fantastic.
I have implemented some of these Typescript template literal procedure/func/domain generators in my own library and would love to discuss how I can contribute that work to integrate into Drizzle. It would be easier to discuss on a video call so if there's a chance to speak to one or more of the core team members about that I would appreciate the opportunity (at your convenience).
Thanks!
@shah
I've been working on similar Typescript template literal generators.
Could you please share the code with me? I'm interested in exploring it further. Thank you!
from drizzle-orm.
Sure, @benhassineb my code is available at https://www.github.com/netspective-labs/sql-aide.
from drizzle-orm.
Related Issues (20)
- useLiveQuery doesn't update if the query parameters change.
- [FEATURE]: Drizzle relations with materialized views HOT 2
- [BUG]: TypeScript error on optional fields during update (and insert) operation HOT 5
- [BUG]: Incorrect inference for PostgreSQL array columns (arrays may contain null items)
- [BUG]: Error when running npx drizzle-kit introspect: "Expected object, received string" HOT 3
- [BUG]: cannot insert many sql variables when using cloudflare d1 HOT 1
- [BUG]: useLiveQuery doesn't see change when querying joined tables
- [BUG]: Error: The 'cache' field on 'RequestInitializerDict' is not implemented.
- [BUG]: generated migration with multicolumn foreign keys is wrong HOT 3
- [BUG]: Drizzle findFirst return undefined when using eq in enum in postgres HOT 1
- [FEATURE]: Button to copy command line arguments in the Documentation HOT 1
- [BUG]: Select operation returning [] while using ORM but not while using SQL HOT 1
- [BUG]: isTable helper function is not working HOT 1
- [BUG]: Geometry type ignores SRID option
- [FEATURE]: alias of rows to insert with ON DUPLICATE KEY
- [BUG]: PG Numeric inferred as string, but is numeric at runtime HOT 1
- How to fetch one to many relationships using the select api
- [BUG]: raw SQL fields selected from subqueries should not require manually-defined aliases
- [BUG]: Persistent HTTP 400 with Vercel & drizzle-kit
- [Enhancement]: Generated type 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 drizzle-orm.