import SQLite from 'react-native-sqlite-storage';
import { View, Text, StyleSheet } from 'react-native';
import React, { useEffect } from 'react';

SQLite.DEBUG(true);
SQLite.enablePromise(false);

const database_name = "MyMoney.db";
const database_version = "1.0"
const database_displayname = "SQLite Test Database";
const database_size = 200000;
let db;

function MoneyDB() {

  console.log('money db')

  const loadAndQueryDB = () => {
    db = SQLite.openDatabase(database_name, database_version, database_displayname, database_size, () => { console.log('load db') }, error => console.log(error.message));
    
  };

  useEffect(() => {
    loadAndQueryDB()

  }, [])

  return (
    <>
      <View>
        <Text>DB</Text>
      </View>
    </>
  )
}


export default MoneyDB