Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings
This repository was archived by the owner on Jul 12, 2025. It is now read-only.

Connector for backends created with SQLite.

License

NotificationsYou must be signed in to change notification settings

mateusabelli/refine-sqlite

refine-sqlite

Connector for backends created withSQLite.

npm versionnpmGitHub licenseNode.js CI


Getting Started

Withrefine-sqlite you can quickly start creating your app as fast as possible by leveraging the easy-to-use methods powered byrefine to interact with your SQLite database.

Features

  • Well tested - All the methods are tested usingJest.
  • Fully featured - All CRUD operations are supported.
  • Synchronous - Everything works synchronously usingbetter-sqlite3.
  • Type safe - Written in TypeScript with strict mode enabled.

Installation

npm install refine-sqlite

Usage

  1. Create a database file. You can use theDB Browser for SQLite to easily create the tables and insert some data, or you can also use thesqlite3 command line shell.
  2. Import thedataProvider function in your file and pass the database file path as a string parameter.
  3. Use the methods to create, update, delete, and get data from your database, filtering and sorting as you wish.

Noteresource is the name of the table in the database.

import{dataProvider}from"refine-sqlite";constresponse=dataProvider("database.db").getList({resource:"posts",filters:[{field:"category_id",operator:"eq",value:["2"],},],sorters:[{field:"title",order:"asc",},],});console.log(response)// {//   data: [//     { id: 6, title: 'Dolorem unde et officiis.', category_id: 2 },//     { id: 1, title: 'Soluta et est est.', category_id: 2 }//   ],//   total: 2// }

Documentation

Development

Clone the repository

git clone https://github.com/mateusabelli/refine-sqlite.git

Install the dependencies

cd refine-sqlitepnpm install

Build and test

pnpm run buildpnpm runtest

ImportantBefore the tests run, the database filetest.db is deleted and recreated.

Contributing

All contributions are welcome and appreciated! Please create anIssue orPull Request if you encounter any problems or have suggestions for improvements.

If you want to saythank you or/and support active development ofrefine-sqlite

Special Thanks

refine

I'd like to thankrefine, my first GitHub sponsor ❤️
For believing and supporting my projects!

License

refine-sqlite is free and open-source software licensed under theMIT License.
The feather icon is fromPhosphor Icons licensed under the MIT License.

About

Connector for backends created with SQLite.

Topics

Resources

License

Code of conduct

Contributing

Security policy

Stars

Watchers

Forks

Sponsor this project

 

Packages

No packages published

[8]ページ先頭

©2009-2025 Movatter.jp