0.5.14 • Published 1 year ago

@monkeyplus/unorm v0.5.14

Weekly downloads
-
License
MIT
Repository
-
Last release
1 year ago

Unorm

Herramienta para capa de datos

Uso

# yarn
yarn add @monkeyplus/unorm

# npm
npm install @monkeyplus/unorm

# pnpm
pnpm add @monkeyplus/unorm

Ejemplo

import { createOrm } from '@monkeyplus/unorm';
import { defineDriver } from '@monkeyplus/unorm/drivers/knex';

const driver = defineDriver(/* ...options */);
const orm = createOrm({ driver });

const User = orm.defineModel('users', {
  fields: ['id', 'name', 'email'],
});

// Create User
const user = await User.create({ name: 'John Doe', email: 'email@test.com' });
// Update UserByPk
const user = await User.updateByPk(1, { name: 'John Doe', email: '' });
// Delete UserByPk
const user = await User.deleteByPk(1);
// Find UserByPk
const user = await User.findByPk(1);
// FindAll
const users = await User.findAll();
0.5.14

1 year ago

0.5.13

1 year ago

0.5.12

1 year ago

0.5.11

2 years ago

0.5.10

2 years ago

0.5.9

2 years ago

0.5.8

2 years ago

0.5.7

2 years ago

0.5.6

2 years ago

0.5.5

2 years ago

0.5.4

2 years ago

0.5.3

2 years ago

0.5.2

2 years ago

0.5.1

2 years ago

0.5.0

3 years ago

0.4.1

3 years ago

0.4.0

3 years ago

0.3.5

3 years ago

0.3.4

3 years ago

0.3.3

3 years ago

0.3.2

3 years ago

0.3.1

3 years ago

0.3.0

3 years ago

0.2.0

3 years ago

0.1.0

3 years ago