Hacker Newsnew | past | comments | ask | show | jobs | submit | lroal's commentslogin

Orange ORM 5.0.0 is out.

Breaking:

- getAll removed; use getMany (same signature).

- getOne no longer accepts filter as first arg; move it to where.

Also:

- ExpressJS before/after hooks for row-level security.

- SQLite user-defined functions.

- Enums support.


I am happy to announce that orange-orm now supports Cloudflare D1. It does not need the node compatability flag. It is a typescript ORM.


The datatable component is pretty advanced. https://primevue.org/datatable/ This also seems more mature than Vuetify.


You should try https://github.com/alfateam/rdb

It is database agnostic. It works with sqlite, mssql, mysql, postgres, oracle, and sapase.

It gives you full intellisense without code generation - even when running pure javascript.

You can run it from the browser in a secure manner, as you can host it in express js via adapter.

I am the author.


You should really try out RDB, an ORM that I've been working on since 2014.

https://rdbjs.org

It has a very small fooprint - well suited for Amazon lambda. We now support client over HTTP (in a safe manner), making it accessible in-browser.

Key Features:

No code generation required

Full intellisense, even when mapping tables and relations

Powerful filtering - with any, all, none at any level deep

Supports JavaScript and TypeScript

ESM and CommonJS compatible

Succint and concise syntax

Works over http


I am excited about this release of RDB. Rich Querying Model Concise API: Developer-friendly & expressive. Full IntelliSense without code generation. TS & JS Ready Browser-Friendly: Build web apps with RDB in Express



Agree


It is not supported today. But it would't be any problem to implement it. Please create an issue if you want it.


My plan was to stick to promises only. Unless there are lots of lots of developers that really wants callbacks.


please stick with promises. Promises are the only sane way to deal with async in JS. With people starting to use async/await they become even more compelling.

The people who defend callbacks either don't understand the benefits that promises provide, don't know about async/await or are suffering from stockholm syndrome.

Callbacks do not pass the reversibility test. If everyone had started out with promises and / or async/await, and someone proposed callbacks as a way to deal with this instead, they'd be dismissed as a fool. They're an accident of history and we should forget about them as quickly as possible.


Callbacks allow await/defer in Iced CoffeeScript, not to mention the other async libs as stated above.

Promises don't really offer any benefit to program structure overall, generally devs just end up creating long chains of anonymous functions rather than long nests of anonymous functions. Promises actually discourage flat code (and functional programming) for that reason. I understand they seem attractive but become a hack in complex situations.


> Callbacks allow await/defer in Iced CoffeeScript

Not the same thing as in ES6, also that project is totally dead.

> generally devs just end up creating long chains of anonymous functions rather than long nests of anonymous functions

Not true in my experience, also not required at all when using async / await.

> Promises actually discourage flat code (and functional programming) for that reason.

This is really not true, Promises are functional and composable, callbacks are imperative.

> I understand they seem attractive but become a hack in complex situations.

Just no. Callbacks lead to terrible "solutions" like caolan/async, callbacks make refactoring extremely awkward.

Callbacks don't even get to claim better performance, because they require a load of internal hacks in node/io.js to maintain state.

With async/await in the picture, callbacks so totally inferior I can't believe someone would attempt to argue otherwise.


Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: