Get the latest tech news

Writing Composable SQL Using Knex and Pipelines


Despite all its strengths, SQL can be awkward to integrate with host languages such as JavaScript and Python. There’s often an impedance mismatch between SQL’s declarative nature and the host language’s object-oriented or functional paradigms – SQL queries are typically written as strings within the host language, making it difficult to apply composable programming techniques…

Several solutions have been developed over the years to address the impedance mismatch, with ORM (Object-Relational Mapping) libraries being one of them. ORMs such as Java’s Hibernate are widely used to model a relational database using objects, but there are various difficulties in making them work well. Knex uses a fluent interface to build queries, making it possible to modify them by simply chaining additional methods.

Get the Android app

Or read this on Hacker News

Read more on:

Photo of pipelines

pipelines

Photo of knex

knex

Photo of composable sql

composable sql

Related news:

News photo

‘Tremendous’ AI Gas Demand Will Boost Pipelines, Executives Say

News photo

Show HN: Pippy – Pipelines for GitHub Actions

News photo

GitLab: Critical bug lets attackers run pipelines as other users