Skip to content

Commit ad85c2e

Browse files
author
Christopher J. Brody
committed
Merge branch 'cordova-sqlite-storage-commoncore' into dev
2 parents f40a365 + ad119df commit ad85c2e

File tree

9 files changed

+50
-17
lines changed

9 files changed

+50
-17
lines changed

CHANGES.md

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,12 @@
22

33
#### cordova-sqlite-storage 6.0.0-dev
44

5+
### cordova-sqlite-storage-commoncore 2.0.0
6+
7+
- refactor: clean up imports for Android
8+
- Fix plugin param name for macOS ("osx") - *tested* with Cordova 9 and cordova-osx@5
9+
- Drop support for Windows on ARM (Windows Mobile)
10+
511
#### cordova-sqlite-storage 5.1.0
612

713
- Add browser platform support using sql-asm-memory-growth.js from sql.js, with some limitations as documented

README.md

Lines changed: 15 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@ Native SQLite component with API based on HTML5/[Web SQL (DRAFT) API](http://www
66
- Android
77
- iOS
88
- macOS ("osx" platform)
9-
- Windows 10 (UWP) DESKTOP and MOBILE (see below for major limitations)
9+
- Windows 10 (UWP) DESKTOP ~~and MOBILE~~ (see below for major limitations)
1010

1111
The browser platform is now supported with the following options:
1212
- This plugin now supports the browser platform using [`storesafe/sql.js`](https://github.com/storesafe/sql.js) (fork of [`sql-js/sql.js`](https://github.com/sql-js/sql.js)), with no persistence and other limitations described below.
@@ -247,13 +247,16 @@ See the [**Sample**](#sample) section below for a sample with a more detailed ex
247247
- This plugin version branch has dependency on platform toolset libraries included by Visual Studio 2017 ref: [`storesafe/cordova-sqlite-storage#580`](https://github.com/storesafe/cordova-sqlite-storage/issues/580). (Visual Studio 2019 is not supported with cordova-windows, see [`apache/cordova-windows#327`](https://github.com/apache/cordova-windows/issues/327).) Visual Studio 2015 is now supported by [`brodybits/cordova-sqlite-legacy`](https://github.com/brodybits/cordova-sqlite-legacy) (permissive license terms, no performance enhancements for Android) and [`brodybits/cordova-sqlite-evcore-legacy-ext-common-free`](https://github.com/brodybits/cordova-sqlite-evcore-legacy-ext-common-free) (GPL v3 or commercial license terms, with performance enhancements for Android). UNTESTED workaround for Visual Studio 2015: it *may* be possible to support this plugin version on Visual Studio 2015 Update 3 by installing platform toolset v141.)
248248
- Visual Studio components needed: Universal Windows Platform development, C++ Universal Windows Platform tools. A recent version of Visual Studio 2017 will offer to install any missing feature components.
249249
- It is **not** possible to use this plugin with the default "Any CPU" target. A specific target CPU type **must** be specified when building an app with this plugin.
250+
- ARM target CPU for Windows Mobile is no longer supported.
250251
- The `SQLite3-WinRT` component in `src/windows/SQLite3-WinRT-sync` is based on [`doo/SQLite3-WinRT` commit `f4b06e6`](https://github.com/doo/SQLite3-WinRT/commit/f4b06e6a772a2688ee0575a8034b55401ea64049) from 2012, which is missing the asynchronous C++ API improvements. There is no background processing on the Windows platform.
251252
- Truncation issue with UNICODE `\u0000` character (same as `\0`)
252253
- INCONSISTENT error code (0) and INCORRECT error message (missing actual error info) in error callbacks ref: [`storesafe/cordova-sqlite-storage#539`](https://github.com/storesafe/cordova-sqlite-storage/issues/539)
253254
- Not possible to SELECT BLOB column values directly. It is recommended to use built-in HEX function to retrieve BLOB column values, which should work consistently across all platform implementations as well as (WebKit) Web SQL. Non-standard BASE64 function to SELECT BLOB column values in Base64 format is supported by [`brodybits/cordova-sqlite-ext`](https://github.com/brodybits/cordova-sqlite-ext) (permissive license terms) and [`storesafe/cordova-sqlite-evcore-extbuild-free`](https://github.com/storesafe/cordova-sqlite-evcore-extbuild-free) (GPL v3 or commercial license terms).
254255
- Windows platform version uses `UTF-16le` internal database encoding while the other platform versions use `UTF-8` internal encoding. (`UTF-8` internal encoding is preferred ref: [`storesafe/cordova-sqlite-storage#652`](https://github.com/storesafe/cordova-sqlite-storage/issues/652))
255256
- Known issue with database names that contain certain US-ASCII punctuation and control characters (see below)
256-
- The macOS platform version ("osx" platform) is not tested in a release build and should be considered pre-alpha.
257+
- The **macOS** platform version (**"osx" platform**) is not tested in a release build and should be considered pre-alpha with known issues:
258+
- `cordova prepare osx` is needed before building and running from Xcode
259+
- known issue between `cordova-osx` and Cordova CLI `10.0.0`: <https://github.com/apache/cordova-osx/issues/106>
257260
- Android platform versions supported: minimum: 4.0 (deprecated), recommended minimum: 5.1, see also: ref: <https://cordova.apache.org/docs/en/latest/guide/platforms/android/>
258261
- iOS platform versions supported: minimum 9.0 (see <https://cordova.apache.org/docs/en/latest/guide/platforms/ios/index.html>); see also [**deviations section**](#deviations) below for differences between WKWebView (cordova-ios 6.0(+)) and UIWebView (cordova-ios pre-6.0)
259262
- FTS3, FTS4, and R-Tree features are tested and supported on all target platforms in this plugin version branch.
@@ -268,7 +271,7 @@ See the [**Sample**](#sample) section below for a sample with a more detailed ex
268271
## Announcements
269272

270273
- The browser platform is now supported using [`storesafe/sql.js`](https://github.com/storesafe/sql.js) (fork of [`sql-js/sql.js`](https://github.com/sql-js/sql.js)), with no persistence and other limitations described below.
271-
- Using recent version of SQLite3 (see above) with some new features and some important security updates including:
274+
- _Using version of SQLite3 (...) with window functions and recent security updates:_
272275
- [`storesafe/cordova-sqlite-storage#895`](https://github.com/storesafe/cordova-sqlite-storage/issues/895)
273276
- [`storesafe/cordova-sqlite-storage#867`](https://github.com/storesafe/cordova-sqlite-storage/issues/867)
274277
- [`storesafe/cordova-sqlite-storage#837`](https://github.com/storesafe/cordova-sqlite-storage/issues/837)
@@ -340,8 +343,10 @@ More resources can be found by <https://www.google.com/search?q=cordova+tutorial
340343

341344
In addition, this guide assumes a basic knowledge of some key JavaScript concepts such as variables, function calls, and callback functions. There is an excellent explanation of JavaScript callbacks at <http://cwbuecheler.com/web/tutorials/2013/javascript-callbacks/>.
342345

343-
**MAJOR TIPS:** As described in the [**Installing**](#installing) section:
344-
- It is recommended to use the `--save` flag when installing plugins to track them in `config.xml` _in case of Cordova CLI pre-7.x_. If all plugins are tracked in `config.xml` then there is no need to commit the `plugins` subdirectory tree into the source repository.
346+
**MAJOR TIPS:** As described in the [Installing](#installing) section:
347+
348+
- In case of extra-old Cordova CLI pre-7.0, it is recommended to use the `--save` flag when installing plugins to add them to `config.xml` / `package.json`. (This is automatic starting with Cordova CLI 7.0.)
349+
- Assuming that all plugins are added to `config.xml` or `package.json`, there is no need to commit the `plugins` subdirectory tree into the source repository.
345350
- In general it is *not* recommended to commit the `platforms` subdirectory tree into the source repository.
346351

347352
**NOTICE:** This plugin is only supported with the Cordova CLI. This plugin is *not* supported with other Cordova/PhoneGap systems such as PhoneGap CLI, PhoneGap Build, Plugman, Intel XDK, Webstorm, etc.
@@ -867,7 +872,7 @@ where the `iosDatabaseLocation` option may be set to one of the following choice
867872

868873
**WARNING:** Again, the new "default" iosDatabaseLocation value is *NOT* the same as the old default location and would break an upgrade for an app using the old default value (0) on iOS.
869874

870-
DEPRECATED ALTERNATIVE to be removed in September 2018:
875+
DEPRECATED ALTERNATIVE to be removed in an upcoming release:
871876
- `var db = window.sqlitePlugin.openDatabase({name: "my.db", location: 1}, successcb, errorcb);`
872877

873878
with the `location` option set to one the following choices (affects iOS *only*):
@@ -1443,9 +1448,10 @@ cordova prepare # OPTIONAL (MAY BE NEEDED cordova-ios pre-4.3.0 (Cordova CLI pre
14431448

14441449
**Additional Cordova CLI NOTES:**
14451450

1446-
- In case of Cordova CLI pre-7.0 it is recommended to add plugins including standard plugins such as `cordova-plugin-whitelist` with the `--save` flag to track these in `config.xml` (automatically saved in `config.xml` starting with Cordova CLI 7.0).
1447-
- In general there is no need to keep the Cordova `platforms` subdirectory tree in source code control (such as git). In case ALL plugins are tracked in `config.xml` (automatic starting with Cordova CLI 7.0, `--save` flag needed for Cordova CLI pre-7.0) then there is no need to keep the `plugins` subdirectory tree in source code control either.
1448-
- It may be necessary to use `cordova prepare` in case of cordova-ios older than `4.3.0` (Cordova CLI `6.4.0`).
1451+
- As stated above:
1452+
- In case of Cordova CLI pre-7.0 it is recommended to add plugins including standard plugins such as `cordova-plugin-whitelist` with the `--save` flag to track these in `config.xml` (automatically saved in `config.xml` / `package.json` starting with Cordova CLI 7.0).
1453+
- In general there is no need to keep the Cordova `platforms` subdirectory tree in source code control (such as git). In case ALL plugins are tracked in `config.xml` or `package.json` (automatic starting with Cordova CLI 7.0, `--save` flag needed for Cordova CLI pre-7.0) then there is no need to keep the `plugins` subdirectory tree in source code control either.
1454+
- It may be necessary to use `cordova prepare` in case of `cordova-ios` older than `4.3.0` (Cordova CLI `6.4.0`) or `cordova-osx`.
14491455
- In case of problems with building and running it is recommended to try again after `cordova prepare`.
14501456
- If you cannot build for a platform after `cordova prepare`, you may have to remove the platform and add it again, such as:
14511457

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -35,7 +35,7 @@
3535
"cordova-sqlite-storage-dependencies": "3.0.0"
3636
},
3737
"scripts": {
38-
"clean-spec": "rm -rf spec/[mnp]* && git cl spec/config.xml && git status --ignored",
38+
"clean-spec": "rm -rf spec/[mnp]* && git cl spec/config.xml spec/package.json && git status --ignored",
3939
"prepare-js": "coffee -p SQLitePlugin.coffee.md > www/SQLitePlugin.js",
4040
"prepare-spec": "node scripts/prepareSpec.js"
4141
},

plugin.xml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -74,7 +74,7 @@
7474
<platform name="osx">
7575
<config-file target="config.xml" parent="/*">
7676
<feature name="SQLitePlugin">
77-
<param name="ios-package" value="SQLitePlugin" />
77+
<param name="osx-package" value="SQLitePlugin" />
7878
</feature>
7979
</config-file>
8080

spec/package.json

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
{
2+
"name": "cordova-sqlite-spec",
3+
"cordova": {}
4+
}

src/android/io/sqlc/SQLiteAndroidDatabase.java

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,8 @@
1010
import android.database.CursorWindow;
1111

1212
import android.database.sqlite.SQLiteConstraintException;
13-
import android.database.sqlite.SQLiteCursor;
13+
// no longer needed - for pre-Honeycomb NO LONGER SUPPORTED:
14+
// import android.database.sqlite.SQLiteCursor;
1415
import android.database.sqlite.SQLiteDatabase;
1516
import android.database.sqlite.SQLiteException;
1617
import android.database.sqlite.SQLiteStatement;

src/android/io/sqlc/SQLiteConnectorDatabase.java

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -10,14 +10,10 @@
1010

1111
import java.io.File;
1212

13-
import java.lang.IllegalArgumentException;
1413
import java.lang.Number;
1514

1615
import java.sql.SQLException;
1716

18-
import java.util.regex.Matcher;
19-
import java.util.regex.Pattern;
20-
2117
import org.apache.cordova.CallbackContext;
2218

2319
import org.json.JSONArray;

src/android/io/sqlc/SQLitePlugin.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,9 +11,9 @@
1111
import java.io.File;
1212

1313
import java.lang.IllegalArgumentException;
14-
import java.lang.Number;
1514

1615
import java.util.Map;
16+
1717
import java.util.concurrent.BlockingQueue;
1818
import java.util.concurrent.ConcurrentHashMap;
1919
import java.util.concurrent.LinkedBlockingQueue;

src/windows/SQLite3-WinRT-sync/SQLite3/SQLite3.UWP.vcxproj

Lines changed: 20 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,10 +2,12 @@
22
<Project DefaultTargets="Build" ToolsVersion="15.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
33

44
<ItemGroup Label="ProjectConfigurations">
5+
<!-- MOBILE (ARM) NOT SUPPORTED (...)
56
<ProjectConfiguration Include="Debug|ARM">
67
<Configuration>Debug</Configuration>
78
<Platform>ARM</Platform>
89
</ProjectConfiguration>
10+
- -->
911
<ProjectConfiguration Include="Debug|Win32">
1012
<Configuration>Debug</Configuration>
1113
<Platform>Win32</Platform>
@@ -14,10 +16,12 @@
1416
<Configuration>Debug</Configuration>
1517
<Platform>x64</Platform>
1618
</ProjectConfiguration>
19+
<!-- MOBILE (ARM) NOT SUPPORTED (...)
1720
<ProjectConfiguration Include="Release|ARM">
1821
<Configuration>Release</Configuration>
1922
<Platform>ARM</Platform>
2023
</ProjectConfiguration>
24+
- -->
2125
<ProjectConfiguration Include="Release|Win32">
2226
<Configuration>Release</Configuration>
2327
<Platform>Win32</Platform>
@@ -49,11 +53,13 @@
4953
<UseDebugLibraries>true</UseDebugLibraries>
5054
<PlatformToolset>v141</PlatformToolset>
5155
</PropertyGroup>
56+
<!-- MOBILE (ARM) NOT SUPPORTED (...)
5257
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|ARM'" Label="Configuration">
5358
<ConfigurationType>DynamicLibrary</ConfigurationType>
5459
<UseDebugLibraries>true</UseDebugLibraries>
5560
<PlatformToolset>v141</PlatformToolset>
5661
</PropertyGroup>
62+
- -->
5763
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'" Label="Configuration">
5864
<ConfigurationType>DynamicLibrary</ConfigurationType>
5965
<UseDebugLibraries>true</UseDebugLibraries>
@@ -65,12 +71,14 @@
6571
<WholeProgramOptimization>true</WholeProgramOptimization>
6672
<PlatformToolset>v141</PlatformToolset>
6773
</PropertyGroup>
74+
<!-- MOBILE (ARM) NOT SUPPORTED (...)
6875
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|ARM'" Label="Configuration">
6976
<ConfigurationType>DynamicLibrary</ConfigurationType>
7077
<UseDebugLibraries>false</UseDebugLibraries>
7178
<WholeProgramOptimization>true</WholeProgramOptimization>
7279
<PlatformToolset>v141</PlatformToolset>
7380
</PropertyGroup>
81+
- -->
7482
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'" Label="Configuration">
7583
<ConfigurationType>DynamicLibrary</ConfigurationType>
7684
<UseDebugLibraries>false</UseDebugLibraries>
@@ -96,13 +104,17 @@
96104
<Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
97105
</ImportGroup>
98106

107+
<!-- MOBILE (ARM) NOT SUPPORTED (...)
99108
<ImportGroup Label="PropertySheets" Condition="'$(Configuration)|$(Platform)'=='Debug|ARM'">
100109
<Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
101110
</ImportGroup>
111+
- -->
102112

113+
<!-- MOBILE (ARM) NOT SUPPORTED (...)
103114
<ImportGroup Label="PropertySheets" Condition="'$(Configuration)|$(Platform)'=='Release|ARM'">
104115
<Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
105116
</ImportGroup>
117+
- -->
106118

107119
<ImportGroup Label="PropertySheets" Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">
108120
<Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
@@ -123,13 +135,17 @@
123135
<GenerateManifest>false</GenerateManifest>
124136
</PropertyGroup>
125137

138+
<!-- MOBILE (ARM) NOT SUPPORTED (...)
126139
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|ARM'">
127140
<GenerateManifest>false</GenerateManifest>
128141
</PropertyGroup>
142+
- -->
129143

144+
<!-- MOBILE (ARM) NOT SUPPORTED (...)
130145
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|ARM'">
131146
<GenerateManifest>false</GenerateManifest>
132147
</PropertyGroup>
148+
- -->
133149

134150
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">
135151
<GenerateManifest>false</GenerateManifest>
@@ -173,6 +189,7 @@
173189
</Link>
174190
</ItemDefinitionGroup>
175191

192+
<!-- MOBILE (ARM) NOT SUPPORTED (...)
176193
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Debug|ARM'">
177194
<ClCompile>
178195
<PrecompiledHeader>NotUsing</PrecompiledHeader>
@@ -189,7 +206,9 @@
189206
<IgnoreAllDefaultLibraries>false</IgnoreAllDefaultLibraries>
190207
</Link>
191208
</ItemDefinitionGroup>
209+
- -->
192210

211+
<!-- MOBILE (ARM) NOT SUPPORTED (...)
193212
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Release|ARM'">
194213
<ClCompile>
195214
<PrecompiledHeader>NotUsing</PrecompiledHeader>
@@ -207,6 +226,7 @@
207226
<IgnoreAllDefaultLibraries>false</IgnoreAllDefaultLibraries>
208227
</Link>
209228
</ItemDefinitionGroup>
229+
- -->
210230

211231
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">
212232
<ClCompile>

0 commit comments

Comments
 (0)