Settings

Theme

Show HN: Build entire data access layer with SQL only

backlogic.net

3 points by kw123 2 years ago · 3 comments

Reader

kw123OP 2 years ago

This is a concept different from ORM for solving the object-relational impedance mismatch problem. It: a) Abstracts away the host language (Java etc.) from SQL, so that data access logic can be built with SQL only; b) Abstracts away the hard object-relational transformation problem from developer, so that the developer has the flexibility to query objects of any shape he/she needs from PostgreSQL or MySQL. Here is the output from an example query service:

[ { "id": 1, "arr1": [ { "id1": 1 } ], "arr2": [{ "id2": 1, "arr3": [{ "id3": 1, "val": "abc" }] }] } ]

the single SELECT statement for the query is like:

select 10 as id, 1 as id1, 2 as id2, 3 as id3, 'X' as val union all select 20, 2, 4, 6, 'Y'

ddgflorida 2 years ago

You're missing commas in your example: "customerId": 12 "customerName": "John Smith" ...

Keyboard Shortcuts

j
Next item
k
Previous item
o / Enter
Open selected item
?
Show this help
Esc
Close modal / clear selection