All Projects → thinkkoa → thinkorm

thinkkoa / thinkorm

Licence: MIT license
A flexible, lightweight and powerful Object-Relational Mapper for Node.js. Support TypeScript!!

Programming Languages

javascript
184084 projects - #8 most used programming language
typescript
32286 projects

Projects that are alternatives of or similar to thinkorm

Jooq
jOOQ is the best way to write SQL in Java
Stars: ✭ 4,695 (+14127.27%)
Mutual labels:  oracle, sql-query, sqlserver
json-sql-builder2
Level Up Your SQL-Queries
Stars: ✭ 59 (+78.79%)
Mutual labels:  oracle, mariadb, query-builder
ormdb
ORM tool for .Net / .Net.Core
Stars: ✭ 14 (-57.58%)
Mutual labels:  oracle, mariadb, sqlserver
Typeorm
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.
Stars: ✭ 26,559 (+80381.82%)
Mutual labels:  oracle, mariadb, sqlserver
Ebean
Ebean ORM
Stars: ✭ 1,172 (+3451.52%)
Mutual labels:  oracle, mariadb, sqlserver
Sharding Method
分表分库的新思路——服务层Sharding框架,全SQL、全数据库兼容,ACID特性与原生数据库一致,能实现RR级别读写分离,无SQL解析性能更高
Stars: ✭ 188 (+469.7%)
Mutual labels:  oracle, mariadb, sqlserver
Qxorm
QxOrm library - C++ Qt ORM (Object Relational Mapping) and ODM (Object Document Mapper) library - Official repository
Stars: ✭ 176 (+433.33%)
Mutual labels:  oracle, mariadb, sqlserver
Liquibase
Main Liquibase Source
Stars: ✭ 2,910 (+8718.18%)
Mutual labels:  oracle, mariadb, sqlserver
laravel-adminer
Adminer database management tool for your Laravel application.
Stars: ✭ 45 (+36.36%)
Mutual labels:  oracle, mariadb
DBTestCompare
Application to compare results of two SQL queries
Stars: ✭ 15 (-54.55%)
Mutual labels:  mariadb, sqlserver
sea-query
🔱 A dynamic SQL query builder for MySQL, Postgres and SQLite
Stars: ✭ 595 (+1703.03%)
Mutual labels:  mariadb, query-builder
SQLServerTools
This repo is the home of various SQL-Server-Tools
Stars: ✭ 28 (-15.15%)
Mutual labels:  sql-query, sqlserver
r2dbc-migrate
R2DBC database migration tool & library
Stars: ✭ 83 (+151.52%)
Mutual labels:  mariadb, sqlserver
Dev.Data
The Dev.Data.SqlDatabaseCommand is a set of components helping C# developers to execute SQL Queries and to retrieve data from SQL Server.
Stars: ✭ 15 (-54.55%)
Mutual labels:  oracle, sql-query
DataX-src
DataX 是异构数据广泛使用的离线数据同步工具/平台,实现包括 MySQL、Oracle、SqlServer、Postgre、HDFS、Hive、ADS、HBase、OTS、ODPS 等各种异构数据源之间高效的数据同步功能。
Stars: ✭ 21 (-36.36%)
Mutual labels:  oracle, sqlserver
data-profiling
a set of scripts to pull meta data and data profiling metrics from relational database systems
Stars: ✭ 57 (+72.73%)
Mutual labels:  oracle, sqlserver
buildsqlx
Go database query builder library for PostgreSQL
Stars: ✭ 92 (+178.79%)
Mutual labels:  query-builder, sqlbuilder
kex
ORM-less for Knex
Stars: ✭ 17 (-48.48%)
Mutual labels:  knex, query-builder
db-doc
📝一款生成在线/离线数据库文档的小工具
Stars: ✭ 98 (+196.97%)
Mutual labels:  mariadb, sqlserver
vaultaire
Query DSL and data access utilities for Corda developers.
Stars: ✭ 14 (-57.58%)
Mutual labels:  query-builder, querydsl

介绍

npm version Build Status

A flexible, lightweight and powerful Object-Relational Mapper for Node.js.

ThinkORM是一个可扩展轻量级的功能丰富的ORM,运行在Node.js环境,已经支持Typescript。

ThinkORM试图用一种抽象的DSL语言,尽量保持各种数据库书写语法一致,用户专注于数据操作逻辑而非具体的数据存储类型,达到快速开发和移植的目的。

特性

  1. 支持Typescript (4.x版本)

  2. 基于Knex.js实现,支持 MySQL, PostgreSQL, MariaDB, SQLite, MS SQL Server, Oracle等常见数据库.

  3. 抽象的面向对象式SQL操作语言,保持各种数据库书写语法一致,方便开发和项目迁移

  4. 支持schema定义数据结构,支持严格的类型检查;支持数据结构迁移到数据库,通过migrate方法调用

  5. 支持hasone,hasmany,manytomany关联查询

  6. 支持left,right,inner join查询,支持count,sum,group查询

  7. 支持连接池配置.支持数据链接检测以及自动重联,数据库服务的宕机修复后无需重启应用

  8. 支持事务操作,包括同模型、跨模型、并行事务

  9. 支持数据自动验证以及自定义规则验证,且规则可扩展

  10. 支持前置、后置逻辑处理

安装

npm install thinkorm --save

使用

used [email protected]

//class User.js
const {BaseModel, helper, Entity, PrimaryColumn, Column, IsNotEmpty } = require('thinkorm');

@Entity()
class User extends BaseModel {
    @PrimaryColumn()
    id: number;

    @IsNotEmpty({ message: "姓名不能为空" })
    @Column(0, '', true)
    name: string;
}

//CURD
const userModel = new User(config);
// add
let result = await userModel.add({"name": "张三"});

// delete
result = await userModel.where({id: 1}).delete();

// update
result = await userModel.where({id: 2}).update({"name": "李四"});

// select 
result = await userModel.where({id: 3}).find(); //limit 1
result = await userModel.where({"name": {"<>": ""}}).select(); //query name is not null

文档

4.x cn thinkorm_doc

贡献者

  • richenlin
  • richerdlee

协议

MIT

Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].