Uh oh!
There was an error while loading.Please reload this page.
- Notifications
You must be signed in to change notification settings - Fork3
Connector for backends created with SQLite.
License
mateusabelli/refine-sqlite
Folders and files
| Name | Name | Last commit message | Last commit date | |
|---|---|---|---|---|
Repository files navigation
Connector for backends created withSQLite.
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.
- 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.
npm install refine-sqlite
- 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.
- Import the
dataProviderfunction in your file and pass the database file path as a string parameter. - Use the methods to create, update, delete, and get data from your database, filtering and sorting as you wish.
Note
resourceis 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// }
Clone the repository
git clone https://github.com/mateusabelli/refine-sqlite.git
Install the dependencies
cd refine-sqlitepnpm installBuild and test
pnpm run buildpnpm runtestImportantBefore the tests run, the database file
test.dbis deleted and recreated.
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
- Add aGitHub Star to the project.
- Tweet about the projecton Twitter / X.
- Write interesting articles about the project onDev.to,Medium or personal blog.
- Consider becoming a sponsor onGitHub.
![]() refine |
I'd like to thankrefine, my first GitHub sponsor ❤️
For believing and supporting my projects!
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
Uh oh!
There was an error while loading.Please reload this page.
Stars
Watchers
Forks
Sponsor this project
Uh oh!
There was an error while loading.Please reload this page.
Packages0
Uh oh!
There was an error while loading.Please reload this page.
