├── .github └── FUNDING.yml ├── .gitignore ├── LICENSE ├── README.md ├── demo ├── .editorconfig ├── .gitignore ├── App_Resources │ ├── Android │ │ ├── app.gradle │ │ └── src │ │ │ └── main │ │ │ ├── AndroidManifest.xml │ │ │ └── res │ │ │ ├── drawable-hdpi │ │ │ ├── background.png │ │ │ ├── icon.png │ │ │ └── logo.png │ │ │ ├── drawable-ldpi │ │ │ ├── background.png │ │ │ ├── icon.png │ │ │ └── logo.png │ │ │ ├── drawable-mdpi │ │ │ ├── background.png │ │ │ ├── icon.png │ │ │ └── logo.png │ │ │ ├── drawable-nodpi │ │ │ └── splash_screen.xml │ │ │ ├── drawable-xhdpi │ │ │ ├── background.png │ │ │ ├── icon.png │ │ │ └── logo.png │ │ │ ├── drawable-xxhdpi │ │ │ ├── background.png │ │ │ ├── icon.png │ │ │ └── logo.png │ │ │ ├── drawable-xxxhdpi │ │ │ ├── background.png │ │ │ ├── icon.png │ │ │ └── logo.png │ │ │ ├── mipmap-hdpi │ │ │ └── ic_launcher.png │ │ │ ├── mipmap-mdpi │ │ │ └── ic_launcher.png │ │ │ ├── mipmap-xhdpi │ │ │ └── ic_launcher.png │ │ │ ├── mipmap-xxhdpi │ │ │ └── ic_launcher.png │ │ │ ├── mipmap-xxxhdpi │ │ │ └── ic_launcher.png │ │ │ ├── values-v21 │ │ │ ├── colors.xml │ │ │ └── styles.xml │ │ │ ├── values-v29 │ │ │ └── styles.xml │ │ │ └── values │ │ │ ├── colors.xml │ │ │ ├── ic_launcher_background.xml │ │ │ └── styles.xml │ └── iOS │ │ ├── Assets.xcassets │ │ ├── AppIcon.appiconset │ │ │ ├── Contents.json │ │ │ ├── icon-1024.png │ │ │ ├── icon-20.png │ │ │ ├── icon-20@2x.png │ │ │ ├── icon-20@3x.png │ │ │ ├── icon-29.png │ │ │ ├── icon-29@2x.png │ │ │ ├── icon-29@3x.png │ │ │ ├── icon-40.png │ │ │ ├── icon-40@2x.png │ │ │ ├── icon-40@3x.png │ │ │ ├── icon-60@2x.png │ │ │ ├── icon-60@3x.png │ │ │ ├── icon-76.png │ │ │ ├── icon-76@2x.png │ │ │ └── icon-83.5@2x.png │ │ ├── Contents.json │ │ ├── LaunchImage.launchimage │ │ │ ├── Contents.json │ │ │ ├── Default-1125h.png │ │ │ ├── Default-568h@2x.png │ │ │ ├── Default-667h@2x.png │ │ │ ├── Default-736h@3x.png │ │ │ ├── Default-Landscape-X.png │ │ │ ├── Default-Landscape-XR.png │ │ │ ├── Default-Landscape-XS-Max.png │ │ │ ├── Default-Landscape.png │ │ │ ├── Default-Landscape@2x.png │ │ │ ├── Default-Landscape@3x.png │ │ │ ├── Default-Portrait-XR.png │ │ │ ├── Default-Portrait-XS-Max.png │ │ │ ├── Default-Portrait.png │ │ │ ├── Default-Portrait@2x.png │ │ │ ├── Default.png │ │ │ └── Default@2x.png │ │ ├── LaunchScreen.AspectFill.imageset │ │ │ ├── Contents.json │ │ │ ├── LaunchScreen-AspectFill.png │ │ │ ├── LaunchScreen-AspectFill@2x.png │ │ │ └── LaunchScreen-AspectFill@3x.png │ │ └── LaunchScreen.Center.imageset │ │ │ ├── Contents.json │ │ │ ├── LaunchScreen-Center.png │ │ │ ├── LaunchScreen-Center@2x.png │ │ │ └── LaunchScreen-Center@3x.png │ │ ├── Info.plist │ │ ├── LaunchScreen.storyboard │ │ └── build.xcconfig ├── app │ ├── app-root.xml │ ├── app.css │ ├── app.js │ ├── encrypted.sqlite │ ├── icon.sqlite │ ├── main-page.js │ ├── main-page.xml │ ├── name_db.sqlite │ └── sqlite_syncer.js ├── jsconfig.json ├── nativescript.config.ts ├── package.json └── webpack.config.js ├── src ├── .npmignore ├── LICENSE ├── README.md ├── changelog ├── contributors.md ├── nativescript.webpack.js ├── package.json ├── platforms │ └── ios │ │ ├── build.xcconfig │ │ └── module.modulemap ├── sqlite-internal.android.js ├── sqlite-internal.ios.js └── sqlite.js └── tsconfig.json /.github/FUNDING.yml: -------------------------------------------------------------------------------- 1 | github: NathanaelA 2 | patreon: NathanaelA 3 | custom: https://www.paypal.me/MasterTechnology 4 | -------------------------------------------------------------------------------- /.gitignore: -------------------------------------------------------------------------------- 1 | .idea 2 | *.tgz 3 | *.tar 4 | node_modules/ 5 | demoos/ 6 | *.zip 7 | package-lock.json 8 | 9 | demo/hooks/ 10 | demo/platforms/ 11 | 12 | demo-sync/ 13 | old/ 14 | graphics/ 15 | encrypted/ 16 | commercial/ 17 | sync/ 18 | 19 | # Commercial Only 20 | sqlite.d.ts 21 | -------------------------------------------------------------------------------- /LICENSE: -------------------------------------------------------------------------------- 1 | The MIT License (MIT) 2 | 3 | Copyright (c) 2015-2019 Nathanael Anderson 4 | 5 | Permission is hereby granted, free of charge, to any person obtaining a copy 6 | of this software and associated documentation files (the "Software"), to deal 7 | in the Software without restriction, including without limitation the rights 8 | to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 9 | copies of the Software, and to permit persons to whom the Software is 10 | furnished to do so, subject to the following conditions: 11 | 12 | The above copyright notice and this permission notice shall be included in all 13 | copies or substantial portions of the Software. 14 | 15 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 16 | IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 17 | FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 18 | AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 19 | LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 20 | OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE 21 | SOFTWARE. 22 | 23 | -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- 1 | # Archived Public Repo 2 | See: https://fluentreports.com/blog/?p=1434 3 | - If you want any support, you can purchase it here: https://nativescript.tools/product/10 4 | - If you are already a paid customer please post any issues here: https://git.master-technology.com/nativescript-sqlite/nativescript-sqlite 5 | 6 | 7 | 8 | ## NativeScript-sqlite 9 | 10 |

