dbos-inc / dbos-transact

The TypeScript framework for backends that scale
https://docs.dbos.dev
MIT License
291 stars 20 forks source link

JS Stored Procs #486

Closed devhawk closed 1 week ago

devhawk commented 1 month ago

This PR adds the stored proc compiler + changes to transact itself to support @StoredProcedure methods in DBOS Transact applications. @StoredProcedure methods are similar to @Transaction methods except that they only require a single round trip to the database server. @StoredProcedure methods are compiled to JS and deployed to the user's database by the dbosc compiler.

devhawk commented 2 weeks ago

Are there any tests for recovery of stored procedures or workflows containing stored procedures? I think we need to test that.

There are tests to ensure procs don't execute their business logic multiple times w/ the same WF UUID

devhawk commented 2 weeks ago

Do we have a test that uses the debug runtime? Maybe consider to add a simple test similar to the one in debugger.test.ts so we make sure debug mode executes correctly.

Yes, but it's part of the proc.tests since it needs extra config to deploy the procs