An SQL-friendly ORM for Node.js

Overview

Build Status Coverage Status Join the chat at https://gitter.im/Vincit/objection.js

Objection.js

Objection.js is an ORM for Node.js that aims to stay out of your way and make it as easy as possible to use the full power of SQL and the underlying database engine while still making the common stuff easy and enjoyable.

Even though ORM is the best commonly known acronym to describe objection, a more accurate description is to call it a relational query builder. You get all the benefits of an SQL query builder but also a powerful set of tools for working with relations.

Objection.js is built on an SQL query builder called knex. All databases supported by knex are supported by objection.js. SQLite3, Postgres and MySQL are thoroughly tested.

What objection.js gives you:

What objection.js doesn't give you:

  • A fully object oriented view of your database With objection you don't work with entities. You work with queries. Objection doesn't try to wrap every concept with an object oriented equivalent. The best attempt to do that (IMO) is Hibernate, which is excellent, but it has 800k lines of code and a lot more concepts to learn than SQL itself. The point is, writing a good traditional ORM is borderline impossible. Objection attempts to provide a completely different way of working with SQL.
  • A custom query DSL. SQL is used as a query language. This doesn't mean you have to write SQL strings though. A query builder based on knex is used to build the SQL. However, if the query builder fails you for some reason, raw SQL strings can be easily written using the raw helper function.
  • Automatic database schema creation and migration from model definitions. For simple things it is useful that the database schema is automatically generated from the model definitions, but usually just gets in your way when doing anything non-trivial. Objection.js leaves the schema related things to you. knex has a great migration tool that we recommend for this job. Check out the example project.

The best way to get started is to clone our example project and start playing with it. There's also a typescript version available.

Check out this issue to see who is using objection and what they think about it.

Shortcuts:

