Skip to content

Commit 235c325

Browse files
author
Oscar Franco
committed
Update readme
1 parent cbc39ad commit 235c325

1 file changed

Lines changed: 14 additions & 3 deletions

File tree

README.md

Lines changed: 14 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -3,12 +3,19 @@
33
![screenshot](https://raw.githubusercontent.com/ospfranco/react-native-quick-sqlite/main/header.png)
44

55
<div align="center">
6+
<h3>With TypeORM</h3>
67
<pre align="center">
78
<a href="https://github.com/ospfranco/react-native-quick-sqlite/blob/main/example/patches/typeorm%2B0.2.31.patch">Copy typeORM patch-package from example dir</a>
8-
npm i react-native-quick-sqlite typeorm
9+
yarn add react-native-quick-sqlite typeorm
910
npx pod-install
1011
<a href="https://dev.to/vinipachecov/setup-typeorm-with-react-native-50c4">Enable decorators and configure babel</a>
1112
</pre>
13+
<br>
14+
<h3>Low level bindings only</h3>
15+
<pre align="center">
16+
yarn add react-native-quick-sqlite
17+
npx pod-install
18+
</pre>
1219
<a align="center" href="https://github.com/ospfranco?tab=followers">
1320
<img src="https://img.shields.io/github/followers/ospfranco?label=Follow%20%40ospfranco&style=social" />
1421
</a>
@@ -104,7 +111,7 @@ interface ISQLite {
104111
# Usage
105112

106113
```typescript
107-
// Import as early as possible, auto-installs bindings.
114+
// Import as early as possible, auto-installs bindings.
108115
// Thanks to @mrousavy for this installation method, see one example: https://github.com/mrousavy/react-native-mmkv/blob/75b425db530e26cf10c7054308583d03ff01851f/src/createMMKV.ts#L56
109116
import 'react-native-quick-sqlite';
110117

@@ -147,7 +154,10 @@ storage datatypes, like booleans or datetimes. When fetching data directly from
147154
to identify the table declared types:
148155

149156
```typescript
150-
let result = sqlite.executeSql('myDatabase', 'SELECT int_column_1, bol_column_2 FROM sometable');
157+
let result = sqlite.executeSql(
158+
'myDatabase',
159+
'SELECT int_column_1, bol_column_2 FROM sometable'
160+
);
151161
if (!result.status) {
152162
// result.status undefined or 0 === sucess
153163
for (let i = 0; i < result.metadata.length; i++) {
@@ -159,6 +169,7 @@ if (!result.status) {
159169
}
160170
}
161171
```
172+
162173
Batch execution allows transactional execution of a set of commands
163174

164175
```typescript

0 commit comments

Comments
 (0)