Skip to content

Commit a178fa0

Browse files
committed
chore: project
1 parent f7c54e1 commit a178fa0

File tree

6 files changed

+83
-3
lines changed

6 files changed

+83
-3
lines changed

.gitignore

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -24,6 +24,7 @@ yarn-error.log*
2424
.gradle
2525
.project
2626
.yarn
27+
.cxx
2728
tmp/
2829

2930
!.eslintrc.js
@@ -34,6 +35,7 @@ tmp/
3435
devices.js
3536

3637
*.framework
38+
*.xcframework
3739
**/*.js.map
3840
src/**/*.js
3941
packages/**/*.js

.yarnrc.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,4 +2,4 @@ nmHoistingLimits: workspaces
22

33
nodeLinker: node-modules
44

5-
yarnPath: tools/.yarn/releases/yarn-3.3.1.cjs
5+
yarnPath: tools/.yarn/releases/yarn-3.6.4.cjs

packages/sqlite/README.md

Lines changed: 72 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,72 @@
1+
<!-- ⚠️ This README has been generated from the file(s) "blueprint.md" ⚠️-->
2+
<!-- !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
3+
!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
4+
!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
5+
!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
6+
!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
7+
!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
8+
!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
9+
!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
10+
!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
11+
DO NOT EDIT THIS READEME DIRECTLY! Edit "bluesprint.md" instead.
12+
!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
13+
!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
14+
!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
15+
!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
16+
!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
17+
!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
18+
!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
19+
!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
20+
!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! -->
21+
<h1 align="center">@nativescript-community/sqlite</h1>
22+
<p align="center">
23+
<a href="https://npmcharts.com/compare/@nativescript-community/sqlite?minimal=true"><img alt="Downloads per month" src="https://img.shields.io/npm/dm/@nativescript-community/sqlite.svg" height="20"/></a>
24+
<a href="https://www.npmjs.com/package/@nativescript-community/sqlite"><img alt="NPM Version" src="https://img.shields.io/npm/v/@nativescript-community/sqlite.svg" height="20"/></a>
25+
</p>
26+
27+
<p align="center">
28+
<b>SQLite for Nativescript</b></br>
29+
<sub><sub>
30+
</p>
31+
32+
<br />
33+
34+
35+
36+
[](#table-of-contents)
37+
38+
## Table of Contents
39+
40+
* [Installation](#installation)
41+
* [Usage](#usage)
42+
43+
44+
[](#installation)
45+
46+
## Installation
47+
Run the following command from the root of your project:
48+
49+
`ns plugin add @nativescript-community/sqlite`
50+
51+
52+
[](#usage)
53+
54+
## Usage
55+
56+
You should take care of wrapping sqlite calls to your preferred async option (promises, observables, async/await). And catch any exceptions thrown.
57+
58+
```typescript
59+
import { openOrCreate, deleteDatabase } from "@nativescript-community/sqlite";
60+
61+
const sqlite = openOrCreate("path/to/db");
62+
sqlite.execute("CREATE TABLE names (id INT, name TEXT)");
63+
sqlite.transaction(cancelTransaction => {
64+
// Calling cancelTransaction will rollback all changes made to db
65+
names.forEach((name, id) =>
66+
sqlite.execute(
67+
"INSERT INTO names (id, name) VALUES (?, ?)",
68+
[id, name]
69+
)
70+
);
71+
});
72+
```

packages/sqlite/blueprint.md

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -29,3 +29,9 @@ sqlite.transaction(cancelTransaction => {
2929
);
3030
});
3131
```
32+
33+
## Platforms sqlite versions
34+
35+
* [Android](https://stackoverflow.com/a/4377116)
36+
* [iOS](https://github.com/yapstudios/YapDatabase/wiki/SQLite-version-(bundled-with-OS))
37+

0 commit comments

Comments
 (0)