Comments
  • Add model snake/camel-case conversion flag

    Add model snake/camel-case conversion flag

    Mysql and postgres have snake case convention by default. Since lodash is already a dependency, it'll be very nice to have a model flag and a built-in conversion. Something like this:

    class Animal extends Model {
      static get useSnakeCase() {
        return true;
      }
    }
    

    The result of turning this flag on will be conversion of output object properties to camel case and input object properties to snake case in model hooks.

    I tried using camel case columns in my databases to avoid conversion, but it feels weird after using snake case columns before. There are also some cons of camel case columns - e.g. you have to use quotes in raw sql queries, knex migrations and default database indices/foreign keys use snake case and don't match camel case table and column names.

    It'll be very useful to have this feature built in for different purposes.

    enhancement question 
    opened by vladshcherbin 74
  • Typings don't allow custom query builders

    Typings don't allow custom query builders

    I'm trying to create Model, which has extended query builder with .session() method. However when I'm extending the model and setting our custom query builder there return type of $query() and other functions still is QueryBuilder<this> instead of CustomQueryBuilder<this>.

    Simplified (not runnable example):

    class CustomQueryBuilder<T> extends QueryBuilder<T> {
      session(session: any) {
        this.context().session = session;
        return this;
      }
    }
    
    class BaseModel extends Model {
      // Override the objection.js query builders classes for subclasses.
      static QueryBuilder = CustomQueryBuilder;
      static RelatedQueryBuilder = CustomQueryBuilder;
    
      // ... more stuff ...
    }
    
    const daa = await BaseModel
              .query(trx)
              // ERROR: [ts] Property 'session' does not exist on type 'QueryBuilder<BaseModel>'
              .session(req.session)
              .insert({1:1});
    

    Any ideas how to override this? I wouldn't like to do casting everywhere I'm using my extended query builder, nor I would like to add extra methods to BaseModel which would apply correct typing for returned query builder.

    enhancement discussion 
    opened by elhigu 71
  • Poll - What would you like to see in the future versions of objection?

    Poll - What would you like to see in the future versions of objection?

    I'm starting to plan the 2.0 release and I'd like to hear the community's opinions what we should add to objection in 2.0 or later down the road.

    I'd like to reiterate here that the goal of objection was never to become Eloquent, Django's ORM, Active Record or any other known ORM. Objection's goal is said pretty well at the top of the github README. Objection is a "query builder on steroids" that never get's in the way of SQL, but still attempts to provide tools for working with repetitive stuff and especially relations.

    That said, there are many things those ORMs do better than objection and we should try to bring in the features that suit objection's design goal.

    SO, I'd like you to post here what you miss from any other tool you've worked with and think objection should really have. Vote the features using :+1: and :-1:

    Couple of things 2.0 will have:

    • A more usable and consistent static hook system that fixes most if not all issues I've seen people having. The instance hooks will still be around. They have their use cases.
    • More consistent naming of methods and concepts. For example eager is used as a verb, even though it's not, joinRelation implies it joins a single relation. joinEager sounds like joinRelation even though it does a very different thing. These will be something like withGraphFetched, joinRelated, withGraphJoined. etc. The old names will remain as aliases at least until 3.0.

    https://github.com/Vincit/objection.js/projects/1

    opened by koskimas 63
  • Official plugin listing?

    Official plugin listing?

    opened by ackerdev 56
  • Support for knex 0.95.0

    Support for knex 0.95.0

    I just upgrade knex to 0.95.0 and now I'm getting typescript compilation errors in objectionjs like this:

    node_modules/objection/typings/objection/index.d.ts:1830:12 - error TS2709: Cannot use namespace 'Knex' as a type.
    
    1830     (knex: Knex, modelClasses: AnyModelConstructor[]): Promise<void>;
                    ~~~~
    

    Will support for 0.95 be added soon?

    opened by david-wb 52
  • Convert documentation to vuepress

    Convert documentation to vuepress

    Hey, sorry if I'm out of line here. I've been using Objection.js for a little while and I love it. I have almost no complaints. The library is well designed and the documentation is usually clear and comprehensive.

    However, it takes about 10 seconds to become interactive on my extremely modern (6 months old) computer built for computation. Ctrl-F takes forever and isn't that helpful because 9/10 whatever I'm looking for is used in every other example.

    I don't know that the right thing to do would be to split it up into multiple pages, but it seems no one has brought this problem up yet, at least in the issues. Could be an area of improvement. I wouldn't be offended if this issue is closed because it's not something the team is particularly interested in improving. It's definitely usable at the moment, but it's a bit of a time suck.

    enhancement docs 
    opened by rivertam 41
  • Class constructor Model cannot be invoked without 'new'

    Class constructor Model cannot be invoked without 'new'

    I'm getting the following error after upgrading to 0.8.0:

    TypeError: Class constructor Model cannot be invoked without 'new'
      at new UserModel (/path/to/project/src/server/graphql/models/User/userModel.js:29:103)
      at Function.fromDatabaseJson (/path/to/project/node_modules/objection/lib/model/Model.js:443:19)
      at Object.createModels (/path/to/project/node_modules/objection/lib/queryBuilder/QueryBuilder.js:826:41)
      at Object.tryCatcher (/path/to/project/node_modules/bluebird/js/release/util.js:16:23)
      at Promise._settlePromiseFromHandler (/path/to/project/node_modules/bluebird/js/release/promise.js:512:31)
      at Promise._settlePromise (/path/to/project/node_modules/bluebird/js/release/promise.js:569:18)
      at Promise._settlePromise0 (/path/to/project/node_modules/bluebird/js/release/promise.js:614:10)
      at Promise._settlePromises (/path/to/project/node_modules/bluebird/js/release/promise.js:693:18)
      at Async._drainQueue (/path/to/project/node_modules/bluebird/js/release/async.js:133:16)
      at Async._drainQueues (/path/to/project/node_modules/bluebird/js/release/async.js:143:10)
      at Immediate.Async.drainQueues (/path/to/project/node_modules/bluebird/js/release/async.js:17:14)
      at runCallback (timers.js:672:20)
      at tryOnImmediate (timers.js:645:5)
      at processImmediate [as _immediateCallback] (timers.js:617:5)
    
    opened by amiuhle 40
  • POLL: Should we add an alternative object syntax for relation expressions?

    POLL: Should we add an alternative object syntax for relation expressions?

    Currently all relation expressions are strings. Should we add an alternative object representation for them?

    Reasons to add something like this:

    1. object expressions would be easier to create and inspect programmatically
    2. Simple array expressions are just an array of relation names, which is intuitive and clean.

    Reasons to not add something like this:

    1. Multiple ways to do the same thing.
    2. Aliases and filters are difficult to add while keeping the expressions simple.

    Here's some examples how this could work:

    Simple relation expressions

    // All following are equivalent:
    
    // string
    const e1 = `[a, b.c]`;
    
    // array of strings
    const e2 = ['a', 'b.c'];
    
    // all objects
    const e3 = {
      a: {},
      b: {
        c: {}
      }
    }
    
    // all objects 2
    const e4 = {
      a: true,
      b: {
        c: true
      }
    }
    
    // combination of objects and arrays
    const e5 = {
      a: {},
      b: ['c']
    }
    

    Expressions with aliases and filters

    // All following are equivalent:
    
    // string
    const e1 = `[
      a(f1) as aa, 
      b(f2).c(f3, f4)
    ]`;
    
    // array of strings
    const e2 = [
      'a(f1) as aa', 
      'b(f2).c(f3, f4)'
    ];
    
    // all objects (ugly as hell)
    const e3 = {
      'a(f1) as aa': true,
      'b(f2)': {
        'c(f3, f4)': true
      }
    }
    
    // combination of objects and arrays  (ugly as hell)
    const e4 = {
      'a(f1) as aa': true,
      'b(f2)': ['c(f3, f4)']
    }
    
    // all objects, filters and aliases using special properties:
    const e5 = {
      a: {
        $alias: 'aa',
        $filter: ['f1']
      },
    
      b: {
        $filter: ['f2']
    
        c: {
          $filter: ['f3', 'f4']
        }
      }
    }
    

    Alternative verbose syntax

    // All following are equivalent:
    
    // string
    const e1 = `[
      a(f1) as aa, 
      b(f2).c(f3, f4)
    ]`;
    
    const e2 = [
      {
        name: 'a',
        filter: 'aa'
      },
      {
        name: 'b'
        filter: ['f2'],
    
        children: [
          {
            name: 'c',
            filter: ['f3', 'f4']
          }
        ]
      }
    ]
    

    So what do you think? Should this be added and with which syntax? If you have an alternative syntax in mind, I'd love to hear it.

    help wanted discussion 
    opened by koskimas 35
  • Add property data paths to nested insert and upsert validations

    Add property data paths to nested insert and upsert validations

    When validation errors happen in graph inserts and upserts of nested relations data, Objection currently doesn't specific the location of the error.

    This PR calculated dataPaths for graph inserts and upserts, and then provides these as relative JSON pointers instead of plain property names in the validation errors. If the data is only on the root level of the graph, then these two behaviors are actually the same.

    As discussed on Gitter, the convention of how to handle JSON pointers, and wether they should be absolute or relative paths to the data still needs some more thought and a proper decision.

    For now, here the current state of things, so the discussion can be continued on in the issue here.

    opened by lehni 35
  • Add option to use update instead of patch in graph upserts

    Add option to use update instead of patch in graph upserts

    As discussed before, here now the PR to add this.

    This is a follow up PR for #583, I will rebase once that one is merged.

    Please note that there are things to be figured out still, as outlined in this comment:

    // TODO: Should we distinguish between update and patch for noUpdate also?
    // If we want different options, then:
    // return hasOption(node, 'update')
    //   ? decideType(node, UpsertNodeType.Update, 'noUpdate')
    //   : decideType(node, UpsertNodeType.Patch, 'noPatch');
    

    Note that 'noUpdate' in the current code base would become 'noPatch' if we did this.

    opened by lehni 32
  • joinEager doesn't work with table names that contain a postgresql schema

    joinEager doesn't work with table names that contain a postgresql schema

    I have a query that looks similar to this:

    Thing.query().first().select(
        "thingId", "creationTime", "author.emailAddress"
    ).joinRelation("author" /* Join on users table */ ).where({
        "thingId": thingId
    }).then(thing => doStuff(thing))
    

    Both the thing and user tables have a creationTime column. When I try to express the query like above I get an error column reference "creationTime" is ambiguous.

    One solution would be to do this, but I really don't want to because it's verbose and repetitive and I'd have to do it in lots of places. It wouldn't help maintainability at all.

    Thing.query().first().select(
        "thingId", "thingSchemaName.thingTableName.creationTime", "author.emailAddress"
    ).joinRelation("author" /* Join on users table */ ).where({
        "thingId": thingId
    }).then(thing => doStuff(thing))
    

    What I would very much like to do and would expect to be able to do - except I haven't worked out any way how - is to select the model table with an alias. Something nice and sensible and readable like

    Thing.query().as("thing").first().select(
        "thing.thingId", "thing.creationTime", "author.emailAddress"
    ).joinRelation("author" /* Join on users table */ ).where({
        "thing.thingId": thingId
    }).then(thing => doStuff(thing))
    

    Or, it would be quite nice if objection was able to automagically prepend the models' table name to selected columns that don't otherwise specify.

    What's the best way to fix this?

    bug 
    opened by pineapplemachine 31
  • Bump ansi-html and webpack-dev-server

    Bump ansi-html and webpack-dev-server

    Removes ansi-html. It's no longer used after updating ancestor dependency webpack-dev-server. These dependencies need to be updated together.

    Removes ansi-html

    Updates webpack-dev-server from 3.11.2 to 3.11.3

    Release notes

    Sourced from webpack-dev-server's releases.

    v3.11.3

    3.11.3 (2021-11-08)

    Bug Fixes

    • replace ansi-html with ansi-html-community (#4011) (4fef67b)
    Changelog

    Sourced from webpack-dev-server's changelog.

    3.11.3 (2021-11-08)

    Bug Fixes

    • replace ansi-html with ansi-html-community (#4011) (4fef67b)
    Commits

    Dependabot will resolve any conflicts with this PR as long as you don't alter it yourself. You can also trigger a rebase manually by commenting @dependabot rebase.


    Dependabot commands and options

    You can trigger Dependabot actions by commenting on this PR:

    • @dependabot rebase will rebase this PR
    • @dependabot recreate will recreate this PR, overwriting any edits that have been made to it
    • @dependabot merge will merge this PR after your CI passes on it
    • @dependabot squash and merge will squash and merge this PR after your CI passes on it
    • @dependabot cancel merge will cancel a previously requested merge and block automerging
    • @dependabot reopen will reopen this PR if it is closed
    • @dependabot close will close this PR and stop Dependabot recreating it. You can achieve the same result by closing it manually
    • @dependabot ignore this major version will close this PR and stop Dependabot creating any more for this major version (unless you reopen the PR or upgrade to it yourself)
    • @dependabot ignore this minor version will close this PR and stop Dependabot creating any more for this minor version (unless you reopen the PR or upgrade to it yourself)
    • @dependabot ignore this dependency will close this PR and stop Dependabot creating any more for this dependency (unless you reopen the PR or upgrade to it yourself)
    • @dependabot use these labels will set the current labels as the default for future PRs for this repo and language
    • @dependabot use these reviewers will set the current reviewers as the default for future PRs for this repo and language
    • @dependabot use these assignees will set the current assignees as the default for future PRs for this repo and language
    • @dependabot use this milestone will set the current milestone as the default for future PRs for this repo and language

    You can disable automated security fix PRs for this repo from the Security Alerts page.

    dependencies 
    opened by dependabot[bot] 0
  • Bump ansi-regex from 4.1.0 to 5.0.1

    Bump ansi-regex from 4.1.0 to 5.0.1

    Bumps ansi-regex from 4.1.0 to 5.0.1.

    Release notes

    Sourced from ansi-regex's releases.

    v5.0.1

    Fixes (backport of 6.0.1 to v5)

    This is a backport of the minor ReDos vulnerability in ansi-regex@<6.0.1, as requested in #38.

    • Fix ReDoS in certain cases (#37) You are only really affected if you run the regex on untrusted user input in a server context, which it's very unlikely anyone is doing, since this regex is mainly used in command-line tools.

    CVE-2021-3807

    https://github.com/chalk/ansi-regex/compare/v5.0.0..v5.0.1

    Thank you @​yetingli for the patch and reproduction case!

    v5.0.0

    Breaking

    • Require Node.js 8 166a0d5

    Enhancements

    • Add TypeScript definition (#32) e77ea17

    https://github.com/chalk/ansi-regex/compare/v4.1.0...v5.0.0

    Commits

    Dependabot compatibility score

    Dependabot will resolve any conflicts with this PR as long as you don't alter it yourself. You can also trigger a rebase manually by commenting @dependabot rebase.


    Dependabot commands and options

    You can trigger Dependabot actions by commenting on this PR:

    • @dependabot rebase will rebase this PR
    • @dependabot recreate will recreate this PR, overwriting any edits that have been made to it
    • @dependabot merge will merge this PR after your CI passes on it
    • @dependabot squash and merge will squash and merge this PR after your CI passes on it
    • @dependabot cancel merge will cancel a previously requested merge and block automerging
    • @dependabot reopen will reopen this PR if it is closed
    • @dependabot close will close this PR and stop Dependabot recreating it. You can achieve the same result by closing it manually
    • @dependabot ignore this major version will close this PR and stop Dependabot creating any more for this major version (unless you reopen the PR or upgrade to it yourself)
    • @dependabot ignore this minor version will close this PR and stop Dependabot creating any more for this minor version (unless you reopen the PR or upgrade to it yourself)
    • @dependabot ignore this dependency will close this PR and stop Dependabot creating any more for this dependency (unless you reopen the PR or upgrade to it yourself)
    • @dependabot use these labels will set the current labels as the default for future PRs for this repo and language
    • @dependabot use these reviewers will set the current reviewers as the default for future PRs for this repo and language
    • @dependabot use these assignees will set the current assignees as the default for future PRs for this repo and language
    • @dependabot use this milestone will set the current milestone as the default for future PRs for this repo and language

    You can disable automated security fix PRs for this repo from the Security Alerts page.

    dependencies 
    opened by dependabot[bot] 0
  • Models with relationships across different databases

    Models with relationships across different databases

    Hello, do you have an example with models that contain nested relationships between different databases?

    For example if you had an Order model which hasMany Items which are on the same DB but then the Items have a manufacturer which is on another DB I know if they were non nested I would use two queries with different transaction knex connections:

            await order.$fetchGraph(
               '[items]',
              {transaction: this.ordersDB.getConnection()}
            )
    
          await order.$fetchGraph(
             '['items.manufacturer']',
             {transaction: this.manufacturerDB.getConnection()}
           )
    

    But If like in my given example the relation is through a model which lives on the same DB but the relation on that model lives on another DB how would that be achieved?

    Thanks for any support/guidance let me know if you need me to clarify anything

    opened by jsagethuboo 0
  • Models with relations from different DBS

    Models with relations from different DBS

    Hello, do you have a solution/implementation example of having models with relationships between different databases?

    For example we were planning to use inject models into repositories with the correct DB instance to which they correlate to example:

    injectedModel.withGraphFetched('[relationOnDifferentDB, relationOnSameDB]') but it seems this assumes that all relations are on the same DB connection which was injected into the model which fails, has anyone encountered this issue or found a good solution?

    opened by jsagethuboo 0
  • Bump decode-uri-component from 0.2.0 to 0.2.2

    Bump decode-uri-component from 0.2.0 to 0.2.2

    Bumps decode-uri-component from 0.2.0 to 0.2.2.

    Release notes

    Sourced from decode-uri-component's releases.

    v0.2.2

    • Prevent overwriting previously decoded tokens 980e0bf

    https://github.com/SamVerschueren/decode-uri-component/compare/v0.2.1...v0.2.2

    v0.2.1

    • Switch to GitHub workflows 76abc93
    • Fix issue where decode throws - fixes #6 746ca5d
    • Update license (#1) 486d7e2
    • Tidelift tasks a650457
    • Meta tweaks 66e1c28

    https://github.com/SamVerschueren/decode-uri-component/compare/v0.2.0...v0.2.1

    Commits

    Dependabot compatibility score

    Dependabot will resolve any conflicts with this PR as long as you don't alter it yourself. You can also trigger a rebase manually by commenting @dependabot rebase.


    Dependabot commands and options

    You can trigger Dependabot actions by commenting on this PR:

    • @dependabot rebase will rebase this PR
    • @dependabot recreate will recreate this PR, overwriting any edits that have been made to it
    • @dependabot merge will merge this PR after your CI passes on it
    • @dependabot squash and merge will squash and merge this PR after your CI passes on it
    • @dependabot cancel merge will cancel a previously requested merge and block automerging
    • @dependabot reopen will reopen this PR if it is closed
    • @dependabot close will close this PR and stop Dependabot recreating it. You can achieve the same result by closing it manually
    • @dependabot ignore this major version will close this PR and stop Dependabot creating any more for this major version (unless you reopen the PR or upgrade to it yourself)
    • @dependabot ignore this minor version will close this PR and stop Dependabot creating any more for this minor version (unless you reopen the PR or upgrade to it yourself)
    • @dependabot ignore this dependency will close this PR and stop Dependabot creating any more for this dependency (unless you reopen the PR or upgrade to it yourself)
    • @dependabot use these labels will set the current labels as the default for future PRs for this repo and language
    • @dependabot use these reviewers will set the current reviewers as the default for future PRs for this repo and language
    • @dependabot use these assignees will set the current assignees as the default for future PRs for this repo and language
    • @dependabot use this milestone will set the current milestone as the default for future PRs for this repo and language

    You can disable automated security fix PRs for this repo from the Security Alerts page.

    dependencies 
    opened by dependabot[bot] 0
Owner
Vincit
Software Development Expert
Vincit
An easy-to-use multi SQL dialect ORM tool for Node.js

Sequelize Sequelize is a promise-based Node.js ORM tool for Postgres, MySQL, MariaDB, SQLite and Microsoft SQL Server. It features solid transaction s

Sequelize 27.3k Jan 4, 2023
Next-generation ORM for Node.js & TypeScript | PostgreSQL, MySQL, MariaDB, SQL Server & SQLite

Prisma Quickstart • Website • Docs • Examples • Blog • Slack • Twitter • Prisma 1 What is Prisma? Prisma is a next-generation ORM that consists of the

Prisma 28k Jan 2, 2023
An adapter-based ORM for Node.js with support for mysql, mongo, postgres, mssql (SQL Server), and more

Waterline is a next-generation storage and retrieval engine, and the default ORM used in the Sails framework. It provides a uniform API for accessing

Balderdash 5.4k Jan 4, 2023
ORM for TypeScript and JavaScript (ES7, ES6, ES5). Supports MySQL, PostgreSQL, MariaDB, SQLite, MS SQL Server, Oracle, SAP Hana, WebSQL databases. Works in NodeJS, Browser, Ionic, Cordova and Electron platforms.

TypeORM is an ORM that can run in NodeJS, Browser, Cordova, PhoneGap, Ionic, React Native, NativeScript, Expo, and Electron platforms and can be used

null 30.1k Jan 3, 2023
Connect to private Google Cloud SQL instance through Cloud SQL Auth Proxy running in Kubernetes.

⛅ google-cloud-sql A CLI app which establishes a connection to a private Google Cloud SQL instance and port-forwards it to a local machine. Connection

Dinko Osrecki 10 Oct 16, 2022
A typesafe database ORM that exposes the full power of handwritten sql statements to the developer.

TORM A typesafe database ORM that exposes the full power of handwritten sql statements to the developer. import { torm, z } from 'https://deno.land/x/

Andrew Kaiser 15 Dec 22, 2022
A simple Node.js ORM for PostgreSQL, MySQL and SQLite3 built on top of Knex.js

bookshelf.js Bookshelf is a JavaScript ORM for Node.js, built on the Knex SQL query builder. It features both Promise-based and traditional callback i

Bookshelf.js 6.3k Jan 2, 2023
AlaSQL.js - JavaScript SQL database for browser and Node.js. Handles both traditional relational tables and nested JSON data (NoSQL). Export, store, and import data from localStorage, IndexedDB, or Excel.

Please use version 1.x as prior versions has a security flaw if you use user generated data to concat your SQL strings instead of providing them as a

Andrey Gershun 6.1k Jan 9, 2023
TypeScript ORM for Node.js based on Data Mapper, Unit of Work and Identity Map patterns. Supports MongoDB, MySQL, MariaDB, PostgreSQL and SQLite databases.

TypeScript ORM for Node.js based on Data Mapper, Unit of Work and Identity Map patterns. Supports MongoDB, MySQL, MariaDB, PostgreSQL and SQLite datab

MikroORM 5.4k Dec 31, 2022
Microsoft SQL Server client for Node.js

node-mssql Microsoft SQL Server client for Node.js Supported TDS drivers: Tedious (pure JavaScript - Windows/macOS/Linux, default) Microsoft / Contrib

null 2.1k Jan 4, 2023
A high performance MongoDB ORM for Node.js

Iridium A High Performance, IDE Friendly ODM for MongoDB Iridium is designed to offer a high performance, easy to use and above all, editor friendly O

Sierra Softworks 570 Dec 14, 2022
Adapter based JavaScript ORM for Node.js and the browser

firenze.js A database agnostic adapter-based object relational mapper (ORM) targetting node.js and the browser. Visit http://firenze.js.org for docume

Fahad Heylaal 130 Jul 14, 2022
The Blog system developed by nest.js based on node.js and the database orm used typeorm, the development language used TypeScript

考拉的 Nest 实战学习系列 readme 中有很多要说的,今天刚开源还没来及更新,晚些慢慢写,其实本人最近半年多没怎么写后端代码,主要在做低代码和中台么内容,操作的也不是原生数据库而是元数据Meta,文中的原生数据库操作也当作复习下,数据库的操作为了同时适合前端和Node开发小伙伴,所以并不是很

程序员成长指北 148 Dec 22, 2022
A Node.js ORM for MySQL, SQLite, PostgreSQL, MongoDB, GitHub and serverless service like Deta, InspireCloud, CloudBase, LeanCloud.

Dittorm A Node.js ORM for MySQL, SQLite, PostgreSQL, MongoDB, GitHub and serverless service like Deta, InspireCloud, CloudBase, LeanCloud. Installatio

Waline 21 Dec 25, 2022
Lovefield is a relational database for web apps. Written in JavaScript, works cross-browser. Provides SQL-like APIs that are fast, safe, and easy to use.

Lovefield Lovefield is a relational database written in pure JavaScript. It provides SQL-like syntax and works cross-browser (currently supporting Chr

Google 6.8k Jan 3, 2023
TypeScript clients for databases that prevent SQL Injection

Safe From HTML Injection Using tagged template literals for queries, e.g. db.query(sql`SELECT * FROM users WHERE id=${userID}`); makes it virtually im

Forbes Lindesay 478 Dec 21, 2022
Conjure SQL from GraphQL queries 🧙🔮✨

Sqlmancer Conjure SQL from your GraphQL queries ?? ?? ✨ ⚠️ This project is currently on hiatus. I am hoping to resume working on Sqlmancer once I have

Daniel Rearden 132 Oct 30, 2022
This is a demo sample of linking NODEJS via ORM and MYSQL

Demons(Demo of Nodejs with SQL) This is a demo sample of linking NODEJS with ORM and MYSQL Connecting Node to SQL is a hard task and not much help is

Shivam Sourav Jha 3 Apr 14, 2022