0.2.3 • Published 9 years ago

panthera-model v0.2.3

Weekly downloads
2
License
MIT
Repository
github
Last release
9 years ago

panthera-model

npm Build Status Coverage Dependency Status Supported Node.js version MIT licensed

Maps compatible object structures to MySQL query-building functionality. Supports namespaces at the table, but not the database, level. Constructed queries are intended for use with mysql and mysql2's named placeholders.

Installation

npm install panthera-model

Usage

const model = require('panthera-model');
const table = {
  name: 'users',
  columns: {
    id: //...
  }
};

let users = model(table);
let selectQuery = users.usingNamespace('test').select().where('id').equals('id').limit(1);
// SELECT * FROM `test_users` WHERE `id` = :id LIMIT 1
0.2.3

9 years ago

0.2.2

9 years ago

0.2.1

9 years ago

0.1.2

9 years ago

0.1.1

9 years ago

0.1.0

9 years ago