Skip to content

Commit

Permalink
Merge branch 'master' of github.com:OutSystems/Cordova-sqlcipher-adapter
Browse files Browse the repository at this point in the history
  • Loading branch information
vmfo22 committed Jan 29, 2019
2 parents e56daf3 + a8a1734 commit a9db3da
Showing 1 changed file with 12 additions and 2 deletions.
14 changes: 12 additions & 2 deletions src/android/io/sqlc/SQLitePlugin.java
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,8 @@
import java.io.File;
import java.lang.IllegalArgumentException;
import java.lang.Number;

import java.util.Map;
import java.util.concurrent.ConcurrentHashMap;
import java.util.concurrent.BlockingQueue;
import java.util.concurrent.LinkedBlockingQueue;
Expand All @@ -38,9 +40,17 @@ public class SQLitePlugin extends CordovaPlugin {
/**
* Multiple database runner map (static).
* NOTE: no public static accessor to db (runner) map since it would not work with db threading.
* FUTURE put DBRunner into a public class that can provide external accessor.
*
* FUTURE TBD put DBRunner into a public class that can provide external accessor.
*
* ADDITIONAL NOTE: Storing as Map<String, DBRunner> to avoid portabiity issue
* between Java 6/7/8 as discussed in:
* https://gist.github.com/AlainODea/1375759b8720a3f9f094
*
* THANKS to @NeoLSN (Jason Yang/楊朝傑) for giving the pointer in:
* https://github.com/litehelpers/Cordova-sqlite-storage/issues/727
*/
static ConcurrentHashMap<String, DBRunner> dbrmap = new ConcurrentHashMap<String, DBRunner>();
static Map<String, DBRunner> dbrmap = new ConcurrentHashMap<String, DBRunner>();

/**
* NOTE: Using default constructor, no explicit constructor.
Expand Down

0 comments on commit a9db3da

Please sign in to comment.