By Emir Hasanbegovic [email protected]
My website, what the harm in open sourcing it for now?
MVVM Framework
License: Other
By Emir Hasanbegovic [email protected]
My website, what the harm in open sourcing it for now?
A suggestion for Tasks and how they're registered in the TaskStateTable. Currently, the insert/update calls into the TaskStateTable will treat the same task with different query parameters as different tasks. While this can be useful in some cases, it's possible that we only want one task of a particular type running at a time. There should be a way to specify if simultaneous instances of a task can be run, as well as what defines uniqueness.
On a related note, when running a task using startTask and then retriggering the same task using forceStartTask, the TaskStateTable treats them as separate tasks, with separate task states and results. I don't know what the intended behaviour is, but I think having the same task run twice at nearly the same time would be inefficient.
Column.getValue() can't preserve null information for integer columns (and possibly real). Performing cursor.getLong() on a null column value will return zero. There should be a check to see if the column is null before the conversion that takes place in the switch statement.
I've run into an issue updating to the latest version of liason. My task state table hits when onCreate is called. Attempts to do a clean build and rerun tests didn't fix the issue.
I have a fix, which involved redeclaring the Columns and Paths definitions found in TaskStateTable.java, but this seems redundant.
Android Studio 0.5.9
Robolectric 2.3
liason.mobi.loaders 0.0.5
liason.mobi.task 0.0.5
liason.mobi.mvvm 0.0.6
android.database.sqlite.SQLiteException: Cannot prepare statement, base error code: 1
at org.robolectric.shadows.ShadowSQLiteConnection.rethrow(ShadowSQLiteConnection.java:48)
at org.robolectric.shadows.ShadowSQLiteConnection.access$500(ShadowSQLiteConnection.java:26)
at org.robolectric.shadows.ShadowSQLiteConnection$Connections.execute(ShadowSQLiteConnection.java:436)
at org.robolectric.shadows.ShadowSQLiteConnection$Connections.prepareStatement(ShadowSQLiteConnection.java:361)
at org.robolectric.shadows.ShadowSQLiteConnection.nativePrepareStatement(ShadowSQLiteConnection.java:58)
at android.database.sqlite.SQLiteConnection.nativePrepareStatement(SQLiteConnection.java)
at android.database.sqlite.SQLiteConnection.acquirePreparedStatement(SQLiteConnection.java:889)
at android.database.sqlite.SQLiteConnection.prepare(SQLiteConnection.java:500)
at android.database.sqlite.SQLiteSession.prepare(SQLiteSession.java:588)
at android.database.sqlite.SQLiteProgram.constructor(SQLiteProgram.java:58)
at android.database.sqlite.SQLiteProgram.(SQLiteProgram.java:41)
at android.database.sqlite.SQLiteStatement.(SQLiteStatement.java:31)
at android.database.sqlite.SQLiteDatabase.executeSql(SQLiteDatabase.java:1672)
at android.database.sqlite.SQLiteDatabase.execSQL(SQLiteDatabase.java:1603)
at mobi.liason.loaders.DatabaseHelper.onCreate(DatabaseHelper.java:78)
at android.database.sqlite.SQLiteOpenHelper.getDatabaseLocked(SQLiteOpenHelper.java:252)
at android.database.sqlite.SQLiteOpenHelper.getWritableDatabase(SQLiteOpenHelper.java:164)
at mobi.liason.loaders.DatabaseHelper.getWritableDatabase(DatabaseHelper.java:28)
at mobi.liason.loaders.Provider.getSQLiteDatabase(Provider.java:35)
at mobi.liason.loaders.Provider.insert(Provider.java:106)
at org.robolectric.shadows.ShadowContentResolver.insert(ShadowContentResolver.java:120)
at android.content.ContentResolver.insert(ContentResolver.java)
at com..helpers.TestDriver.setupUser(TestDriver.java:88)
at com..viewmodels.UnreadNotificationViewModelTest.setup(UnreadNotificationViewModelTest.java:44)
at org.junit.runners.model.FrameworkMethod$1.runReflectiveCall(FrameworkMethod.java:47)
at org.junit.internal.runners.model.ReflectiveCallable.run(ReflectiveCallable.java:12)
at org.junit.runners.model.FrameworkMethod.invokeExplosively(FrameworkMethod.java:44)
at org.junit.internal.runners.statements.RunBefores.evaluate(RunBefores.java:24)
at org.robolectric.RobolectricTestRunner$2.evaluate(RobolectricTestRunner.java:250)
at org.junit.runners.ParentRunner.runLeaf(ParentRunner.java:271)
at org.junit.runners.BlockJUnit4ClassRunner.runChild(BlockJUnit4ClassRunner.java:70)
at org.junit.runners.BlockJUnit4ClassRunner.runChild(BlockJUnit4ClassRunner.java:50)
at org.junit.runners.ParentRunner$3.run(ParentRunner.java:238)
at org.junit.runners.ParentRunner$1.schedule(ParentRunner.java:63)
at org.junit.runners.ParentRunner.runChildren(ParentRunner.java:236)
at org.junit.runners.ParentRunner.access$000(ParentRunner.java:53)
at org.junit.runners.ParentRunner$2.evaluate(ParentRunner.java:229)
at org.robolectric.RobolectricTestRunner$1.evaluate(RobolectricTestRunner.java:177)
at org.junit.runners.ParentRunner.run(ParentRunner.java:309)
at org.junit.runners.Suite.runChild(Suite.java:127)
at org.junit.runners.Suite.runChild(Suite.java:26)
at org.junit.runners.ParentRunner$3.run(ParentRunner.java:238)
at org.junit.runners.ParentRunner$1.schedule(ParentRunner.java:63)
at org.junit.runners.ParentRunner.runChildren(ParentRunner.java:236)
at org.junit.runners.ParentRunner.access$000(ParentRunner.java:53)
at org.junit.runners.ParentRunner$2.evaluate(ParentRunner.java:229)
at org.junit.runners.ParentRunner.run(ParentRunner.java:309)
at org.junit.runner.JUnitCore.run(JUnitCore.java:160)
at com.intellij.rt.execution.application.AppMain.main(AppMain.java:134)
Caused by: com.almworks.sqlite4java.SQLiteException: [1] DB[99] prepare() CREATE TABLE IF NOT EXISTS TasksStateTable ( ); [near ")": syntax error]
at com.almworks.sqlite4java.SQLiteConnection.throwResult(SQLiteConnection.java:1309)
at com.almworks.sqlite4java.SQLiteConnection.prepare(SQLiteConnection.java:487)
at com.almworks.sqlite4java.SQLiteConnection.prepare(SQLiteConnection.java:542)
at com.almworks.sqlite4java.SQLiteConnection.prepare(SQLiteConnection.java:529)
at org.robolectric.shadows.ShadowSQLiteConnection$Connections$2.call(ShadowSQLiteConnection.java:365)
at org.robolectric.shadows.ShadowSQLiteConnection$Connections$2.call(ShadowSQLiteConnection.java:361)
at org.robolectric.shadows.ShadowSQLiteConnection$Connections$6.call(ShadowSQLiteConnection.java:422)
at org.robolectric.shadows.ShadowSQLiteConnection$Connections$6.call(ShadowSQLiteConnection.java:416)
at java.util.concurrent.FutureTask.run(FutureTask.java:266)
at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1142)
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:617)
at java.lang.Thread.run(Thread.java:744)
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.