Skip to content

Instantly share code, notes, and snippets.

@arifkoken
Created August 22, 2017 14:56
Show Gist options
  • Save arifkoken/a9542033438d0dfccaa2e2db776332be to your computer and use it in GitHub Desktop.
Save arifkoken/a9542033438d0dfccaa2e2db776332be to your computer and use it in GitHub Desktop.
import React, { Component } from 'react';
import {
AppRegistry,
Text
} from 'react-native';
import SqlService from './Providers/SqlService'
export default class sqllite extends Component {
constructor(props)
{
super(props);
SqlService.query("CREATE TABLE IF NOT EXISTS TEST (Id TEXT)").then(res => {
SqlService.insert("TEST",["id"],["1"]).then(res=>{
SqlService.select("TEST","*").then(res=>{
console.log(res);
debugger;
})
})
})
}
render() {
return (
<Text style={{marginTop:20}}>Merhaba React Native</Text>
);
}
}
AppRegistry.registerComponent('sqllite', () => sqllite);
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment