@keyv/mysql
MySQL/MariaDB storage adapter for Keyv
Last updated 3 years ago by lukechilds .
MIT · Repository · Bugs · Original npm · Tarball · package.json
$ cnpm install @keyv/mysql 
SYNC missed versions from official npm registry.

@keyv/mysql keyv

MySQL/MariaDB storage adapter for Keyv

Build Status Coverage Status npm

MySQL/MariaDB storage adapter for Keyv.

Install

npm install --save keyv @keyv/mysql

Usage

const Keyv = require('keyv');

const keyv = new Keyv('mysql://user:pass@localhost:3306/dbname');
keyv.on('error', handleConnectionError);

You can specify a custom table with the table option and the primary key size with keySize.

e.g:

const keyv = new Keyv('mysql://user:pass@localhost:3306/dbname', {
  table: 'cache',
  keySize: 255
});

Note: Some MySQL/MariaDB installations won't allow a key size longer than 767 bytes. If you get an error on table creation try reducing keySize to 191 or lower. #5

License

MIT © Luke Childs

Current Tags

  • 1.1.4                                ...           latest (3 years ago)

10 Versions

  • 1.1.4                                ...           3 years ago
  • 1.1.3                                ...           3 years ago
  • 1.1.2                                ...           3 years ago
  • 1.1.1                                ...           3 years ago
  • 1.1.0                                ...           3 years ago
  • 1.0.7                                ...           3 years ago
  • 1.0.6                                ...           3 years ago
  • 1.0.5                                ...           3 years ago
  • 1.0.4                                ...           3 years ago
  • 1.0.3                                ...           3 years ago
Maintainers (1)
Downloads
Today 0
This Week 0
This Month 11
Last Day 0
Last Week 0
Last Month 2
Dependencies (2)
Dev Dependencies (9)

Copyright 2014 - 2016 © taobao.org |