p32929 / easiestsqllibrary Goto Github PK
View Code? Open in Web Editor NEWThe Easiest and Laziest approach to Android SQL Database
License: MIT License
The Easiest and Laziest approach to Android SQL Database
License: MIT License
There are a few ways to encrypt sqlite data based on a StackOverflow article. could you implement a similar system in this library?
https://stackoverflow.com/questions/29746231/android-encrypt-decrypt-sqlite-database-100-secure
fun EasyDB(): EasiestDB {
return EasiestDB.init(instance)
.addTableColumns("Objects",
Column("wmid", "integer", "unique"),
Column("title", "text"),
Column("descr", "text"),
Column("lat", "text"),
Column("lng", "text"),
).addTableColumns("Chat",
Column("uid", "text"),
Column("name", "text"),
Column("text", "text"),
Column("time", "text"),
Column("msgid", "integer", "unique")
)
.doneAddingTables()
}
So I create two tables, the first fill when the user is first and do not touch anymore. Chat fill when checking new messages. And once, he cleans me the first table.
App.Companion.EasyDB().addDataInTable(1,
new Datum("uid", uid),
new Datum("name", name),
new Datum("text", text),
new Datum("time", time),
new Datum("msgid", msgid));
This is a chat filling method.
I am getting this error in gradle build file.
Failed to resolve: com.github.p32929:EasiestSqlLibrary:1.0.0.2
I use a recyclerView and add items to it. So far so good (it's a chat), I happen to add this item to sqlite using the library, if I want to remove this item (which in this case would be a message) I can't because I don't have the id of this item (in sqlite ). Now if I exit the app and return, I already have the ids because in the method of getting all the items, I also have all the ids. I think there could be a way to send the item to sqlite and get the id of that item, I don't know if it's possible. As I can't modify the libs (I only have android) so I can only report these bugs instead of forking and fixing
All functions are working well except update function.
I added one record.
easiestDB.addDataInTable(0,
new Datum(1, "FirstName"),
new Datum(2, "LastName")
);
and tried to update with this code.
easiestDB.updateData(0, 1,
new Datum(1, "aaa"),
new Datum(2, "bbb"));
java.lang.NullPointerException: Attempt to invoke virtual method 'void android.content.ContentValues.put(java.lang.String, java.lang.String)' on a null object reference
at org.richit.easiestsqllib.EasiestDB.updateData(EasiestDB.java:74)
thank for this library..
please add a code about
-reading db from local folder / assets
-location where we can find the db.
-how to save the entire database to local folder
thank you
I have Caused by: java.lang.IndexOutOfBoundsException: Index: 0, Size: 0
on
EasiestDB easiestDB = EasiestDB.init(this);
Cursor cursor = easiestDB.getOneRowData(0, 0);
if (cursor != null) {
SQlite SQlite = new SQlite();
SQlite.execute();
}
How i can check if DB is null and insert data?
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.