react-native-sqlite-storage icon indicating copy to clipboard operation
react-native-sqlite-storage copied to clipboard

API reference?

Open laurent22 opened this issue 8 years ago • 9 comments

Is there an API reference for this library? For example, I see many different openDatabase calls in the README file. How can I find out what are all the possible parameters and values?

I'm asking this question because I'm trying to find out where the database file is being created on the Android device. It seems to be created successfully but when I check Android/data/myapp I'm not seeing the SQLite file. A related question is: is it possible to set the file path explicitly?

laurent22 avatar May 11 '17 09:05 laurent22

I've been looking for this as well. @andpor?

ewendel avatar Oct 17 '17 13:10 ewendel

Once the typescript definition file gets in, you can use it as documentation for your js files as well.

rodrigoelp avatar Dec 20 '17 09:12 rodrigoelp

Look at documentation on openDatabase call - it shows various options for locations and states where target database file gets created...

andpor avatar Dec 20 '17 10:12 andpor

@andpor Actually, I think there should be a documentation on how to use the library for various use cases like SELECT/INSERT/CREATE etc. Right now, I'm looking around but there is no information on how exactly to use this library. I can find instructions on only how to set up.

palerdot avatar Dec 28 '17 15:12 palerdot

@palerdot, I think the documentation you are looking for is the same as the cordova SQLite project

SQLite works pretty much the same regardless of the plugin adapting the library.

I got working examples here if you are interested. It should read pretty similar to pure javascript as typescript is javascript with types.

By the way, I got the typescript definition to work on my project about a week or so ago. I see the pull request created by @dryganets #220 has not been merged. Is there something wrong with his definition? I am curious to know if there is a problem with his as our implementations are pretty similar with minor differences.

rodrigoelp avatar Dec 28 '17 21:12 rodrigoelp

@rodrigoelp The examples you shared is for typescript. Is there any normal JS/ES6 examples. I myself started compiling by digging into the code samples here - https://github.com/palerdot/react-native-sqlite-storage-examples. Also, this api information should go into the README of this repo. As most people, will not look for documentation in another repo.

palerdot avatar Dec 29 '17 05:12 palerdot

Hi @palerdot, I do not have any js/es6 sample handy. If I got some time soon I will try to generate the same code in javascript.

rodrigoelp avatar Dec 29 '17 10:12 rodrigoelp

I think that should provide API documentation, so it looks more intuitive.

giantss avatar Mar 23 '18 05:03 giantss

Also, this api information should go into the README of this repo. As most people, will not look for documentation in another repo.

Yeah... Links in the readme to the API reference (even if other github repo) and the example repos would be real nice.

MillingtonAllen avatar Mar 26 '22 15:03 MillingtonAllen