0.3.0 • Published 4 months ago
@triniwiz/nativescript-supabase v0.3.0
Nativescript Supabase
npm install @triniwiz/nativescript-supabase
Usage
Database
import {createClient} from '@triniwiz/nativescript-supabase';
const client = createClient('supabaseUrl', 'supabaseKey');
// Select from table `countries` ordering by `name`
const response = await client
.from('countries')
.select()
.order('name', ascending: true)
.execute();
}
Authentication
import {createClient} from '@triniwiz/nativescript-supabase';
const client = createClient('supabaseUrl', 'supabaseKey');
// Sign up user with email and password
const response = await client.auth.signUp('email', 'password');
Storage
import {File as nsFile, knownFolders, path} from '@nativescript/core';
import {createClient} from '@triniwiz/nativescript-supabase';
const client = createClient('supabaseUrl', 'supabaseKey');
// Create file `example.txt` and upload it in `public` bucket
const exampleText = path.join(knownFolders.documents().path, 'example.txt');
const file = nsFile.fromPath(exampleText);
file.writeTextSync('File content');
const storageResponse = await client
.storage
.from('public')
.upload('example.txt', exampleText);
Check out the Official Documentation to learn all the other available methods.
Credits
Based on supabase-js
License
Apache License Version 2.0
2.0.0-rc.19
5 months ago
2.0.0-rc.17
5 months ago
2.0.0-rc.18
5 months ago
2.0.0-rc.15
5 months ago
2.0.0-rc.16
5 months ago
2.0.0-rc.26
4 months ago
2.0.0-rc.27
4 months ago
2.0.0-rc.24
4 months ago
2.0.0-rc.25
4 months ago
2.0.0-rc.22
4 months ago
2.0.0-rc.23
4 months ago
2.0.0-rc.20
4 months ago
2.0.0-rc.21
4 months ago
2.0.0-rc.13
5 months ago
2.0.0-rc.14
5 months ago
2.0.0-rc.11
5 months ago
2.0.0-rc.12
5 months ago
2.0.0-rc.10
5 months ago
2.0.0-rc.8
5 months ago
2.0.0-rc.9
5 months ago
2.0.0-rc.7
1 year ago
2.0.0-rc.6
1 year ago
2.0.0-rc.2
2 years ago
2.0.0-rc.3
2 years ago
2.0.0-rc.4
2 years ago
2.0.0-rc.5
2 years ago
2.0.0-rc.0
2 years ago
2.0.0-rc.1
2 years ago
0.3.0
3 years ago
0.2.0
3 years ago
0.1.0
4 years ago