11 | 12 | ## Developed & Sponsored by 13 | [![MasterTech](https://proplugins.org/logos/mt-banner.png)](https://master.technology) 14 | 15 | ## Documentation 16 | The [documentation](src/README.md) for the plugin is located in the [src folder](src). 17 | 18 | 19 | ## Commercial Options 20 | The [commercial version](https://nativescript.tools/product/10) comes with the following enhancements: 21 | - TypeScript definitions 22 | - Totally backwards compatible with the free version 23 | - Prepared statements 24 | - Multilevel transaction support 25 | - Encryption 26 | - Run multiple queries per call (i.e. get(["select 1", "select 2", "select 3"])) 27 | - **Multi-threading** 28 | 29 | ## Installation 30 | - tns plugin add nativescript-sqlite@latest 31 | 32 | ### Installation of Encrypted Plugin (Provides encryption support) 33 | - tns plugin add nativescript-sqlite-encrypted-1.5.0.tgz 34 | 35 | ### Installation of Commercial Plugin (Provides Transactions, Prepared statements, multiple queries) 36 | - tns plugin add nativescript-sqlite-commercial-1.4.2.tgz 37 | -------------------------------------------------------------------------------- /demo/.editorconfig: -------------------------------------------------------------------------------- 1 | root = true 2 | 3 | [*] 4 | end_of_line = lf 5 | insert_final_newline = true 6 | trim_trailing_whitespace = true 7 | charset = utf-8 8 | 9 | [*.json] 10 | indent_style = space 11 | indent_size = 2 12 | 13 | [*.js] 14 | indent_style = space 15 | indent_size = 2 16 | 17 | [*.ts] 18 | indent_style = space 19 | indent_size = 2 -------------------------------------------------------------------------------- /demo/.gitignore: -------------------------------------------------------------------------------- 1 | # NativeScript 2 | hooks/ 3 | node_modules/ 4 | platforms/ 5 | 6 | # Logs 7 | logs 8 | *.log 9 | npm-debug.log* 10 | yarn-debug.log* 11 | yarn-error.log* 12 | 13 | # General 14 | .DS_Store 15 | .AppleDouble 16 | .LSOverride 17 | .idea 18 | .cloud 19 | .project 20 | tmp/ 21 | typings/ 22 | 23 | app/test.sqlite 24 | app/test2.sqlite 25 | beta-250/ 26 | 27 | # Visual Studio Code 28 | .vscode/* 29 | !.vscode/settings.json 30 | !.vscode/tasks.json 31 | !.vscode/launch.json 32 | !.vscode/extensions.json 33 | -------------------------------------------------------------------------------- /demo/App_Resources/Android/app.gradle: -------------------------------------------------------------------------------- 1 | // Add your native dependencies here: 2 | 3 | // Uncomment to add recyclerview-v7 dependency 4 | //dependencies { 5 | // implementation 'com.android.support:recyclerview-v7:+' 6 | //} 7 | 8 | // If you want to add something to be applied before applying plugins' include.gradle files 9 | // e.g. project.ext.googlePlayServicesVersion = "15.0.1" 10 | // create a file named before-plugins.gradle in the current directory and place it there 11 | 12 | android { 13 | defaultConfig { 14 | minSdkVersion 17 15 | generatedDensities = [] 16 | } 17 | aaptOptions { 18 | additionalParameters "--no-version-vectors" 19 | } 20 | } 21 | -------------------------------------------------------------------------------- /demo/App_Resources/Android/src/main/AndroidManifest.xml: -------------------------------------------------------------------------------- 1 | 2 | 6 | 7 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | 24 | 25 | 30 | 31 | 32 | 33 | 34 | 35 | 36 | 37 | 38 | 39 | 40 | 41 | -------------------------------------------------------------------------------- /demo/App_Resources/Android/src/main/res/drawable-hdpi/background.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/NathanaelA/nativescript-sqlite/0cf65148fc786bc56edf2396c12b4ec52670d164/demo/App_Resources/Android/src/main/res/drawable-hdpi/background.png -------------------------------------------------------------------------------- /demo/App_Resources/Android/src/main/res/drawable-hdpi/icon.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/NathanaelA/nativescript-sqlite/0cf65148fc786bc56edf2396c12b4ec52670d164/demo/App_Resources/Android/src/main/res/drawable-hdpi/icon.png -------------------------------------------------------------------------------- /demo/App_Resources/Android/src/main/res/drawable-hdpi/logo.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/NathanaelA/nativescript-sqlite/0cf65148fc786bc56edf2396c12b4ec52670d164/demo/App_Resources/Android/src/main/res/drawable-hdpi/logo.png -------------------------------------------------------------------------------- /demo/App_Resources/Android/src/main/res/drawable-ldpi/background.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/NathanaelA/nativescript-sqlite/0cf65148fc786bc56edf2396c12b4ec52670d164/demo/App_Resources/Android/src/main/res/drawable-ldpi/background.png -------------------------------------------------------------------------------- /demo/App_Resources/Android/src/main/res/drawable-ldpi/icon.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/NathanaelA/nativescript-sqlite/0cf65148fc786bc56edf2396c12b4ec52670d164/demo/App_Resources/Android/src/main/res/drawable-ldpi/icon.png -------------------------------------------------------------------------------- /demo/App_Resources/Android/src/main/res/drawable-ldpi/logo.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/NathanaelA/nativescript-sqlite/0cf65148fc786bc56edf2396c12b4ec52670d164/demo/App_Resources/Android/src/main/res/drawable-ldpi/logo.png -------------------------------------------------------------------------------- /demo/App_Resources/Android/src/main/res/drawable-mdpi/background.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/NathanaelA/nativescript-sqlite/0cf65148fc786bc56edf2396c12b4ec52670d164/demo/App_Resources/Android/src/main/res/drawable-mdpi/background.png -------------------------------------------------------------------------------- /demo/App_Resources/Android/src/main/res/drawable-mdpi/icon.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/NathanaelA/nativescript-sqlite/0cf65148fc786bc56edf2396c12b4ec52670d164/demo/App_Resources/Android/src/main/res/drawable-mdpi/icon.png -------------------------------------------------------------------------------- /demo/App_Resources/Android/src/main/res/drawable-mdpi/logo.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/NathanaelA/nativescript-sqlite/0cf65148fc786bc56edf2396c12b4ec52670d164/demo/App_Resources/Android/src/main/res/drawable-mdpi/logo.png -------------------------------------------------------------------------------- /demo/App_Resources/Android/src/main/res/drawable-nodpi/splash_screen.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | -------------------------------------------------------------------------------- /demo/App_Resources/Android/src/main/res/drawable-xhdpi/background.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/NathanaelA/nativescript-sqlite/0cf65148fc786bc56edf2396c12b4ec52670d164/demo/App_Resources/Android/src/main/res/drawable-xhdpi/background.png -------------------------------------------------------------------------------- /demo/App_Resources/Android/src/main/res/drawable-xhdpi/icon.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/NathanaelA/nativescript-sqlite/0cf65148fc786bc56edf2396c12b4ec52670d164/demo/App_Resources/Android/src/main/res/drawable-xhdpi/icon.png -------------------------------------------------------------------------------- /demo/App_Resources/Android/src/main/res/drawable-xhdpi/logo.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/NathanaelA/nativescript-sqlite/0cf65148fc786bc56edf2396c12b4ec52670d164/demo/App_Resources/Android/src/main/res/drawable-xhdpi/logo.png -------------------------------------------------------------------------------- /demo/App_Resources/Android/src/main/res/drawable-xxhdpi/background.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/NathanaelA/nativescript-sqlite/0cf65148fc786bc56edf2396c12b4ec52670d164/demo/App_Resources/Android/src/main/res/drawable-xxhdpi/background.png -------------------------------------------------------------------------------- /demo/App_Resources/Android/src/main/res/drawable-xxhdpi/icon.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/NathanaelA/nativescript-sqlite/0cf65148fc786bc56edf2396c12b4ec52670d164/demo/App_Resources/Android/src/main/res/drawable-xxhdpi/icon.png -------------------------------------------------------------------------------- /demo/App_Resources/Android/src/main/res/drawable-xxhdpi/logo.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/NathanaelA/nativescript-sqlite/0cf65148fc786bc56edf2396c12b4ec52670d164/demo/App_Resources/Android/src/main/res/drawable-xxhdpi/logo.png -------------------------------------------------------------------------------- /demo/App_Resources/Android/src/main/res/drawable-xxxhdpi/background.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/NathanaelA/nativescript-sqlite/0cf65148fc786bc56edf2396c12b4ec52670d164/demo/App_Resources/Android/src/main/res/drawable-xxxhdpi/background.png -------------------------------------------------------------------------------- /demo/App_Resources/Android/src/main/res/drawable-xxxhdpi/icon.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/NathanaelA/nativescript-sqlite/0cf65148fc786bc56edf2396c12b4ec52670d164/demo/App_Resources/Android/src/main/res/drawable-xxxhdpi/icon.png -------------------------------------------------------------------------------- /demo/App_Resources/Android/src/main/res/drawable-xxxhdpi/logo.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/NathanaelA/nativescript-sqlite/0cf65148fc786bc56edf2396c12b4ec52670d164/demo/App_Resources/Android/src/main/res/drawable-xxxhdpi/logo.png -------------------------------------------------------------------------------- /demo/App_Resources/Android/src/main/res/mipmap-hdpi/ic_launcher.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/NathanaelA/nativescript-sqlite/0cf65148fc786bc56edf2396c12b4ec52670d164/demo/App_Resources/Android/src/main/res/mipmap-hdpi/ic_launcher.png -------------------------------------------------------------------------------- /demo/App_Resources/Android/src/main/res/mipmap-mdpi/ic_launcher.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/NathanaelA/nativescript-sqlite/0cf65148fc786bc56edf2396c12b4ec52670d164/demo/App_Resources/Android/src/main/res/mipmap-mdpi/ic_launcher.png -------------------------------------------------------------------------------- /demo/App_Resources/Android/src/main/res/mipmap-xhdpi/ic_launcher.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/NathanaelA/nativescript-sqlite/0cf65148fc786bc56edf2396c12b4ec52670d164/demo/App_Resources/Android/src/main/res/mipmap-xhdpi/ic_launcher.png -------------------------------------------------------------------------------- /demo/App_Resources/Android/src/main/res/mipmap-xxhdpi/ic_launcher.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/NathanaelA/nativescript-sqlite/0cf65148fc786bc56edf2396c12b4ec52670d164/demo/App_Resources/Android/src/main/res/mipmap-xxhdpi/ic_launcher.png -------------------------------------------------------------------------------- /demo/App_Resources/Android/src/main/res/mipmap-xxxhdpi/ic_launcher.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/NathanaelA/nativescript-sqlite/0cf65148fc786bc56edf2396c12b4ec52670d164/demo/App_Resources/Android/src/main/res/mipmap-xxxhdpi/ic_launcher.png -------------------------------------------------------------------------------- /demo/App_Resources/Android/src/main/res/values-v21/colors.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | #3d5afe 4 | -------------------------------------------------------------------------------- /demo/App_Resources/Android/src/main/res/values-v21/styles.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 10 | 11 | 13 | 14 | 15 | 18 | 19 | 20 | 23 | 24 | 28 | -------------------------------------------------------------------------------- /demo/App_Resources/Android/src/main/res/values-v29/styles.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 8 | 9 | 11 | 12 | -------------------------------------------------------------------------------- /demo/App_Resources/Android/src/main/res/values/colors.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | #F5F5F5 4 | #757575 5 | #33B5E5 6 | #272734 7 | #36b115 8 | #960b0b 9 | 10 | -------------------------------------------------------------------------------- /demo/App_Resources/Android/src/main/res/values/ic_launcher_background.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | #FFFFFF 4 | -------------------------------------------------------------------------------- /demo/App_Resources/Android/src/main/res/values/styles.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 18 | 19 | 21 | 22 | 23 | 31 | 32 | 34 | 35 | 36 | 42 | 43 | 45 | 46 | -------------------------------------------------------------------------------- /demo/App_Resources/iOS/Assets.xcassets/AppIcon.appiconset/Contents.json: -------------------------------------------------------------------------------- 1 | { 2 | "images" : [ 3 | { 4 | "size" : "20x20", 5 | "idiom" : "iphone", 6 | "filename" : "icon-20@2x.png", 7 | "scale" : "2x" 8 | }, 9 | { 10 | "size" : "20x20", 11 | "idiom" : "iphone", 12 | "filename" : "icon-20@3x.png", 13 | "scale" : "3x" 14 | }, 15 | { 16 | "size" : "29x29", 17 | "idiom" : "iphone", 18 | "filename" : "icon-29.png", 19 | "scale" : "1x" 20 | }, 21 | { 22 | "size" : "29x29", 23 | "idiom" : "iphone", 24 | "filename" : "icon-29@2x.png", 25 | "scale" : "2x" 26 | }, 27 | { 28 | "size" : "29x29", 29 | "idiom" : "iphone", 30 | "filename" : "icon-29@3x.png", 31 | "scale" : "3x" 32 | }, 33 | { 34 | "size" : "40x40", 35 | "idiom" : "iphone", 36 | "filename" : "icon-40@2x.png", 37 | "scale" : "2x" 38 | }, 39 | { 40 | "size" : "40x40", 41 | "idiom" : "iphone", 42 | "filename" : "icon-40@3x.png", 43 | "scale" : "3x" 44 | }, 45 | { 46 | "size" : "60x60", 47 | "idiom" : "iphone", 48 | "filename" : "icon-60@2x.png", 49 | "scale" : "2x" 50 | }, 51 | { 52 | "size" : "60x60", 53 | "idiom" : "iphone", 54 | "filename" : "icon-60@3x.png", 55 | "scale" : "3x" 56 | }, 57 | { 58 | "size" : "20x20", 59 | "idiom" : "ipad", 60 | "filename" : "icon-20.png", 61 | "scale" : "1x" 62 | }, 63 | { 64 | "size" : "20x20", 65 | "idiom" : "ipad", 66 | "filename" : "icon-20@2x.png", 67 | "scale" : "2x" 68 | }, 69 | { 70 | "size" : "29x29", 71 | "idiom" : "ipad", 72 | "filename" : "icon-29.png", 73 | "scale" : "1x" 74 | }, 75 | { 76 | "size" : "29x29", 77 | "idiom" : "ipad", 78 | "filename" : "icon-29@2x.png", 79 | "scale" : "2x" 80 | }, 81 | { 82 | "size" : "40x40", 83 | "idiom" : "ipad", 84 | "filename" : "icon-40.png", 85 | "scale" : "1x" 86 | }, 87 | { 88 | "size" : "40x40", 89 | "idiom" : "ipad", 90 | "filename" : "icon-40@2x.png", 91 | "scale" : "2x" 92 | }, 93 | { 94 | "size" : "76x76", 95 | "idiom" : "ipad", 96 | "filename" : "icon-76.png", 97 | "scale" : "1x" 98 | }, 99 | { 100 | "size" : "76x76", 101 | "idiom" : "ipad", 102 | "filename" : "icon-76@2x.png", 103 | "scale" : "2x" 104 | }, 105 | { 106 | "size" : "83.5x83.5", 107 | "idiom" : "ipad", 108 | "filename" : "icon-83.5@2x.png", 109 | "scale" : "2x" 110 | }, 111 | { 112 | "size" : "1024x1024", 113 | "idiom" : "ios-marketing", 114 | "filename" : "icon-1024.png", 115 | "scale" : "1x" 116 | } 117 | ], 118 | "info" : { 119 | "version" : 1, 120 | "author" : "xcode" 121 | } 122 | } -------------------------------------------------------------------------------- /demo/App_Resources/iOS/Assets.xcassets/AppIcon.appiconset/icon-1024.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/NathanaelA/nativescript-sqlite/0cf65148fc786bc56edf2396c12b4ec52670d164/demo/App_Resources/iOS/Assets.xcassets/AppIcon.appiconset/icon-1024.png -------------------------------------------------------------------------------- /demo/App_Resources/iOS/Assets.xcassets/AppIcon.appiconset/icon-20.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/NathanaelA/nativescript-sqlite/0cf65148fc786bc56edf2396c12b4ec52670d164/demo/App_Resources/iOS/Assets.xcassets/AppIcon.appiconset/icon-20.png -------------------------------------------------------------------------------- /demo/App_Resources/iOS/Assets.xcassets/AppIcon.appiconset/icon-20@2x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/NathanaelA/nativescript-sqlite/0cf65148fc786bc56edf2396c12b4ec52670d164/demo/App_Resources/iOS/Assets.xcassets/AppIcon.appiconset/icon-20@2x.png -------------------------------------------------------------------------------- /demo/App_Resources/iOS/Assets.xcassets/AppIcon.appiconset/icon-20@3x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/NathanaelA/nativescript-sqlite/0cf65148fc786bc56edf2396c12b4ec52670d164/demo/App_Resources/iOS/Assets.xcassets/AppIcon.appiconset/icon-20@3x.png -------------------------------------------------------------------------------- /demo/App_Resources/iOS/Assets.xcassets/AppIcon.appiconset/icon-29.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/NathanaelA/nativescript-sqlite/0cf65148fc786bc56edf2396c12b4ec52670d164/demo/App_Resources/iOS/Assets.xcassets/AppIcon.appiconset/icon-29.png -------------------------------------------------------------------------------- /demo/App_Resources/iOS/Assets.xcassets/AppIcon.appiconset/icon-29@2x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/NathanaelA/nativescript-sqlite/0cf65148fc786bc56edf2396c12b4ec52670d164/demo/App_Resources/iOS/Assets.xcassets/AppIcon.appiconset/icon-29@2x.png -------------------------------------------------------------------------------- /demo/App_Resources/iOS/Assets.xcassets/AppIcon.appiconset/icon-29@3x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/NathanaelA/nativescript-sqlite/0cf65148fc786bc56edf2396c12b4ec52670d164/demo/App_Resources/iOS/Assets.xcassets/AppIcon.appiconset/icon-29@3x.png -------------------------------------------------------------------------------- /demo/App_Resources/iOS/Assets.xcassets/AppIcon.appiconset/icon-40.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/NathanaelA/nativescript-sqlite/0cf65148fc786bc56edf2396c12b4ec52670d164/demo/App_Resources/iOS/Assets.xcassets/AppIcon.appiconset/icon-40.png -------------------------------------------------------------------------------- /demo/App_Resources/iOS/Assets.xcassets/AppIcon.appiconset/icon-40@2x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/NathanaelA/nativescript-sqlite/0cf65148fc786bc56edf2396c12b4ec52670d164/demo/App_Resources/iOS/Assets.xcassets/AppIcon.appiconset/icon-40@2x.png -------------------------------------------------------------------------------- /demo/App_Resources/iOS/Assets.xcassets/AppIcon.appiconset/icon-40@3x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/NathanaelA/nativescript-sqlite/0cf65148fc786bc56edf2396c12b4ec52670d164/demo/App_Resources/iOS/Assets.xcassets/AppIcon.appiconset/icon-40@3x.png -------------------------------------------------------------------------------- /demo/App_Resources/iOS/Assets.xcassets/AppIcon.appiconset/icon-60@2x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/NathanaelA/nativescript-sqlite/0cf65148fc786bc56edf2396c12b4ec52670d164/demo/App_Resources/iOS/Assets.xcassets/AppIcon.appiconset/icon-60@2x.png -------------------------------------------------------------------------------- /demo/App_Resources/iOS/Assets.xcassets/AppIcon.appiconset/icon-60@3x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/NathanaelA/nativescript-sqlite/0cf65148fc786bc56edf2396c12b4ec52670d164/demo/App_Resources/iOS/Assets.xcassets/AppIcon.appiconset/icon-60@3x.png -------------------------------------------------------------------------------- /demo/App_Resources/iOS/Assets.xcassets/AppIcon.appiconset/icon-76.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/NathanaelA/nativescript-sqlite/0cf65148fc786bc56edf2396c12b4ec52670d164/demo/App_Resources/iOS/Assets.xcassets/AppIcon.appiconset/icon-76.png -------------------------------------------------------------------------------- /demo/App_Resources/iOS/Assets.xcassets/AppIcon.appiconset/icon-76@2x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/NathanaelA/nativescript-sqlite/0cf65148fc786bc56edf2396c12b4ec52670d164/demo/App_Resources/iOS/Assets.xcassets/AppIcon.appiconset/icon-76@2x.png -------------------------------------------------------------------------------- /demo/App_Resources/iOS/Assets.xcassets/AppIcon.appiconset/icon-83.5@2x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/NathanaelA/nativescript-sqlite/0cf65148fc786bc56edf2396c12b4ec52670d164/demo/App_Resources/iOS/Assets.xcassets/AppIcon.appiconset/icon-83.5@2x.png -------------------------------------------------------------------------------- /demo/App_Resources/iOS/Assets.xcassets/Contents.json: -------------------------------------------------------------------------------- 1 | { 2 | "info" : { 3 | "version" : 1, 4 | "author" : "xcode" 5 | } 6 | } -------------------------------------------------------------------------------- /demo/App_Resources/iOS/Assets.xcassets/LaunchImage.launchimage/Contents.json: -------------------------------------------------------------------------------- 1 | { 2 | "images" : [ 3 | { 4 | "extent" : "full-screen", 5 | "idiom" : "iphone", 6 | "subtype" : "2688h", 7 | "filename" : "Default-Portrait-XS-Max.png", 8 | "minimum-system-version" : "12.0", 9 | "orientation" : "portrait", 10 | "scale" : "3x" 11 | }, 12 | { 13 | "extent" : "full-screen", 14 | "idiom" : "iphone", 15 | "subtype" : "2688h", 16 | "filename" : "Default-Landscape-XS-Max.png", 17 | "minimum-system-version" : "12.0", 18 | "orientation" : "landscape", 19 | "scale" : "3x" 20 | }, 21 | { 22 | "extent" : "full-screen", 23 | "idiom" : "iphone", 24 | "subtype" : "1792h", 25 | "filename" : "Default-Portrait-XR.png", 26 | "minimum-system-version" : "12.0", 27 | "orientation" : "portrait", 28 | "scale" : "2x" 29 | }, 30 | { 31 | "extent" : "full-screen", 32 | "idiom" : "iphone", 33 | "subtype" : "1792h", 34 | "filename" : "Default-Landscape-XR.png", 35 | "minimum-system-version" : "12.0", 36 | "orientation" : "landscape", 37 | "scale" : "2x" 38 | }, 39 | { 40 | "extent" : "full-screen", 41 | "idiom" : "iphone", 42 | "subtype" : "2436h", 43 | "filename" : "Default-1125h.png", 44 | "minimum-system-version" : "11.0", 45 | "orientation" : "portrait", 46 | "scale" : "3x" 47 | }, 48 | { 49 | "extent" : "full-screen", 50 | "idiom" : "iphone", 51 | "subtype" : "2436h", 52 | "filename" : "Default-Landscape-X.png", 53 | "minimum-system-version" : "11.0", 54 | "orientation" : "landscape", 55 | "scale" : "3x" 56 | }, 57 | { 58 | "extent" : "full-screen", 59 | "idiom" : "iphone", 60 | "subtype" : "736h", 61 | "filename" : "Default-736h@3x.png", 62 | "minimum-system-version" : "8.0", 63 | "orientation" : "portrait", 64 | "scale" : "3x" 65 | }, 66 | { 67 | "extent" : "full-screen", 68 | "idiom" : "iphone", 69 | "subtype" : "736h", 70 | "filename" : "Default-Landscape@3x.png", 71 | "minimum-system-version" : "8.0", 72 | "orientation" : "landscape", 73 | "scale" : "3x" 74 | }, 75 | { 76 | "extent" : "full-screen", 77 | "idiom" : "iphone", 78 | "subtype" : "667h", 79 | "filename" : "Default-667h@2x.png", 80 | "minimum-system-version" : "8.0", 81 | "orientation" : "portrait", 82 | "scale" : "2x" 83 | }, 84 | { 85 | "orientation" : "portrait", 86 | "idiom" : "iphone", 87 | "filename" : "Default@2x.png", 88 | "extent" : "full-screen", 89 | "minimum-system-version" : "7.0", 90 | "scale" : "2x" 91 | }, 92 | { 93 | "extent" : "full-screen", 94 | "idiom" : "iphone", 95 | "subtype" : "retina4", 96 | "filename" : "Default-568h@2x.png", 97 | "minimum-system-version" : "7.0", 98 | "orientation" : "portrait", 99 | "scale" : "2x" 100 | }, 101 | { 102 | "orientation" : "portrait", 103 | "idiom" : "ipad", 104 | "filename" : "Default-Portrait.png", 105 | "extent" : "full-screen", 106 | "minimum-system-version" : "7.0", 107 | "scale" : "1x" 108 | }, 109 | { 110 | "orientation" : "landscape", 111 | "idiom" : "ipad", 112 | "filename" : "Default-Landscape.png", 113 | "extent" : "full-screen", 114 | "minimum-system-version" : "7.0", 115 | "scale" : "1x" 116 | }, 117 | { 118 | "orientation" : "portrait", 119 | "idiom" : "ipad", 120 | "filename" : "Default-Portrait@2x.png", 121 | "extent" : "full-screen", 122 | "minimum-system-version" : "7.0", 123 | "scale" : "2x" 124 | }, 125 | { 126 | "orientation" : "landscape", 127 | "idiom" : "ipad", 128 | "filename" : "Default-Landscape@2x.png", 129 | "extent" : "full-screen", 130 | "minimum-system-version" : "7.0", 131 | "scale" : "2x" 132 | }, 133 | { 134 | "orientation" : "portrait", 135 | "idiom" : "iphone", 136 | "filename" : "Default.png", 137 | "extent" : "full-screen", 138 | "scale" : "1x" 139 | }, 140 | { 141 | "orientation" : "portrait", 142 | "idiom" : "iphone", 143 | "filename" : "Default@2x.png", 144 | "extent" : "full-screen", 145 | "scale" : "2x" 146 | }, 147 | { 148 | "orientation" : "portrait", 149 | "idiom" : "iphone", 150 | "filename" : "Default-568h@2x.png", 151 | "extent" : "full-screen", 152 | "subtype" : "retina4", 153 | "scale" : "2x" 154 | }, 155 | { 156 | "orientation" : "portrait", 157 | "idiom" : "ipad", 158 | "extent" : "to-status-bar", 159 | "scale" : "1x" 160 | }, 161 | { 162 | "orientation" : "portrait", 163 | "idiom" : "ipad", 164 | "filename" : "Default-Portrait.png", 165 | "extent" : "full-screen", 166 | "scale" : "1x" 167 | }, 168 | { 169 | "orientation" : "landscape", 170 | "idiom" : "ipad", 171 | "extent" : "to-status-bar", 172 | "scale" : "1x" 173 | }, 174 | { 175 | "orientation" : "landscape", 176 | "idiom" : "ipad", 177 | "filename" : "Default-Landscape.png", 178 | "extent" : "full-screen", 179 | "scale" : "1x" 180 | }, 181 | { 182 | "orientation" : "portrait", 183 | "idiom" : "ipad", 184 | "extent" : "to-status-bar", 185 | "scale" : "2x" 186 | }, 187 | { 188 | "orientation" : "portrait", 189 | "idiom" : "ipad", 190 | "filename" : "Default-Portrait@2x.png", 191 | "extent" : "full-screen", 192 | "scale" : "2x" 193 | }, 194 | { 195 | "orientation" : "landscape", 196 | "idiom" : "ipad", 197 | "extent" : "to-status-bar", 198 | "scale" : "2x" 199 | }, 200 | { 201 | "orientation" : "landscape", 202 | "idiom" : "ipad", 203 | "filename" : "Default-Landscape@2x.png", 204 | "extent" : "full-screen", 205 | "scale" : "2x" 206 | } 207 | ], 208 | "info" : { 209 | "version" : 1, 210 | "author" : "xcode" 211 | } 212 | } -------------------------------------------------------------------------------- /demo/App_Resources/iOS/Assets.xcassets/LaunchImage.launchimage/Default-1125h.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/NathanaelA/nativescript-sqlite/0cf65148fc786bc56edf2396c12b4ec52670d164/demo/App_Resources/iOS/Assets.xcassets/LaunchImage.launchimage/Default-1125h.png -------------------------------------------------------------------------------- /demo/App_Resources/iOS/Assets.xcassets/LaunchImage.launchimage/Default-568h@2x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/NathanaelA/nativescript-sqlite/0cf65148fc786bc56edf2396c12b4ec52670d164/demo/App_Resources/iOS/Assets.xcassets/LaunchImage.launchimage/Default-568h@2x.png -------------------------------------------------------------------------------- /demo/App_Resources/iOS/Assets.xcassets/LaunchImage.launchimage/Default-667h@2x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/NathanaelA/nativescript-sqlite/0cf65148fc786bc56edf2396c12b4ec52670d164/demo/App_Resources/iOS/Assets.xcassets/LaunchImage.launchimage/Default-667h@2x.png -------------------------------------------------------------------------------- /demo/App_Resources/iOS/Assets.xcassets/LaunchImage.launchimage/Default-736h@3x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/NathanaelA/nativescript-sqlite/0cf65148fc786bc56edf2396c12b4ec52670d164/demo/App_Resources/iOS/Assets.xcassets/LaunchImage.launchimage/Default-736h@3x.png -------------------------------------------------------------------------------- /demo/App_Resources/iOS/Assets.xcassets/LaunchImage.launchimage/Default-Landscape-X.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/NathanaelA/nativescript-sqlite/0cf65148fc786bc56edf2396c12b4ec52670d164/demo/App_Resources/iOS/Assets.xcassets/LaunchImage.launchimage/Default-Landscape-X.png -------------------------------------------------------------------------------- /demo/App_Resources/iOS/Assets.xcassets/LaunchImage.launchimage/Default-Landscape-XR.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/NathanaelA/nativescript-sqlite/0cf65148fc786bc56edf2396c12b4ec52670d164/demo/App_Resources/iOS/Assets.xcassets/LaunchImage.launchimage/Default-Landscape-XR.png -------------------------------------------------------------------------------- /demo/App_Resources/iOS/Assets.xcassets/LaunchImage.launchimage/Default-Landscape-XS-Max.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/NathanaelA/nativescript-sqlite/0cf65148fc786bc56edf2396c12b4ec52670d164/demo/App_Resources/iOS/Assets.xcassets/LaunchImage.launchimage/Default-Landscape-XS-Max.png -------------------------------------------------------------------------------- /demo/App_Resources/iOS/Assets.xcassets/LaunchImage.launchimage/Default-Landscape.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/NathanaelA/nativescript-sqlite/0cf65148fc786bc56edf2396c12b4ec52670d164/demo/App_Resources/iOS/Assets.xcassets/LaunchImage.launchimage/Default-Landscape.png -------------------------------------------------------------------------------- /demo/App_Resources/iOS/Assets.xcassets/LaunchImage.launchimage/Default-Landscape@2x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/NathanaelA/nativescript-sqlite/0cf65148fc786bc56edf2396c12b4ec52670d164/demo/App_Resources/iOS/Assets.xcassets/LaunchImage.launchimage/Default-Landscape@2x.png -------------------------------------------------------------------------------- /demo/App_Resources/iOS/Assets.xcassets/LaunchImage.launchimage/Default-Landscape@3x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/NathanaelA/nativescript-sqlite/0cf65148fc786bc56edf2396c12b4ec52670d164/demo/App_Resources/iOS/Assets.xcassets/LaunchImage.launchimage/Default-Landscape@3x.png -------------------------------------------------------------------------------- /demo/App_Resources/iOS/Assets.xcassets/LaunchImage.launchimage/Default-Portrait-XR.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/NathanaelA/nativescript-sqlite/0cf65148fc786bc56edf2396c12b4ec52670d164/demo/App_Resources/iOS/Assets.xcassets/LaunchImage.launchimage/Default-Portrait-XR.png -------------------------------------------------------------------------------- /demo/App_Resources/iOS/Assets.xcassets/LaunchImage.launchimage/Default-Portrait-XS-Max.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/NathanaelA/nativescript-sqlite/0cf65148fc786bc56edf2396c12b4ec52670d164/demo/App_Resources/iOS/Assets.xcassets/LaunchImage.launchimage/Default-Portrait-XS-Max.png -------------------------------------------------------------------------------- /demo/App_Resources/iOS/Assets.xcassets/LaunchImage.launchimage/Default-Portrait.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/NathanaelA/nativescript-sqlite/0cf65148fc786bc56edf2396c12b4ec52670d164/demo/App_Resources/iOS/Assets.xcassets/LaunchImage.launchimage/Default-Portrait.png -------------------------------------------------------------------------------- /demo/App_Resources/iOS/Assets.xcassets/LaunchImage.launchimage/Default-Portrait@2x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/NathanaelA/nativescript-sqlite/0cf65148fc786bc56edf2396c12b4ec52670d164/demo/App_Resources/iOS/Assets.xcassets/LaunchImage.launchimage/Default-Portrait@2x.png -------------------------------------------------------------------------------- /demo/App_Resources/iOS/Assets.xcassets/LaunchImage.launchimage/Default.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/NathanaelA/nativescript-sqlite/0cf65148fc786bc56edf2396c12b4ec52670d164/demo/App_Resources/iOS/Assets.xcassets/LaunchImage.launchimage/Default.png -------------------------------------------------------------------------------- /demo/App_Resources/iOS/Assets.xcassets/LaunchImage.launchimage/Default@2x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/NathanaelA/nativescript-sqlite/0cf65148fc786bc56edf2396c12b4ec52670d164/demo/App_Resources/iOS/Assets.xcassets/LaunchImage.launchimage/Default@2x.png -------------------------------------------------------------------------------- /demo/App_Resources/iOS/Assets.xcassets/LaunchScreen.AspectFill.imageset/Contents.json: -------------------------------------------------------------------------------- 1 | { 2 | "images" : [ 3 | { 4 | "idiom" : "universal", 5 | "filename" : "LaunchScreen-AspectFill.png", 6 | "scale" : "1x" 7 | }, 8 | { 9 | "idiom" : "universal", 10 | "filename" : "LaunchScreen-AspectFill@2x.png", 11 | "scale" : "2x" 12 | }, 13 | { 14 | "idiom" : "universal", 15 | "filename" : "LaunchScreen-AspectFill@3x.png", 16 | "scale" : "3x" 17 | } 18 | ], 19 | "info" : { 20 | "version" : 1, 21 | "author" : "xcode" 22 | } 23 | } -------------------------------------------------------------------------------- /demo/App_Resources/iOS/Assets.xcassets/LaunchScreen.AspectFill.imageset/LaunchScreen-AspectFill.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/NathanaelA/nativescript-sqlite/0cf65148fc786bc56edf2396c12b4ec52670d164/demo/App_Resources/iOS/Assets.xcassets/LaunchScreen.AspectFill.imageset/LaunchScreen-AspectFill.png -------------------------------------------------------------------------------- /demo/App_Resources/iOS/Assets.xcassets/LaunchScreen.AspectFill.imageset/LaunchScreen-AspectFill@2x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/NathanaelA/nativescript-sqlite/0cf65148fc786bc56edf2396c12b4ec52670d164/demo/App_Resources/iOS/Assets.xcassets/LaunchScreen.AspectFill.imageset/LaunchScreen-AspectFill@2x.png -------------------------------------------------------------------------------- /demo/App_Resources/iOS/Assets.xcassets/LaunchScreen.AspectFill.imageset/LaunchScreen-AspectFill@3x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/NathanaelA/nativescript-sqlite/0cf65148fc786bc56edf2396c12b4ec52670d164/demo/App_Resources/iOS/Assets.xcassets/LaunchScreen.AspectFill.imageset/LaunchScreen-AspectFill@3x.png -------------------------------------------------------------------------------- /demo/App_Resources/iOS/Assets.xcassets/LaunchScreen.Center.imageset/Contents.json: -------------------------------------------------------------------------------- 1 | { 2 | "images" : [ 3 | { 4 | "idiom" : "universal", 5 | "filename" : "LaunchScreen-Center.png", 6 | "scale" : "1x" 7 | }, 8 | { 9 | "idiom" : "universal", 10 | "filename" : "LaunchScreen-Center@2x.png", 11 | "scale" : "2x" 12 | }, 13 | { 14 | "idiom" : "universal", 15 | "filename" : "LaunchScreen-Center@3x.png", 16 | "scale" : "3x" 17 | } 18 | ], 19 | "info" : { 20 | "version" : 1, 21 | "author" : "xcode" 22 | } 23 | } -------------------------------------------------------------------------------- /demo/App_Resources/iOS/Assets.xcassets/LaunchScreen.Center.imageset/LaunchScreen-Center.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/NathanaelA/nativescript-sqlite/0cf65148fc786bc56edf2396c12b4ec52670d164/demo/App_Resources/iOS/Assets.xcassets/LaunchScreen.Center.imageset/LaunchScreen-Center.png -------------------------------------------------------------------------------- /demo/App_Resources/iOS/Assets.xcassets/LaunchScreen.Center.imageset/LaunchScreen-Center@2x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/NathanaelA/nativescript-sqlite/0cf65148fc786bc56edf2396c12b4ec52670d164/demo/App_Resources/iOS/Assets.xcassets/LaunchScreen.Center.imageset/LaunchScreen-Center@2x.png -------------------------------------------------------------------------------- /demo/App_Resources/iOS/Assets.xcassets/LaunchScreen.Center.imageset/LaunchScreen-Center@3x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/NathanaelA/nativescript-sqlite/0cf65148fc786bc56edf2396c12b4ec52670d164/demo/App_Resources/iOS/Assets.xcassets/LaunchScreen.Center.imageset/LaunchScreen-Center@3x.png -------------------------------------------------------------------------------- /demo/App_Resources/iOS/Info.plist: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | CFBundleDevelopmentRegion 6 | en 7 | CFBundleDisplayName 8 | ${PRODUCT_NAME} 9 | CFBundleExecutable 10 | ${EXECUTABLE_NAME} 11 | CFBundleInfoDictionaryVersion 12 | 6.0 13 | CFBundleName 14 | ${PRODUCT_NAME} 15 | CFBundlePackageType 16 | APPL 17 | CFBundleShortVersionString 18 | 1.0 19 | CFBundleSignature 20 | ???? 21 | CFBundleVersion 22 | 1.0 23 | LSRequiresIPhoneOS 24 | 25 | UILaunchStoryboardName 26 | LaunchScreen 27 | UIRequiresFullScreen 28 | 29 | UIRequiredDeviceCapabilities 30 | 31 | armv7 32 | 33 | UISupportedInterfaceOrientations 34 | 35 | UIInterfaceOrientationPortrait 36 | UIInterfaceOrientationLandscapeLeft 37 | UIInterfaceOrientationLandscapeRight 38 | 39 | UISupportedInterfaceOrientations~ipad 40 | 41 | UIInterfaceOrientationPortrait 42 | UIInterfaceOrientationPortraitUpsideDown 43 | UIInterfaceOrientationLandscapeLeft 44 | UIInterfaceOrientationLandscapeRight 45 | 46 | 47 | 48 | -------------------------------------------------------------------------------- /demo/App_Resources/iOS/LaunchScreen.storyboard: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | 20 | 21 | 22 | 23 | 24 | 25 | 26 | 27 | 28 | 29 | 30 | 31 | 32 | 33 | 34 | 35 | 36 | 37 | 38 | 39 | 40 | 41 | 42 | 43 | 44 | 45 | 46 | 47 | 48 | 49 | 50 | 51 | 52 | 53 | 54 | -------------------------------------------------------------------------------- /demo/App_Resources/iOS/build.xcconfig: -------------------------------------------------------------------------------- 1 | // You can add custom settings here 2 | // for example you can uncomment the following line to force distribution code signing 3 | // CODE_SIGN_IDENTITY = iPhone Distribution 4 | // To build for device with XCode you need to specify your development team. 5 | // DEVELOPMENT_TEAM = YOUR_TEAM_ID; 6 | ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon; 7 | -------------------------------------------------------------------------------- /demo/app/app-root.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | -------------------------------------------------------------------------------- /demo/app/app.css: -------------------------------------------------------------------------------- 1 | /* 2 | In NativeScript, the app.css file is where you place CSS rules that 3 | you would like to apply to your entire application. Check out 4 | http://docs.nativescript.org/ui/styling for a full list of the CSS 5 | selectors and properties you can use to style UI components. 6 | 7 | /* 8 | In many cases you may want to use the NativeScript core theme instead 9 | of writing your own CSS rules. You can learn more about the 10 | NativeScript core theme at https://github.com/nativescript/theme 11 | The imported CSS rules must precede all other types of rules. 12 | */ 13 | 14 | /* @import '@nativescript/theme/css/core.css'; 15 | @import '@nativescript/theme/css/default.css'; */ 16 | 17 | /* Place any CSS rules you want to apply on both iOS and Android here. 18 | This is where the vast majority of your CSS code goes. */ 19 | 20 | /* 21 | The following CSS rule changes the font size of all Buttons that have the 22 | "-primary" class modifier. 23 | */ 24 | 25 | Page { 26 | background-color: lightgrey; 27 | color: black; 28 | } 29 | button { 30 | font-size: 20; 31 | horizontal-align: center; 32 | } 33 | 34 | .one { 35 | background-color: black; 36 | color: white; 37 | } 38 | 39 | .two { 40 | background-color: lightgrey; 41 | color: black; 42 | } 43 | 44 | .entry { 45 | background-color: lightgrey; 46 | color: black; 47 | } 48 | 49 | .copyright { 50 | background-color: black; 51 | color: white; 52 | font-size: 16; 53 | width: 100%; 54 | horizontal-align: center; 55 | } 56 | -------------------------------------------------------------------------------- /demo/app/app.js: -------------------------------------------------------------------------------- 1 | /* 2 | In NativeScript, the app.js file is the entry point to your application. 3 | You can use this file to perform app-level initialization, but the primary 4 | purpose of the file is to pass control to the app’s first module. 5 | */ 6 | 7 | import { Application } from '@nativescript/core'; 8 | 9 | Application.run({ moduleName: 'app-root' }) 10 | 11 | /* 12 | Do not place any code after the application has been started as it will not 13 | be executed on iOS. 14 | */ 15 | -------------------------------------------------------------------------------- /demo/app/encrypted.sqlite: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/NathanaelA/nativescript-sqlite/0cf65148fc786bc56edf2396c12b4ec52670d164/demo/app/encrypted.sqlite -------------------------------------------------------------------------------- /demo/app/icon.sqlite: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/NathanaelA/nativescript-sqlite/0cf65148fc786bc56edf2396c12b4ec52670d164/demo/app/icon.sqlite -------------------------------------------------------------------------------- /demo/app/main-page.js: -------------------------------------------------------------------------------- 1 | /************************************************************************************** 2 | * (c) 2015-2021, Master Technology 3 | * Licensed under the MIT license or contact me for a support, changes, enhancements, 4 | * and/or if you require a commercial licensing 5 | * 6 | * Any questions please feel free to put a issue up on github 7 | * Nathan@master-technology.com http://nativescript.tools 8 | *************************************************************************************/ 9 | 10 | const sqlite = require('nativescript-sqlite'); 11 | const ObservableArray = require("@nativescript/core/data/observable-array").ObservableArray; 12 | const FileSystemAccess = require("@nativescript/core/file-system/file-system-access").FileSystemAccess; 13 | 14 | 15 | //var Tracing = require('./tracing.js'); 16 | //Tracing(sqlite, {ignore: ["close", "resultType", "valueType", "_toStringArray", "_getResultEngine"], disableAddedFunction: true}); 17 | 18 | let dbname = 'name_db.sqlite'; 19 | let db = null; 20 | let page = null; 21 | 22 | const data = new ObservableArray(); 23 | 24 | console.log("NativeScript Runtime Version", global.__runtimeVersion); 25 | 26 | if (sqlite.HAS_COMMERCIAL) { 27 | console.log("Using Commercial"); 28 | data.push({name:'Commercial Support', css:'one'}); 29 | } else { 30 | console.log("No Commercial Support"); 31 | } 32 | 33 | if (sqlite.HAS_ENCRYPTION) { 34 | console.log("Using Encryption"); 35 | dbname = 'encrypted.sqlite'; 36 | data.push({name:'Encryption Support', css:'one'}); 37 | } else { 38 | console.log("No Encryption"); 39 | } 40 | data.push({name: 'Loading...', css: 'one'}); 41 | 42 | 43 | if (sqlite.HAS_SYNC) { 44 | console.log("Using Sync"); 45 | data.push({name: 'Sync Support',css: 'one'}); 46 | } else { 47 | console.log("No Sync"); 48 | } 49 | 50 | 51 | exports.pageLoaded = async function (args) { 52 | page = args.object; 53 | page.bindingContext = {names: data}; 54 | console.log("Using Database:", dbname); 55 | 56 | if (!sqlite.exists(dbname)) { 57 | sqlite.copyDatabase(dbname); 58 | } 59 | try { 60 | let myDb = await sqlite(dbname, {key: 'testing', multithreading: false, /*!!sqlite.HAS_COMMERCIAL ,*/ migrate: true}, 61 | ); 62 | 63 | let b = function (err, dbConnection) { 64 | if (err) { 65 | console.log(err, err.stack); 66 | } 67 | db = dbConnection; 68 | db.resultType(sqlite.RESULTSASOBJECT); 69 | 70 | db.version().then(function (results) { 71 | console.log("User Version: ", results, typeof results, Number.isNumber(results)); //, String.isString(results)); 72 | }); 73 | 74 | if (sqlite.HAS_ENCRYPTION) { 75 | db.get("PRAGMA cipher_version;").then(function (results) { 76 | console.log("Cipher version", results['cipher_version']); 77 | }); 78 | } 79 | 80 | reloadData(); 81 | }; 82 | b(null, myDb); 83 | } catch(err) { 84 | console.log("sqlite error", err, err.stack); 85 | } 86 | }; 87 | 88 | exports.addNewName = function() { 89 | const entry = page.getViewById('entry'); 90 | const name = entry.text; 91 | if (name.length > 0) { 92 | if (name.toLowerCase() === "test" || name.toLowerCase() === "runtest" || name.toLowerCase() === "tests" || name.toLowerCase() === "runtests" || name.indexOf("Test") === 0) { 93 | runTests(); 94 | return; 95 | } 96 | 97 | if (name.toLowerCase() === "sync") { 98 | db.enableTracking("names", {'syncTime': 10}).then((res) => { 99 | console.log("Result", res); 100 | }).catch((err) => { 101 | console.log("Error",err, err.stack); 102 | }); 103 | return; 104 | } 105 | 106 | if (name.toLowerCase() === "fsync") { 107 | db.enableTracking("names", {force: true, syncTime: 10}).then((res) => { 108 | console.log("Result", res); 109 | }).catch((err) => { 110 | console.log("Error",err, err.stack); 111 | }); 112 | return; 113 | } 114 | 115 | if (name.toLowerCase() === "csync") { 116 | db.execSQL("update __mt_sync_tracking set completed=1"); 117 | return; 118 | } 119 | 120 | 121 | if (name.toLowerCase() === "dsync") { 122 | db.execSQL("delete from __mt_sync_tracking"); 123 | return; 124 | } 125 | 126 | if (name.toLowerCase() === 'tsync') { 127 | db.all("select * from __mt_sync_tracking").then((res) => { 128 | console.log("Results:", res); 129 | }); 130 | return; 131 | } 132 | 133 | 134 | db.execSQL("insert into names (name) values (?)", name); 135 | reloadData(); 136 | } 137 | entry.text = ''; 138 | }; 139 | 140 | exports.openMT = function() { 141 | const utils = require('@nativescript/core/utils/utils'); 142 | utils.openUrl("https://www.master-technology.com"); 143 | }; 144 | 145 | function reloadData() { 146 | db.resultType(sqlite.RESULTSASOBJECT); 147 | db.valueType(sqlite.VALUESARENATIVE); 148 | 149 | db.all('select name from names', function (err, loadedData) { 150 | data.length = 0; 151 | if (err) { 152 | console.log(err); 153 | } else { 154 | for (let i=0;i { 172 | console.error("Error", err); 173 | }); 174 | } 175 | 176 | 177 | async function setupTests() { 178 | loadBlob(); 179 | data.push({name: 'Creating tables and data...', css: 'one'}); 180 | try { 181 | await db.execSQL('drop table if exists tests;'); 182 | await db.execSQL('create table tests (`int_field` integer, `num_field` numeric, `real_field` real, `text_field` text, `blob_field` blob)'); 183 | await db.execSQL('insert into tests (int_field, num_field, real_field, text_field, blob_field) values (1,1.2,2.4,"Text1",?)',[blob]); 184 | await db.execSQL('insert into tests (int_field, num_field, real_field, text_field, blob_field) values (2,4.8,5.6,"Text2",?)',[blob]); 185 | await db.execSQL('insert into tests (int_field, num_field, real_field, text_field, blob_field) values (3,null,null,null,null)'); 186 | } catch (err) { 187 | console.log("Error", err); 188 | data.push({name: 'Error setting up tests...'+err.toString(), css: 'two'}); 189 | throw err; 190 | } 191 | } 192 | 193 | function checkRowOfData(inData, validData) { 194 | if (Array.isArray(inData)) { 195 | for (let i = 0; i < inData.length; i++) { 196 | if (typeof inData[i] === "number") { 197 | if (inData[i] !== validData[i]) { 198 | if ((inData[i] - 0.1) > validData[i] || (inData[i] + 0.1) < validData[i]) { 199 | console.log("Failed", inData[i], validData[i]) 200 | return ({status: false, field: i}); 201 | } 202 | } 203 | } else { 204 | if (inData[i] !== validData[i]) { 205 | // console.log("Check:", inData[i], validData[i], typeof inData[i], typeof validData[i]); 206 | if (inData[i] === null || validData[i] === null) { 207 | return ({status: false, field: i}); 208 | } 209 | // Do we have a ".count" property, if so check it 210 | if (inData[i].count > 0 && inData[i].count === validData[i].count) { 211 | for (let j = 0; j < inData[i].count; j++) { 212 | if (inData[i][j] !== validData[i][j]) { 213 | return ({status: false, field: i}); 214 | } 215 | } 216 | return ({status: true}); 217 | } 218 | // Do we have a ".length" property, if so check it 219 | else if (inData[i].length > 0 && inData[i].length === validData[i].length) { 220 | for (let j = 0; j < inData[i].length; j++) { 221 | if (inData[i][j] !== validData[i][j]) { 222 | return ({status: false, field: i}); 223 | } 224 | } 225 | return ({status: true}); 226 | } else { 227 | console.log("Failed:", inData[i].length, validData[i].length, typeof inData[i], typeof validData[i]); 228 | return ({status: false, field: i}); 229 | } 230 | } 231 | } 232 | } 233 | } else if (typeof inData === 'number') { 234 | if (inData !== validData) { 235 | if ((inData - 0.1) > validData || (inData + 0.1) < validData) { 236 | return ({status: false, field: 0}); 237 | } 238 | } 239 | } else { 240 | for (let key in inData) { 241 | if (inData.hasOwnProperty(key)) { 242 | if (typeof inData[key] === "number") { 243 | if (inData[key] !== validData[key]) { 244 | if ((inData[key]-0.1) > validData[key] || (inData[key]+0.1) < validData[key]) { 245 | return ({status: false, field: key}); 246 | } 247 | } 248 | } else { 249 | if (inData[key] !== validData[key]) { 250 | if (inData[key] === null || validData[key] === null) { 251 | return ({status: false, field: key}); 252 | } 253 | // Do we have a ".count" property, if so check it 254 | if (inData[key].count > 0 && inData[key].count === validData[key].count) { 255 | for (let j = 0; j < inData[key].count; j++) { 256 | if (inData[key][j] !== validData[key][j]) { 257 | return ({status: false, field: key}); 258 | } 259 | } 260 | return ({status: true}); 261 | } 262 | // Do we have a ".length" property, if so check it 263 | else if (inData[key].length > 0 && inData[key].length === validData[key].length) { 264 | for (let j = 0; j < inData[key].length; j++) { 265 | if (inData[key][j] !== validData[key][j]) { 266 | return ({status: false, field: key}); 267 | } 268 | } 269 | return ({status: true}); 270 | } else { 271 | return ({status: false, field: key}); 272 | } 273 | } 274 | } 275 | } 276 | } 277 | } 278 | return {status: true}; 279 | } 280 | 281 | function runATest(options, callback) { 282 | 283 | //console.log("!-------------- Starting Test", options.name); 284 | 285 | //data.push({name: "Starting test"+options.name}); 286 | const checkResults = function(err, inData) { 287 | //console.log("!-------------- Checking Results", options.name, "Error: ", err, "Data:", inData); 288 | let passed = true; 289 | if (err) { 290 | console.log("!------------ Error", err.toString()); 291 | data.push({name: options.name + " test failed with: ", css: 'one'}); 292 | data.push({name: " " + err.toString(), css:'one'}); 293 | return callback(false); 294 | } 295 | if (!inData || inData.length !== options.results.length) { 296 | console.dir(inData); 297 | console.log("!----------- No Data"); 298 | data.push({name: options.name + " test failed with different results length", css: 'one'}); 299 | return callback(false); 300 | } 301 | if (inData.length === 0) { 302 | console.log("!-------- No Data Returned"); 303 | return callback(passed); 304 | } 305 | // console.log("!------------ Data Returned", inData.length, inData); 306 | for (let i=0;i { 427 | let runningTest = -1; 428 | const runTest = function (status) { 429 | if (!status) { 430 | return reject("Failed: " + tests[runningTest].name); 431 | } else if (runningTest > -1) { 432 | data.push({name: "Passed: " + tests[runningTest].name, 'css': 'two'}); 433 | } 434 | runningTest++; 435 | if (runningTest >= tests.length) { 436 | return resolve(status); 437 | } 438 | try { 439 | runATest(tests[runningTest], runTest); 440 | } catch(err) { 441 | console.error("Failed Test", tests[runningTest].name) 442 | return reject(err); 443 | } 444 | }; 445 | 446 | data.push({name: "-----------------------------", css: 'two'}); 447 | runTest(true); 448 | }); 449 | } 450 | 451 | async function runNativeArrayTest() { 452 | console.log("!-------------- Starting RNA Test"); 453 | db.resultType(sqlite.RESULTSASARRAY); 454 | db.valueType(sqlite.VALUESARENATIVE); 455 | 456 | const tests = [ 457 | // Callback 458 | {name: 'NativeArray Check', sql: 'select count(*) from tests', results: [3], use: 0}, 459 | {name: 'NativeArray Get', sql: 'select * from tests where int_field=?', values: [2], results: [2,4.8,5.6,'Text2', blob], use: 0}, 460 | {name: 'NativeArray All', sql: 'select * from tests order by int_field', results: [[1,1.2,2.4,"Text1",blob],[2,4.8,5.6,'Text2',blob],[3,null,null,null,null]], use: 1}, 461 | {name: 'NativeArray Each', sql: 'select * from tests order by int_field', results: [[1,1.2,2.4,"Text1",blob],[2,4.8,5.6,'Text2',blob],[3,null,null,null,null]], use: 2}, 462 | 463 | // Promise 464 | {name: 'NativeArray Promise Check', sql: 'select count(*) from tests', results: [3], use: 3}, 465 | {name: 'NativeArray Promise Get', sql: 'select * from tests where int_field=?', values: [2], results: [2,4.8,5.6,'Text2',blob], use: 3}, 466 | {name: 'NativeArray Promise All', sql: 'select * from tests order by int_field', results: [[1,1.2,2.4,"Text1",blob],[2,4.8,5.6,'Text2',blob],[3,null,null,null,null]], use: 4}, 467 | {name: 'NativeArray Promise Each', sql: 'select * from tests order by int_field', results: [[1,1.2,2.4,"Text1",blob],[2,4.8,5.6,'Text2',blob],[3,null,null,null,null]], use: 5} 468 | 469 | ]; 470 | await runTestGroup(tests); 471 | } 472 | 473 | async function runStringArrayTest() { 474 | console.log("!-------------- Starting RSA Test"); 475 | db.resultType(sqlite.RESULTSASARRAY); 476 | db.valueType(sqlite.VALUESARESTRINGS); 477 | const tests = [ 478 | // Callback Version 479 | {name: 'StringArray Get', sql: 'select * from tests where int_field=?', values: [2], results: ["2","4.8","5.6",'Text2',blob], use: 0}, 480 | {name: 'StringArray All', sql: 'select * from tests order by int_field', results: [["1","1.2","2.4","Text1",blob],["2","4.8","5.6",'Text2',blob], ["3",null,null,null,null]], use: 1}, 481 | {name: 'StringArray Each', sql: 'select * from tests order by int_field', results: [["1","1.2","2.4","Text1",blob],["2","4.8","5.6",'Text2',blob], ["3",null,null,null,null]], use: 2}, 482 | 483 | // Promise Version 484 | {name: 'StringArray Promise Get', sql: 'select * from tests where int_field=?', values: [2], results: ["2","4.8","5.6",'Text2',blob], use: 3}, 485 | {name: 'StringArray Promise All', sql: 'select * from tests order by int_field', results: [["1","1.2","2.4","Text1",blob],["2","4.8","5.6",'Text2',blob],["3",null,null,null,null]], use: 4}, 486 | {name: 'StringArray Promise Each', sql: 'select * from tests order by int_field', results: [["1","1.2","2.4","Text1",blob],["2","4.8","5.6",'Text2',blob],["3",null,null,null,null]], use: 5} 487 | ]; 488 | await runTestGroup(tests); 489 | } 490 | 491 | async function runNativeObjectTest() { 492 | console.log("!-------------- Starting RNO Test"); 493 | db.resultType(sqlite.RESULTSASOBJECT); 494 | db.valueType(sqlite.VALUESARENATIVE); 495 | 496 | const tests = [ 497 | // Callback 498 | {name: 'NativeObject Get', sql: 'select * from tests where int_field=?', values: [2], results: {int_field: 2, num_field: 4.8, real_field: 5.6, text_field: 'Text2', blob_field: blob}, use: 0}, 499 | {name: 'NativeObject All', sql: 'select * from tests order by int_field', results: [{int_field: 1, num_field: 1.2, real_field: 2.4, text_field: 'Text1', blob_field: blob},{int_field: 2, num_field: 4.8, real_field: 5.6, text_field: 'Text2', blob_field: blob},{int_field: 3, num_field: null, real_field: null, text_field: null, blob_field: null}], use: 1}, 500 | {name: 'NativeObject Each', sql: 'select * from tests order by int_field', results: [{int_field: 1, num_field: 1.2, real_field: 2.4, text_field: 'Text1', blob_field: blob},{int_field: 2, num_field: 4.8, real_field: 5.6, text_field: 'Text2', blob_field: blob},{int_field: 3, num_field: null, real_field: null, text_field: null, blob_field: null}], use: 2}, 501 | 502 | // Promise 503 | {name: 'NativeObject Promise Get', sql: 'select * from tests where int_field=?', values: [2], results: {int_field: 2, num_field: 4.8, real_field: 5.6, text_field: 'Text2', blob_field: blob}, use: 3}, 504 | {name: 'NativeObject Promise All', sql: 'select * from tests order by int_field', results: [{int_field: 1, num_field: 1.2, real_field: 2.4, text_field: 'Text1', blob_field: blob},{int_field: 2, num_field: 4.8, real_field: 5.6, text_field: 'Text2', blob_field: blob},{int_field: 3, num_field: null, real_field: null, text_field: null, blob_field: null}], use: 4}, 505 | {name: 'NativeObject Promise Each', sql: 'select * from tests order by int_field', results: [{int_field: 1, num_field: 1.2, real_field: 2.4, text_field: 'Text1', blob_field: blob},{int_field: 2, num_field: 4.8, real_field: 5.6, text_field: 'Text2', blob_field: blob},{int_field: 3, num_field: null, real_field: null, text_field: null, blob_field: null}], use: 5} 506 | 507 | ]; 508 | await runTestGroup(tests); 509 | } 510 | 511 | async function runStringObjectTest() { 512 | console.log("!-------------- Starting RSO Test"); 513 | db.resultType(sqlite.RESULTSASOBJECT); 514 | db.valueType(sqlite.VALUESARENATIVE); 515 | 516 | const tests = [ 517 | // Callback 518 | {name: 'StringObject Get', sql: 'select * from tests where int_field=?', values: [2], results: {int_field: "2", num_field: "4.8", real_field: "5.6", text_field: 'Text2', blob_field: blob}, use: 0}, 519 | {name: 'StringObject All', sql: 'select * from tests order by int_field', results: [{int_field: "1", num_field: "1.2", real_field: "2.4", text_field: 'Text1', blob_field: blob},{int_field: "2", num_field: "4.8", real_field: "5.6", text_field: 'Text2', blob_field: blob},{int_field: 3, num_field: null, real_field: null, text_field: null, blob_field: null}], use: 1}, 520 | {name: 'StringObject Each', sql: 'select * from tests order by int_field', results: [{int_field: "1", num_field: "1.2", real_field: "2.4", text_field: 'Text1', blob_field: blob},{int_field: "2", num_field: "4.8", real_field: "5.6", text_field: 'Text2', blob_field: blob},{int_field: 3, num_field: null, real_field: null, text_field: null, blob_field: null}], use: 2}, 521 | 522 | // Promise 523 | {name: 'StringObject Promise Get', sql: 'select * from tests where int_field=?', values: [2], results: {int_field: "2", num_field: "4.8", real_field: "5.6", text_field: 'Text2', blob_field: blob}, use: 3}, 524 | {name: 'StringObject Promise All', sql: 'select * from tests order by int_field', results: [{int_field: "1", num_field: "1.2", real_field: "2.4", text_field: 'Text1', blob_field: blob},{int_field: "2", num_field: "4.8", real_field: "5.6", text_field: 'Text2', blob_field: blob},{int_field: 3, num_field: null, real_field: null, text_field: null, blob_field: null}], use: 4}, 525 | {name: 'StringObject Promise Each', sql: 'select * from tests order by int_field', results: [{int_field: "1", num_field: "1.2", real_field: "2.4", text_field: 'Text1', blob_field: blob},{int_field: "2", num_field: "4.8", real_field: "5.6", text_field: 'Text2', blob_field: blob},{int_field: 3, num_field: null, real_field: null, text_field: null, blob_field: null}], use: 5} 526 | 527 | ]; 528 | await runTestGroup(tests); 529 | } 530 | 531 | async function setupPreparedTests() { 532 | if (!sqlite.HAS_COMMERCIAL) { 533 | return; 534 | } 535 | 536 | console.log("!-------------- Creating Prepared Tests Data"); 537 | try { 538 | await db.execSQL('drop table if exists preparetests;'); 539 | await db.execSQL('create table preparetests (`int_field` integer, `num_field` numeric, `real_field` real, `text_field` text, `blob_field` blob)'); 540 | } catch (err) { 541 | data.push({name: 'Failed to create tables and data...', css: 'one'}); 542 | console.log("!---- Create Table err", err); 543 | throw err; 544 | } 545 | } 546 | 547 | async function runExtraTests() { 548 | console.log("!-------------- Extra Tests"); 549 | data.push({name: "-----------------------------", css: 'two'}); 550 | db.resultType(sqlite.RESULTSASOBJECT); 551 | db.valueType(sqlite.VALUESARENATIVE); 552 | 553 | try { 554 | await db.execSQL('drop table if exists extratests;'); 555 | await db.execSQL('create table extratests (`int_field` integer, `num_field` numeric, `real_field` real, `text_field` text, `blob_field` blob, `int2field` integer)'); 556 | await db.execSQL('insert into extratests values (1, 2, 3, "4", "5", 6)'); 557 | let val = await db.get('select * from extratests'); 558 | if (!(val.int_field === 1 && val.num_field === 2 && val.int2field === 6)) { 559 | throw new Error("ExtraTest data does not match"); 560 | } 561 | 562 | await db.execSQL("update extratests set num_field=null where int_field=1"); 563 | val = await db.get('select * from extratests'); 564 | if (val.int_field !== 1 || val.num_field !== null) { 565 | throw new Error("Failed ExtraTest direct null"); 566 | } 567 | 568 | await db.execSQL("update extratests set int2field=null where int_field=1"); 569 | val = await db.get('select * from extratests'); 570 | if (val.int_field !== 1 || val.int2field !== null) { 571 | throw new Error("Failed ExtraTest int is null"); 572 | } 573 | 574 | await db.execSQL("update extratests set real_field=? where int_field=1", [null]); 575 | val = await db.get('select * from extratests'); 576 | if (val.int_field !== 1 || val.real_field !== null) { 577 | throw new Error("Failed ExtraTest param as null") 578 | } 579 | } catch (err) { 580 | console.log("Failed: Extra Tests", err) 581 | data.push({name: 'Failed: Extra Tests...'+err, 'css': 'one'}); 582 | throw err; 583 | } 584 | data.push({name: 'Passed: Extra Tests...', 'css': 'two'}); 585 | } 586 | 587 | async function runPreparedTests(callback) { 588 | if (!sqlite.HAS_COMMERCIAL) { 589 | return; 590 | } 591 | db.resultType(sqlite.RESULTSASARRAY); 592 | db.valueType(sqlite.VALUESARENATIVE); 593 | 594 | try { 595 | // Test to make sure Rollbacks work 596 | await setupPreparedTests(); 597 | await createPreparedData(true); 598 | let tests = [{ 599 | name: 'Verify Rollback Check', 600 | sql: 'select count(*) from preparetests', 601 | results: [0], 602 | use: 0 603 | }]; 604 | await runTestGroup(tests); 605 | 606 | 607 | // Test to make sure Commits work 608 | await createPreparedData(false); 609 | tests = [{ 610 | name: 'Verify Commit Check', 611 | sql: 'select count(*) from preparetests', 612 | results: [3], 613 | use: 0 614 | }, 615 | { 616 | name: 'Commit/Prepare All', sql: 'select * from preparetests order by int_field', results: [ 617 | [1, 1.2, 2.4, 'Text1', blob], 618 | [2, 2.4, 3.6, 'Text2', blob], 619 | [3, 3.6, 4.8, 'Text3', blob] 620 | ], use: 1 621 | }]; 622 | await runTestGroup(tests); 623 | } catch (err) { 624 | data.push({name: 'Failed: Prepared Tests...', 'css': 'one'}); 625 | throw err; 626 | } 627 | data.push({name: 'Passed: Prepared Tests...', 'css': 'two'}); 628 | 629 | } 630 | 631 | async function createPreparedData(rollback) { 632 | if (!sqlite.HAS_COMMERCIAL) { 633 | return; 634 | } 635 | 636 | let prepared; 637 | try { 638 | console.log("!------------------ Create Prepared Tests"); 639 | prepared = db.prepare("insert into preparetests (int_field, num_field, real_field, text_field, blob_field) values (?,?,?,?,?);"); 640 | } catch(err) { 641 | console.log("Error creating prepare data", err); 642 | throw err; 643 | } 644 | 645 | try { 646 | await db.begin(); 647 | await prepared.execute([1, 1.2, 2.4, "Text1", blob]); 648 | await prepared.execute([[2, 2.4, 3.6, "Text2", blob], [3, 3.6, 4.8, "Text3", blob]]); 649 | if (rollback) { 650 | await db.rollback(); 651 | } else { 652 | await db.commit(); 653 | } 654 | prepared.finished(); 655 | } catch (err) { 656 | data.push({name: 'Failed Prepared Tests...', css: 'one'}); 657 | console.log(err); 658 | throw err; 659 | } 660 | } 661 | 662 | async function delay(time) { 663 | return new Promise((resolve) => { 664 | setTimeout(() => { resolve(); }, time); 665 | }); 666 | } 667 | 668 | async function runTests() { 669 | data.length = 0; 670 | data.push({name: 'Running SQLite tests...', css: 'one'}); 671 | 672 | try { 673 | await setupTests(); 674 | await delay(10); 675 | data.push({name: 'Created tables & data...', css: 'one'}); 676 | // for (let i=0;i<20;i++) { 677 | // data.length = 0; 678 | await runNativeArrayTest(); 679 | await delay(10); 680 | await runNativeObjectTest(); 681 | await delay(10); 682 | await runStringArrayTest(); 683 | await delay(10); 684 | await runStringObjectTest(); 685 | await delay(10); 686 | // } 687 | await runPreparedTests(); 688 | await delay(10); 689 | await runExtraTests(); 690 | data.push({name: "-----------------------------", css: 'two'}); 691 | data.push({name: 'Tests completed...', css: 'two'}); 692 | } catch (err) { 693 | data.push({name: "-----------------------------", css: 'two'}); 694 | data.push({name: 'Tests failed...', css: 'one'}); 695 | data.push({name: err, css: 'one'}); 696 | } 697 | console.log("-----------------------------"); 698 | console.log("Tests completed!"); 699 | } 700 | 701 | -------------------------------------------------------------------------------- /demo/app/main-page.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 11 | 12 | 13 | 14 | 15 |