Coder Social home page Coder Social logo

sqlite-example's Introduction

sqlite-example's People

Contributors

brentvatne avatar calebnance avatar cruzach avatar dependabot[bot] avatar evanbacon avatar expbot avatar ide avatar mahmutgundogdukizilay avatar nikki93 avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar

sqlite-example's Issues

import statement is not updated?

Hi, I'm really new so I'm not so sure if this is correct but I got this error:
TypeError: undefined is not an object (evaluating '_expoSqlite.SQLite.openDatabase')

Googled and found an issue on another repo: typeorm/typeorm#4846

And I think it has to do with line 11 App.js:
import { SQLite } from 'expo-sqlite

Even in the Expo docs on SQLite says we should call the API like so:
import * as SQLite from 'expo-sqlite';

Really minor thing, but would appreciate you fixing this. (or maybe clarification if this is intentional)

Thank you!

not working in snack?

"this" is a problem according to the debugger:

screenshot_2017-07-21-14-47-16

It works in XDE but I get 2 warnings:
Warning: PropTypes has been moved to a separate package. Accessing React.PropTypes is no longer supported and will be removed completely in React 16. Use the prop-types package on npm instead. (https://fb.me/migrating-from-react-proptypes)
14:50:45
Warning: React.createClass is no longer supported. Use a plain JavaScript class instead. If you're not yet ready to migrate, create-react-class is available on npm as a drop-in replacement. (https://fb.me/migrating-from-react-create-class)

Would be great to have it in snack! ;)

Pre-filled db

Is there an option of pre-filled database? or probably easy approach to dump existing sqlite db?

how to start BeginTransaction?

i need to insert thousands row, i use db.transaction like the example but it return error after 3000 row,
this is my sql execution... i need to start begin transaction to execute big data , how i can do that?

var multiQuery = []
lasti=0
for (let i = 0; i < result.length; i++) {
const l = result[i];
if (i === 0 || i % 999 == 0) {
query = 'INSERT INTO ' + LocationDB.table + ' (' + fields + ') VALUES '
lasti = i
}
query += '(' + "'" + l.join("','") + "'" + '),'
if (i === result.length - 1 || i === (lasti + 998)) {
query = query.slice(0, -1)
query += ';'
}
multiQuery.push(query)
}
execute(multiQuery)

function execute(sqlStatement, callback) {
var output = ''
config.console('execute() => ', sqlStatement)
if (this.db) {
this.db.transaction((tx) => {
if (Array.isArray(sqlStatement)) {
sqlStatement.map((query) => {
tx.executeSql(query, [], (transaction, result) => {
if (callback) callback(result)
}, (eror) => config.console(eror))
})
} else {
tx.executeSql(sqlStatement, [], (transaction, result) => {
if (callback) callback(result)
}, (eror) => config.console("execute() error =>", eror))
}
})
} else {
config.console('db is undefined')
}
}

Left join?

Does SQLite in expo.io have left join expressions?
I tried to do this one:
SELECT directions.r_id as r_id, routes.id as route_id FROM directions LEFT JOIN routes ON r_id = route_id;

But I failed.

{"_websqlDatabase":{"version":"1.0","_db":{"_name":"goes_db"},"_txnQueue":{"length":0},"_running":true,"_currentTask":{"readOnly":false}},"_error":null,"_complete":false,"_runningTimeout":false,"_sqlQueue":{"length":0},"_running":true}

SqlCipher

I'm sorry, I know it's not the right place to post but I just want to know if Expo has any working on db protection, e.g. SqlCipher. Thank you!

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.