Big News: Socket raises $60M Series C at a $1B valuation to secure software supply chains for AI-driven development.Announcement
Sign In

@powersync/op-sqlite

Package Overview
Dependencies
Maintainers
2
Versions
146
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@powersync/op-sqlite

Powersync

Source
npmnpm
Version
0.0.0-dev-20241014164640
Version published
Weekly downloads
19K
-23.17%
Maintainers
2
Weekly downloads
 
Created
Source

OP-SQLite Factory for the PowerSync React Native SDK

Overview

This package (packages/powersync-op-sqlite) enables using OP-SQLite with PowerSync alongside the React Native SDK.

If you are not yet familiar with PowerSync, please see the PowerSync React Native SDK README for more information.

Alpha release

This package is currently in an alpha release. If you find a bug or issue, please open a GitHub issue. Questions or feedback can be posted on our community Discord - we'd love to hear from you.

Installation

Follow the installation instructions for the React Native SDK if you haven't yet set up PowerSync in your project. However, note that this package cannot be installed alongside @journeyapps/react-native-quick-sqlite. Skip the step about installing it as a peer dependency, or uninstall it if it is already installed.

Install Package

npx expo install @powersync/op-sqlite

Install Peer Dependency:

This SDK currently requires @op-engineering/op-sqlite as a peer dependency.

Install it in your app with:

npx expo install @op-engineering/op-sqlite

Usage

import { OPSqliteOpenFactory } from '@powersync/op-sqlite';
import { PowerSyncDatabase } from '@powersync/react-native';

const factory = new OPSqliteOpenFactory({
  dbFilename: 'sqlite.db'
});

this.powersync = new PowerSyncDatabase({ database: factory, schema: AppSchema });

Native Projects

This package uses native libraries. Create native Android and iOS projects (if not created already) by running:

npx expo run:android
# OR
npx expo run:ios

Keywords

data sync

FAQs

Package last updated on 14 Oct 2024

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts