1.0.3 • Published 5 years ago

yy-orm v1.0.3

Weekly downloads
3
License
ISC
Repository
github
Last release
5 years ago

yy-orm

Getting Started

var orm = require("yy-orm");

Create Database Object

var opt = { host: 'localhost', user: 'root', password: 'root', database: 'test' }; var db = orm.create(opt);

Define Schema

var def = { id: type.id(), name: type.varchar(32).unique(), alias: type.varchar("Rookie"), rank: type.integer().default(0), registTime: type.datetime().notNull(), }; var User = db.define("User", def);

Type

integer varchar datetime

Props

default length

Constraint

notNull unique

Cond

Simple Cond

eq ne gt lt gte lte in nin between

##Combined Cond and or

##Decorate Cond asc desc limit

batch update but has delete...

1.0.3

5 years ago

1.0.2

5 years ago

1.0.1

5 years ago