├── src
├── jql
│ ├── tests
│ │ └── data
│ │ │ ├── 013.jql
│ │ │ ├── 012.jql
│ │ │ ├── 014.jql
│ │ │ ├── 022.jql
│ │ │ ├── 002.expected.jql
│ │ │ ├── 002.jql
│ │ │ ├── 004.jql
│ │ │ ├── 000.jql
│ │ │ ├── 003.expected.jql
│ │ │ ├── 003.jql
│ │ │ ├── 004.expected.jql
│ │ │ ├── 011.jql
│ │ │ ├── 014.expected.jql
│ │ │ ├── 017.jql
│ │ │ ├── 022.expected.jql
│ │ │ ├── 005.expected.jql
│ │ │ ├── 005.jql
│ │ │ ├── 000.expected.jql
│ │ │ ├── 006.jql
│ │ │ ├── 017.expected.jql
│ │ │ ├── 006.expected.jql
│ │ │ ├── 010.jql
│ │ │ ├── 015.jql
│ │ │ ├── 010.expected.jql
│ │ │ ├── 018.jql
│ │ │ ├── 008.expected.jql
│ │ │ ├── 008.jql
│ │ │ ├── 009.jql
│ │ │ ├── 015.expected.jql
│ │ │ ├── 020.jql
│ │ │ ├── 018.expected.jql
│ │ │ ├── 009.expected.jql
│ │ │ ├── 021.jql
│ │ │ ├── 020.expected.jql
│ │ │ ├── 007.jql
│ │ │ ├── 021.expected.jql
│ │ │ ├── 007.expected.jql
│ │ │ ├── 016.jql
│ │ │ ├── 016.expected.jql
│ │ │ ├── 019.jql
│ │ │ ├── 019.expected.jql
│ │ │ ├── 001.expected.jql
│ │ │ └── 001.jql
│ ├── Autark
│ └── jql_internal.h
├── bindings
│ ├── ejdb2_jni
│ │ ├── version.txt
│ │ ├── .gitignore
│ │ ├── .editorconfig
│ │ ├── hints.txt
│ │ ├── src
│ │ │ └── main
│ │ │ │ └── java
│ │ │ │ └── com
│ │ │ │ └── softmotions
│ │ │ │ └── ejdb2
│ │ │ │ ├── JSONMissingException.java
│ │ │ │ ├── JSONException.java
│ │ │ │ ├── JQLCallback.java
│ │ │ │ ├── EJDB2DocumentCallback.java
│ │ │ │ ├── EJDB2Document.java
│ │ │ │ └── EJDB2Exception.java
│ │ ├── maven-deploy.sh.in
│ │ ├── example
│ │ │ ├── src
│ │ │ │ └── main
│ │ │ │ │ └── java
│ │ │ │ │ └── EJDB2Example.java
│ │ │ ├── pom.xml
│ │ │ └── README.md
│ │ ├── pom.xml
│ │ └── README.md
│ ├── ejdb2_node
│ │ ├── version.txt
│ │ ├── CHANGELOG.md
│ │ ├── example
│ │ │ ├── package.json
│ │ │ ├── index.ts
│ │ │ ├── tsconfig.json
│ │ │ └── README.md
│ │ ├── tsconfig.json
│ │ ├── tslint.json
│ │ ├── .eslintrc
│ │ ├── README.md
│ │ ├── package.json
│ │ ├── binary.js
│ │ ├── node_api_types.h
│ │ ├── Autark
│ │ └── install.js
│ ├── archived
│ │ ├── ejdb2_dart
│ │ │ ├── version.txt
│ │ │ ├── .gitignore
│ │ │ ├── CHANGELOG.md
│ │ │ ├── pubspec.yaml.in
│ │ │ ├── pubspec.yaml
│ │ │ ├── example
│ │ │ │ ├── example.dart
│ │ │ │ └── isolate.dart
│ │ │ ├── LICENSE
│ │ │ └── README.md
│ │ ├── ejdb2_flutter
│ │ │ ├── version.txt
│ │ │ ├── ios
│ │ │ │ ├── Assets
│ │ │ │ │ └── .gitkeep
│ │ │ │ ├── Classes
│ │ │ │ │ ├── Ejdb2FlutterPlugin.h
│ │ │ │ │ └── Ejdb2FlutterPlugin.m
│ │ │ │ ├── .gitignore
│ │ │ │ └── ejdb2_flutter.podspec
│ │ │ ├── android
│ │ │ │ ├── settings.gradle
│ │ │ │ ├── gradle.properties
│ │ │ │ ├── src
│ │ │ │ │ └── main
│ │ │ │ │ │ └── AndroidManifest.xml
│ │ │ │ ├── .gitignore
│ │ │ │ ├── gradle
│ │ │ │ │ └── wrapper
│ │ │ │ │ │ ├── gradle-wrapper.jar
│ │ │ │ │ │ └── gradle-wrapper.properties
│ │ │ │ ├── .project
│ │ │ │ └── gradlew.bat
│ │ │ ├── example
│ │ │ │ ├── ios
│ │ │ │ │ ├── Runner
│ │ │ │ │ │ ├── Runner-Bridging-Header.h
│ │ │ │ │ │ ├── Assets.xcassets
│ │ │ │ │ │ │ ├── LaunchImage.imageset
│ │ │ │ │ │ │ │ ├── LaunchImage.png
│ │ │ │ │ │ │ │ ├── LaunchImage@2x.png
│ │ │ │ │ │ │ │ ├── LaunchImage@3x.png
│ │ │ │ │ │ │ │ ├── README.md
│ │ │ │ │ │ │ │ └── Contents.json
│ │ │ │ │ │ │ └── AppIcon.appiconset
│ │ │ │ │ │ │ │ ├── Icon-App-20x20@1x.png
│ │ │ │ │ │ │ │ ├── Icon-App-20x20@2x.png
│ │ │ │ │ │ │ │ ├── Icon-App-20x20@3x.png
│ │ │ │ │ │ │ │ ├── Icon-App-29x29@1x.png
│ │ │ │ │ │ │ │ ├── Icon-App-29x29@2x.png
│ │ │ │ │ │ │ │ ├── Icon-App-29x29@3x.png
│ │ │ │ │ │ │ │ ├── Icon-App-40x40@1x.png
│ │ │ │ │ │ │ │ ├── Icon-App-40x40@2x.png
│ │ │ │ │ │ │ │ ├── Icon-App-40x40@3x.png
│ │ │ │ │ │ │ │ ├── Icon-App-60x60@2x.png
│ │ │ │ │ │ │ │ ├── Icon-App-60x60@3x.png
│ │ │ │ │ │ │ │ ├── Icon-App-76x76@1x.png
│ │ │ │ │ │ │ │ ├── Icon-App-76x76@2x.png
│ │ │ │ │ │ │ │ ├── Icon-App-1024x1024@1x.png
│ │ │ │ │ │ │ │ ├── Icon-App-83.5x83.5@2x.png
│ │ │ │ │ │ │ │ └── Contents.json
│ │ │ │ │ │ ├── AppDelegate.swift
│ │ │ │ │ │ ├── Info.plist
│ │ │ │ │ │ └── Base.lproj
│ │ │ │ │ │ │ ├── Main.storyboard
│ │ │ │ │ │ │ └── LaunchScreen.storyboard
│ │ │ │ │ ├── Flutter
│ │ │ │ │ │ ├── Debug.xcconfig
│ │ │ │ │ │ ├── Release.xcconfig
│ │ │ │ │ │ └── AppFrameworkInfo.plist
│ │ │ │ │ ├── Runner.xcodeproj
│ │ │ │ │ │ └── project.xcworkspace
│ │ │ │ │ │ │ └── contents.xcworkspacedata
│ │ │ │ │ ├── Runner.xcworkspace
│ │ │ │ │ │ ├── contents.xcworkspacedata
│ │ │ │ │ │ └── xcshareddata
│ │ │ │ │ │ │ └── IDEWorkspaceChecks.plist
│ │ │ │ │ └── .gitignore
│ │ │ │ ├── android
│ │ │ │ │ ├── gradle.properties
│ │ │ │ │ ├── gradle
│ │ │ │ │ │ └── wrapper
│ │ │ │ │ │ │ ├── gradle-wrapper.jar
│ │ │ │ │ │ │ └── gradle-wrapper.properties
│ │ │ │ │ ├── app
│ │ │ │ │ │ ├── src
│ │ │ │ │ │ │ ├── main
│ │ │ │ │ │ │ │ ├── res
│ │ │ │ │ │ │ │ │ ├── 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
│ │ │ │ │ │ │ │ │ │ └── styles.xml
│ │ │ │ │ │ │ │ │ └── drawable
│ │ │ │ │ │ │ │ │ │ └── launch_background.xml
│ │ │ │ │ │ │ │ ├── java
│ │ │ │ │ │ │ │ │ └── com
│ │ │ │ │ │ │ │ │ │ └── softmotions
│ │ │ │ │ │ │ │ │ │ └── ejdb2_example
│ │ │ │ │ │ │ │ │ │ └── MainActivity.java
│ │ │ │ │ │ │ │ └── AndroidManifest.xml
│ │ │ │ │ │ │ ├── debug
│ │ │ │ │ │ │ │ └── AndroidManifest.xml
│ │ │ │ │ │ │ └── profile
│ │ │ │ │ │ │ │ └── AndroidManifest.xml
│ │ │ │ │ │ ├── .project
│ │ │ │ │ │ └── build.gradle
│ │ │ │ │ ├── .project
│ │ │ │ │ ├── settings.gradle
│ │ │ │ │ ├── build.gradle
│ │ │ │ │ └── gradlew.bat
│ │ │ │ ├── test_driver
│ │ │ │ │ ├── app.dart
│ │ │ │ │ └── app_test.dart
│ │ │ │ ├── .metadata
│ │ │ │ ├── README.md
│ │ │ │ ├── .gitignore
│ │ │ │ ├── pubspec.yaml
│ │ │ │ └── lib
│ │ │ │ │ └── utils
│ │ │ │ │ └── assertions.dart
│ │ │ ├── CHANGELOG.md
│ │ │ ├── .gitignore
│ │ │ ├── .metadata
│ │ │ ├── pubspec.yaml
│ │ │ ├── pubspec.yaml.in
│ │ │ ├── LICENSE
│ │ │ └── README.md
│ │ ├── ejdb2_react_native
│ │ │ ├── binding
│ │ │ │ ├── version.txt
│ │ │ │ ├── android
│ │ │ │ │ ├── src
│ │ │ │ │ │ └── main
│ │ │ │ │ │ │ ├── .gitignore
│ │ │ │ │ │ │ ├── AndroidManifest.xml
│ │ │ │ │ │ │ └── java
│ │ │ │ │ │ │ └── com
│ │ │ │ │ │ │ └── softmotions
│ │ │ │ │ │ │ └── ejdb2
│ │ │ │ │ │ │ └── EJDB2Package.java
│ │ │ │ │ ├── .gitignore
│ │ │ │ │ ├── gradle
│ │ │ │ │ │ └── wrapper
│ │ │ │ │ │ │ ├── gradle-wrapper.jar
│ │ │ │ │ │ │ └── gradle-wrapper.properties
│ │ │ │ │ └── build.gradle
│ │ │ │ ├── .gitignore
│ │ │ │ ├── CHANGELOG.md
│ │ │ │ ├── .npmignore
│ │ │ │ ├── package.json
│ │ │ │ └── CMakeLists.txt
│ │ │ ├── tests
│ │ │ │ ├── .watchmanconfig
│ │ │ │ ├── .gitattributes
│ │ │ │ ├── android
│ │ │ │ │ ├── .gitignore
│ │ │ │ │ ├── .npmignore
│ │ │ │ │ ├── app
│ │ │ │ │ │ ├── src
│ │ │ │ │ │ │ ├── main
│ │ │ │ │ │ │ │ ├── res
│ │ │ │ │ │ │ │ │ ├── values
│ │ │ │ │ │ │ │ │ │ ├── strings.xml
│ │ │ │ │ │ │ │ │ │ └── styles.xml
│ │ │ │ │ │ │ │ │ ├── mipmap-hdpi
│ │ │ │ │ │ │ │ │ │ ├── ic_launcher.png
│ │ │ │ │ │ │ │ │ │ └── ic_launcher_round.png
│ │ │ │ │ │ │ │ │ ├── mipmap-mdpi
│ │ │ │ │ │ │ │ │ │ ├── ic_launcher.png
│ │ │ │ │ │ │ │ │ │ └── ic_launcher_round.png
│ │ │ │ │ │ │ │ │ ├── mipmap-xhdpi
│ │ │ │ │ │ │ │ │ │ ├── ic_launcher.png
│ │ │ │ │ │ │ │ │ │ └── ic_launcher_round.png
│ │ │ │ │ │ │ │ │ ├── mipmap-xxhdpi
│ │ │ │ │ │ │ │ │ │ ├── ic_launcher.png
│ │ │ │ │ │ │ │ │ │ └── ic_launcher_round.png
│ │ │ │ │ │ │ │ │ └── mipmap-xxxhdpi
│ │ │ │ │ │ │ │ │ │ ├── ic_launcher.png
│ │ │ │ │ │ │ │ │ │ └── ic_launcher_round.png
│ │ │ │ │ │ │ │ ├── java
│ │ │ │ │ │ │ │ │ └── com
│ │ │ │ │ │ │ │ │ │ └── test
│ │ │ │ │ │ │ │ │ │ ├── MainActivity.java
│ │ │ │ │ │ │ │ │ │ └── MainApplication.java
│ │ │ │ │ │ │ │ └── AndroidManifest.xml
│ │ │ │ │ │ │ ├── debug
│ │ │ │ │ │ │ │ └── AndroidManifest.xml
│ │ │ │ │ │ │ └── androidTest
│ │ │ │ │ │ │ │ └── java
│ │ │ │ │ │ │ │ └── com
│ │ │ │ │ │ │ │ └── test
│ │ │ │ │ │ │ │ └── DetoxTest.java
│ │ │ │ │ │ └── proguard-rules.pro
│ │ │ │ │ ├── keystores
│ │ │ │ │ │ └── debug.keystore.properties
│ │ │ │ │ ├── gradle
│ │ │ │ │ │ └── wrapper
│ │ │ │ │ │ │ ├── gradle-wrapper.jar
│ │ │ │ │ │ │ └── gradle-wrapper.properties
│ │ │ │ │ ├── settings.gradle
│ │ │ │ │ ├── gradle.properties
│ │ │ │ │ └── build.gradle
│ │ │ │ ├── app.json
│ │ │ │ ├── e2e
│ │ │ │ │ ├── mocha.opts
│ │ │ │ │ ├── firstTest.spec.js
│ │ │ │ │ └── init.js
│ │ │ │ ├── .eslintrc.js
│ │ │ │ ├── babel.config.js
│ │ │ │ ├── index.js
│ │ │ │ ├── CMakeLists.txt
│ │ │ │ ├── metro.config.js
│ │ │ │ ├── .gitignore
│ │ │ │ └── package.json
│ │ │ ├── CMakeLists.txt
│ │ │ └── README.md
│ │ ├── README.md
│ │ ├── ejdb2_android
│ │ │ ├── test
│ │ │ │ ├── settings.gradle
│ │ │ │ ├── ejdb2
│ │ │ │ │ ├── .gitignore
│ │ │ │ │ ├── src
│ │ │ │ │ │ └── main
│ │ │ │ │ │ │ └── AndroidManifest.xml
│ │ │ │ │ └── build.gradle
│ │ │ │ ├── .gitignore
│ │ │ │ ├── gradle
│ │ │ │ │ └── wrapper
│ │ │ │ │ │ ├── gradle-wrapper.jar
│ │ │ │ │ │ └── gradle-wrapper.properties
│ │ │ │ ├── local.properties
│ │ │ │ ├── README.md
│ │ │ │ ├── gradle.properties
│ │ │ │ └── build.gradle
│ │ │ ├── README.md
│ │ │ └── CMakeLists.txt
│ │ └── ejdb2_swift
│ │ │ ├── EJDB2Swift
│ │ │ ├── .vscode
│ │ │ │ └── settings.json
│ │ │ ├── Sources
│ │ │ │ ├── CEJDB2
│ │ │ │ │ ├── module.modulemap
│ │ │ │ │ └── swift_ejdb2.h
│ │ │ │ └── EJDB2
│ │ │ │ │ ├── Info.plist
│ │ │ │ │ ├── JsonAt.swift
│ │ │ │ │ └── Utils.swift
│ │ │ ├── Tests
│ │ │ │ ├── LinuxMain.swift
│ │ │ │ └── EJDB2Tests
│ │ │ │ │ ├── XCTestManifests.swift
│ │ │ │ │ └── Info.plist
│ │ │ ├── .gitignore
│ │ │ ├── EJDB2.xcodeproj
│ │ │ │ ├── project.xcworkspace
│ │ │ │ │ ├── contents.xcworkspacedata
│ │ │ │ │ ├── xcuserdata
│ │ │ │ │ │ └── adam.xcuserdatad
│ │ │ │ │ │ │ └── IDEFindNavigatorScopes.plist
│ │ │ │ │ └── xcshareddata
│ │ │ │ │ │ └── IDEWorkspaceChecks.plist
│ │ │ │ ├── xcuserdata
│ │ │ │ │ └── adam.xcuserdatad
│ │ │ │ │ │ └── xcschemes
│ │ │ │ │ │ └── xcschememanagement.plist
│ │ │ │ └── xcshareddata
│ │ │ │ │ └── xcschemes
│ │ │ │ │ └── EJDB2.xcscheme
│ │ │ ├── Package.swift
│ │ │ ├── LICENSE
│ │ │ ├── build-ios.sh
│ │ │ └── EJDB2.podspec
│ │ │ └── CMakeLists.txt
│ └── Autark
├── jbs
│ ├── Autark
│ └── README.md
├── jbr
│ ├── Autark
│ ├── tests
│ │ └── Autark
│ └── jbr.h
├── jbi
│ ├── Autark
│ ├── jbi_full_scanner.c
│ └── jbi_pk_scanner.c
├── libejdb2.pc.in
├── tests
│ ├── Autark
│ └── ejdb_test.h
├── examples
│ └── example1.c
└── ejdb2cfg.h.in
├── .ignore
├── analysis_options.yaml
├── man
├── Autark
├── ejdb2.3
└── jbs.1
├── .gitmodules
├── .editorconfig
├── .autark
├── test_qsort_r.sh
├── test_pthread.sh
├── test_header.sh
├── test_blocks.sh
├── test_symbol.sh
├── fetch_resource.sh
└── system.sh
├── .gdbinit
├── .lvimrc
├── .clang-tidy
├── LICENSE
├── release.sh
├── BASE.md
└── CAPI.md
/src/jql/tests/data/013.jql:
--------------------------------------------------------------------------------
1 | foo/bar
--------------------------------------------------------------------------------
/src/bindings/ejdb2_jni/version.txt:
--------------------------------------------------------------------------------
1 | 28
--------------------------------------------------------------------------------
/src/bindings/ejdb2_node/version.txt:
--------------------------------------------------------------------------------
1 | 12
--------------------------------------------------------------------------------
/src/jql/tests/data/012.jql:
--------------------------------------------------------------------------------
1 | /foo/\"bar
--------------------------------------------------------------------------------
/src/jql/tests/data/014.jql:
--------------------------------------------------------------------------------
1 | (/foo/bar)
--------------------------------------------------------------------------------
/src/jql/tests/data/022.jql:
--------------------------------------------------------------------------------
1 | @users/=122
--------------------------------------------------------------------------------
/.ignore:
--------------------------------------------------------------------------------
1 | /autark-cache*
2 | /mxe
3 | /build
--------------------------------------------------------------------------------
/src/jql/tests/data/002.expected.jql:
--------------------------------------------------------------------------------
1 | /foo/bar
--------------------------------------------------------------------------------
/src/jql/tests/data/002.jql:
--------------------------------------------------------------------------------
1 | /foo/bar
2 |
--------------------------------------------------------------------------------
/src/jql/tests/data/004.jql:
--------------------------------------------------------------------------------
1 | /foo and /bar
--------------------------------------------------------------------------------
/src/bindings/archived/ejdb2_dart/version.txt:
--------------------------------------------------------------------------------
1 | 5
--------------------------------------------------------------------------------
/src/bindings/archived/ejdb2_flutter/version.txt:
--------------------------------------------------------------------------------
1 | 6
--------------------------------------------------------------------------------
/src/jql/tests/data/000.jql:
--------------------------------------------------------------------------------
1 | /foo/bar and /foo/baz
--------------------------------------------------------------------------------
/src/jql/tests/data/003.expected.jql:
--------------------------------------------------------------------------------
1 | /foo/b ar
--------------------------------------------------------------------------------
/src/jql/tests/data/003.jql:
--------------------------------------------------------------------------------
1 | /"foo"/"b ar"
2 |
--------------------------------------------------------------------------------
/src/jql/tests/data/004.expected.jql:
--------------------------------------------------------------------------------
1 | /foo and /bar
--------------------------------------------------------------------------------
/src/jql/tests/data/011.jql:
--------------------------------------------------------------------------------
1 | /foo/[barlike22]
2 |
--------------------------------------------------------------------------------
/src/jql/tests/data/014.expected.jql:
--------------------------------------------------------------------------------
1 | (/foo/bar)
--------------------------------------------------------------------------------
/src/jql/tests/data/017.jql:
--------------------------------------------------------------------------------
1 | /foo/bar | skip 10
--------------------------------------------------------------------------------
/src/jql/tests/data/022.expected.jql:
--------------------------------------------------------------------------------
1 | @users/=122
--------------------------------------------------------------------------------
/src/jql/tests/data/005.expected.jql:
--------------------------------------------------------------------------------
1 | /foo/[bar = "val"]
--------------------------------------------------------------------------------
/src/jql/tests/data/005.jql:
--------------------------------------------------------------------------------
1 | /foo/[bar = "val"]
2 |
--------------------------------------------------------------------------------
/src/bindings/archived/ejdb2_dart/.gitignore:
--------------------------------------------------------------------------------
1 | !/.packages
--------------------------------------------------------------------------------
/src/bindings/archived/ejdb2_flutter/ios/Assets/.gitkeep:
--------------------------------------------------------------------------------
1 |
--------------------------------------------------------------------------------
/src/jql/tests/data/000.expected.jql:
--------------------------------------------------------------------------------
1 | /foo/bar and /foo/baz
--------------------------------------------------------------------------------
/src/jql/tests/data/006.jql:
--------------------------------------------------------------------------------
1 | /foo/[bar = :placeholder]
2 |
--------------------------------------------------------------------------------
/src/jql/tests/data/017.expected.jql:
--------------------------------------------------------------------------------
1 | /foo/bar
2 | | skip 10
--------------------------------------------------------------------------------
/src/bindings/archived/ejdb2_react_native/binding/version.txt:
--------------------------------------------------------------------------------
1 | 6
--------------------------------------------------------------------------------
/src/jql/tests/data/006.expected.jql:
--------------------------------------------------------------------------------
1 | /foo/[bar = :placeholder]
--------------------------------------------------------------------------------
/src/jql/tests/data/010.jql:
--------------------------------------------------------------------------------
1 | /**/[[* = "familyName"] = "Doe"]
2 |
--------------------------------------------------------------------------------
/src/jql/tests/data/015.jql:
--------------------------------------------------------------------------------
1 | /foo/bar and (/foo/baz or /foo/gaz)
--------------------------------------------------------------------------------
/analysis_options.yaml:
--------------------------------------------------------------------------------
1 | analyzer:
2 | exclude:
3 | - build/**
--------------------------------------------------------------------------------
/src/bindings/archived/ejdb2_react_native/tests/.watchmanconfig:
--------------------------------------------------------------------------------
1 | {}
--------------------------------------------------------------------------------
/src/jql/tests/data/010.expected.jql:
--------------------------------------------------------------------------------
1 | /**/[[* = "familyName"] = "Doe"]
--------------------------------------------------------------------------------
/src/jql/tests/data/018.jql:
--------------------------------------------------------------------------------
1 | /foo/bar | skip :numskip limit 1000
2 |
--------------------------------------------------------------------------------
/src/jql/tests/data/008.expected.jql:
--------------------------------------------------------------------------------
1 | /foo/[bar = [1,2,3,{},{"foo":"bar"}]]
--------------------------------------------------------------------------------
/src/jql/tests/data/008.jql:
--------------------------------------------------------------------------------
1 | /foo/[bar = [1, 2,3,{},{"foo": "bar"}]]
2 |
--------------------------------------------------------------------------------
/src/jql/tests/data/009.jql:
--------------------------------------------------------------------------------
1 | /tags/[* in ["sample", "foo"] and * re "ta.*"]
--------------------------------------------------------------------------------
/src/jql/tests/data/015.expected.jql:
--------------------------------------------------------------------------------
1 | /foo/bar and (/foo/baz or /foo/gaz)
--------------------------------------------------------------------------------
/src/jql/tests/data/020.jql:
--------------------------------------------------------------------------------
1 | /= :? | apply {"foo":"bar","nums":[1,2,3,4,5]}
--------------------------------------------------------------------------------
/src/bindings/archived/README.md:
--------------------------------------------------------------------------------
1 | # Archived bindings. Contributors welcomed.
--------------------------------------------------------------------------------
/src/bindings/archived/ejdb2_android/test/settings.gradle:
--------------------------------------------------------------------------------
1 | include ':ejdb2'
2 |
--------------------------------------------------------------------------------
/src/jql/tests/data/018.expected.jql:
--------------------------------------------------------------------------------
1 | /foo/bar
2 | | skip :numskip limit 1000
--------------------------------------------------------------------------------
/src/bindings/archived/ejdb2_react_native/binding/android/src/main/.gitignore:
--------------------------------------------------------------------------------
1 | /gen
--------------------------------------------------------------------------------
/src/bindings/archived/ejdb2_react_native/tests/.gitattributes:
--------------------------------------------------------------------------------
1 | *.pbxproj -text
2 |
--------------------------------------------------------------------------------
/src/jql/tests/data/009.expected.jql:
--------------------------------------------------------------------------------
1 | /tags/[* in ["sample","foo"] and * re "ta.*"]
--------------------------------------------------------------------------------
/src/jql/tests/data/021.jql:
--------------------------------------------------------------------------------
1 | @users/= :id | apply {"foo":"bar","nums":[1,2,3,4,5]}
--------------------------------------------------------------------------------
/src/bindings/archived/ejdb2_android/test/ejdb2/.gitignore:
--------------------------------------------------------------------------------
1 | /build
2 | /jniLibs
3 | /libs
--------------------------------------------------------------------------------
/src/jql/tests/data/020.expected.jql:
--------------------------------------------------------------------------------
1 | /=:?
2 | | apply {"foo":"bar","nums":[1,2,3,4,5]}
--------------------------------------------------------------------------------
/src/bindings/ejdb2_jni/.gitignore:
--------------------------------------------------------------------------------
1 |
2 | ### Idea All template
3 | /.idea
4 | *.iml
5 | *.ipr
--------------------------------------------------------------------------------
/src/jql/tests/data/007.jql:
--------------------------------------------------------------------------------
1 | /foo/[bar = :? and "baz" = :?] or /root/**/[fname not re "John"]
--------------------------------------------------------------------------------
/src/jql/tests/data/021.expected.jql:
--------------------------------------------------------------------------------
1 | @users/=:id
2 | | apply {"foo":"bar","nums":[1,2,3,4,5]}
--------------------------------------------------------------------------------
/src/bindings/archived/ejdb2_flutter/android/settings.gradle:
--------------------------------------------------------------------------------
1 | rootProject.name = 'ejdb2_flutter'
2 |
--------------------------------------------------------------------------------
/src/bindings/archived/ejdb2_swift/EJDB2Swift/.vscode/settings.json:
--------------------------------------------------------------------------------
1 | {
2 | "cSpell.enabled": true
3 | }
--------------------------------------------------------------------------------
/src/jql/tests/data/007.expected.jql:
--------------------------------------------------------------------------------
1 | /foo/[bar = :? and "baz" = :?] or /root/**/[fname not re "John"]
--------------------------------------------------------------------------------
/src/jql/tests/data/016.jql:
--------------------------------------------------------------------------------
1 | /foo/bar and (/foo/baz or (/foo/gaz and /foo/daz) and (/foo/sss or /foo/vvv))
--------------------------------------------------------------------------------
/src/bindings/archived/ejdb2_react_native/tests/android/.gitignore:
--------------------------------------------------------------------------------
1 | !/gradle/wrapper/gradle-wrapper.jar
2 |
--------------------------------------------------------------------------------
/src/bindings/archived/ejdb2_react_native/tests/android/.npmignore:
--------------------------------------------------------------------------------
1 | /gradle/wrapper/gradle-wrapper.jar
2 |
--------------------------------------------------------------------------------
/man/Autark:
--------------------------------------------------------------------------------
1 | install { ^{${INSTALL_MAN_DIR} /man3} ./ejdb2.3 }
2 | install { ^{${INSTALL_MAN_DIR} /man1} ./jbs.1 }
--------------------------------------------------------------------------------
/src/bindings/archived/ejdb2_react_native/tests/app.json:
--------------------------------------------------------------------------------
1 | {
2 | "name": "test",
3 | "displayName": "test"
4 | }
--------------------------------------------------------------------------------
/src/bindings/ejdb2_node/CHANGELOG.md:
--------------------------------------------------------------------------------
1 | ejdb_node (@EJDB_NODE_VERSION@)
2 |
3 | - Upgraded to ejdb2 v@META_VERSION@
--------------------------------------------------------------------------------
/src/jql/tests/data/016.expected.jql:
--------------------------------------------------------------------------------
1 | /foo/bar and (/foo/baz or (/foo/gaz and /foo/daz) and (/foo/sss or /foo/vvv))
--------------------------------------------------------------------------------
/src/bindings/archived/ejdb2_flutter/example/ios/Runner/Runner-Bridging-Header.h:
--------------------------------------------------------------------------------
1 | #import "GeneratedPluginRegistrant.h"
--------------------------------------------------------------------------------
/src/bindings/archived/ejdb2_react_native/binding/android/.gitignore:
--------------------------------------------------------------------------------
1 | /.idea
2 | /libs
3 | *.iml
4 | /local.properties
--------------------------------------------------------------------------------
/src/bindings/archived/ejdb2_react_native/tests/e2e/mocha.opts:
--------------------------------------------------------------------------------
1 | --recursive --timeout 120000 --bail --file e2e/init.js
2 |
--------------------------------------------------------------------------------
/src/bindings/archived/ejdb2_dart/CHANGELOG.md:
--------------------------------------------------------------------------------
1 | ejdb_dart (@EJDB2_DART_VERSION@)
2 |
3 | - Upgraded to ejdb2 v@PROJECT_VERSION@
--------------------------------------------------------------------------------
/src/bindings/archived/ejdb2_react_native/binding/.gitignore:
--------------------------------------------------------------------------------
1 | *.iml
2 | /.idea
3 | *.tgz
4 | /yarn.lock
5 | node_modules/
6 | /local.properties
7 | /gradle*
--------------------------------------------------------------------------------
/src/bindings/archived/ejdb2_react_native/binding/CHANGELOG.md:
--------------------------------------------------------------------------------
1 | ejdb2_react_native (@EJDB2_RN_VERSION@)
2 |
3 | - Upgraded to ejdb2 v@PROJECT_VERSION@
4 |
--------------------------------------------------------------------------------
/src/bindings/archived/ejdb2_react_native/tests/.eslintrc.js:
--------------------------------------------------------------------------------
1 | module.exports = {
2 | root: true,
3 | extends: '@react-native-community',
4 | };
5 |
--------------------------------------------------------------------------------
/src/bindings/archived/ejdb2_react_native/tests/babel.config.js:
--------------------------------------------------------------------------------
1 | module.exports = {
2 | presets: ['module:metro-react-native-babel-preset'],
3 | };
4 |
--------------------------------------------------------------------------------
/src/bindings/ejdb2_jni/.editorconfig:
--------------------------------------------------------------------------------
1 | [*]
2 | charset=utf-8
3 | end_of_line=lf
4 | insert_final_newline=false
5 | indent_style=space
6 | indent_size=2
7 |
--------------------------------------------------------------------------------
/src/bindings/archived/ejdb2_flutter/android/gradle.properties:
--------------------------------------------------------------------------------
1 | org.gradle.jvmargs=-Xmx1024M
2 | android.useAndroidX=true
3 | android.enableJetifier=true
4 |
--------------------------------------------------------------------------------
/src/bindings/ejdb2_jni/hints.txt:
--------------------------------------------------------------------------------
1 | https://docs.oracle.com/en/java/javase/11/docs/specs/jni/
2 | (gdb) handle SIGSEGV nostop noprint pass
3 |
4 |
5 |
6 |
--------------------------------------------------------------------------------
/src/bindings/archived/ejdb2_flutter/example/android/gradle.properties:
--------------------------------------------------------------------------------
1 | org.gradle.jvmargs=-Xmx1024M
2 | android.useAndroidX=true
3 | android.enableJetifier=true
4 |
--------------------------------------------------------------------------------
/src/bindings/Autark:
--------------------------------------------------------------------------------
1 | if { ${BUILD_BINDING_JNI}
2 | include { ejdb2_jni/Autark }
3 | }
4 |
5 | if { ${BUILD_BINDING_NODEJS}
6 | include { ejdb2_node/Autark }
7 | }
--------------------------------------------------------------------------------
/src/bindings/archived/ejdb2_android/test/.gitignore:
--------------------------------------------------------------------------------
1 | !/gradle/wrapper/gradle-wrapper.jar
2 | .gradle
3 | .DS_Store
4 | /build
5 | /captures
6 | .externalNativeBuild
7 |
--------------------------------------------------------------------------------
/.gitmodules:
--------------------------------------------------------------------------------
1 | [submodule "src/bindings/ejdb2_swift/EJDB2Swift"]
2 | path = src/bindings/ejdb2_swift/EJDB2Swift
3 | url = https://github.com/Softmotions/EJDB2Swift.git
4 |
--------------------------------------------------------------------------------
/src/bindings/archived/ejdb2_react_native/tests/android/app/src/main/res/values/strings.xml:
--------------------------------------------------------------------------------
1 |
2 | test
3 |
4 |
--------------------------------------------------------------------------------
/src/bindings/archived/ejdb2_flutter/ios/Classes/Ejdb2FlutterPlugin.h:
--------------------------------------------------------------------------------
1 | #import
2 |
3 | @interface Ejdb2FlutterPlugin : NSObject
4 | @end
5 |
--------------------------------------------------------------------------------
/src/bindings/archived/ejdb2_flutter/example/ios/Flutter/Debug.xcconfig:
--------------------------------------------------------------------------------
1 | #include "Pods/Target Support Files/Pods-Runner/Pods-Runner.debug.xcconfig"
2 | #include "Generated.xcconfig"
3 |
--------------------------------------------------------------------------------
/src/bindings/archived/ejdb2_flutter/example/ios/Flutter/Release.xcconfig:
--------------------------------------------------------------------------------
1 | #include "Pods/Target Support Files/Pods-Runner/Pods-Runner.release.xcconfig"
2 | #include "Generated.xcconfig"
3 |
--------------------------------------------------------------------------------
/src/jql/tests/data/019.jql:
--------------------------------------------------------------------------------
1 | /foo/bar | apply {"foo":"bar","nums":[1,2,3,4,5]}
2 | | all - /**/author/{givenName,familyName}
3 | | asc /foo/bar desc :myfield
4 | skip :numskip limit 1000
5 |
--------------------------------------------------------------------------------
/src/bindings/archived/ejdb2_flutter/CHANGELOG.md:
--------------------------------------------------------------------------------
1 | ## @EJDB2_FLUTTER_VERSION@
2 |
3 | - Fixed java.util.concurrent.RejectedExecutionException #305
4 | - Upgraded to ejdb2 v@PROJECT_VERSION@
5 |
6 |
--------------------------------------------------------------------------------
/src/bindings/archived/ejdb2_swift/EJDB2Swift/Sources/CEJDB2/module.modulemap:
--------------------------------------------------------------------------------
1 | module CEJDB2 [system] [extern_c] {
2 | umbrella header "swift_ejdb2.h"
3 | link "ejdb2"
4 | export *
5 | }
6 |
--------------------------------------------------------------------------------
/src/bindings/archived/ejdb2_android/test/gradle/wrapper/gradle-wrapper.jar:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Softmotions/ejdb/HEAD/src/bindings/archived/ejdb2_android/test/gradle/wrapper/gradle-wrapper.jar
--------------------------------------------------------------------------------
/src/bindings/archived/ejdb2_flutter/android/src/main/AndroidManifest.xml:
--------------------------------------------------------------------------------
1 |
3 |
4 |
--------------------------------------------------------------------------------
/src/bindings/archived/ejdb2_swift/EJDB2Swift/Tests/LinuxMain.swift:
--------------------------------------------------------------------------------
1 | import XCTest
2 | import EJDB2Tests
3 |
4 | var tests = [XCTestCaseEntry]()
5 | tests += EJDB2Tests.allTests()
6 | XCTMain(tests)
7 |
--------------------------------------------------------------------------------
/src/bindings/archived/ejdb2_flutter/android/.gitignore:
--------------------------------------------------------------------------------
1 | !*.iml
2 | .gradle
3 | /local.properties
4 | /.idea/workspace.xml
5 | /.idea/libraries
6 | .DS_Store
7 | /build
8 | /captures
9 | /libs
10 |
--------------------------------------------------------------------------------
/src/bindings/archived/ejdb2_flutter/android/gradle/wrapper/gradle-wrapper.jar:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Softmotions/ejdb/HEAD/src/bindings/archived/ejdb2_flutter/android/gradle/wrapper/gradle-wrapper.jar
--------------------------------------------------------------------------------
/src/jql/tests/data/019.expected.jql:
--------------------------------------------------------------------------------
1 | /foo/bar
2 | | apply {"foo":"bar","nums":[1,2,3,4,5]}
3 | | all - /**/author/{givenName,familyName}
4 | | asc /foo/bar
5 | desc :myfield
6 | skip :numskip limit 1000
--------------------------------------------------------------------------------
/src/bindings/archived/ejdb2_react_native/tests/android/keystores/debug.keystore.properties:
--------------------------------------------------------------------------------
1 | key.store=debug.keystore
2 | key.alias=androiddebugkey
3 | key.store.password=android
4 | key.alias.password=android
5 |
--------------------------------------------------------------------------------
/src/bindings/archived/ejdb2_flutter/example/android/gradle/wrapper/gradle-wrapper.jar:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Softmotions/ejdb/HEAD/src/bindings/archived/ejdb2_flutter/example/android/gradle/wrapper/gradle-wrapper.jar
--------------------------------------------------------------------------------
/src/bindings/archived/ejdb2_react_native/binding/android/src/main/AndroidManifest.xml:
--------------------------------------------------------------------------------
1 |
3 |
4 |
--------------------------------------------------------------------------------
/src/bindings/archived/ejdb2_react_native/binding/.npmignore:
--------------------------------------------------------------------------------
1 | *.tgz
2 | *.cmake
3 | yarn.lock
4 | /test
5 | /CMakeLists.txt
6 | /CMakeFiles
7 | /Makefile
8 | /android/build
9 | /android/.gradle
10 | !/android/libs
11 |
--------------------------------------------------------------------------------
/src/bindings/archived/ejdb2_react_native/tests/android/gradle/wrapper/gradle-wrapper.jar:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Softmotions/ejdb/HEAD/src/bindings/archived/ejdb2_react_native/tests/android/gradle/wrapper/gradle-wrapper.jar
--------------------------------------------------------------------------------
/src/bindings/archived/ejdb2_react_native/binding/android/gradle/wrapper/gradle-wrapper.jar:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Softmotions/ejdb/HEAD/src/bindings/archived/ejdb2_react_native/binding/android/gradle/wrapper/gradle-wrapper.jar
--------------------------------------------------------------------------------
/src/bindings/archived/ejdb2_swift/EJDB2Swift/.gitignore:
--------------------------------------------------------------------------------
1 | *.db
2 | *.db-wal
3 | .DS_Store
4 | /include
5 | /lib
6 | /.build
7 | /build-xcode
8 | /.idea
9 | /Packages
10 | #/*.xcodeproj
11 | #xcuserdata/
12 | *.xcuserstate
13 |
--------------------------------------------------------------------------------
/src/bindings/archived/ejdb2_flutter/.gitignore:
--------------------------------------------------------------------------------
1 | local.properties
2 | !*.iml
3 | .classpath
4 | !.project
5 | .DS_Store
6 | .dart_tool/
7 | .packages
8 | .pub/
9 | build/
10 | .flutter-plugins-dependencies
11 | Podfile.lock
12 |
13 |
--------------------------------------------------------------------------------
/.editorconfig:
--------------------------------------------------------------------------------
1 | [*]
2 | charset=utf-8
3 | end_of_line=lf
4 | insert_final_newline=false
5 | indent_style=space
6 | indent_size=2
7 |
8 | [Makefile]
9 | indent_style = tab
10 |
11 | [*.{c,cpp,cc,h,hpp}]
12 | insert_final_newline=true
13 |
--------------------------------------------------------------------------------
/src/bindings/archived/ejdb2_flutter/example/android/app/src/main/res/mipmap-hdpi/ic_launcher.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Softmotions/ejdb/HEAD/src/bindings/archived/ejdb2_flutter/example/android/app/src/main/res/mipmap-hdpi/ic_launcher.png
--------------------------------------------------------------------------------
/src/bindings/archived/ejdb2_flutter/example/android/app/src/main/res/mipmap-mdpi/ic_launcher.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Softmotions/ejdb/HEAD/src/bindings/archived/ejdb2_flutter/example/android/app/src/main/res/mipmap-mdpi/ic_launcher.png
--------------------------------------------------------------------------------
/src/bindings/archived/ejdb2_flutter/example/android/app/src/main/res/mipmap-xhdpi/ic_launcher.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Softmotions/ejdb/HEAD/src/bindings/archived/ejdb2_flutter/example/android/app/src/main/res/mipmap-xhdpi/ic_launcher.png
--------------------------------------------------------------------------------
/src/bindings/archived/ejdb2_flutter/example/android/app/src/main/res/mipmap-xxhdpi/ic_launcher.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Softmotions/ejdb/HEAD/src/bindings/archived/ejdb2_flutter/example/android/app/src/main/res/mipmap-xxhdpi/ic_launcher.png
--------------------------------------------------------------------------------
/src/jql/tests/data/001.expected.jql:
--------------------------------------------------------------------------------
1 | @one/**/[familyName re "D\n.*"] and /**/family/mother/[age > 30 and age <= 40 or name re "Grace.*"] and not /bar/ba z"zz
2 | | apply {"foo":"bar","nums":[1,2,3,4,5]}
3 | | all - /**/author/{givenName,familyName}
--------------------------------------------------------------------------------
/src/bindings/archived/ejdb2_flutter/example/android/app/src/main/res/mipmap-xxxhdpi/ic_launcher.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Softmotions/ejdb/HEAD/src/bindings/archived/ejdb2_flutter/example/android/app/src/main/res/mipmap-xxxhdpi/ic_launcher.png
--------------------------------------------------------------------------------
/src/bindings/archived/ejdb2_react_native/tests/android/app/src/main/res/mipmap-hdpi/ic_launcher.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Softmotions/ejdb/HEAD/src/bindings/archived/ejdb2_react_native/tests/android/app/src/main/res/mipmap-hdpi/ic_launcher.png
--------------------------------------------------------------------------------
/src/bindings/archived/ejdb2_react_native/tests/android/app/src/main/res/mipmap-mdpi/ic_launcher.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Softmotions/ejdb/HEAD/src/bindings/archived/ejdb2_react_native/tests/android/app/src/main/res/mipmap-mdpi/ic_launcher.png
--------------------------------------------------------------------------------
/src/bindings/archived/ejdb2_react_native/tests/android/app/src/main/res/mipmap-xhdpi/ic_launcher.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Softmotions/ejdb/HEAD/src/bindings/archived/ejdb2_react_native/tests/android/app/src/main/res/mipmap-xhdpi/ic_launcher.png
--------------------------------------------------------------------------------
/src/bindings/archived/ejdb2_react_native/tests/android/app/src/main/res/mipmap-xxhdpi/ic_launcher.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Softmotions/ejdb/HEAD/src/bindings/archived/ejdb2_react_native/tests/android/app/src/main/res/mipmap-xxhdpi/ic_launcher.png
--------------------------------------------------------------------------------
/src/bindings/archived/ejdb2_react_native/tests/android/app/src/main/res/mipmap-xxxhdpi/ic_launcher.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Softmotions/ejdb/HEAD/src/bindings/archived/ejdb2_react_native/tests/android/app/src/main/res/mipmap-xxxhdpi/ic_launcher.png
--------------------------------------------------------------------------------
/src/bindings/archived/ejdb2_flutter/example/test_driver/app.dart:
--------------------------------------------------------------------------------
1 | import 'package:flutter_driver/driver_extension.dart';
2 | import 'package:ejdb2_example/main.dart' as app;
3 |
4 | void main() {
5 | enableFlutterDriverExtension();
6 | app.main();
7 | }
8 |
--------------------------------------------------------------------------------
/src/bindings/archived/ejdb2_react_native/tests/android/app/src/main/res/mipmap-hdpi/ic_launcher_round.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Softmotions/ejdb/HEAD/src/bindings/archived/ejdb2_react_native/tests/android/app/src/main/res/mipmap-hdpi/ic_launcher_round.png
--------------------------------------------------------------------------------
/src/bindings/archived/ejdb2_react_native/tests/android/app/src/main/res/mipmap-mdpi/ic_launcher_round.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Softmotions/ejdb/HEAD/src/bindings/archived/ejdb2_react_native/tests/android/app/src/main/res/mipmap-mdpi/ic_launcher_round.png
--------------------------------------------------------------------------------
/src/jql/tests/data/001.jql:
--------------------------------------------------------------------------------
1 | @one/**/[familyName re "D\n.*"]
2 | and /**/family/mother/[age > 30 and age <= 40 or name re "Grace.*"]
3 | and not /bar/"ba z\"zz"
4 | | apply {"foo":"bar", "nums": [1,2,3,4,5]}
5 | | all - /**/author/{givenName,familyName}
6 |
--------------------------------------------------------------------------------
/src/bindings/archived/ejdb2_android/test/local.properties:
--------------------------------------------------------------------------------
1 |
2 | ## Path to Android SDK dir
3 | sdk.dir=/Android-sdk
4 |
5 | ## Path to Android NDK dir
6 | ndk.dir=/Android-sdk/ndk-bundle
7 |
8 | ## Target abi name: armeabi-v7a, arm64-v8a, x86, x86_64
9 | abi.name=x86
--------------------------------------------------------------------------------
/src/bindings/archived/ejdb2_flutter/example/ios/Runner/Assets.xcassets/LaunchImage.imageset/LaunchImage.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Softmotions/ejdb/HEAD/src/bindings/archived/ejdb2_flutter/example/ios/Runner/Assets.xcassets/LaunchImage.imageset/LaunchImage.png
--------------------------------------------------------------------------------
/src/bindings/archived/ejdb2_react_native/tests/android/app/src/main/res/mipmap-xhdpi/ic_launcher_round.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Softmotions/ejdb/HEAD/src/bindings/archived/ejdb2_react_native/tests/android/app/src/main/res/mipmap-xhdpi/ic_launcher_round.png
--------------------------------------------------------------------------------
/src/bindings/archived/ejdb2_react_native/tests/android/app/src/main/res/mipmap-xxhdpi/ic_launcher_round.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Softmotions/ejdb/HEAD/src/bindings/archived/ejdb2_react_native/tests/android/app/src/main/res/mipmap-xxhdpi/ic_launcher_round.png
--------------------------------------------------------------------------------
/src/bindings/archived/ejdb2_react_native/tests/android/app/src/main/res/mipmap-xxxhdpi/ic_launcher_round.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Softmotions/ejdb/HEAD/src/bindings/archived/ejdb2_react_native/tests/android/app/src/main/res/mipmap-xxxhdpi/ic_launcher_round.png
--------------------------------------------------------------------------------
/src/bindings/archived/ejdb2_swift/EJDB2Swift/EJDB2.xcodeproj/project.xcworkspace/contents.xcworkspacedata:
--------------------------------------------------------------------------------
1 |
2 |
4 |
6 |
7 |
8 |
--------------------------------------------------------------------------------
/src/bindings/archived/ejdb2_flutter/example/ios/Runner/Assets.xcassets/LaunchImage.imageset/LaunchImage@2x.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Softmotions/ejdb/HEAD/src/bindings/archived/ejdb2_flutter/example/ios/Runner/Assets.xcassets/LaunchImage.imageset/LaunchImage@2x.png
--------------------------------------------------------------------------------
/src/bindings/archived/ejdb2_flutter/example/ios/Runner/Assets.xcassets/LaunchImage.imageset/LaunchImage@3x.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Softmotions/ejdb/HEAD/src/bindings/archived/ejdb2_flutter/example/ios/Runner/Assets.xcassets/LaunchImage.imageset/LaunchImage@3x.png
--------------------------------------------------------------------------------
/src/bindings/archived/ejdb2_flutter/example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-20x20@1x.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Softmotions/ejdb/HEAD/src/bindings/archived/ejdb2_flutter/example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-20x20@1x.png
--------------------------------------------------------------------------------
/src/bindings/archived/ejdb2_flutter/example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-20x20@2x.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Softmotions/ejdb/HEAD/src/bindings/archived/ejdb2_flutter/example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-20x20@2x.png
--------------------------------------------------------------------------------
/src/bindings/archived/ejdb2_flutter/example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-20x20@3x.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Softmotions/ejdb/HEAD/src/bindings/archived/ejdb2_flutter/example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-20x20@3x.png
--------------------------------------------------------------------------------
/src/bindings/archived/ejdb2_flutter/example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-29x29@1x.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Softmotions/ejdb/HEAD/src/bindings/archived/ejdb2_flutter/example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-29x29@1x.png
--------------------------------------------------------------------------------
/src/bindings/archived/ejdb2_flutter/example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-29x29@2x.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Softmotions/ejdb/HEAD/src/bindings/archived/ejdb2_flutter/example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-29x29@2x.png
--------------------------------------------------------------------------------
/src/bindings/archived/ejdb2_flutter/example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-29x29@3x.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Softmotions/ejdb/HEAD/src/bindings/archived/ejdb2_flutter/example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-29x29@3x.png
--------------------------------------------------------------------------------
/src/bindings/archived/ejdb2_flutter/example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-40x40@1x.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Softmotions/ejdb/HEAD/src/bindings/archived/ejdb2_flutter/example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-40x40@1x.png
--------------------------------------------------------------------------------
/src/bindings/archived/ejdb2_flutter/example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-40x40@2x.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Softmotions/ejdb/HEAD/src/bindings/archived/ejdb2_flutter/example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-40x40@2x.png
--------------------------------------------------------------------------------
/src/bindings/archived/ejdb2_flutter/example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-40x40@3x.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Softmotions/ejdb/HEAD/src/bindings/archived/ejdb2_flutter/example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-40x40@3x.png
--------------------------------------------------------------------------------
/src/bindings/archived/ejdb2_flutter/example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-60x60@2x.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Softmotions/ejdb/HEAD/src/bindings/archived/ejdb2_flutter/example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-60x60@2x.png
--------------------------------------------------------------------------------
/src/bindings/archived/ejdb2_flutter/example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-60x60@3x.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Softmotions/ejdb/HEAD/src/bindings/archived/ejdb2_flutter/example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-60x60@3x.png
--------------------------------------------------------------------------------
/src/bindings/archived/ejdb2_flutter/example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-76x76@1x.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Softmotions/ejdb/HEAD/src/bindings/archived/ejdb2_flutter/example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-76x76@1x.png
--------------------------------------------------------------------------------
/src/bindings/archived/ejdb2_flutter/example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-76x76@2x.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Softmotions/ejdb/HEAD/src/bindings/archived/ejdb2_flutter/example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-76x76@2x.png
--------------------------------------------------------------------------------
/src/bindings/archived/ejdb2_flutter/example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-1024x1024@1x.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Softmotions/ejdb/HEAD/src/bindings/archived/ejdb2_flutter/example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-1024x1024@1x.png
--------------------------------------------------------------------------------
/src/bindings/archived/ejdb2_flutter/example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-83.5x83.5@2x.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Softmotions/ejdb/HEAD/src/bindings/archived/ejdb2_flutter/example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-83.5x83.5@2x.png
--------------------------------------------------------------------------------
/src/bindings/archived/ejdb2_react_native/tests/android/settings.gradle:
--------------------------------------------------------------------------------
1 | rootProject.name = 'test'
2 | include ':ejdb2_react_native'
3 | project(':ejdb2_react_native').projectDir = new File(rootProject.projectDir, '../node_modules/ejdb2_react_native/android')
4 |
5 | include ':app'
6 |
--------------------------------------------------------------------------------
/src/bindings/archived/ejdb2_react_native/tests/index.js:
--------------------------------------------------------------------------------
1 | /**
2 | * @format
3 | */
4 |
5 | import {AppRegistry} from 'react-native';
6 | import App from './App';
7 | import {name as appName} from './app.json';
8 |
9 | AppRegistry.registerComponent(appName, () => App);
10 |
--------------------------------------------------------------------------------
/src/bindings/archived/ejdb2_swift/EJDB2Swift/Tests/EJDB2Tests/XCTestManifests.swift:
--------------------------------------------------------------------------------
1 | import XCTest
2 |
3 | #if !canImport(ObjectiveC)
4 | public func allTests() -> [XCTestCaseEntry] {
5 | return [
6 | testCase(EJDB2Tests.allTests),
7 | ]
8 | }
9 | #endif
10 |
--------------------------------------------------------------------------------
/src/bindings/archived/ejdb2_flutter/example/ios/Runner.xcodeproj/project.xcworkspace/contents.xcworkspacedata:
--------------------------------------------------------------------------------
1 |
2 |
4 |
6 |
7 |
8 |
--------------------------------------------------------------------------------
/src/jbs/Autark:
--------------------------------------------------------------------------------
1 | cc {
2 | jbs.c
3 | set { _ ..${CFLAGS} -DIW_STATIC }
4 | }
5 |
6 | run {
7 | exec { ${CC} ${CC_OBJS} set { _ ${LIBEJDB_A} ..${LDFLAGS} } -o jbs }
8 | consumes { ${CC_OBJS} ${LIBEJDB_A} }
9 | produces { jbs }
10 | }
11 |
12 | install { ${INSTALL_BIN_DIR} jbs }
--------------------------------------------------------------------------------
/src/bindings/archived/ejdb2_android/test/gradle/wrapper/gradle-wrapper.properties:
--------------------------------------------------------------------------------
1 | distributionBase=GRADLE_USER_HOME
2 | distributionPath=wrapper/dists
3 | distributionUrl=https\://services.gradle.org/distributions/gradle-5.4.1-bin.zip
4 | zipStoreBase=GRADLE_USER_HOME
5 | zipStorePath=wrapper/dists
6 |
--------------------------------------------------------------------------------
/src/bindings/archived/ejdb2_flutter/android/gradle/wrapper/gradle-wrapper.properties:
--------------------------------------------------------------------------------
1 | distributionBase=GRADLE_USER_HOME
2 | distributionPath=wrapper/dists
3 | distributionUrl=https\://services.gradle.org/distributions/gradle-5.4.1-bin.zip
4 | zipStoreBase=GRADLE_USER_HOME
5 | zipStorePath=wrapper/dists
6 |
--------------------------------------------------------------------------------
/src/bindings/archived/ejdb2_react_native/tests/android/app/src/main/res/values/styles.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
7 |
8 |
9 |
--------------------------------------------------------------------------------
/src/bindings/archived/ejdb2_flutter/example/android/gradle/wrapper/gradle-wrapper.properties:
--------------------------------------------------------------------------------
1 | distributionBase=GRADLE_USER_HOME
2 | distributionPath=wrapper/dists
3 | distributionUrl=https\://services.gradle.org/distributions/gradle-5.4.1-bin.zip
4 | zipStoreBase=GRADLE_USER_HOME
5 | zipStorePath=wrapper/dists
6 |
--------------------------------------------------------------------------------
/src/bindings/archived/ejdb2_react_native/tests/android/gradle/wrapper/gradle-wrapper.properties:
--------------------------------------------------------------------------------
1 | distributionBase=GRADLE_USER_HOME
2 | distributionPath=wrapper/dists
3 | distributionUrl=https\://services.gradle.org/distributions/gradle-5.5.1-bin.zip
4 | zipStoreBase=GRADLE_USER_HOME
5 | zipStorePath=wrapper/dists
6 |
--------------------------------------------------------------------------------
/src/bindings/archived/ejdb2_react_native/CMakeLists.txt:
--------------------------------------------------------------------------------
1 | file(
2 | COPY .
3 | DESTINATION ${CMAKE_CURRENT_BINARY_DIR}
4 | REGEX "(/\\.gradle)|(/node_modules)|(/build$)|(/libs)|(/jniLibs)" EXCLUDE
5 | )
6 |
7 | add_subdirectory(binding)
8 | if (BUILD_TESTS)
9 | add_subdirectory(tests)
10 | endif()
11 |
--------------------------------------------------------------------------------
/man/ejdb2.3:
--------------------------------------------------------------------------------
1 | .TH "EJDB2" 3 "2020-04-01" "Man Page" "EJDB2"
2 |
3 | .SH NAME
4 | EJDB2 \- Embedded JSON Database engine
5 |
6 | .SH DESCRIPTION
7 | .PP
8 | EJDB2 is an embeddable JSON database engine published under MIT license.
9 |
10 | .SH "SEE ALSO"
11 | .I http://ejdb.org
12 | EJDB project offcial web site.
13 |
--------------------------------------------------------------------------------
/man/jbs.1:
--------------------------------------------------------------------------------
1 | .TH "JBS" 1 "2019-04-01" "Man Page" "JBS"
2 |
3 | .SH NAME
4 | EJDB2 standalone HTTP REST/Websocket server.
5 |
6 | .SH DESCRIPTION
7 | .PP
8 | EJDB2 is an embeddable JSON database engine published under MIT license.
9 |
10 | .SH "SEE ALSO"
11 | .I http://ejdb.org
12 | EJDB2 project offcial web site.
13 |
--------------------------------------------------------------------------------
/src/jql/Autark:
--------------------------------------------------------------------------------
1 | set {
2 | parent {
3 | SOURCES
4 | }
5 | ..${SOURCES}
6 | jql/jql.c
7 | jql/jqp.c
8 | }
9 |
10 | set {
11 | parent {
12 | PUB_HDRS
13 | }
14 | ..${PUB_HDRS}
15 | jql/jql.h
16 | }
17 |
18 | set {
19 | root {
20 | CFLAGS
21 | }
22 | ..${CFLAGS}
23 | -I SS{}
24 | }
--------------------------------------------------------------------------------
/src/bindings/archived/ejdb2_swift/EJDB2Swift/EJDB2.xcodeproj/project.xcworkspace/xcuserdata/adam.xcuserdatad/IDEFindNavigatorScopes.plist:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
--------------------------------------------------------------------------------
/src/bindings/archived/ejdb2_react_native/binding/android/gradle/wrapper/gradle-wrapper.properties:
--------------------------------------------------------------------------------
1 | #Wed Oct 30 17:49:09 NOVT 2019
2 | distributionBase=GRADLE_USER_HOME
3 | distributionPath=wrapper/dists
4 | zipStoreBase=GRADLE_USER_HOME
5 | zipStorePath=wrapper/dists
6 | distributionUrl=https\://services.gradle.org/distributions/gradle-5.4.1-all.zip
7 |
--------------------------------------------------------------------------------
/.autark/test_qsort_r.sh:
--------------------------------------------------------------------------------
1 | #!/bin/sh
2 |
3 | cat > './test_qsort_r.c' << 'EOF'
4 | #include
5 | int main(int argc, char **argv) {
6 | qsort_r(0, 0, 0, 0, 0);
7 | return 0;
8 | }
9 | EOF
10 |
11 | ${CC:=cc} ./test_qsort_r.c
12 |
13 | if [ "$?" -eq "0" ]; then
14 | autark set "HAVE_QSORT_R=1"
15 | else
16 | echo "No qsort_r found"
17 | fi
--------------------------------------------------------------------------------
/src/bindings/archived/ejdb2_flutter/example/ios/Runner.xcworkspace/contents.xcworkspacedata:
--------------------------------------------------------------------------------
1 |
2 |
4 |
6 |
7 |
9 |
10 |
11 |
--------------------------------------------------------------------------------
/src/bindings/archived/ejdb2_flutter/example/ios/Runner.xcworkspace/xcshareddata/IDEWorkspaceChecks.plist:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 | IDEDidComputeMac32BitWarning
6 |
7 |
8 |
9 |
--------------------------------------------------------------------------------
/src/bindings/archived/ejdb2_android/test/ejdb2/src/main/AndroidManifest.xml:
--------------------------------------------------------------------------------
1 |
2 |
4 |
5 |
8 |
9 |
10 |
--------------------------------------------------------------------------------
/src/bindings/archived/ejdb2_swift/EJDB2Swift/EJDB2.xcodeproj/project.xcworkspace/xcshareddata/IDEWorkspaceChecks.plist:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 | IDEDidComputeMac32BitWarning
6 |
7 |
8 |
9 |
--------------------------------------------------------------------------------
/src/jbr/Autark:
--------------------------------------------------------------------------------
1 | set {
2 | parent {
3 | SOURCES
4 | }
5 | ..${SOURCES}
6 | jbr/jbr.c
7 | }
8 |
9 | set {
10 | parent {
11 | PUB_HDRS
12 | }
13 | ..${PUB_HDRS}
14 | jbr/jbr.h
15 | }
16 |
17 | set {
18 | root {
19 | CFLAGS
20 | }
21 | ..${CFLAGS}
22 | -I SS{}
23 | }
24 |
25 | if { ${EJDB_BUILD_TESTS}
26 | include { tests/Autark }
27 | }
--------------------------------------------------------------------------------
/src/bindings/archived/ejdb2_flutter/.metadata:
--------------------------------------------------------------------------------
1 | # This file tracks properties of this Flutter project.
2 | # Used by Flutter tool to assess capabilities and perform upgrades etc.
3 | #
4 | # This file should be version controlled and should not be manually edited.
5 |
6 | version:
7 | revision: 68587a0916366e9512a78df22c44163d041dd5f3
8 | channel: stable
9 |
10 | project_type: plugin
11 |
--------------------------------------------------------------------------------
/src/bindings/archived/ejdb2_flutter/example/.metadata:
--------------------------------------------------------------------------------
1 | # This file tracks properties of this Flutter project.
2 | # Used by Flutter tool to assess capabilities and perform upgrades etc.
3 | #
4 | # This file should be version controlled and should not be manually edited.
5 |
6 | version:
7 | revision: 68587a0916366e9512a78df22c44163d041dd5f3
8 | channel: stable
9 |
10 | project_type: app
11 |
--------------------------------------------------------------------------------
/src/jbi/Autark:
--------------------------------------------------------------------------------
1 | set {
2 | parent {
3 | SOURCES
4 | }
5 | ..${SOURCES}
6 | jbi/jbi_consumer.c
7 | jbi/jbi_dup_scanner.c
8 | jbi/jbi_full_scanner.c
9 | jbi/jbi_pk_scanner.c
10 | jbi/jbi_selection.c
11 | jbi/jbi_sorter_consumer.c
12 | jbi/jbi_uniq_scanner.c
13 | jbi/jbi_util.c
14 | }
15 |
16 | set {
17 | root {
18 | CFLAGS
19 | }
20 | ..${CFLAGS}
21 | -I SS{}
22 | }
--------------------------------------------------------------------------------
/.autark/test_pthread.sh:
--------------------------------------------------------------------------------
1 | #!/bin/sh
2 |
3 | cat > './test_pthread.c' << 'EOF'
4 | #include
5 | int main(void) {
6 | pthread_t t;
7 | return 0;
8 | }
9 | EOF
10 |
11 | CC=${CC:-cc}
12 |
13 | if ${CC} ./test_pthread.c -pthread; then
14 | autark set "PTHREAD_LFLAG=-pthread"
15 | elif ${CC} ./test_pthread.c -lpthread; then
16 | autark set "PTHREAD_LFLAG=-lpthread"
17 | fi
18 |
19 | autark env CC
--------------------------------------------------------------------------------
/src/bindings/archived/ejdb2_flutter/example/android/app/src/debug/AndroidManifest.xml:
--------------------------------------------------------------------------------
1 |
3 |
6 |
7 |
8 |
--------------------------------------------------------------------------------
/src/bindings/archived/ejdb2_flutter/example/android/app/src/profile/AndroidManifest.xml:
--------------------------------------------------------------------------------
1 |
3 |
6 |
7 |
8 |
--------------------------------------------------------------------------------
/src/bindings/archived/ejdb2_flutter/example/ios/Runner/Assets.xcassets/LaunchImage.imageset/README.md:
--------------------------------------------------------------------------------
1 | # Launch Screen Assets
2 |
3 | You can customize the launch screen with your own desired assets by replacing the image files in this directory.
4 |
5 | You can also do it by opening your Flutter project's Xcode project with `open ios/Runner.xcworkspace`, selecting `Runner/Assets.xcassets` in the Project Navigator and dropping in the desired images.
--------------------------------------------------------------------------------
/src/bindings/ejdb2_node/example/package.json:
--------------------------------------------------------------------------------
1 | {
2 | "name": "ejdb2_ts_example",
3 | "version": "1.0.0",
4 | "main": "index.js",
5 | "description": "EJDB2 TypeScript example project",
6 | "private": true,
7 | "scripts": {
8 | "start": "tsc && node index.js"
9 | },
10 | "dependencies": {
11 | "ejdb2_node": "^1.0.23",
12 | "typescript": "^3.5.2"
13 | },
14 | "devDependencies": {
15 | "@types/node": "^12.12.5"
16 | }
17 | }
--------------------------------------------------------------------------------
/.gdbinit:
--------------------------------------------------------------------------------
1 |
2 | cd ./build/src/jbs
3 | file ./jbs
4 | #set args --ssl
5 |
6 | set confirm off
7 | set follow-fork-mode parent
8 | set detach-on-fork on
9 | set print elements 4096
10 |
11 | define lb
12 | set breakpoint pending on
13 | source ~/.breakpoints
14 | set breakpoint pending auto
15 | echo breakpoints loaded\n
16 | end
17 |
18 | define sb
19 | save breakpoints ~/.breakpoints
20 | echo breakpoints saved\n
21 | end
22 |
23 |
24 |
--------------------------------------------------------------------------------
/src/bindings/archived/ejdb2_flutter/example/android/app/src/main/res/values/styles.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
8 |
9 |
--------------------------------------------------------------------------------
/.autark/test_header.sh:
--------------------------------------------------------------------------------
1 | #!/bin/sh
2 |
3 | HEADER=$1
4 | DEFINE_VAR=$2
5 |
6 | usage() {
7 | echo "Usage test_header.sh "
8 | exit 1
9 | }
10 |
11 | [ -n "$HEADER" ] || usage
12 | [ -n "$DEFINE_VAR" ] || usage
13 |
14 | cat > "test_header.c" <
16 | int main() {
17 | return 0;
18 | }
19 | EOF
20 |
21 | if ${CC:-cc} -Werror ./test_header.c; then
22 | autark set "$DEFINE_VAR=1"
23 | fi
24 |
25 | autark env CC
26 |
--------------------------------------------------------------------------------
/.autark/test_blocks.sh:
--------------------------------------------------------------------------------
1 | #!/bin/sh
2 |
3 | DEFINE_VAR=$1
4 | CC=${CC:-cc}
5 |
6 | usage() {
7 | echo "Usage test_blocks.sh "
8 | exit 1
9 | }
10 |
11 | [ -n "$DEFINE_VAR" ] || usage
12 |
13 | cat > "test_blocks.c" <<'EOF'
14 | int main() {
15 | void (^block)(void) = ^{ };
16 | block();
17 | return 0;
18 | }
19 | EOF
20 |
21 | if ${CC} -Werror -fblocks -lBlocksRuntime ./test_blocks.c -o ./test_blocks; then
22 | autark set "$DEFINE_VAR=1"
23 | fi
24 |
25 | autark env CC
26 |
--------------------------------------------------------------------------------
/src/bindings/archived/ejdb2_dart/pubspec.yaml.in:
--------------------------------------------------------------------------------
1 | name: ejdb2_dart
2 | description: Embeddable JSON Database engine EJDB http://ejdb.org Dart binding.
3 | version: @EJDB2_DART_VERSION@
4 | homepage: https://github.com/Softmotions/ejdb
5 | issue_tracker: https://github.com/Softmotions/ejdb/issues?q=is%3Aissue+label%3ADart+
6 | license: MIT
7 |
8 | environment:
9 | sdk: ">=2.12.0 <3.0.0"
10 |
11 | dependencies:
12 | json_at: ^2.1.0
13 | path: ^1.8.0
14 | quiver: ^3.0.1
15 | test: ^1.17.8
16 |
--------------------------------------------------------------------------------
/src/bindings/archived/ejdb2_react_native/tests/android/app/src/main/java/com/test/MainActivity.java:
--------------------------------------------------------------------------------
1 | package com.test;
2 |
3 | import com.facebook.react.ReactActivity;
4 |
5 | public class MainActivity extends ReactActivity {
6 |
7 | /**
8 | * Returns the name of the main component registered from JavaScript.
9 | * This is used to schedule rendering of the component.
10 | */
11 | @Override
12 | protected String getMainComponentName() {
13 | return "test";
14 | }
15 | }
16 |
--------------------------------------------------------------------------------
/src/libejdb2.pc.in:
--------------------------------------------------------------------------------
1 | exec_prefix=@INSTALL_PREFIX@/@INSTALL_BIN_DIR@
2 | libdir=@INSTALL_PREFIX@/@INSTALL_LIB_DIR@
3 | includedir=@INSTALL_PREFIX@/@EJDB_PUBLIC_HEADERS_DESTINATION@
4 | artifact=@META_NAME@
5 |
6 | Name: @META_NAME@
7 | Description: @META_DESCRIPTION@
8 | URL: @META_WEBSITE@
9 | Version: @META_VERSION@
10 | Libs: -L${libdir} -l${artifact}
11 | Requires: libiwnet
12 | Libs.private: @LDFLAGS_PKGCONF@
13 | Cflags: -I@INSTALL_PREFIX@/@INSTALL_INCLUDE_DIR@ -I${includedir}
14 | Cflags.private: -DIW_STATIC
--------------------------------------------------------------------------------
/src/bindings/archived/ejdb2_android/README.md:
--------------------------------------------------------------------------------
1 | # WARNING: Unsupported now. Maintainer needed.
2 |
3 | # Android
4 |
5 | * [Flutter binding](https://github.com/Softmotions/ejdb/tree/master/src/bindings/ejdb2_flutter)
6 | * [React Native binding](https://github.com/Softmotions/ejdb/tree/master/src/bindings/ejdb2_react_native)
7 |
8 | ## Sample Android application
9 |
10 | * https://github.com/Softmotions/ejdb/tree/master/src/bindings/ejdb2_android/test
11 |
12 | * https://github.com/Softmotions/ejdb_android_todo_app
--------------------------------------------------------------------------------
/src/bindings/archived/ejdb2_react_native/tests/e2e/firstTest.spec.js:
--------------------------------------------------------------------------------
1 | describe('EJDB2', () => {
2 |
3 | beforeEach(async () => {
4 | await device.reloadReactNative();
5 | });
6 |
7 | it('all', async () => {
8 | await new Promise((resolve) => setTimeout(resolve, 2000));
9 | await element(by.id('run')).tap();
10 | await waitFor(element(by.id('status'))).toExist().withTimeout(2000);
11 | await waitFor(element(by.id('status'))).toHaveText('OK').withTimeout(20000);
12 | });
13 | });
14 |
--------------------------------------------------------------------------------
/src/bindings/archived/ejdb2_flutter/example/ios/Runner/AppDelegate.swift:
--------------------------------------------------------------------------------
1 | import UIKit
2 | import Flutter
3 |
4 | @UIApplicationMain
5 | @objc class AppDelegate: FlutterAppDelegate {
6 | override func application(
7 | _ application: UIApplication,
8 | didFinishLaunchingWithOptions launchOptions: [UIApplication.LaunchOptionsKey: Any]?
9 | ) -> Bool {
10 | GeneratedPluginRegistrant.register(with: self)
11 | return super.application(application, didFinishLaunchingWithOptions: launchOptions)
12 | }
13 | }
14 |
--------------------------------------------------------------------------------
/src/bindings/archived/ejdb2_dart/pubspec.yaml:
--------------------------------------------------------------------------------
1 | name: ejdb2_dart
2 | description: Embeddable JSON Database engine EJDB http://ejdb.org Dart binding.
3 | version: 1.0.63
4 | homepage: https://github.com/Softmotions/ejdb
5 | issue_tracker: https://github.com/Softmotions/ejdb/issues?q=is%3Aissue+label%3ADart+
6 | license: MIT
7 |
8 | environment:
9 | sdk: ">=2.12.0-0 <3.0.0"
10 |
11 | dependencies:
12 | json_at: ^2.0.0-nullsafety.1
13 | path: ^1.8.0-nullsafety.3
14 | quiver: ^3.0.0-nullsafety.2
15 | test: ^1.16.0-nullsafety.13
16 |
--------------------------------------------------------------------------------
/src/bindings/archived/ejdb2_flutter/example/android/app/src/main/java/com/softmotions/ejdb2_example/MainActivity.java:
--------------------------------------------------------------------------------
1 | package com.softmotions.ejdb2_example;
2 |
3 | import android.os.Bundle;
4 | import io.flutter.app.FlutterActivity;
5 | import io.flutter.plugins.GeneratedPluginRegistrant;
6 |
7 | public class MainActivity extends FlutterActivity {
8 | @Override
9 | protected void onCreate(Bundle savedInstanceState) {
10 | super.onCreate(savedInstanceState);
11 | GeneratedPluginRegistrant.registerWith(this);
12 | }
13 | }
14 |
--------------------------------------------------------------------------------
/src/bindings/archived/ejdb2_flutter/example/android/.project:
--------------------------------------------------------------------------------
1 |
2 |
3 | android
4 | Project android created by Buildship.
5 |
6 |
7 |
8 |
9 | org.eclipse.buildship.core.gradleprojectbuilder
10 |
11 |
12 |
13 |
14 |
15 | org.eclipse.buildship.core.gradleprojectnature
16 |
17 |
18 |
--------------------------------------------------------------------------------
/src/bindings/ejdb2_jni/src/main/java/com/softmotions/ejdb2/JSONMissingException.java:
--------------------------------------------------------------------------------
1 | package com.softmotions.ejdb2;
2 |
3 | /**
4 | * Missing JSON value at key exception.
5 | */
6 | public class JSONMissingException extends RuntimeException {
7 |
8 | private static final long serialVersionUID = -1180177018517230756L;
9 |
10 | public JSONMissingException(String key) {
11 | super("Missing JSON value at: '" + key + '\'');
12 | }
13 |
14 | public JSONMissingException(int index) {
15 | super("Missing JSON value at: '" + index + '\'');
16 | }
17 | }
18 |
--------------------------------------------------------------------------------
/src/bindings/archived/ejdb2_flutter/example/android/app/src/main/res/drawable/launch_background.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
12 |
13 |
--------------------------------------------------------------------------------
/src/bindings/ejdb2_jni/src/main/java/com/softmotions/ejdb2/JSONException.java:
--------------------------------------------------------------------------------
1 | package com.softmotions.ejdb2;
2 |
3 | public class JSONException extends RuntimeException {
4 |
5 | private static final long serialVersionUID = -1180877018017230756L;
6 |
7 | public JSONException() {
8 | }
9 |
10 | public JSONException(String message) {
11 | super(message);
12 | }
13 |
14 | public JSONException(String message, Throwable cause) {
15 | super(message, cause);
16 | }
17 |
18 | public JSONException(Throwable cause) {
19 | super(cause);
20 | }
21 | }
22 |
--------------------------------------------------------------------------------
/.lvimrc:
--------------------------------------------------------------------------------
1 | " Local vim rc
2 |
3 | if exists('g:build_dir')
4 | finish
5 | endif
6 |
7 | let g:build_type = get(g:, 'build_type', 'Debug')
8 | let g:build_tests = get(g:, 'build_tests', 'ON')
9 | let g:cc = get(g:, 'cc', 'clang')
10 | let g:cxx = get(g:, 'cxx', 'clang++')
11 |
12 | let g:root_dir = g:localvimrc_script_dir_unresolved
13 | let $ROOT_DIR = g:root_dir
14 | let $UNCRUSTIFY_CONFIG = g:root_dir.'/uncrustify.cfg'
15 |
16 | let g:build_dir = g:root_dir.'/build'
17 | let &g:makeprg = 'BUILD_TYPE=Debug EJDB_BUILD_TESTS=1 CC=clang ./build.sh'
18 |
19 | let g:termdebug_wide=1
20 |
--------------------------------------------------------------------------------
/src/bindings/archived/ejdb2_react_native/tests/CMakeLists.txt:
--------------------------------------------------------------------------------
1 | include(CTest)
2 |
3 | add_custom_command(
4 | OUTPUT node_modules
5 | COMMAND ${YARN_EXEC} --non-interactive --no-progress install
6 | DEPENDS ejdb2_react_native
7 | ${CMAKE_CURRENT_SOURCE_DIR}/package.json
8 | VERBATIM
9 | )
10 |
11 | add_custom_target(
12 | ejdb2_react_native_tests ALL
13 | COMMAND ${YARN_EXEC} --non-interactive --no-progress build-dev
14 | DEPENDS node_modules
15 | )
16 |
17 | add_test(NAME ejdb2_react_native
18 | COMMAND ${YARN_EXEC} --non-interactive --no-progress test-dev
19 | )
--------------------------------------------------------------------------------
/src/bindings/archived/ejdb2_flutter/example/ios/Runner/Assets.xcassets/LaunchImage.imageset/Contents.json:
--------------------------------------------------------------------------------
1 | {
2 | "images" : [
3 | {
4 | "idiom" : "universal",
5 | "filename" : "LaunchImage.png",
6 | "scale" : "1x"
7 | },
8 | {
9 | "idiom" : "universal",
10 | "filename" : "LaunchImage@2x.png",
11 | "scale" : "2x"
12 | },
13 | {
14 | "idiom" : "universal",
15 | "filename" : "LaunchImage@3x.png",
16 | "scale" : "3x"
17 | }
18 | ],
19 | "info" : {
20 | "version" : 1,
21 | "author" : "xcode"
22 | }
23 | }
24 |
--------------------------------------------------------------------------------
/src/bindings/archived/ejdb2_dart/example/example.dart:
--------------------------------------------------------------------------------
1 | import 'package:ejdb2_dart/ejdb2_dart.dart';
2 |
3 | void main() async {
4 | final db = await EJDB2.open('example.db', truncate: true);
5 |
6 | var id = await db.put('parrots', {'name': 'Bianca', 'age': 4});
7 | print('Bianca record: ${id}');
8 |
9 | id = await db.put('parrots', {'name': 'Darko', 'age': 8});
10 | print('Darko record: ${id}');
11 |
12 | final q = db.createQuery('/[age > :age]', 'parrots');
13 | await for (final doc in q.setInt('age', 3).execute()) {
14 | print('Found $doc');
15 | }
16 | await db.close();
17 | }
18 |
--------------------------------------------------------------------------------
/src/bindings/archived/ejdb2_flutter/example/android/settings.gradle:
--------------------------------------------------------------------------------
1 | include ':app'
2 |
3 | def flutterProjectRoot = rootProject.projectDir.parentFile.toPath()
4 |
5 | def plugins = new Properties()
6 | def pluginsFile = new File(flutterProjectRoot.toFile(), '.flutter-plugins')
7 | if (pluginsFile.exists()) {
8 | pluginsFile.withReader('UTF-8') { reader -> plugins.load(reader) }
9 | }
10 |
11 | plugins.each { name, path ->
12 | def pluginDirectory = flutterProjectRoot.resolve(path).resolve('android').toFile()
13 | include ":$name"
14 | project(":$name").projectDir = pluginDirectory
15 | }
16 |
--------------------------------------------------------------------------------
/src/bindings/archived/ejdb2_flutter/ios/.gitignore:
--------------------------------------------------------------------------------
1 | .idea/
2 | .vagrant/
3 | .sconsign.dblite
4 | .svn/
5 |
6 | .DS_Store
7 | *.swp
8 | profile
9 |
10 | DerivedData/
11 | build/
12 | GeneratedPluginRegistrant.h
13 | GeneratedPluginRegistrant.m
14 |
15 | .generated/
16 |
17 | *.pbxuser
18 | *.mode1v3
19 | *.mode2v3
20 | *.perspectivev3
21 |
22 | !default.pbxuser
23 | !default.mode1v3
24 | !default.mode2v3
25 | !default.perspectivev3
26 |
27 | xcuserdata
28 |
29 | *.moved-aside
30 |
31 | *.pyc
32 | *sync/
33 | Icon?
34 | .tags*
35 |
36 | /Flutter/Generated.xcconfig
37 | /Flutter/flutter_export_environment.sh
--------------------------------------------------------------------------------
/src/tests/Autark:
--------------------------------------------------------------------------------
1 | cc {
2 | set { _
3 | ejdb_test1.c
4 | ejdb_test2.c
5 | ejdb_test3.c
6 | ejdb_test4.c
7 | ejdb_test5.c
8 | }
9 | set { _ ..${CFLAGS} -DIW_STATIC -DIW_TESTS }
10 | }
11 |
12 | foreach {
13 | OBJ
14 | ${CC_OBJS}
15 | run {
16 | exec { ${CC} ${OBJ} ${LDFLAGS_TEST} -o %{${OBJ}} }
17 | consumes { ${LIBEJDB_A} ${OBJ} }
18 | produces { %{${OBJ}} }
19 | }
20 | }
21 |
22 | if { ${EJDB_RUN_TESTS}
23 | foreach {
24 | OBJ
25 | ${CC_OBJS}
26 | run {
27 | always
28 | shell { %{${OBJ}} }
29 | consumes { %{${OBJ}} }
30 | }
31 | }
32 | }
--------------------------------------------------------------------------------
/src/bindings/archived/ejdb2_flutter/example/android/build.gradle:
--------------------------------------------------------------------------------
1 | buildscript {
2 | repositories {
3 | google()
4 | jcenter()
5 | }
6 | dependencies {
7 | classpath 'com.android.tools.build:gradle:3.2.1'
8 | }
9 | }
10 | allprojects {
11 | repositories {
12 | google()
13 | jcenter()
14 | }
15 | }
16 | rootProject.buildDir = '../build'
17 |
18 | subprojects {
19 | project.buildDir = "${rootProject.buildDir}/${project.name}"
20 | project.evaluationDependsOn(':app')
21 | }
22 |
23 | task clean(type: Delete) {
24 | delete rootProject.buildDir
25 | }
26 |
--------------------------------------------------------------------------------
/src/jbr/tests/Autark:
--------------------------------------------------------------------------------
1 | cc {
2 | jbr_test1.c
3 | set { _ ..${CFLAGS} -DIW_STATIC -DIW_TESTS -I S{src/tests} }
4 | }
5 |
6 | set {
7 | LDFLAGS_TEST
8 | ..${LDFLAGS_TEST}
9 | ..@@{${PKGCONF} --libs libcurl}
10 | }
11 |
12 | foreach {
13 | OBJ
14 | ${CC_OBJS}
15 | run {
16 | exec { ${CC} ${OBJ} ${LDFLAGS_TEST} -o %{${OBJ}} }
17 | consumes { ${LIBEJDB_A} ${OBJ} }
18 | produces { %{${OBJ}} }
19 | }
20 | }
21 |
22 | if { ${EJDB_RUN_TESTS}
23 | foreach {
24 | OBJ
25 | ${CC_OBJS}
26 | run {
27 | always
28 | shell { %{${OBJ}} }
29 | consumes { %{${OBJ}} }
30 | }
31 | }
32 | }
--------------------------------------------------------------------------------
/src/bindings/archived/ejdb2_flutter/example/test_driver/app_test.dart:
--------------------------------------------------------------------------------
1 | import 'package:flutter_driver/flutter_driver.dart';
2 | import 'package:test/test.dart';
3 |
4 | void main() {
5 | group('EJDB2 tests', () {
6 | FlutterDriver driver;
7 |
8 | setUpAll(() async {
9 | driver = await FlutterDriver.connect();
10 | });
11 |
12 | tearDownAll(() async {
13 | if (driver != null) {
14 | await driver.close();
15 | }
16 | });
17 |
18 | test('main test', () async {
19 | await driver.waitFor(find.byValueKey('success'), timeout: const Duration(seconds: 10));
20 | });
21 | });
22 | }
23 |
--------------------------------------------------------------------------------
/src/bindings/ejdb2_node/example/index.ts:
--------------------------------------------------------------------------------
1 | import { EJDB2 } from 'ejdb2_node';
2 |
3 | async function run() {
4 | const db = await EJDB2.open('example.db', { truncate: true });
5 |
6 | var id = await db.put('parrots', {'name': 'Bianca', 'age': 4});
7 | console.log(`Bianca record: ${id}`);
8 |
9 | id = await db.put('parrots', {'name': 'Darko', 'age': 8});
10 | console.log(`Darko record: ${id}`);
11 |
12 | const q = db.createQuery('/[age > :age]', 'parrots');
13 |
14 | for await (const doc of q.setNumber('age', 3).stream()) {
15 | console.log(`Found ${doc}`);
16 | }
17 |
18 | await db.close();
19 | }
20 |
21 | run();
22 |
--------------------------------------------------------------------------------
/src/bindings/archived/ejdb2_react_native/tests/android/app/src/debug/AndroidManifest.xml:
--------------------------------------------------------------------------------
1 |
2 |
4 |
5 |
11 |
12 |
--------------------------------------------------------------------------------
/.autark/test_symbol.sh:
--------------------------------------------------------------------------------
1 | #!/bin/sh
2 |
3 | SYMBOL=$1
4 | HEADER=$2
5 | DEFINE_VAR=$3
6 |
7 | usage() {
8 | echo "Usage test_symbol.sh "
9 | exit 1
10 | }
11 |
12 | [ -n "$SYMBOL" ] || usage
13 | [ -n "$HEADER" ] || usage
14 | [ -n "$DEFINE_VAR" ] || usage
15 |
16 | cat > "test_symbol.c" <
18 | int main() {
19 | #ifdef $SYMBOL
20 | return 0; // Symbol is a macro
21 | #else
22 | (void)$SYMBOL; // Symbol might be a function or variable
23 | return 0;
24 | #endif
25 | }
26 | EOF
27 |
28 | if ${CC:-cc} -Werror ./test_symbol.c; then
29 | autark set "$DEFINE_VAR=1"
30 | fi
31 |
32 | autark env CC
33 |
--------------------------------------------------------------------------------
/src/bindings/archived/ejdb2_swift/EJDB2Swift/Package.swift:
--------------------------------------------------------------------------------
1 | // swift-tools-version:5.1
2 | // The swift-tools-version declares the minimum version of Swift required to build this package.
3 |
4 | import PackageDescription
5 |
6 | let package = Package(
7 | name: "EJDB2",
8 | products: [
9 | .library(
10 | name: "EJDB2",
11 | targets: ["EJDB2"]),
12 | ],
13 | dependencies: [
14 | ],
15 | targets: [
16 | .systemLibrary(name: "CEJDB2", pkgConfig: "libejdb2"),
17 | .target(
18 | name: "EJDB2",
19 | dependencies: [
20 | "CEJDB2",
21 | ]),
22 | .testTarget(name: "EJDB2Tests", dependencies: ["EJDB2"]),
23 | ]
24 | )
--------------------------------------------------------------------------------
/src/bindings/archived/ejdb2_flutter/example/README.md:
--------------------------------------------------------------------------------
1 | # ejdb2_example
2 |
3 | Demonstrates how to use the ejdb2 plugin.
4 |
5 | ## Getting Started
6 |
7 | This project is a starting point for a Flutter application.
8 |
9 | A few resources to get you started if this is your first Flutter project:
10 |
11 | - [Lab: Write your first Flutter app](https://flutter.dev/docs/get-started/codelab)
12 | - [Cookbook: Useful Flutter samples](https://flutter.dev/docs/cookbook)
13 |
14 | For help getting started with Flutter, view our
15 | [online documentation](https://flutter.dev/docs), which offers tutorials,
16 | samples, guidance on mobile development, and a full API reference.
17 |
--------------------------------------------------------------------------------
/src/bindings/ejdb2_jni/maven-deploy.sh.in:
--------------------------------------------------------------------------------
1 | #!/bin/sh
2 |
3 | set -e
4 |
5 | SCRIPTPATH="$(
6 | cd "$(dirname "$0")"
7 | pwd -P
8 | )"
9 | cd $SCRIPTPATH
10 |
11 | VERSION="@EJDB_JAR_VERSION@"
12 | DEPLOY_JAR_FILE="@EJDB_JAR@"
13 | DEPLOY_SOURCES_JAR_FILE="@EJDB_SOURCES_JAR@"
14 |
15 | mvn org.apache.maven.plugins:maven-deploy-plugin:3.0.0-M1:deploy-file \
16 | -DgroupId=softmotions \
17 | -DartifactId=ejdb2 \
18 | -Dversion=${VERSION} \
19 | -Dpackaging=jar \
20 | -Dfile=${DEPLOY_JAR_FILE} \
21 | -Dsources=${DEPLOY_SOURCES_JAR_FILE} \
22 | -DrepositoryId=repsy_repository \
23 | -DgeneratePom=true \
24 | -Durl=https://repo.repsy.io/mvn/adamansky/softmotions
--------------------------------------------------------------------------------
/src/bindings/ejdb2_node/example/tsconfig.json:
--------------------------------------------------------------------------------
1 | {
2 | "compilerOptions": {
3 | "target": "es6",
4 | "moduleResolution": "node",
5 | "module": "commonjs",
6 | "strictNullChecks": true,
7 | "forceConsistentCasingInFileNames": true,
8 | "noFallthroughCasesInSwitch": true,
9 | "noImplicitAny": true,
10 | "noImplicitReturns": true,
11 | "noImplicitThis": true,
12 | "noUnusedLocals": false,
13 | "noUnusedParameters": false,
14 | "declaration": false,
15 | "pretty": true,
16 | "lib": [
17 | "es6"
18 | ],
19 | "baseUrl": "."
20 | },
21 | "exclude": [
22 | "node_modules/**",
23 | "**/*.aot.ts"
24 | ]
25 | }
--------------------------------------------------------------------------------
/src/bindings/archived/ejdb2_swift/EJDB2Swift/Sources/CEJDB2/swift_ejdb2.h:
--------------------------------------------------------------------------------
1 | #include
2 |
3 | #if defined(__linux__)
4 | #include
5 | #if defined(__GLIBC__) && (__GLIBC__ == 2 && __GLIBC_MINOR__ < 26)
6 | #include
7 | #else
8 | #include
9 | #endif
10 | #endif
11 |
12 | #ifdef INPROJECT_BUILD
13 | #include "ejdb2.h"
14 | #else
15 | #include
16 | #endif
17 |
18 | static void swjb_free_json_node(void *ptr, void *op) {
19 | IWPOOL *pool = (IWPOOL*) op;
20 | if (pool) iwpool_destroy(pool);
21 | }
22 |
23 | static void swjb_free_str(void *ptr, void *op) {
24 | if (ptr) free(ptr);
25 | }
26 |
--------------------------------------------------------------------------------
/src/bindings/ejdb2_node/tsconfig.json:
--------------------------------------------------------------------------------
1 | {
2 | "compilerOptions": {
3 | "target": "es6",
4 | "moduleResolution": "node",
5 | "module": "commonjs",
6 | "strictNullChecks": true,
7 | "forceConsistentCasingInFileNames": true,
8 | "noFallthroughCasesInSwitch": true,
9 | "noImplicitAny": true,
10 | "noImplicitReturns": true,
11 | "noImplicitThis": true,
12 | "noUnusedLocals": false,
13 | "noUnusedParameters": false,
14 | "declaration": false,
15 | "pretty": true,
16 | "lib": [
17 | "es6",
18 | "esnext.asynciterable"
19 | ],
20 | "baseUrl": "."
21 | },
22 | "exclude": [
23 | "node_modules/**",
24 | "**/*.aot.ts"
25 | ]
26 | }
--------------------------------------------------------------------------------
/src/bindings/archived/ejdb2_flutter/ios/Classes/Ejdb2FlutterPlugin.m:
--------------------------------------------------------------------------------
1 | #import "Ejdb2FlutterPlugin.h"
2 | #if __has_include()
3 | #import
4 | #else
5 | // Support project import fallback if the generated compatibility header
6 | // is not copied when this plugin is created as a library.
7 | // https://forums.swift.org/t/swift-static-libraries-dont-copy-generated-objective-c-header/19816
8 | #import "ejdb2_flutter-Swift.h"
9 | #endif
10 |
11 | @implementation Ejdb2FlutterPlugin
12 | + (void)registerWithRegistrar:(NSObject*)registrar {
13 | [SwiftEjdb2FlutterPlugin registerWithRegistrar:registrar];
14 | }
15 | @end
16 |
--------------------------------------------------------------------------------
/.clang-tidy:
--------------------------------------------------------------------------------
1 | ---
2 | Checks: >
3 | bugprone-*,
4 | clang-analyzer-*,
5 | google-*,
6 | misc-*,
7 | modernize-*,
8 | performance-*,
9 | portability-*,
10 | -bugprone-branch-clone,
11 | -bugprone-easily-swappable-parameters,
12 | -bugprone-macro-parentheses,
13 | -bugprone-narrowing-conversions,
14 | -bugprone-not-null-terminated-result,
15 | -bugprone-reserved-identifier,
16 | -bugprone-sizeof-expression,
17 | -clang-analyzer-security.insecureAPI.DeprecatedOrUnsafeBufferHandling,
18 | -clang-analyzer-security.insecureAPI.strcpy,
19 | -google-readability-todo,
20 | -misc-unused-parameters,
21 | -performance-no-int-to-ptr,
22 | -bugprone-assignment-in-if-condition,
23 |
24 | ...
25 |
--------------------------------------------------------------------------------
/src/bindings/archived/ejdb2_flutter/pubspec.yaml:
--------------------------------------------------------------------------------
1 | name: ejdb2_flutter
2 | description: Embeddable JSON Database engine EJDB http://ejdb.org Flutter binding.
3 | version: 1.0.29+1
4 | homepage: https://ejdb.org
5 |
6 | environment:
7 | sdk: '>=2.5.0 <3.0.0'
8 | flutter: ">=1.10.0"
9 |
10 | dependencies:
11 | flutter:
12 | sdk: flutter
13 | json_at: ^1.0.4
14 | quiver: ^2.0.5
15 | pedantic: ^1.8.0+1
16 |
17 | dev_dependencies:
18 | flutter_test:
19 | sdk: flutter
20 |
21 | flutter:
22 | plugin:
23 | platforms:
24 | android:
25 | package: com.softmotions.ejdb2
26 | pluginClass: Ejdb2FlutterPlugin
27 | ios:
28 | pluginClass: Ejdb2FlutterPlugin
29 |
30 |
31 |
--------------------------------------------------------------------------------
/src/bindings/archived/ejdb2_android/test/README.md:
--------------------------------------------------------------------------------
1 | # Android
2 |
3 | ## Sample Android application
4 |
5 | https://github.com/Softmotions/ejdb_android_todo_app
6 |
7 | ## Android binding showcase and unit tests
8 |
9 | ```bash
10 | cd ./src/bindings/ejdb2_android/test
11 | ```
12 |
13 | Set local android SDK/NDK path and target `arch` in `local.properties`
14 |
15 | ```properties
16 | # Path to Android SDK dir
17 | sdk.dir=/Android-sdk
18 |
19 | # Path to Android NDK dir
20 | ndk.dir=/Android-sdk/ndk-bundle
21 |
22 | # Target abi name: armeabi-v7a, arm64-v8a, x86, x86_64
23 | abi.name=arm64-v8a
24 | ```
25 |
26 | Run Android emulator for the same abi version then:
27 |
28 | ```bash
29 | ./gradlew connectedAndroidTest
30 | ```
--------------------------------------------------------------------------------
/src/bindings/archived/ejdb2_flutter/pubspec.yaml.in:
--------------------------------------------------------------------------------
1 | name: ejdb2_flutter
2 | description: Embeddable JSON Database engine EJDB http://ejdb.org Flutter binding.
3 | version: @EJDB2_FLUTTER_VERSION@
4 | homepage: https://ejdb.org
5 |
6 | environment:
7 | sdk: '>=2.5.0 <3.0.0'
8 | flutter: ">=1.10.0"
9 |
10 | dependencies:
11 | flutter:
12 | sdk: flutter
13 | json_at: ^1.0.4
14 | quiver: ^2.0.5
15 | pedantic: ^1.8.0+1
16 |
17 | dev_dependencies:
18 | flutter_test:
19 | sdk: flutter
20 |
21 | flutter:
22 | plugin:
23 | platforms:
24 | android:
25 | package: com.softmotions.ejdb2
26 | pluginClass: Ejdb2FlutterPlugin
27 | ios:
28 | pluginClass: Ejdb2FlutterPlugin
29 |
30 |
31 |
--------------------------------------------------------------------------------
/src/bindings/archived/ejdb2_flutter/example/ios/.gitignore:
--------------------------------------------------------------------------------
1 | *.mode1v3
2 | *.mode2v3
3 | *.moved-aside
4 | *.pbxuser
5 | *.perspectivev3
6 | **/*sync/
7 | .sconsign.dblite
8 | .tags*
9 | **/.vagrant/
10 | **/DerivedData/
11 | Icon?
12 | **/Pods/
13 | **/.symlinks/
14 | profile
15 | xcuserdata
16 | **/.generated/
17 | Flutter/App.framework
18 | Flutter/Flutter.framework
19 | Flutter/Flutter.podspec
20 | Flutter/Generated.xcconfig
21 | Flutter/app.flx
22 | Flutter/app.zip
23 | Flutter/flutter_assets/
24 | Flutter/flutter_export_environment.sh
25 | ServiceDefinitions.json
26 | Runner/GeneratedPluginRegistrant.*
27 |
28 | # Exceptions to above rules.
29 | !default.mode1v3
30 | !default.mode2v3
31 | !default.pbxuser
32 | !default.perspectivev3
33 |
--------------------------------------------------------------------------------
/src/bindings/archived/ejdb2_flutter/example/android/app/.project:
--------------------------------------------------------------------------------
1 |
2 |
3 | app
4 | Project app created by Buildship.
5 |
6 |
7 |
8 |
9 | org.eclipse.jdt.core.javabuilder
10 |
11 |
12 |
13 |
14 | org.eclipse.buildship.core.gradleprojectbuilder
15 |
16 |
17 |
18 |
19 |
20 | org.eclipse.jdt.core.javanature
21 | org.eclipse.buildship.core.gradleprojectnature
22 |
23 |
24 |
--------------------------------------------------------------------------------
/src/bindings/archived/ejdb2_react_native/tests/android/app/src/androidTest/java/com/test/DetoxTest.java:
--------------------------------------------------------------------------------
1 | package com.test;
2 |
3 | import com.wix.detox.Detox;
4 |
5 | import org.junit.Rule;
6 | import org.junit.Test;
7 | import org.junit.runner.RunWith;
8 |
9 | import androidx.test.ext.junit.runners.AndroidJUnit4;
10 | import androidx.test.filters.LargeTest;
11 | import androidx.test.rule.ActivityTestRule;
12 |
13 | @RunWith(AndroidJUnit4.class)
14 | @LargeTest
15 | public class DetoxTest {
16 |
17 | @Rule
18 | public ActivityTestRule mActivityRule = new ActivityTestRule<>(MainActivity.class, false, false);
19 |
20 | @Test
21 | public void runDetoxTests() {
22 | Detox.runTests(mActivityRule);
23 | }
24 | }
--------------------------------------------------------------------------------
/src/bindings/archived/ejdb2_react_native/tests/android/app/proguard-rules.pro:
--------------------------------------------------------------------------------
1 | # Add project specific ProGuard rules here.
2 | # By default, the flags in this file are appended to flags specified
3 | # in /usr/local/Cellar/android-sdk/24.3.3/tools/proguard/proguard-android.txt
4 | # You can edit the include path and order by changing the proguardFiles
5 | # directive in build.gradle.
6 | #
7 | # For more details, see
8 | # http://developer.android.com/guide/developing/tools/proguard.html
9 |
10 | # Add any project specific keep options here:
11 |
12 | # If your project uses WebView with JS, uncomment the following
13 | # and specify the fully qualified class name to the JavaScript interface
14 | # class:
15 | #-keepclassmembers class fqcn.of.javascript.interface.for.webview {
16 | # public *;
17 | #}
18 |
--------------------------------------------------------------------------------
/src/bindings/archived/ejdb2_swift/EJDB2Swift/EJDB2.xcodeproj/xcuserdata/adam.xcuserdatad/xcschemes/xcschememanagement.plist:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 | SchemeUserState
6 |
7 | EJDB2.xcscheme_^#shared#^_
8 |
9 | orderHint
10 | 0
11 |
12 |
13 | SuppressBuildableAutocreation
14 |
15 | 662FA9D223C079C800F80E06
16 |
17 | primary
18 |
19 |
20 | 662FA9DB23C079C800F80E06
21 |
22 | primary
23 |
24 |
25 |
26 |
27 |
28 |
--------------------------------------------------------------------------------
/src/bindings/ejdb2_node/example/README.md:
--------------------------------------------------------------------------------
1 | # EJDB2 Typescript example project
2 |
3 | ```ts
4 | import { EJDB2 } from 'ejdb2_node';
5 |
6 | async function run() {
7 | const db = await EJDB2.open('example.db', { truncate: true });
8 |
9 | var id = await db.put('parrots', {'name': 'Bianca', 'age': 4});
10 | console.log(`Bianca record: ${id}`);
11 |
12 | id = await db.put('parrots', {'name': 'Darko', 'age': 8});
13 | console.log(`Darko record: ${id}`);
14 |
15 | const q = db.createQuery('/[age > :age]', 'parrots');
16 |
17 | for await (const doc of q.setNumber('age', 3).stream()) {
18 | console.log(`Found ${doc}`);
19 | }
20 |
21 | await db.close();
22 | }
23 |
24 | run();
25 | ```
26 |
27 | ## Build and run
28 |
29 | ```sh
30 | cd ./example
31 | yarn install
32 | yarn run start
33 | ```
--------------------------------------------------------------------------------
/src/bindings/archived/ejdb2_android/test/gradle.properties:
--------------------------------------------------------------------------------
1 | # Project-wide Gradle settings.
2 | # IDE (e.g. Android Studio) users:
3 | # Gradle settings configured through the IDE *will override*
4 | # any settings specified in this file.
5 | # For more details on how to configure your build environment visit
6 | # http://www.gradle.org/docs/current/userguide/build_environment.html
7 | # Specifies the JVM arguments used for the daemon process.
8 | # The setting is particularly useful for tweaking memory settings.
9 | org.gradle.jvmargs=-Xmx1536m
10 | # When configured, Gradle will run in incubating parallel mode.
11 | # This option should only be used with decoupled projects. More details, visit
12 | # http://www.gradle.org/docs/current/userguide/multi_project_builds.html#sec:decoupled_projects
13 | # org.gradle.parallel=true
14 |
15 |
16 |
--------------------------------------------------------------------------------
/src/bindings/archived/ejdb2_react_native/tests/e2e/init.js:
--------------------------------------------------------------------------------
1 | const detox = require('detox');
2 | const adapter = require('detox/runners/mocha/adapter');
3 | const execFile = require('child_process').execFile;
4 | let config = require('../package.json').detox;
5 |
6 | if (process.env['ANDROID_AVD'] != null) {
7 | config = config.replace(/"name":\s?"TestingAVD"/, `"name": ${process.env['ANDROID_AVD']}`)
8 | }
9 |
10 | let server;
11 |
12 | before(async () => {
13 | server = execFile('yarn', ['run', 'start'], {});
14 | await detox.init(config);
15 | });
16 |
17 | beforeEach(async function () {
18 | await adapter.beforeEach(this);
19 | });
20 |
21 | afterEach(async function () {
22 | await adapter.afterEach(this);
23 | });
24 |
25 | after(async () => {
26 | await detox.cleanup();
27 | execFile('yarn', ['run', 'stop'], {});
28 | });
29 |
--------------------------------------------------------------------------------
/src/bindings/archived/ejdb2_swift/EJDB2Swift/Tests/EJDB2Tests/Info.plist:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 | CFBundleDevelopmentRegion
6 | $(DEVELOPMENT_LANGUAGE)
7 | CFBundleExecutable
8 | $(EXECUTABLE_NAME)
9 | CFBundleIdentifier
10 | $(PRODUCT_BUNDLE_IDENTIFIER)
11 | CFBundleInfoDictionaryVersion
12 | 6.0
13 | CFBundleName
14 | $(PRODUCT_NAME)
15 | CFBundlePackageType
16 | $(PRODUCT_BUNDLE_PACKAGE_TYPE)
17 | CFBundleShortVersionString
18 | 1.0
19 | CFBundleVersion
20 | 1
21 |
22 |
23 |
--------------------------------------------------------------------------------
/src/bindings/ejdb2_jni/example/src/main/java/EJDB2Example.java:
--------------------------------------------------------------------------------
1 | import com.softmotions.ejdb2.EJDB2;
2 | import com.softmotions.ejdb2.EJDB2Builder;
3 |
4 | /**
5 | * Minimal EJDB2 Java example.
6 | *
7 | * @author Adamansky Anton (adamansky@softmotions.com)
8 | */
9 | public class EJDB2Example {
10 |
11 | public static void main(String[] args) {
12 | try (EJDB2 db = new EJDB2Builder("example.db").truncate().open()) {
13 | long id = db.put("parrots", "{\"name\":\"Bianca\", \"age\": 4}");
14 | System.out.println("Bianca record: " + id);
15 |
16 | id = db.put("parrots", "{\"name\":\"Darko\", \"age\": 8}");
17 | System.out.println("Darko record: " + id);
18 |
19 | db.createQuery("@parrots/[age > :age]").setLong("age", 3).execute((doc) -> {
20 | System.out.println(String.format("Found %s", doc));
21 | return 1;
22 | });
23 | }
24 | }
25 | }
26 |
--------------------------------------------------------------------------------
/src/bindings/ejdb2_jni/src/main/java/com/softmotions/ejdb2/JQLCallback.java:
--------------------------------------------------------------------------------
1 | package com.softmotions.ejdb2;
2 |
3 | /**
4 | * SAM callback used iterate over query result set.
5 | */
6 | public interface JQLCallback {
7 |
8 | /**
9 | * Called on every JSON record in result set.
10 | *
11 | * Implementor can control iteration behavior by returning a step getting next
12 | * record:
13 | *
14 | *
15 | * - {@code 1} go to the next record
16 | * - {@code N} move forward by {@code N} records
17 | * - {@code -1} iterate current record again
18 | * - {@code -2} go to the previous record
19 | * - {@code 0} stop iteration
20 | *
21 | *
22 | * @param id Current document identifier
23 | * @param json Document JSOn body as string
24 | * @return Number of records to skip
25 | */
26 | long onRecord(long id, String json);
27 | }
--------------------------------------------------------------------------------
/src/bindings/archived/ejdb2_swift/EJDB2Swift/Sources/EJDB2/Info.plist:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 | CFBundleDevelopmentRegion
6 | $(DEVELOPMENT_LANGUAGE)
7 | CFBundleExecutable
8 | $(EXECUTABLE_NAME)
9 | CFBundleIdentifier
10 | $(PRODUCT_BUNDLE_IDENTIFIER)
11 | CFBundleInfoDictionaryVersion
12 | 6.0
13 | CFBundleName
14 | $(PRODUCT_NAME)
15 | CFBundlePackageType
16 | $(PRODUCT_BUNDLE_PACKAGE_TYPE)
17 | CFBundleShortVersionString
18 | $(MARKETING_VERSION)
19 | CFBundleVersion
20 | $(CURRENT_PROJECT_VERSION)
21 |
22 |
23 |
--------------------------------------------------------------------------------
/src/bindings/ejdb2_jni/src/main/java/com/softmotions/ejdb2/EJDB2DocumentCallback.java:
--------------------------------------------------------------------------------
1 | package com.softmotions.ejdb2;
2 |
3 | /**
4 | * SAM callback used iterate over query result set.
5 | */
6 | public interface EJDB2DocumentCallback {
7 |
8 | /**
9 | * Called on every JSON record in result set.
10 | *
11 | * Implementor can control iteration behavior by returning a step getting next
12 | * record:
13 | *
14 | *
15 | * - {@code 1} go to the next record
16 | * - {@code N} move forward by {@code N} records
17 | * - {@code -1} iterate current record again
18 | * - {@code -2} go to the previous record
19 | * - {@code 0} stop iteration
20 | *
21 | *
22 | * @param id Current document identifier
23 | * @param json Document {@link JSON} body as string
24 | * @return Number of records to skip
25 | */
26 | long onDocument(EJDB2Document doc);
27 | }
28 |
--------------------------------------------------------------------------------
/src/bindings/ejdb2_jni/src/main/java/com/softmotions/ejdb2/EJDB2Document.java:
--------------------------------------------------------------------------------
1 | package com.softmotions.ejdb2;
2 |
3 | import com.softmotions.ejdb2.JSON.ValueType;
4 |
5 | public final class EJDB2Document {
6 |
7 | public final long id;
8 |
9 | public final JSON json;
10 |
11 | EJDB2Document(long id, byte[] data) {
12 | this(id, new JSON(data));
13 | }
14 |
15 | EJDB2Document(long id, String data) {
16 | this(id, new JSON(data));
17 | }
18 |
19 | EJDB2Document(long id, JSON json) {
20 | if (json.type != ValueType.OBJECT && json.type != ValueType.NULL) {
21 | throw new IllegalArgumentException("json is not an object or null");
22 | }
23 | this.id = id;
24 | this.json = json;
25 | }
26 |
27 | @Override
28 | public String toString() {
29 | return "[" + id + ' ' + json.toString() + ']';
30 | }
31 |
32 | @Override
33 | public int hashCode() {
34 | return json.hashCode();
35 | }
36 | }
37 |
--------------------------------------------------------------------------------
/src/bindings/archived/ejdb2_react_native/binding/package.json:
--------------------------------------------------------------------------------
1 | {
2 | "name": "ejdb2_react_native",
3 | "version": "@EJDB2_RN_VERSION@",
4 | "repository": "https://github.com/Softmotions/ejdb.git",
5 | "author": "Anton Adamansky ",
6 | "description": "EJDB2 React Native binding",
7 | "license": "MIT",
8 | "main": "index.js",
9 | "types": "index.d.ts",
10 | "scripts": {},
11 | "keywords": [
12 | "react-native",
13 | "ejdb",
14 | "ejdb2",
15 | "nosql",
16 | "json",
17 | "database",
18 | "storage",
19 | "embedded",
20 | "embeddable",
21 | "native",
22 | "binding"
23 | ],
24 | "files": [
25 | "android/gradle/**",
26 | "android/libs/**",
27 | "android/src/**",
28 | "android/build.gradle",
29 | "android/gradlew*",
30 | "index.d.ts",
31 | "index.js",
32 | "README.md"
33 | ],
34 | "peerDependencies": {
35 | "react-native": "^0.61.3"
36 | }
37 | }
38 |
--------------------------------------------------------------------------------
/src/bindings/archived/ejdb2_flutter/example/ios/Flutter/AppFrameworkInfo.plist:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 | CFBundleDevelopmentRegion
6 | $(DEVELOPMENT_LANGUAGE)
7 | CFBundleExecutable
8 | App
9 | CFBundleIdentifier
10 | io.flutter.flutter.app
11 | CFBundleInfoDictionaryVersion
12 | 6.0
13 | CFBundleName
14 | App
15 | CFBundlePackageType
16 | FMWK
17 | CFBundleShortVersionString
18 | 1.0
19 | CFBundleSignature
20 | ????
21 | CFBundleVersion
22 | 1.0
23 | MinimumOSVersion
24 | 8.0
25 |
26 |
27 |
--------------------------------------------------------------------------------
/src/bindings/ejdb2_jni/src/main/java/com/softmotions/ejdb2/EJDB2Exception.java:
--------------------------------------------------------------------------------
1 | package com.softmotions.ejdb2;
2 |
3 | /**
4 | * @author Adamansky Anton (adamansky@softmotions.com)
5 | */
6 | public final class EJDB2Exception extends RuntimeException {
7 |
8 | private static final long serialVersionUID = 2380289380319769542L;
9 |
10 | private final long code;
11 |
12 | private final long errno;
13 |
14 | public long getCode() {
15 | return code;
16 | }
17 |
18 | public long getErrno() {
19 | return errno;
20 | }
21 |
22 | public EJDB2Exception(long code, long errno, String message, Throwable cause) {
23 | super("@ejdb IWRC:" + code + " errno:" + errno + ' ' + message, cause);
24 | this.code = code;
25 | this.errno = errno;
26 | }
27 |
28 | public EJDB2Exception(long code, long errno, String message) {
29 | super("@ejdb IWRC:" + code + " errno:" + errno + ' ' + message);
30 | this.code = code;
31 | this.errno = errno;
32 | }
33 | }
34 |
--------------------------------------------------------------------------------
/src/bindings/archived/ejdb2_android/test/build.gradle:
--------------------------------------------------------------------------------
1 | // Top-level build file where you can add configuration options common to all sub-projects/modules.
2 |
3 | buildscript {
4 | repositories {
5 | google()
6 | jcenter()
7 | }
8 | dependencies {
9 | classpath "com.android.tools.build:gradle:3.1.0"
10 |
11 | // NOTE: Do not place your application dependencies here; they belong
12 | // in the individual module build.gradle files
13 | }
14 | }
15 |
16 | allprojects {
17 | repositories {
18 | google()
19 | jcenter()
20 | }
21 | }
22 |
23 | task clean(type: Delete) {
24 | delete rootProject.buildDir
25 | }
26 |
27 | Properties properties = new Properties()
28 | if (project.rootProject.file('local.properties').exists()) {
29 | def is = project.rootProject.file('local.properties').newDataInputStream()
30 | properties.load(is)
31 | is.close()
32 | }
33 |
34 | ext {
35 | abiName = properties.get("abi.name")
36 | }
--------------------------------------------------------------------------------
/src/bindings/archived/ejdb2_react_native/tests/android/gradle.properties:
--------------------------------------------------------------------------------
1 | # Project-wide Gradle settings.
2 |
3 | # IDE (e.g. Android Studio) users:
4 | # Gradle settings configured through the IDE *will override*
5 | # any settings specified in this file.
6 |
7 | # For more details on how to configure your build environment visit
8 | # http://www.gradle.org/docs/current/userguide/build_environment.html
9 |
10 | # Specifies the JVM arguments used for the daemon process.
11 | # The setting is particularly useful for tweaking memory settings.
12 | # Default value: -Xmx10248m -XX:MaxPermSize=256m
13 | # org.gradle.jvmargs=-Xmx2048m -XX:MaxPermSize=512m -XX:+HeapDumpOnOutOfMemoryError -Dfile.encoding=UTF-8
14 |
15 | # When configured, Gradle will run in incubating parallel mode.
16 | # This option should only be used with decoupled projects. More details, visit
17 | # http://www.gradle.org/docs/current/userguide/multi_project_builds.html#sec:decoupled_projects
18 | # org.gradle.parallel=true
19 |
20 | android.enableJetifier=true
21 | android.useAndroidX=true
--------------------------------------------------------------------------------
/src/bindings/archived/ejdb2_react_native/tests/metro.config.js:
--------------------------------------------------------------------------------
1 | /**
2 | * Metro configuration for React Native
3 | * https://github.com/facebook/react-native
4 | *
5 | * @format
6 | */
7 |
8 | const path = require('path');
9 |
10 | module.exports = {
11 | transformer: {
12 | getTransformOptions: async () => ({
13 | transform: {
14 | experimentalImportSupport: false,
15 | inlineRequires: false,
16 | },
17 | }),
18 | },
19 | resolver: {
20 | extraNodeModules: new Proxy(
21 | {
22 | 'ejdb2_react_native': path.resolve(__dirname, '../binding')
23 | },
24 | {
25 | get: (target, name) => {
26 | if (target.hasOwnProperty(name)) {
27 | return target[name];
28 | } else {
29 | return path.join(process.cwd(), `node_modules/${name}`);
30 | }
31 | }
32 | }
33 | )
34 | },
35 | projectRoot: path.resolve(__dirname),
36 | watchFolders: [
37 | path.resolve(__dirname, '../binding')
38 | ]
39 | };
40 |
41 |
--------------------------------------------------------------------------------
/src/bindings/archived/ejdb2_flutter/android/.project:
--------------------------------------------------------------------------------
1 |
2 |
3 | ejdb2_flutter
4 |
5 |
6 |
7 |
8 |
9 | org.eclipse.jdt.core.javabuilder
10 |
11 |
12 |
13 |
14 | org.eclipse.buildship.core.gradleprojectbuilder
15 |
16 |
17 |
18 |
19 |
20 | org.eclipse.jdt.core.javanature
21 | org.eclipse.buildship.core.gradleprojectnature
22 |
23 |
24 |
25 | 1607244372293
26 |
27 | 30
28 |
29 | org.eclipse.core.resources.regexFilterMatcher
30 | node_modules|.git|__CREATED_BY_JAVA_LANGUAGE_SERVER__
31 |
32 |
33 |
34 |
35 |
--------------------------------------------------------------------------------
/src/bindings/archived/ejdb2_react_native/tests/.gitignore:
--------------------------------------------------------------------------------
1 | # OSX
2 | #
3 | .DS_Store
4 |
5 | # Xcode
6 | #
7 | build/
8 | *.pbxuser
9 | !default.pbxuser
10 | *.mode1v3
11 | !default.mode1v3
12 | *.mode2v3
13 | !default.mode2v3
14 | *.perspectivev3
15 | !default.perspectivev3
16 | xcuserdata
17 | *.xccheckout
18 | *.moved-aside
19 | DerivedData
20 | *.hmap
21 | *.ipa
22 | *.xcuserstate
23 | project.xcworkspace
24 |
25 | # Android/IntelliJ
26 | #
27 | build/
28 | .idea
29 | .gradle
30 | local.properties
31 | *.iml
32 |
33 | # node.js
34 | #
35 | node_modules/
36 | npm-debug.log
37 | yarn-error.log
38 |
39 | # BUCK
40 | buck-out/
41 | \.buckd/
42 | *.keystore
43 |
44 | # fastlane
45 | #
46 | # It is recommended to not store the screenshots in the git repo. Instead, use fastlane to re-generate the
47 | # screenshots whenever they are needed.
48 | # For more information about the recommended setup visit:
49 | # https://docs.fastlane.tools/best-practices/source-control/
50 |
51 | */fastlane/report.xml
52 | */fastlane/Preview.html
53 | */fastlane/screenshots
54 |
55 | # Bundle artifact
56 | *.jsbundle
57 |
58 | # CocoaPods
59 | /ios/Pods/
60 |
--------------------------------------------------------------------------------
/LICENSE:
--------------------------------------------------------------------------------
1 | MIT License
2 |
3 | Copyright (c) 2012-2024 Softmotions Ltd
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.
--------------------------------------------------------------------------------
/src/bindings/archived/ejdb2_dart/LICENSE:
--------------------------------------------------------------------------------
1 | MIT License
2 |
3 | Copyright (c) 2012-2022 Softmotions Ltd
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 |
--------------------------------------------------------------------------------
/src/bindings/archived/ejdb2_react_native/tests/android/app/src/main/AndroidManifest.xml:
--------------------------------------------------------------------------------
1 |
4 |
5 |
6 |
7 |
14 |
19 |
20 |
21 |
22 |
23 |
24 |
25 |
26 |
27 |
28 |
--------------------------------------------------------------------------------
/src/bindings/archived/ejdb2_flutter/LICENSE:
--------------------------------------------------------------------------------
1 | MIT License
2 |
3 | Copyright (c) 2012-2022 Softmotions Ltd
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 |
--------------------------------------------------------------------------------
/src/bindings/archived/ejdb2_swift/EJDB2Swift/LICENSE:
--------------------------------------------------------------------------------
1 | MIT License
2 |
3 | Copyright (c) 2012-2022 Softmotions Ltd
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 |
--------------------------------------------------------------------------------
/src/bindings/archived/ejdb2_flutter/ios/ejdb2_flutter.podspec:
--------------------------------------------------------------------------------
1 | #
2 | # To learn more about a Podspec see http://guides.cocoapods.org/syntax/podspec.html.
3 | # Run `pod lib lint ejdb2_flutter.podspec' to validate before publishing.
4 | #
5 | Pod::Spec.new do |s|
6 | s.name = 'ejdb2_flutter'
7 | s.version = '1.0.10'
8 | s.summary = 'Embeddable JSON Database engine EJDB http://ejdb.org Flutter binding'
9 | s.description = <<-DESC
10 | Embeddable JSON Database engine EJDB http://ejdb.org Flutter binding
11 | DESC
12 | s.homepage = 'https://ejdb.org'
13 | s.license = { :file => '../LICENSE' }
14 | s.author = { 'Softmotions Ltd.' => 'info@softmotions.com' }
15 | s.source = { :path => '.' }
16 | s.source_files = 'Classes/**/*'
17 | s.static_framework = true
18 | s.dependency 'Flutter'
19 | s.dependency 'PathKit'
20 | s.dependency 'EJDB2'
21 | s.platform = :ios, '9.0'
22 |
23 | # Flutter.framework does not contain a i386 slice. Only x86_64 simulators are supported.
24 | s.pod_target_xcconfig = {
25 | 'DEFINES_MODULE' => 'YES',
26 | 'VALID_ARCHS[sdk=iphonesimulator*]' => 'x86_64'
27 | }
28 | s.swift_version = '5.1'
29 | end
30 |
--------------------------------------------------------------------------------
/src/jbi/jbi_full_scanner.c:
--------------------------------------------------------------------------------
1 | #include "ejdb2_internal.h"
2 |
3 | iwrc jbi_full_scanner(struct jbexec *ctx, jb_scan_consumer consumer) {
4 | bool matched;
5 | IWKV_cursor cur;
6 | int64_t step = 1;
7 | iwrc rc = iwkv_cursor_open(ctx->jbc->cdb, &cur, ctx->cursor_init, 0);
8 | RCRET(rc);
9 |
10 | IWKV_cursor_op cursor_reverse_step = (ctx->cursor_step == IWKV_CURSOR_NEXT)
11 | ? IWKV_CURSOR_PREV : IWKV_CURSOR_NEXT;
12 |
13 | while (step && !(rc = iwkv_cursor_to(cur, step > 0 ? ctx->cursor_step : cursor_reverse_step))) {
14 | if (step > 0) {
15 | --step;
16 | } else if (step < 0) {
17 | ++step; // -V547
18 | }
19 | if (!step) {
20 | size_t sz;
21 | int64_t id;
22 | rc = iwkv_cursor_copy_key(cur, &id, sizeof(id), &sz, 0);
23 | RCBREAK(rc);
24 | if (sz != sizeof(id)) {
25 | rc = IWKV_ERROR_CORRUPTED;
26 | iwlog_ecode_error3(rc);
27 | break;
28 | }
29 | step = 1;
30 | matched = false;
31 | rc = consumer(ctx, cur, id, &step, &matched, 0);
32 | RCBREAK(rc);
33 | }
34 | }
35 | if (rc == IWKV_ERROR_NOTFOUND) {
36 | rc = 0;
37 | }
38 | iwkv_cursor_close(&cur);
39 | return consumer(ctx, 0, 0, 0, 0, rc);
40 | }
41 |
--------------------------------------------------------------------------------
/src/bindings/ejdb2_jni/pom.xml:
--------------------------------------------------------------------------------
1 |
2 |
6 |
9 | 4.0.0
10 | softmotions
11 | ejdb2
12 | 1.0-SNAPSHOT
13 |
14 | UTF-8
15 | 11
16 | 11
17 |
18 |
19 |
20 |
21 | org.apache.maven.plugins
22 | maven-compiler-plugin
23 | 3.8.1
24 |
25 | ${java.source.version}
26 | ${java.target.version}
27 | UTF-8
28 |
29 |
30 |
31 |
32 |
--------------------------------------------------------------------------------
/src/bindings/ejdb2_node/tslint.json:
--------------------------------------------------------------------------------
1 | {
2 | "extends": "tslint:recommended",
3 | "rules": {
4 | "no-var-requires": false,
5 | "ordered-imports": [
6 | false
7 | ],
8 | "quotemark": [
9 | "single"
10 | ],
11 | "no-console": [
12 | false
13 | ],
14 | "no-unused-expression": [
15 | "allow-fast-null-checks",
16 | "allow-new",
17 | "allow-tagged-template"
18 | ],
19 | "only-arrow-functions": [
20 | false
21 | ],
22 | "no-conditional-assignment": false,
23 | "no-angle-bracket-type-assertion": false,
24 | "whitespace": [
25 | "check-branch",
26 | "check-decl",
27 | "check-module",
28 | "check-operator",
29 | "check-preblock",
30 | "check-separator",
31 | "check-type",
32 | "check-typecast"
33 | ],
34 | "member-access": [
35 | "check-constructor",
36 | "no-public"
37 | ],
38 | "object-literal-sort-keys": [
39 | false
40 | ],
41 | "max-classes-per-file": [
42 | false
43 | ],
44 | "no-trailing-whitespace": false,
45 | "arrow-parens": false,
46 | "no-empty": false,
47 | "no-shadowed-variable": true,
48 | "no-string-literal": false,
49 | "trailing-comma": [
50 | false
51 | ]
52 | }
53 | }
--------------------------------------------------------------------------------
/src/bindings/ejdb2_node/.eslintrc:
--------------------------------------------------------------------------------
1 | {
2 | "env": {
3 | "commonjs": true,
4 | "es6": true,
5 | "node": true
6 | },
7 | "parserOptions": {
8 | "ecmaVersion": 2018,
9 | "ecmaFeatures": {
10 | "jsx": false
11 | },
12 | "sourceType": "module"
13 | },
14 | "rules": {
15 | "no-const-assign": "error",
16 | "no-undef": "off",
17 | "no-unreachable": "warn",
18 | "no-unused-vars": "warn",
19 | "no-redeclare": "error",
20 | "no-octal": "error",
21 | "no-self-assign": "error",
22 | "no-unused-labels": "warn",
23 | "no-useless-return": "warn",
24 | "constructor-super": "warn",
25 | "valid-typeof": "warn",
26 | "no-mixed-spaces-and-tabs": "warn",
27 | "no-delete-var": "error",
28 | "no-class-assign": "error",
29 | "no-this-before-super": "warn",
30 | "require-yield": "warn",
31 | "quotes": [
32 | "warn",
33 | "single"
34 | ],
35 | "semi": [
36 | "warn",
37 | "always"
38 | ],
39 | "semi-spacing": [
40 | "warn",
41 | {
42 | "before": false,
43 | "after": true
44 | }
45 | ],
46 | "no-extra-semi": "error",
47 | "brace-style": [
48 | "error",
49 | "1tbs",
50 | {
51 | "allowSingleLine": true
52 | }
53 | ]
54 | }
55 | }
--------------------------------------------------------------------------------
/src/jbi/jbi_pk_scanner.c:
--------------------------------------------------------------------------------
1 | #include "ejdb2_internal.h"
2 |
3 | // Primary key scanner
4 | iwrc jbi_pk_scanner(struct jbexec *ctx, jb_scan_consumer consumer) {
5 | iwrc rc = 0;
6 | int64_t id, step;
7 | bool matched;
8 | struct jqp_aux *aux = ctx->ux->q->aux;
9 | assert(aux->expr->flags & JQP_EXPR_NODE_FLAG_PK);
10 | JQP_EXPR_NODE_PK *pk = (void*) aux->expr;
11 | assert(pk->argument);
12 | JQVAL *jqvp = jql_unit_to_jqval(aux, pk->argument, &rc);
13 | RCGO(rc, finish);
14 |
15 | if ((jqvp->type == JQVAL_JBLNODE) && (jqvp->vnode->type == JBV_ARRAY)) {
16 | JQVAL jqv;
17 | JBL_NODE nv = jqvp->vnode->child;
18 | if (!nv) {
19 | goto finish;
20 | }
21 | step = 1;
22 | do {
23 | jql_node_to_jqval(nv, &jqv);
24 | if (jql_jqval_as_int(&jqv, &id)) {
25 | if (step > 0) {
26 | --step;
27 | } else if (step < 0) {
28 | ++step;
29 | }
30 | if (!step) {
31 | step = 1;
32 | rc = consumer(ctx, 0, id, &step, &matched, 0);
33 | RCGO(rc, finish);
34 | }
35 | }
36 | } while (step && (step > 0 ? (nv = nv->next) : (nv = nv->prev)));
37 | } else if (jql_jqval_as_int(jqvp, &id)) {
38 | rc = consumer(ctx, 0, id, &step, &matched, 0);
39 | }
40 |
41 | finish:
42 | return consumer(ctx, 0, 0, 0, 0, rc);
43 | }
44 |
--------------------------------------------------------------------------------
/src/bindings/archived/ejdb2_react_native/tests/android/build.gradle:
--------------------------------------------------------------------------------
1 | // Top-level build file where you can add configuration options common to all sub-projects/modules.
2 |
3 | buildscript {
4 | ext {
5 | buildToolsVersion = "28.0.3"
6 | supportLibVersion = "28.0.0"
7 | compileSdkVersion = 28
8 | targetSdkVersion = 28
9 | minSdkVersion = 21
10 | kotlinVersion = '1.3.0'
11 | detoxKotlinVersion = kotlinVersion
12 | }
13 | repositories {
14 | google()
15 | jcenter()
16 | }
17 | dependencies {
18 | classpath 'com.android.tools.build:gradle:3.3.2'
19 | classpath "org.jetbrains.kotlin:kotlin-gradle-plugin:$kotlinVersion"
20 |
21 | // NOTE: Do not place your application dependencies here; they belong
22 | // in the individual module build.gradle files
23 | }
24 | }
25 |
26 | allprojects {
27 | repositories {
28 | maven {
29 | // All of React Native (JS, Obj-C sources, Android binaries) is installed from npm
30 | url "$rootDir/../node_modules/react-native/android"
31 | }
32 | maven {
33 | url("$rootDir/../node_modules/jsc-android/dist")
34 | }
35 | maven {
36 | // All of Detox' artifacts are provided via the npm module
37 | url "$rootDir/../node_modules/detox/Detox-android"
38 | }
39 | mavenLocal()
40 | google()
41 | jcenter()
42 | }
43 | }
44 |
--------------------------------------------------------------------------------
/src/bindings/archived/ejdb2_dart/example/isolate.dart:
--------------------------------------------------------------------------------
1 | import 'dart:async';
2 | import 'dart:isolate';
3 |
4 | import 'package:ejdb2_dart/ejdb2_dart.dart';
5 |
6 | /// Database access from multiple isolates.
7 | /// Based on isolate example from https://github.com/adamlofts/leveldb_dart
8 |
9 | void main() async {
10 | final runners = Iterable.generate(5).map((int index) {
11 | return Runner.spawn(index);
12 | }).toList();
13 | await Future.wait(runners.map((Runner r) => r.finish));
14 | }
15 |
16 | Future run(int index) async {
17 | print('Thread ${index} write');
18 | final db = await EJDB2.open('isolate.db', truncate: true);
19 | await db.put('c1', {'index': index});
20 | // Sleep 1 second
21 | await Future.delayed(const Duration(seconds: 1));
22 | final nextKey = (index + 1) % 5;
23 | final doc = await db.createQuery('/[index=:?]', 'c1').setInt(0, nextKey).execute().first;
24 | print('Thread ${index} read: ${doc}');
25 | }
26 |
27 | class Runner {
28 | final Completer _finish = Completer();
29 | final RawReceivePort _finishPort = RawReceivePort();
30 | Runner.spawn(int index) {
31 | _finishPort.handler = (dynamic _) {
32 | _finish.complete();
33 | _finishPort.close();
34 | };
35 | Isolate.spawn(run, index, onExit: _finishPort.sendPort);
36 | }
37 | Future get finish => _finish.future;
38 | }
39 |
--------------------------------------------------------------------------------
/src/bindings/archived/ejdb2_react_native/binding/CMakeLists.txt:
--------------------------------------------------------------------------------
1 | file(READ ${CMAKE_CURRENT_SOURCE_DIR}/version.txt _VERSION)
2 | set_property(GLOBAL PROPERTY EJDB2_RN_VERSION_PROPERTY "${PROJECT_VERSION}.${_VERSION}")
3 | set(EJDB2_RN_VERSION "${PROJECT_VERSION}.${_VERSION}")
4 |
5 | if (NOT DEFINED REACT_NATIVE_PUB_DIR)
6 | set(REACT_NATIVE_PUB_DIR ${CMAKE_CURRENT_BINARY_DIR})
7 | endif ()
8 |
9 | find_program(YARN_EXEC yarn)
10 | if (YARN_EXEC MATCHES "YARN_EXEC-NOTFOUND")
11 | message(FATAL_ERROR "`yarn` executable not found")
12 | endif ()
13 |
14 | set(ANDROID_LIBS_DIR "${REACT_NATIVE_PUB_DIR}/android/libs")
15 | foreach (AABI IN ITEMS ${ANDROID_ABIS})
16 | list(APPEND ANDROID_ABIS_LIBS "android_${AABI}")
17 | endforeach ()
18 |
19 | configure_file(package.json ${REACT_NATIVE_PUB_DIR}/package.json @ONLY)
20 | configure_file(CHANGELOG.md ${REACT_NATIVE_PUB_DIR}/CHANGELOG.md @ONLY)
21 |
22 | add_custom_target(
23 | ejdb2_react_native ALL
24 | DEPENDS ${ANDROID_ABIS_LIBS}
25 | COMMAND ${CMAKE_COMMAND} -E copy_directory ${CMAKE_CURRENT_BINARY_DIR}/../../ejdb2_android/libs ${ANDROID_LIBS_DIR}
26 | COMMAND ${CMAKE_COMMAND} -E copy ${CMAKE_CURRENT_SOURCE_DIR}/../README.md ${CMAKE_CURRENT_BINARY_DIR}
27 | COMMAND ${YARN_EXEC} --non-interactive --no-progress pack --filename ${REACT_NATIVE_PUB_DIR}/ejdb2_react_native.tgz
28 | WORKING_DIRECTORY ${REACT_NATIVE_PUB_DIR}
29 | )
30 |
31 |
--------------------------------------------------------------------------------
/src/bindings/archived/ejdb2_react_native/tests/android/app/src/main/java/com/test/MainApplication.java:
--------------------------------------------------------------------------------
1 | package com.test;
2 |
3 | import android.app.Application;
4 |
5 | import com.facebook.react.ReactApplication;
6 | import com.softmotions.ejdb2.EJDB2Package;
7 | import com.facebook.react.ReactNativeHost;
8 | import com.facebook.react.ReactPackage;
9 | import com.facebook.react.shell.MainReactPackage;
10 | import com.facebook.soloader.SoLoader;
11 |
12 | import java.util.Arrays;
13 | import java.util.List;
14 |
15 | public class MainApplication extends Application implements ReactApplication {
16 |
17 | private final ReactNativeHost mReactNativeHost = new ReactNativeHost(this) {
18 | @Override
19 | public boolean getUseDeveloperSupport() {
20 | return BuildConfig.DEBUG;
21 | }
22 |
23 | @Override
24 | protected List getPackages() {
25 | return Arrays.asList(
26 | new MainReactPackage(),
27 | new EJDB2Package()
28 | );
29 | }
30 |
31 | @Override
32 | protected String getJSMainModuleName() {
33 | return "index";
34 | }
35 | };
36 |
37 | @Override
38 | public ReactNativeHost getReactNativeHost() {
39 | return mReactNativeHost;
40 | }
41 |
42 | @Override
43 | public void onCreate() {
44 | super.onCreate();
45 | SoLoader.init(this, /* native exopackage */ false);
46 | }
47 | }
48 |
--------------------------------------------------------------------------------
/src/jbs/README.md:
--------------------------------------------------------------------------------
1 | # REST/Websocket HTTP server.
2 |
3 | SSL (TLS 1.2) provided by fork of BearSSL library https://github.com/Softmotions/BearSSL
4 |
5 | ## jbs server
6 |
7 | ```
8 | Usage:
9 |
10 | ./jbs [options]
11 |
12 | -v, --version Print program version.
13 | -f, --file=<> Database file path. Default: ejdb2.db
14 | -p, --port=NUM HTTP server port numer. Default: 9191
15 | -l, --listen=<> Network address server will listen. Default: localhost
16 | -k, --key=<> PEM private key file for TLS 1.2 HTTP server.
17 | -c, --certs=<> PEM certificates file for TLS 1.2 HTTP server.
18 | -a, --access=TOKEN|@FILE Access token to match 'X-Access-Token' HTTP header value.
19 | -r, --access-read Allows unrestricted read-only data access.
20 | -C, --cors Enable COSR response headers for HTTP server
21 | -t, --trunc Cleanup/reset database file on open.
22 | -w, --wal use the write ahead log (WAL). Used to provide data durability.
23 |
24 | Advanced options:
25 | -S, --sbz=NUM Max sorting buffer size. If exceeded, an overflow temp file for data will be created.
26 | Default: 16777216, min: 1048576
27 | -D, --dsz=NUM Initial size of buffer to process/store document on queries. Preferable average size of document.
28 | Default: 65536, min: 16384
29 | -T, --trylock Exit with error if database is locked by another process.
30 | If not set, current process will wait for lock release.
31 |
32 | ```
33 |
--------------------------------------------------------------------------------
/src/bindings/archived/ejdb2_react_native/binding/android/src/main/java/com/softmotions/ejdb2/EJDB2Package.java:
--------------------------------------------------------------------------------
1 |
2 | package com.softmotions.ejdb2;
3 |
4 | import java.util.Arrays;
5 | import java.util.Collections;
6 | import java.util.List;
7 | import java.util.concurrent.Executor;
8 | import java.util.concurrent.SynchronousQueue;
9 | import java.util.concurrent.ThreadPoolExecutor;
10 | import java.util.concurrent.TimeUnit;
11 |
12 | import com.facebook.react.ReactPackage;
13 | import com.facebook.react.bridge.JavaScriptModule;
14 | import com.facebook.react.bridge.NativeModule;
15 | import com.facebook.react.bridge.ReactApplicationContext;
16 | import com.facebook.react.uimanager.ViewManager;
17 |
18 | public class EJDB2Package implements ReactPackage {
19 |
20 | private static final Executor executor = new ThreadPoolExecutor(0, 5, 60L, TimeUnit.SECONDS,
21 | new SynchronousQueue());
22 |
23 | @Override
24 | public List createNativeModules(ReactApplicationContext reactContext) {
25 | return Arrays.asList(new EJDB2DBModule(reactContext, executor), new EJDB2JQLModule(reactContext, executor));
26 | }
27 |
28 | // Deprecated from RN 0.47
29 | public List> createJSModules() {
30 | return Collections.emptyList();
31 | }
32 |
33 | @Override
34 | public List createViewManagers(ReactApplicationContext reactContext) {
35 | return Collections.emptyList();
36 | }
37 | }
--------------------------------------------------------------------------------
/src/bindings/archived/ejdb2_react_native/tests/package.json:
--------------------------------------------------------------------------------
1 | {
2 | "name": "test",
3 | "version": "1.0.0",
4 | "private": true,
5 | "scripts": {
6 | "start": "react-native start",
7 | "stop": "react-native-kill-packager",
8 | "clean": "(cd ../binding && yarn unlink); rm -rf ./android/build",
9 | "build": "yarn && detox build",
10 | "test": "yarn run build && detox test -u",
11 | "build-dev": "(cd ../binding && yarn link) && yarn && yarn link ejdb2_react_native && detox build",
12 | "test-dev": "yarn run build-dev && detox test"
13 | },
14 | "dependencies": {
15 | "chai": "^4.2.0",
16 | "react": "^16.11.0",
17 | "react-native": "^0.61.3"
18 | },
19 | "devDependencies": {
20 | "@babel/core": "^7.6.4",
21 | "@babel/runtime": "^7.6.3",
22 | "babel-jest": "^24.9.0",
23 | "detox": "^14.5.1",
24 | "metro-react-native-babel-preset": "^0.56.3",
25 | "mocha": "^6.2.2",
26 | "react-native-kill-packager": "^1.0.0",
27 | "react-test-renderer": "^16.11.0"
28 | },
29 | "jest": {
30 | "preset": "react-native"
31 | },
32 | "detox": {
33 | "test-runner": "mocha",
34 | "configurations": {
35 | "android.emu.debug": {
36 | "binaryPath": "android/app/build/outputs/apk/debug/app-debug.apk",
37 | "build": "cd android && ./gradlew assembleDebug assembleAndroidTest -DtestBuildType=debug && cd ..",
38 | "type": "android.emulator",
39 | "name": "TestingAVD"
40 | }
41 | }
42 | }
43 | }
44 |
--------------------------------------------------------------------------------
/release.sh:
--------------------------------------------------------------------------------
1 | #!/bin/bash
2 |
3 | set -e
4 | # set -x
5 |
6 | SCRIPTPATH="$(
7 | cd "$(dirname "$0")"
8 | pwd -P
9 | )"
10 | cd $SCRIPTPATH
11 |
12 |
13 | readme() {
14 | echo "Generating README.md";
15 | cat "./BASE.md" > "./README.md"
16 | echo -e "\n\n" >> "./README.md"
17 | cat "./src/jql/README.md" >> "./README.md"
18 | echo -e "\n\n" >> "./README.md"
19 | cat "./src/jbr/README.md" >> "./README.md"
20 | echo -e "\n\n" >> "./README.md"
21 | cat "./CAPI.md" >> "./README.md"
22 | echo -e '\n# License\n```\n' >> "./README.md"
23 | cat "./LICENSE" >> "./README.md"
24 | echo -e '\n```\n' >> "./README.md"
25 | }
26 |
27 | release_tag() {
28 | echo "Creating EJDB2 release"
29 | readme
30 |
31 | git pull origin master
32 | dch --distribution testing --no-force-save-on-release --release "" -c ./Changelog
33 | VERSION=`dpkg-parsechangelog -l./Changelog -SVersion`
34 | TAG="v${VERSION}"
35 | CHANGESET=`dpkg-parsechangelog -l./Changelog -SChanges | sed '/^ejdb2.*/d' | sed '/^\s*$/d'`
36 | git add ./Changelog
37 | git add ./README.md
38 |
39 | if ! git diff-index --quiet HEAD --; then
40 | git commit -a -m"${TAG} landed"
41 | git push origin master
42 | fi
43 |
44 | echo "${CHANGESET}" | git tag -f -a -F - "${TAG}"
45 | git push origin -f --tags
46 | }
47 |
48 | while [ "$1" != "" ]; do
49 | case $1 in
50 | "-d" ) readme
51 | exit
52 | ;;
53 | "-r" ) release_tag
54 | exit
55 | ;;
56 | esac
57 | shift
58 | done
59 |
60 |
--------------------------------------------------------------------------------
/src/bindings/archived/ejdb2_dart/README.md:
--------------------------------------------------------------------------------
1 | # WARNING: Unsupported now. Maintainer needed.
2 |
3 | # EJDB2 Dart VM native binding
4 |
5 | Embeddable JSON Database engine http://ejdb.org Dart binding.
6 |
7 | See https://github.com/Softmotions/ejdb/blob/master/README.md
8 |
9 | For API usage examples take a look into [/example](https://github.com/Softmotions/ejdb/tree/master/src/bindings/ejdb2_dart/example) and [/test](https://github.com/Softmotions/ejdb/tree/master/src/bindings/ejdb2_dart/test) folders.
10 |
11 | ## Example
12 |
13 | ```dart
14 | import 'package:ejdb2_dart/ejdb2_dart.dart';
15 |
16 | void main() async {
17 | final db = await EJDB2.open('example.db', truncate: true);
18 |
19 | var id = await db.put('parrots', {'name': 'Bianca', 'age': 4});
20 | print('Bianca record: ${id}');
21 |
22 | id = await db.put('parrots', {'name': 'Darko', 'age': 8});
23 | print('Darko record: ${id}');
24 |
25 | final q = db.createQuery('/[age > :age]', 'parrots');
26 | await for (final doc in q.setInt('age', 3).execute()) {
27 | print('Found ${doc}');
28 | }
29 | await db.close();
30 | }
31 | ```
32 |
33 | ## Supported platforms
34 |
35 | * Linux x64
36 | * OSX
37 |
38 | ## How build it manually
39 |
40 | Note: native binding requires Dart SDK version >= 2.12.x
41 |
42 | ``` sh
43 | git clone https://github.com/Softmotions/ejdb.git
44 | cd ./ejdb
45 | mkdir ./build && cd build
46 | cmake .. -DBUILD_DART_BINDING=ON -DCMAKE_BUILD_TYPE=Release
47 | make
48 | cd src/bindings/ejdb2_dart/ejdb2_dart
49 | pub get
50 | ```
51 |
--------------------------------------------------------------------------------
/src/bindings/ejdb2_node/README.md:
--------------------------------------------------------------------------------
1 | # EJDB2 Node.js native binding
2 |
3 | Embeddable JSON Database engine http://ejdb.org Node.js binding.
4 |
5 | See https://github.com/Softmotions/ejdb/blob/master/README.md
6 |
7 | For API usage examples take a look into [/example](https://github.com/Softmotions/ejdb/tree/master/src/bindings/ejdb2_node/example) and [test.js](https://github.com/Softmotions/ejdb/tree/master/src/bindings/ejdb2_node/test.js)
8 |
9 | ## Sample code
10 |
11 | ```ts
12 | import { EJDB2 } from "ejdb2_node";
13 |
14 | async function run() {
15 | const db = await EJDB2.open("example.db", { truncate: true });
16 |
17 | var id = await db.put("parrots", { name: "Bianca", age: 4 });
18 | console.log(`Bianca record: ${id}`);
19 |
20 | id = await db.put("parrots", { name: "Darko", age: 8 });
21 | console.log(`Darko record: ${id}`);
22 |
23 | const q = db.createQuery("/[age > :age]", "parrots");
24 |
25 | for await (const doc of q.setNumber("age", 3).stream()) {
26 | console.log(`Found ${doc}`);
27 | }
28 |
29 | await db.close();
30 | }
31 |
32 | run();
33 | ```
34 |
35 | ## Supported platforms
36 |
37 | - Linux x64
38 | - OSX
39 |
40 | ## Prerequisites
41 |
42 | - node >= v10.0.0
43 | - yarn
44 | - CMake >= v3.10
45 | - Make
46 | - gcc or clang compiler
47 |
48 | ## How build it manually
49 |
50 | ```sh
51 | git clone https://github.com/Softmotions/ejdb.git
52 | cd ./ejdb
53 | mkdir ./build && cd build
54 | cmake .. -DBUILD_NODEJS_BINDING=ON -DCMAKE_BUILD_TYPE=Release
55 | make
56 | cd src/bindings/ejdb2_node/ejdb2_node
57 | yarn pack
58 | ```
59 |
--------------------------------------------------------------------------------
/src/bindings/ejdb2_node/package.json:
--------------------------------------------------------------------------------
1 | {
2 | "name": "ejdb2_node",
3 | "version": "@EJDB_NODE_VERSION@",
4 | "repository": "https://github.com/Softmotions/ejdb.git",
5 | "author": "Anton Adamansky ",
6 | "description": "EJDB2 Node.js native binding",
7 | "license": "MIT",
8 | "main": "index.js",
9 | "types": "index.d.ts",
10 | "engines": {
11 | "node": ">=10.0.0",
12 | "npm": ">=6.0.0"
13 | },
14 | "os": [
15 | "darwin",
16 | "linux",
17 | "!win32"
18 | ],
19 | "cpu": [
20 | "x64",
21 | "x32",
22 | "arm",
23 | "arm64"
24 | ],
25 | "scripts": {
26 | "test": "node install.js && ava -s",
27 | "install": "node install.js"
28 | },
29 | "files": [
30 | "*.js",
31 | "index.d.ts",
32 | "Changelog",
33 | "README.md"
34 | ],
35 | "revision": "@META_REVISION@",
36 | "dependencies": {
37 | "extract-zip": "^2.0.1",
38 | "gauge": "^4.0.4",
39 | "request": "^2.88.2",
40 | "request-progress": "^3.0.0",
41 | "rimraf": "^3.0.2",
42 | "semver": "^7.3.7"
43 | },
44 | "devDependencies": {
45 | "@types/node": "^12.0.10",
46 | "ava": "^4.3.1",
47 | "chai": "^4.3.6"
48 | },
49 | "resolutions": {
50 | "lodash.merge": "4.6.2"
51 | },
52 | "keywords": [
53 | "ejdb",
54 | "ejdb2",
55 | "nosql",
56 | "json",
57 | "database",
58 | "storage",
59 | "embedded",
60 | "embeddable",
61 | "native",
62 | "binding"
63 | ],
64 | "ava": {
65 | "files": [
66 | "test.js"
67 | ],
68 | "failWithoutAssertions": false
69 | }
70 | }
--------------------------------------------------------------------------------
/src/jql/jql_internal.h:
--------------------------------------------------------------------------------
1 | #pragma once
2 | #ifndef JQL_INTERNAL_H
3 | #define JQL_INTERNAL_H
4 |
5 | #include "jqp.h"
6 |
7 | #include
8 | #include
9 | #include
10 |
11 | /** Query object */
12 | struct jql {
13 | bool dirty;
14 | bool matched;
15 | JQP_QUERY *qp;
16 | JQP_AUX *aux;
17 | const char *coll;
18 | void *opaque;
19 | };
20 |
21 | /** Placeholder value type */
22 | typedef enum {
23 | JQVAL_NULL, // Do not reorder
24 | JQVAL_I64,
25 | JQVAL_F64,
26 | JQVAL_STR,
27 | JQVAL_BOOL,
28 | JQVAL_RE,
29 | JQVAL_JBLNODE, // Do not reorder JQVAL_JBLNODE,JQVAL_BINN must be last
30 | JQVAL_BINN,
31 | } jqval_type_t;
32 |
33 | /** Placeholder value */
34 | typedef struct jqval {
35 | jqval_type_t type;
36 | void (*freefn)(void*, void*);
37 | void *freefn_op;
38 | int refs;
39 | union {
40 | JBL_NODE vnode;
41 | binn *vbinn;
42 | int64_t vi64;
43 | double vf64;
44 | const char *vstr;
45 | struct iwre *vre;
46 | bool vbool;
47 | };
48 | } JQVAL;
49 |
50 | JQVAL* jql_find_placeholder(JQL q, const char *name);
51 |
52 | JQVAL* jql_unit_to_jqval(JQP_AUX *aux, JQPUNIT *unit, iwrc *rcp);
53 |
54 | bool jql_jqval_as_int(JQVAL *jqval, int64_t *out);
55 |
56 | jqval_type_t jql_binn_to_jqval(binn *vbinn, JQVAL *qval);
57 |
58 | void jql_node_to_jqval(JBL_NODE jn, JQVAL *qv);
59 |
60 | int jql_cmp_jqval_pair(const JQVAL *left, const JQVAL *right, iwrc *rcp);
61 |
62 | bool jql_match_jqval_pair(JQP_AUX *aux, JQVAL *left, JQP_OP *jqop, JQVAL *right, iwrc *rcp);
63 |
64 | #endif
65 |
--------------------------------------------------------------------------------
/src/bindings/ejdb2_jni/example/pom.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
6 | 4.0.0
7 | softmotions
8 | ejdb2-example
9 | 1.0-SNAPSHOT
10 | jar
11 |
12 |
13 | UTF-8
14 | 11
15 | 11
16 |
17 |
18 |
19 |
20 | repsy
21 | EJDB2 Maven Repositoty on Repsy
22 | https://repo.repsy.io/mvn/adamansky/softmotions
23 |
24 |
25 |
26 |
27 |
28 | softmotions
29 | ejdb2
30 | 2.62.18
31 |
32 |
33 |
34 |
35 |
36 |
37 | org.apache.maven.plugins
38 | maven-compiler-plugin
39 | 3.8.1
40 |
41 | ${java.source.version}
42 | ${java.target.version}
43 | UTF-8
44 |
45 |
46 |
47 |
48 |
--------------------------------------------------------------------------------
/src/bindings/ejdb2_jni/example/README.md:
--------------------------------------------------------------------------------
1 | ## EJDB2 Java sample app
2 |
3 | First of all you need to get `libejdb2jni.so` native binding library for JVM.
4 |
5 | You can build it yourself
6 |
7 | ```sh
8 | git clone https://github.com/Softmotions/ejdb.git
9 | cd ./ejdb
10 | mkdir ./build && cd build
11 | cmake .. -DBUILD_JNI_BINDING=ON -DCMAKE_BUILD_TYPE=Release
12 | make
13 | ```
14 |
15 | or install binary package from [our PPA repository](https://launchpad.net/~adamansky/+archive/ubuntu/ejdb2)
16 |
17 | ```sh
18 | sudo add-apt-repository ppa:adamansky/ejdb2
19 | sudo apt-get update
20 | sudo apt-get install ejdb2-java
21 | ```
22 |
23 | Then compile and run app (Linux x86-64)
24 |
25 | ```sh
26 | cd ejdb2_jni/example
27 |
28 | mvn clean compile
29 | mvn exec:java -Dexec.cleanupDaemonThreads=false -Dexec.mainClass="EJDB2Example"
30 | ```
31 |
32 | Note: Yoy may need to specify `LD_LIBRARY_PATH` env for `java` in order to help JVM find where
33 | the `libejdb2jni.so` library is located. For Linux systems `ejdb2-java` PPA debian package installs
34 | shared library symlink to `/usr/java/packages/lib` folder listed as default library search
35 | path for JVM so you can skip specifying `LD_LIBRARY_PATH` in that case.
36 |
37 | ### Maven project configuration
38 |
39 | ```xml
40 |
41 |
42 | repsy
43 | EJDB2 Maven Repositoty on Repsy
44 | https://repo.repsy.io/mvn/adamansky/softmotions
45 |
46 |
47 |
48 |
49 |
50 | softmotions
51 | ejdb2
52 | 2.0.57.11
53 |
54 |
55 | ```
--------------------------------------------------------------------------------
/src/bindings/archived/ejdb2_android/CMakeLists.txt:
--------------------------------------------------------------------------------
1 | if (NOT DEFINED ANDROID_NDK_HOME)
2 | if (DEFINED ENV{ANDROID_NDK_HOME})
3 | set(ANDROID_NDK_HOME $ENV{ANDROID_NDK_HOME})
4 | else ()
5 | message(FATAL_ERROR "Missing required ANDROID_NDK_HOME option/env. Use -DANDROID_NDK_HOME=...")
6 | endif ()
7 | endif ()
8 |
9 | set(ANDROID_BUILD_DIR "${CMAKE_SOURCE_DIR}/build_android")
10 | set(ANDROID_LIBS_DIR "${CMAKE_CURRENT_BINARY_DIR}/libs")
11 |
12 | foreach (AABI IN ITEMS ${ANDROID_ABIS})
13 | list(APPEND ANDROID_ABIS_LIBS "${ANDROID_LIBS_DIR}/${AABI}/libejdb2jni.so")
14 | add_custom_target(
15 | android_${AABI} ALL
16 | BYPRODUCTS ${ANDROID_LIBS_DIR}/${AABI}/libejdb2jni.so
17 | COMMAND ${CMAKE_COMMAND} -E remove_directory ${ANDROID_BUILD_DIR}
18 | COMMAND ${CMAKE_COMMAND} -E make_directory ${ANDROID_BUILD_DIR}
19 | COMMAND ${CMAKE_COMMAND} -G ${CMAKE_GENERATOR} -S ${CMAKE_SOURCE_DIR}
20 | -B ${ANDROID_BUILD_DIR}
21 | -DCMAKE_BUILD_TYPE=${CMAKE_BUILD_TYPE}
22 | -DBUILD_JNI_BINDING=ON
23 | -DENABLE_HTTP=OFF
24 | -DCMAKE_TOOLCHAIN_FILE=${ANDROID_NDK_HOME}/build/cmake/android.toolchain.cmake
25 | -DANDROID_ABI=${AABI}
26 | -DANDROID_PLATFORM=android-21
27 | -DANDROID_NATIVE_API_LEVEL=21
28 | -DIOWOW_URL=${IOWOW_URL}
29 | COMMAND ${CMAKE_COMMAND} --build ${ANDROID_BUILD_DIR}
30 | COMMAND ${CMAKE_COMMAND} -E make_directory ${ANDROID_LIBS_DIR}/${AABI}
31 | COMMAND ${CMAKE_COMMAND} -E copy ${ANDROID_BUILD_DIR}/src/bindings/ejdb2_jni/src/libejdb2jni.so ${ANDROID_LIBS_DIR}/${AABI}
32 | COMMAND ${CMAKE_COMMAND} -E copy ${ANDROID_BUILD_DIR}/src/bindings/ejdb2_jni/src/ejdb2.jar ${ANDROID_LIBS_DIR}
33 | COMMAND ${CMAKE_COMMAND} -E remove_directory ${ANDROID_BUILD_DIR}
34 | VERBATIM
35 | )
36 | endforeach ()
--------------------------------------------------------------------------------
/src/bindings/archived/ejdb2_flutter/example/ios/Runner/Info.plist:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 | CFBundleDevelopmentRegion
6 | $(DEVELOPMENT_LANGUAGE)
7 | CFBundleExecutable
8 | $(EXECUTABLE_NAME)
9 | CFBundleIdentifier
10 | $(PRODUCT_BUNDLE_IDENTIFIER)
11 | CFBundleInfoDictionaryVersion
12 | 6.0
13 | CFBundleName
14 | ejdb2_flutter_example
15 | CFBundlePackageType
16 | APPL
17 | CFBundleShortVersionString
18 | $(FLUTTER_BUILD_NAME)
19 | CFBundleSignature
20 | ????
21 | CFBundleVersion
22 | $(FLUTTER_BUILD_NUMBER)
23 | LSRequiresIPhoneOS
24 |
25 | UILaunchStoryboardName
26 | LaunchScreen
27 | UIMainStoryboardFile
28 | Main
29 | UISupportedInterfaceOrientations
30 |
31 | UIInterfaceOrientationPortrait
32 | UIInterfaceOrientationLandscapeLeft
33 | UIInterfaceOrientationLandscapeRight
34 |
35 | UISupportedInterfaceOrientations~ipad
36 |
37 | UIInterfaceOrientationPortrait
38 | UIInterfaceOrientationPortraitUpsideDown
39 | UIInterfaceOrientationLandscapeLeft
40 | UIInterfaceOrientationLandscapeRight
41 |
42 | UIViewControllerBasedStatusBarAppearance
43 |
44 |
45 |
46 |
--------------------------------------------------------------------------------
/src/bindings/ejdb2_node/binary.js:
--------------------------------------------------------------------------------
1 | /**************************************************************************************************
2 | * EJDB2 Node.js native API binding.
3 | *
4 | * MIT License
5 | *
6 | * Copyright (c) 2012-2022 Softmotions Ltd
7 | *
8 | * Permission is hereby granted, free of charge, to any person obtaining a copy
9 | * of this software and associated documentation files (the "Software"), to deal
10 | * in the Software without restriction, including without limitation the rights
11 | * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
12 | * copies of the Software, and to permit persons to whom the Software is
13 | * furnished to do so, subject to the following conditions:
14 | *
15 | * The above copyright notice and this permission notice shall be included in all
16 | * copies or substantial portions of the Software.
17 | *
18 | * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
19 | * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
20 | * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
21 | * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
22 | * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
23 | * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
24 | * SOFTWARE.
25 | *************************************************************************************************/
26 |
27 | const path = require('path');
28 | const utils = require('./utils');
29 |
30 | /*
31 | * Load native library with specified name.
32 | */
33 | module.exports = function (name) {
34 | const file = path.join(__dirname, utils.binariesDir, name);
35 | return require(file);
36 | };
37 |
--------------------------------------------------------------------------------
/src/bindings/ejdb2_node/node_api_types.h:
--------------------------------------------------------------------------------
1 | #ifndef SRC_NODE_API_TYPES_H_
2 | #define SRC_NODE_API_TYPES_H_
3 |
4 | #include "js_native_api_types.h"
5 |
6 | typedef struct napi_callback_scope__* napi_callback_scope;
7 | typedef struct napi_async_context__* napi_async_context;
8 | typedef struct napi_async_work__* napi_async_work;
9 |
10 | #if NAPI_VERSION >= 3
11 | typedef void(NAPI_CDECL* napi_cleanup_hook)(void* arg);
12 | #endif // NAPI_VERSION >= 3
13 |
14 | #if NAPI_VERSION >= 4
15 | typedef struct napi_threadsafe_function__* napi_threadsafe_function;
16 | #endif // NAPI_VERSION >= 4
17 |
18 | #if NAPI_VERSION >= 4
19 | typedef enum {
20 | napi_tsfn_release,
21 | napi_tsfn_abort
22 | } napi_threadsafe_function_release_mode;
23 |
24 | typedef enum {
25 | napi_tsfn_nonblocking,
26 | napi_tsfn_blocking
27 | } napi_threadsafe_function_call_mode;
28 | #endif // NAPI_VERSION >= 4
29 |
30 | typedef void(NAPI_CDECL* napi_async_execute_callback)(napi_env env, void* data);
31 | typedef void(NAPI_CDECL* napi_async_complete_callback)(napi_env env,
32 | napi_status status,
33 | void* data);
34 | #if NAPI_VERSION >= 4
35 | typedef void(NAPI_CDECL* napi_threadsafe_function_call_js)(
36 | napi_env env, napi_value js_callback, void* context, void* data);
37 | #endif // NAPI_VERSION >= 4
38 |
39 | typedef struct {
40 | uint32_t major;
41 | uint32_t minor;
42 | uint32_t patch;
43 | const char* release;
44 | } napi_node_version;
45 |
46 | #if NAPI_VERSION >= 8
47 | typedef struct napi_async_cleanup_hook_handle__* napi_async_cleanup_hook_handle;
48 | typedef void(NAPI_CDECL* napi_async_cleanup_hook)(
49 | napi_async_cleanup_hook_handle handle, void* data);
50 | #endif // NAPI_VERSION >= 8
51 |
52 | #endif // SRC_NODE_API_TYPES_H_
53 |
--------------------------------------------------------------------------------
/src/bindings/archived/ejdb2_react_native/binding/android/build.gradle:
--------------------------------------------------------------------------------
1 | def _ext = rootProject.ext
2 | def _compileSdkVersion = _ext.has('compileSdkVersion') ? _ext.compileSdkVersion : 26
3 | def _buildToolsVersion = _ext.has('buildToolsVersion') ? _ext.buildToolsVersion : '29.0.2'
4 | def _minSdkVersion = _ext.has('minSdkVersion') ? _ext.minSdkVersion : 21
5 | def _targetSdkVersion = _ext.has('targetSdkVersion') ? _ext.targetSdkVersion : 26
6 |
7 | buildscript {
8 | repositories {
9 | mavenLocal()
10 | mavenCentral()
11 | jcenter()
12 | google()
13 | }
14 | dependencies {
15 | classpath "com.android.tools.build:gradle:3.5.1"
16 | }
17 | }
18 |
19 | apply plugin: 'com.android.library'
20 |
21 | android {
22 | compileSdkVersion _compileSdkVersion
23 | buildToolsVersion _buildToolsVersion
24 |
25 | defaultConfig {
26 | minSdkVersion _minSdkVersion
27 | targetSdkVersion _targetSdkVersion
28 | versionCode 1
29 | versionName "1.0"
30 | }
31 |
32 | lintOptions {
33 | abortOnError false
34 | }
35 |
36 | compileOptions {
37 | sourceCompatibility JavaVersion.VERSION_1_8
38 | targetCompatibility JavaVersion.VERSION_1_8
39 | }
40 |
41 | sourceSets.main {
42 | jni.srcDirs = []
43 | jniLibs.srcDir 'libs'
44 | }
45 | }
46 |
47 | allprojects {
48 | repositories {
49 | mavenLocal()
50 | maven {
51 | // All of React Native (JS, Obj-C sources, Android binaries) is installed from npm
52 | url("$rootDir/../node_modules/react-native/android")
53 | }
54 | maven {
55 | // Android JSC is installed from npm
56 | url("$rootDir/../node_modules/jsc-android/dist")
57 | }
58 | google()
59 | jcenter()
60 | }
61 | }
62 |
63 |
64 | dependencies {
65 | implementation fileTree(include: ['*.jar'], dir: 'libs')
66 | implementation 'com.facebook.react:react-native:+'
67 | }
68 |
--------------------------------------------------------------------------------
/src/bindings/archived/ejdb2_flutter/example/.gitignore:
--------------------------------------------------------------------------------
1 | # Miscellaneous
2 | *.class
3 | *.log
4 | *.pyc
5 | *.swp
6 | .DS_Store
7 | .atom/
8 | .buildlog/
9 | .history
10 | .svn/
11 |
12 | # IntelliJ related
13 | *.iml
14 | *.ipr
15 | *.iws
16 | .idea/
17 |
18 | # The .vscode folder contains launch configuration and tasks you configure in
19 | # VS Code which you may wish to be included in version control, so this line
20 | # is commented out by default.
21 | #.vscode/
22 |
23 | # Flutter/Dart/Pub related
24 | **/doc/api/
25 | .dart_tool/
26 | .flutter-plugins
27 | .packages
28 | .pub-cache/
29 | .pub/
30 | /build/
31 |
32 | # Android related
33 | # **/android/**/gradle-wrapper.jar
34 | # **/android/gradlew.bat
35 | # **/android/gradlew
36 | **/android/.gradle
37 | **/android/captures/
38 | **/android/local.properties
39 | **/android/**/GeneratedPluginRegistrant.java
40 |
41 | # iOS/XCode related
42 | **/ios/**/*.mode1v3
43 | **/ios/**/*.mode2v3
44 | **/ios/**/*.moved-aside
45 | **/ios/**/*.pbxuser
46 | **/ios/**/*.perspectivev3
47 | **/ios/**/*sync/
48 | **/ios/**/.sconsign.dblite
49 | **/ios/**/.tags*
50 | **/ios/**/.vagrant/
51 | **/ios/**/DerivedData/
52 | **/ios/**/Icon?
53 | **/ios/**/Pods/
54 | **/ios/**/.symlinks/
55 | **/ios/**/profile
56 | **/ios/**/xcuserdata
57 | **/ios/.generated/
58 | **/ios/Flutter/App.framework
59 | **/ios/Flutter/Flutter.framework
60 | **/ios/Flutter/Generated.xcconfig
61 | **/ios/Flutter/app.flx
62 | **/ios/Flutter/app.zip
63 | **/ios/Flutter/flutter_assets/
64 | **/ios/Flutter/flutter_export_environment.sh
65 | **/ios/ServiceDefinitions.json
66 | **/ios/Runner/GeneratedPluginRegistrant.*
67 |
68 | # Exceptions to above rules.
69 | !**/ios/**/default.mode1v3
70 | !**/ios/**/default.mode2v3
71 | !**/ios/**/default.pbxuser
72 | !**/ios/**/default.perspectivev3
73 | !/packages/flutter_tools/test/data/dart_dependencies_test/**/.packages
74 |
75 | !*.iml
76 |
--------------------------------------------------------------------------------
/src/bindings/archived/ejdb2_swift/EJDB2Swift/Sources/EJDB2/JsonAt.swift:
--------------------------------------------------------------------------------
1 | import Foundation
2 |
3 | public enum JsonAtError: Error {
4 | case invalidArgument(String)
5 | }
6 |
7 | public func jsonAt(_ obj: Any, _ ptr: String) throws -> T? {
8 | if ptr.isEmpty {
9 | return obj as? T
10 | }
11 | let val: Any
12 | if obj is String {
13 | val = try JSONSerialization.jsonObject(with: (obj as! String).data(using: .utf8)!)
14 | } else {
15 | val = obj
16 | }
17 | if val is [AnyHashable: Any?] || val is [Any?] {
18 | var pp = try pointer(ptr)
19 | let tv = traverse(val, &pp)
20 | return tv is T? ? tv as! T? : tv as? T
21 | }
22 | return nil
23 | }
24 |
25 | fileprivate func pointer(_ pointer: String) throws -> [String] {
26 | let ptr = pointer.starts(with: "#") ? pointer.substring(fromIndex: 1).decodeUrl()! : pointer
27 | if ptr.isEmpty || ptr[0] != "/" {
28 | throw JsonAtError.invalidArgument("pointer")
29 | }
30 | if ptr.isEmpty {
31 | return [""]
32 | }
33 |
34 | return ptr.substring(fromIndex: 1)
35 | .split(separator: "/", omittingEmptySubsequences: false)
36 | .map {
37 | $0.replacingOccurrences(of: "~1", with: "/")
38 | .replacingOccurrences(of: "~0", with: "~")
39 | }
40 | }
41 |
42 | fileprivate func traverse(_ obj: Any?, _ pp: inout [String]) -> Any? {
43 | if pp.isEmpty {
44 | return obj
45 | }
46 | let key = pp.remove(at: 0)
47 | if obj is [AnyHashable: Any?] {
48 | let d = obj as! [AnyHashable: Any?]
49 | if d[key] == nil {
50 | return nil
51 | }
52 | return traverse(d[key]!, &pp)
53 | } else if obj is [Any?] {
54 | let a = obj as! [Any?]
55 | guard let ikey = Int(key) else {
56 | return nil
57 | }
58 | if ikey < 0 || ikey >= a.count {
59 | return nil
60 | }
61 | return traverse(a[ikey], &pp)
62 | }
63 | return nil
64 | }
--------------------------------------------------------------------------------
/src/bindings/archived/ejdb2_swift/EJDB2Swift/Sources/EJDB2/Utils.swift:
--------------------------------------------------------------------------------
1 | import Foundation
2 |
3 | class CString {
4 | init(_ string: String?, keep: Bool = false) {
5 | self.keep = keep
6 | let s = string ?? ""
7 | (_len, buffer) = s.withCString {
8 | let len = Int(strlen($0) + 1)
9 | let buffer = strcpy(UnsafeMutablePointer.allocate(capacity: len), $0)!
10 | return (len, buffer)
11 | }
12 | }
13 |
14 | deinit {
15 | if !keep {
16 | buffer.deallocate()
17 | }
18 | }
19 |
20 | var count: Int {
21 | return _len > 0 ? _len - 1 : 0
22 | }
23 |
24 | var bufferOrNil: UnsafeMutablePointer? {
25 | return _len == 0 ? nil : buffer
26 | }
27 |
28 | let buffer: UnsafeMutablePointer
29 | private let keep: Bool
30 | private let _len: Int
31 | }
32 |
33 | extension String {
34 | func encodeUrl() -> String? {
35 | return self.addingPercentEncoding(withAllowedCharacters: NSCharacterSet.urlQueryAllowed)
36 | }
37 |
38 | func decodeUrl() -> String? {
39 | return self.removingPercentEncoding
40 | }
41 | }
42 |
43 | extension String {
44 |
45 | var length: Int {
46 | return count
47 | }
48 |
49 | subscript(i: Int) -> String {
50 | return self[i.. String {
54 | return self[min(fromIndex, length).. String {
58 | return self[0..) -> String {
62 | let range = Range(
63 | uncheckedBounds: (
64 | lower: max(0, min(length, r.lowerBound)),
65 | upper: min(length, max(0, r.upperBound))
66 | ))
67 | let start = index(startIndex, offsetBy: range.lowerBound)
68 | let end = index(start, offsetBy: range.upperBound - range.lowerBound)
69 | return String(self[start..
3 |
4 |
9 |
13 |
20 |
24 |
27 |
28 |
29 |
30 |
31 |
32 |
33 |
34 |
--------------------------------------------------------------------------------
/src/jbr/jbr.h:
--------------------------------------------------------------------------------
1 | #pragma once
2 | #ifndef JBREST_H
3 | #define JBREST_H
4 |
5 | /**************************************************************************************************
6 | * EJDB2
7 | *
8 | * MIT License
9 | *
10 | * Copyright (c) 2012-2022 Softmotions Ltd
11 | *
12 | * Permission is hereby granted, free of charge, to any person obtaining a copy
13 | * of this software and associated documentation files (the "Software"), to deal
14 | * in the Software without restriction, including without limitation the rights
15 | * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
16 | * copies of the Software, and to permit persons to whom the Software is
17 | * furnished to do so, subject to the following conditions:
18 | *
19 | * The above copyright notice and this permission notice shall be included in all
20 | * copies or substantial portions of the Software.
21 | *
22 | * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
23 | * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
24 | * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
25 | * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
26 | * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
27 | * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
28 | * SOFTWARE.
29 | *************************************************************************************************/
30 |
31 | #include "ejdb2.h"
32 |
33 | IW_EXTERN_C_START;
34 |
35 | struct jbr;
36 | typedef struct jbr*JBR;
37 |
38 | iwrc jbr_start(struct ejdb *db, const struct ejdb_opts *opts, struct jbr **out_jbr);
39 |
40 | void jbr_shutdown_request(struct ejdb *db);
41 |
42 | void jbr_shutdown_wait(struct jbr *jbr);
43 |
44 | iwrc jbr_init(void);
45 |
46 | IW_EXTERN_C_END;
47 | #endif
48 |
--------------------------------------------------------------------------------
/src/bindings/ejdb2_node/Autark:
--------------------------------------------------------------------------------
1 |
2 | set {
3 | EJDB_NODE_VERSION
4 | ^{${META_VERSION} . @{cat SS{version.txt}}}
5 | }
6 |
7 | if { !defined { EJDB_NODE_PUB_DIR }
8 | set {
9 | EJDB_NODE_PUB_DIR
10 | CC{ejdb2_node}
11 | }
12 | }
13 |
14 | if { !defined { EJDB_NODE_BIN_ROOT }
15 | set {
16 | EJDB_NODE_BIN_ROOT
17 | ${EJDB_NODE_PUB_DIR}
18 | }
19 | }
20 |
21 | set {
22 | EJDB_NODE_BIN_DIR
23 | ^{${EJDB_NODE_BIN_ROOT} / ^{${SYSTEM_NAME} - ${SYSTEM_ARCH_ALT}}}
24 | }
25 |
26 | set {
27 | EJDB_NODE_BIN
28 | ^{${EJDB_NODE_BIN_DIR} /ejdb2_node.node}
29 | }
30 |
31 |
32 | cc {
33 | ejdb2_node.c
34 | set { _ ..${CFLAGS} -DIW_API_EXPORTS -DNODE_ADDON_API_DISABLE_DEPRECATED }
35 | }
36 |
37 | if { !defined { SYSTEM_DARWIN }
38 | set { NODE_LDFLAGS -rdynamic -Wl,--unresolved-symbols=ignore-all }
39 | } else {
40 | set { NODE_LDFLAGS -rdynamic -undefined dynamic_lookup }
41 | }
42 |
43 | run {
44 | exec { mkdir -p ${EJDB_NODE_BIN_DIR} }
45 | exec {
46 | ${CC} -shared -o ${EJDB_NODE_BIN} ${CC_OBJS}
47 | ${LIBEJDB_A} ${LDFLAGS}
48 | ${NODE_LDFLAGS}
49 | }
50 | if { ${STRIP_CMD}
51 | exec { ${STRIP_CMD} ${EJDB_NODE_BIN} }
52 | }
53 | consumes {
54 | ${LIBEJDB_A}
55 | ${CC_OBJS}
56 | }
57 | }
58 |
59 | configure {
60 | package.json
61 | CHANGELOG.md
62 | }
63 |
64 | run {
65 | exec { cp ./package.json ${EJDB_NODE_PUB_DIR} }
66 | exec { cp ./CHANGELOG.md ${EJDB_NODE_PUB_DIR} }
67 | consumes {
68 | CC{package.json}
69 | CC{CHANGELOG.md}
70 | }
71 | }
72 |
73 | in-sources {
74 | run {
75 | shell { cp *.js *.ts ${EJDB_NODE_PUB_DIR} }
76 | consumes {
77 | set { _ ..@{autark glob *.js *.ts}}
78 | }
79 | }
80 | }
81 |
82 | if { ${EJDB_RUN_TESTS}
83 | run {
84 | always
85 | shell { cd ${EJDB_NODE_PUB_DIR} && npm i && npm run test }
86 | consumes {
87 | ${EJDB_NODE_BIN}
88 | }
89 | }
90 | }
91 |
--------------------------------------------------------------------------------
/src/examples/example1.c:
--------------------------------------------------------------------------------
1 | /// Sample records put/query example
2 | #include
3 |
4 | #define CHECK(rc_) \
5 | if (rc_) { \
6 | iwlog_ecode_error3(rc_); \
7 | return 1; \
8 | }
9 |
10 | static iwrc documents_visitor(EJDB_EXEC *ctx, const EJDB_DOC doc, int64_t *step) {
11 | // Print document to stderr
12 | return jbl_as_json(doc->raw, jbl_fstream_json_printer, stderr, JBL_PRINT_PRETTY);
13 | }
14 |
15 | int main() {
16 | EJDB_OPTS opts = {
17 | .kv = {
18 | .path = "example.db",
19 | .oflags = IWKV_TRUNC
20 | }
21 | };
22 | EJDB db; // EJDB2 storage handle
23 | int64_t id; // Document id placeholder
24 | JQL q = 0; // Query instance
25 | JBL jbl = 0; // Json document
26 |
27 | iwrc rc = ejdb_init();
28 | CHECK(rc);
29 |
30 | rc = ejdb_open(&opts, &db);
31 | CHECK(rc);
32 |
33 | // First record
34 | rc = jbl_from_json(&jbl, "{\"name\":\"Bianca\", \"age\":4}");
35 | RCGO(rc, finish);
36 | rc = ejdb_put_new(db, "parrots", jbl, &id);
37 | RCGO(rc, finish);
38 | jbl_destroy(&jbl);
39 |
40 | // Second record
41 | rc = jbl_from_json(&jbl, "{\"name\":\"Darko\", \"age\":8}");
42 | RCGO(rc, finish);
43 | rc = ejdb_put_new(db, "parrots", jbl, &id);
44 | RCGO(rc, finish);
45 | jbl_destroy(&jbl);
46 |
47 | // Now execute a query
48 | rc = jql_create(&q, "parrots", "/[age > :age]");
49 | RCGO(rc, finish);
50 |
51 | EJDB_EXEC ux = {
52 | .db = db,
53 | .q = q,
54 | .visitor = documents_visitor
55 | };
56 |
57 | // Set query placeholder value.
58 | // Actual query will be /[age > 3]
59 | rc = jql_set_i64(q, "age", 0, 3);
60 | RCGO(rc, finish);
61 |
62 | // Now execute the query
63 | rc = ejdb_exec(&ux);
64 |
65 | finish:
66 | if (q) {
67 | jql_destroy(&q);
68 | }
69 | if (jbl) {
70 | jbl_destroy(&jbl);
71 | }
72 | ejdb_close(&db);
73 | CHECK(rc);
74 | return 0;
75 | }
76 |
--------------------------------------------------------------------------------
/src/bindings/archived/ejdb2_flutter/example/ios/Runner/Base.lproj/Main.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 |
--------------------------------------------------------------------------------
/src/bindings/archived/ejdb2_swift/CMakeLists.txt:
--------------------------------------------------------------------------------
1 |
2 | find_program(SWIFT_EXEC swift)
3 | if (SWIFT_EXEC MATCHES "SWIFT_EXEC-NOTFOUND")
4 | message(FATAL_ERROR "`swift` executable not found")
5 | endif ()
6 |
7 | file(
8 | COPY .
9 | DESTINATION ${CMAKE_CURRENT_BINARY_DIR}
10 | REGEX "(/\\.build)|(.+\\.db)" EXCLUDE
11 | )
12 |
13 | list(TRANSFORM PROJECT_INCLUDE_DIRS PREPEND "-Xcc;-I" OUTPUT_VARIABLE SWIFT_IDIRS)
14 |
15 | if (CMAKE_BUILD_TYPE STREQUAL "Release")
16 | set(SWIFT_BUILD_TYPE "release")
17 | else()
18 | set(SWIFT_BUILD_TYPE "debug")
19 | endif()
20 |
21 | add_custom_target(
22 | ejdb2_swift_binding ALL
23 | WORKING_DIRECTORY ${CMAKE_CURRENT_BINARY_DIR}/EJDB2Swift
24 | COMMAND swift build
25 | -c ${SWIFT_BUILD_TYPE}
26 | -Xlinker -L${CMAKE_BINARY_DIR}/src
27 | -Xcc -DINPROJECT_BUILD
28 | ${SWIFT_IDIRS}
29 | COMMAND_EXPAND_LISTS
30 | )
31 |
32 | add_dependencies(ejdb2_swift_binding ejdb2)
33 |
34 | if (BUILD_TESTS)
35 |
36 | if(${CMAKE_VERSION} VERSION_LESS "3.16.0")
37 |
38 | add_test(
39 | NAME ejdb2_swift
40 | COMMAND ${CMAKE_COMMAND} -E env "LD_LIBRARY_PATH=${CMAKE_BINARY_DIR}/src;DYLD_LIBRARY_PATH=${CMAKE_BINARY_DIR}/src"
41 | swift test
42 | -Xlinker -L${CMAKE_BINARY_DIR}/src
43 | -Xcc -DINPROJECT_BUILD
44 | ${SWIFT_IDIRS}
45 | WORKING_DIRECTORY ${CMAKE_CURRENT_BINARY_DIR}/EJDB2Swift
46 | )
47 |
48 | else()
49 |
50 | add_test(
51 | NAME ejdb2_swift
52 | COMMAND ${CMAKE_COMMAND} -E env "LD_LIBRARY_PATH=${CMAKE_BINARY_DIR}/src;DYLD_LIBRARY_PATH=${CMAKE_BINARY_DIR}/src"
53 | swift test
54 | -Xlinker -L${CMAKE_BINARY_DIR}/src
55 | -Xcc -DINPROJECT_BUILD
56 | ${SWIFT_IDIRS}
57 | WORKING_DIRECTORY ${CMAKE_CURRENT_BINARY_DIR}/EJDB2Swift
58 | COMMAND_EXPAND_LISTS
59 | )
60 | endif()
61 |
62 | endif()
63 |
64 |
65 |
66 |
67 |
68 |
--------------------------------------------------------------------------------
/src/bindings/ejdb2_jni/README.md:
--------------------------------------------------------------------------------
1 | # EJDB2 Java JNI binding
2 |
3 | Embeddable JSON Database engine http://ejdb.org Java binding.
4 |
5 | See https://github.com/Softmotions/ejdb/blob/master/README.md
6 |
7 | For API usage examples take a look into [EJDB2Example.java](https://github.com/Softmotions/ejdb/blob/master/src/bindings/ejdb2_jni/example/src/main/java/EJDB2Example.java) and [TestEJDB2.java](https://github.com/Softmotions/ejdb/blob/master/src/bindings/ejdb2_jni/src/test/java/com/softmotions/ejdb2/TestEJDB2.java) classes.
8 |
9 | ## Minimal example
10 |
11 | ```java
12 | public static void main(String[] args) {
13 | try (EJDB2 db = new EJDB2Builder("example.db").truncate().open()) {
14 | long id = db.put("parrots", "{\"name\":\"Bianca\", \"age\": 4}");
15 | System.out.println("Bianca record: " + id);
16 |
17 | id = db.put("parrots", "{\"name\":\"Darko\", \"age\": 8}");
18 | System.out.println("Darko record: " + id);
19 |
20 | db.createQuery("@parrots/[age > :age]").setLong("age", 3).execute((docId, doc) -> {
21 | System.out.println(String.format("Found %d %s", docId, doc));
22 | return 1;
23 | });
24 | }
25 | }
26 | ```
27 |
28 | ## Supported platforms
29 |
30 | - Linux x64
31 | - MacOS
32 |
33 | ## Install from Ubuntu PPA
34 |
35 | ```sh
36 | sudo add-apt-repository ppa:adamansky/ejdb2
37 | sudo apt-get update
38 | sudo apt-get install ejdb2-java
39 | ```
40 |
41 | Note: Yoy may need to specify `LD_LIBRARY_PATH` env for `java` in order to help JVM find where
42 | the `libejdb2jni.so` library is located. For Linux systems `ejdb2-java` PPA debian package installs
43 | shared library symlink to `/usr/java/packages/lib` folder listed as default library search
44 | path for JVM so you can skip specifying `LD_LIBRARY_PATH` in that case.
45 |
46 | ## How to build it manually
47 |
48 | ```sh
49 | git clone https://github.com/Softmotions/ejdb.git
50 | cd ./ejdb
51 | mkdir ./build && cd build
52 | cmake .. -DBUILD_JNI_BINDING=ON -DCMAKE_BUILD_TYPE=Release
53 | make
54 | ```
55 |
56 | [Sample EJDB2 java project](./example)
57 |
--------------------------------------------------------------------------------
/src/bindings/archived/ejdb2_swift/EJDB2Swift/build-ios.sh:
--------------------------------------------------------------------------------
1 | #!/bin/bash
2 | set -e
3 | set -x
4 |
5 | SCRIPTPATH="$(
6 | cd "$(dirname "$0")"
7 | pwd -P
8 | )"
9 | cd $SCRIPTPATH
10 | INSTALLPATH="${SCRIPTPATH}"
11 |
12 | if [[ ! -z "${PODS_ROOT}" ]]; then
13 | INSTALLPATH="${PODS_ROOT}/EJDB2"
14 | fi
15 |
16 | OWNSRC=""
17 | if [[ -z "${EJDB_ROOT}" ]]; then
18 | OWNSRC="yes"
19 | EJDB_ROOT=`mktemp -d`
20 | echo "Source root: ${EJDB_ROOT}"
21 | echo "Checkout https://github.com/Softmotions/ejdb"
22 | git clone "https://github.com/Softmotions/ejdb" "${EJDB_ROOT}"
23 | (cd "${EJDB_ROOT}" && git submodule update --init)
24 | else
25 | echo "Source root: ${EJDB_ROOT}"
26 | fi
27 |
28 | LIBDIR="${INSTALLPATH}/lib"
29 | INCDIR="${INSTALLPATH}/include"
30 | PLATFORMS="SIMULATOR64 OS64"
31 | BUILD_ROOT="${EJDB_ROOT}/build-xcode"
32 | INSTALL_ROOT="${EJDB_ROOT}/install-xcode"
33 |
34 | for PLATFORM in ${PLATFORMS}; do
35 | rm -rf "${BUILD_ROOT}"
36 | mkdir -p "${BUILD_ROOT}"
37 | INSTALL_PREFIX="${INSTALL_ROOT}/${PLATFORM}"
38 | rm -rf "${INSTALL_PREFIX}"
39 | cd "${BUILD_ROOT}"
40 | cmake .. \
41 | -G "Unix Makefiles" \
42 | -DCMAKE_BUILD_TYPE=Release \
43 | -DBUILD_SHARED_LIBS=OFF \
44 | -DENABLE_HTTP=OFF \
45 | -DCMAKE_TOOLCHAIN_FILE="${EJDB_ROOT}/ios-tc.cmake" \
46 | -DPLATFORM="${PLATFORM}" \
47 | -DCMAKE_INSTALL_PREFIX="${INSTALL_PREFIX}"
48 | cmake --build . --target install;
49 | done
50 |
51 | rm -rf "${LIBDIR}"
52 | rm -rf "${INCDIR}"
53 |
54 | mkdir -p "${INCDIR}"
55 | mkdir -p "${LIBDIR}/IOS"
56 |
57 | lipo -create "${INSTALL_ROOT}/SIMULATOR64/lib/libejdb2-2.a" \
58 | "${INSTALL_ROOT}/OS64/lib/libejdb2-2.a" \
59 | -o "${LIBDIR}/IOS/libejdb2-2.a"
60 |
61 | lipo -create "${INSTALL_ROOT}/SIMULATOR64/lib/libiowow-1.a" \
62 | "${INSTALL_ROOT}/OS64/lib/libiowow-1.a" \
63 | -o "${LIBDIR}/IOS/libiowow-1.a"
64 |
65 | cp -R "${INSTALL_ROOT}/OS64/include" "${INSTALLPATH}"
66 |
67 | rm -rf "${BUILD_ROOT}"
68 | rm -rf "${INSTALL_ROOT}"
69 | test -z "${OWNSRC}" || rm -rf "${EJDB_ROOT}"
70 |
--------------------------------------------------------------------------------
/src/bindings/archived/ejdb2_flutter/example/android/app/build.gradle:
--------------------------------------------------------------------------------
1 | def localProperties = new Properties()
2 | def localPropertiesFile = rootProject.file('local.properties')
3 | if (localPropertiesFile.exists()) {
4 | localPropertiesFile.withReader('UTF-8') { reader ->
5 | localProperties.load(reader)
6 | }
7 | }
8 |
9 | def flutterRoot = localProperties.getProperty('flutter.sdk')
10 | if (flutterRoot == null) {
11 | throw new GradleException("Flutter SDK not found. Define location with flutter.sdk in the local.properties file.")
12 | }
13 |
14 | def flutterVersionCode = localProperties.getProperty('flutter.versionCode')
15 | if (flutterVersionCode == null) {
16 | flutterVersionCode = '1'
17 | }
18 |
19 | def flutterVersionName = localProperties.getProperty('flutter.versionName')
20 | if (flutterVersionName == null) {
21 | flutterVersionName = '1.0'
22 | }
23 |
24 | apply plugin: 'com.android.application'
25 | apply from: "$flutterRoot/packages/flutter_tools/gradle/flutter.gradle"
26 |
27 | android {
28 | compileSdkVersion 28
29 |
30 | lintOptions {
31 | disable 'InvalidPackage'
32 | }
33 |
34 | defaultConfig {
35 | // TODO: Specify your own unique Application ID (https://developer.android.com/studio/build/application-id.html).
36 | applicationId "com.softmotions.ejdb2_example"
37 | minSdkVersion 16
38 | targetSdkVersion 28
39 | versionCode flutterVersionCode.toInteger()
40 | versionName flutterVersionName
41 | testInstrumentationRunner "androidx.test.runner.AndroidJUnitRunner"
42 | }
43 |
44 | buildTypes {
45 | release {
46 | // TODO: Add your own signing config for the release build.
47 | // Signing with the debug keys for now, so `flutter run --release` works.
48 | signingConfig signingConfigs.debug
49 | }
50 | }
51 | }
52 |
53 | flutter {
54 | source '../..'
55 | }
56 |
57 | dependencies {
58 | testImplementation 'junit:junit:4.12'
59 | androidTestImplementation 'androidx.test:runner:1.1.1'
60 | androidTestImplementation 'androidx.test.espresso:espresso-core:3.1.1'
61 | }
62 |
--------------------------------------------------------------------------------
/src/bindings/archived/ejdb2_android/test/ejdb2/build.gradle:
--------------------------------------------------------------------------------
1 | apply plugin: 'com.android.library'
2 |
3 | def props = rootProject.ext
4 |
5 | android {
6 | compileSdkVersion 21
7 | defaultConfig {
8 | minSdkVersion 21
9 | targetSdkVersion 21
10 | versionCode 1
11 | versionName "1.0"
12 | testInstrumentationRunner "android.support.test.runner.AndroidJUnitRunner"
13 | externalNativeBuild {
14 | cmake {
15 | abiFilters props.abiName
16 | targets "ejdb2jni"
17 | arguments "-DCMAKE_BUILD_TYPE=Release",
18 | "-DBUILD_JNI_BINDING=ON",
19 | "-DENABLE_HTTP=OFF",
20 | "-DBUILD_EXAMPLES=OFF",
21 | "-DCMAKE_TOOLCHAIN_FILE=$ndkDirectory/build/cmake/android.toolchain.cmake",
22 | "-DANDROID_ABI=$props.abiName",
23 | "-DANDROID_PLATFORM=android-21",
24 | "-DANDROID_NATIVE_API_LEVEL=21"
25 | }
26 | }
27 | }
28 | externalNativeBuild {
29 | cmake {
30 | path file("../../../../CMakeLists.txt")
31 | }
32 | }
33 | }
34 |
35 | project.afterEvaluate {
36 | if (tasks.findByName("externalNativeBuildDebug")) {
37 | javaPreCompileDebug.dependsOn externalNativeBuildDebug
38 | externalNativeBuildDebug.doLast {
39 | copy {
40 | from(".externalNativeBuild/cmake/debug/$props.abiName/src/bindings/ejdb2_jni/src") {
41 | include "ejdb2.jar"
42 | }
43 | into "libs"
44 | }
45 | }
46 | }
47 | if (tasks.findByName("externalNativeBuildRelease")) {
48 | javaPreCompileRelease.dependsOn externalNativeBuildRelease
49 | externalNativeBuildRelease.doLast {
50 | copy {
51 | from(".externalNativeBuild/cmake/release/$props.abiName/src/bindings/ejdb2_jni/src") {
52 | include "ejdb2.jar"
53 | }
54 | into "libs"
55 | }
56 | }
57 | }
58 | }
59 |
60 | dependencies {
61 | implementation fileTree(dir: "libs", include: ["*.jar"])
62 | testImplementation "junit:junit:4.12"
63 | androidTestImplementation "com.android.support.test:runner:1.0.2"
64 | androidTestImplementation "com.android.support.test.espresso:espresso-core:3.0.2"
65 | }
--------------------------------------------------------------------------------
/src/bindings/archived/ejdb2_swift/EJDB2Swift/EJDB2.podspec:
--------------------------------------------------------------------------------
1 |
2 | Pod::Spec.new do |spec|
3 |
4 | spec.name = 'EJDB2'
5 | spec.version = '1.0.18'
6 | spec.summary = 'Embeddable JSON Database engine'
7 | spec.description = <<-DESC
8 | EJDB2 is an embeddable JSON database engine published under MIT license.
9 |
10 | - Single file database
11 | - Online backups support
12 |
13 | Simple but powerful query language (JQL) as well as support of the following standards:
14 | - rfc6902 JSON Patch
15 | - rfc7386 JSON Merge patch
16 | - rfc6901 JSON Path
17 |
18 | Powered by iowow.io - The persistent key/value storage engine
19 | Provides HTTP REST/Websockets network endpoints with help of facil.io
20 | JSON documents are stored in using fast and compact binn binary format
21 | DESC
22 |
23 | spec.homepage = 'https://ejdb.org'
24 | spec.license = { :type => 'MIT' }
25 | spec.author = { 'Anton Adamansky' => 'adamansky@gmail.com' }
26 | spec.social_media_url = 'https://twitter.com/ejdblab'
27 |
28 | spec.swift_version = '5.1'
29 | spec.static_framework = true
30 | spec.ios.deployment_target = '9.0'
31 |
32 | spec.source = { :git => 'https://github.com/Softmotions/EJDB2Swift.git', :tag => "v#{spec.version}" }
33 | spec.source_files = 'Sources/EJDB2/**/*.{c,h,m,swift}'
34 |
35 | spec.xcconfig = { 'HEADER_SEARCH_PATHS' => ['$(PODS_ROOT)/EJDB2/include'],
36 | 'SWIFT_INCLUDE_PATHS' => ['$(PODS_ROOT)/EJDB2/Sources/CEJDB2']
37 | }
38 |
39 | spec.pod_target_xcconfig = {
40 | 'ARCHS' => '$(ARCHS_STANDARD_64_BIT)',
41 | 'VALID_ARCHS' => '$(ARCHS_STANDARD_64_BIT)'
42 | }
43 |
44 | spec.preserve_paths = ['*.sh', 'Sources/**/*', 'lib/**', 'include/**']
45 | spec.vendored_libraries = 'lib/IOS/*.a'
46 |
47 | spec.script_phase = { :name => 'Build EJDB libs',
48 | :execution_position => :before_compile,
49 | :script => 'test -f ${PODS_ROOT}/EJDB2/include/ejdb2/ejdb2.h || ${PODS_ROOT}/EJDB2/build-ios.sh' }
50 |
51 | spec.prepare_command = "./build-ios.sh"
52 | end
53 |
--------------------------------------------------------------------------------
/src/ejdb2cfg.h.in:
--------------------------------------------------------------------------------
1 | #pragma once
2 | #ifndef JBCFG_H
3 | #define JBCFG_H
4 |
5 | /**************************************************************************************************
6 | * EJDB2
7 | *
8 | * MIT License
9 | *
10 | * Copyright (c) 2012-2022 Softmotions Ltd
11 | *
12 | * Permission is hereby granted, free of charge, to any person obtaining a copy
13 | * of this software and associated documentation files (the "Software"), to deal
14 | * in the Software without restriction, including without limitation the rights
15 | * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
16 | * copies of the Software, and to permit persons to whom the Software is
17 | * furnished to do so, subject to the following conditions:
18 | *
19 | * The above copyright notice and this permission notice shall be included in all
20 | * copies or substantial portions of the Software.
21 | *
22 | * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
23 | * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
24 | * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
25 | * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
26 | * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
27 | * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
28 | * SOFTWARE.
29 | *************************************************************************************************/
30 |
31 | //autarkdef HAVE_QSORT_R
32 |
33 | #ifndef JB_HTTP
34 | #define JB_HTTP
35 | #endif
36 |
37 | #define EJDB2_GIT_REVISION "@META_REVISION@"
38 | #define EJDB2_VERSION "@META_VERSION@"
39 | #define EJDB2_VERSION_MAJOR @META_VERSION_MAJOR@
40 | #define EJDB2_VERSION_MINOR @META_VERSION_MINOR@
41 | #define EJDB2_VERSION_PATCH 0
42 |
43 |
44 | #include
45 | #include
46 | #include
47 | #include
48 | #include
49 | #include
50 | #include
51 | #include
52 | #include
53 |
54 |
55 | #ifndef static_assert
56 | #define static_assert _Static_assert
57 | #endif
58 |
59 |
60 | #endif
--------------------------------------------------------------------------------
/BASE.md:
--------------------------------------------------------------------------------
1 | # EJDB 2.0
2 |
3 | **NOTE: Issues tracker is disabled. You are welcome to contribute, pull requests accepted.**
4 |
5 | [](https://github.com/Softmotions/ejdb/blob/master/LICENSE)
6 | 
7 |
8 | EJDB2 is an embeddable JSON database engine published under MIT license.
9 |
10 | [The Story of the IT-depression, birds and EJDB 2.0](https://medium.com/@adamansky/ejdb2-41670e80897c)
11 |
12 | * C11 API
13 | * Single file database
14 | * Online backups support
15 | * [Simple but powerful query language](#jql)
16 | * [Support of collection joins](#jql-collection-joins)
17 | * Powered by [IOWOW](https://github.com/Softmotions/iowow) - The persistent key/value storage engine
18 | * HTTP REST/Websockets endpoints powered by [IWNET](https://github.com/Softmotions/iwnet)
19 |
20 | ---
21 | * [Native language bindings](#native-language-bindings)
22 | * Supported platforms
23 | * [macOS](#osx)
24 | * [iOS](https://github.com/Softmotions/EJDB2Swift)
25 | * [Linux](#linux)
26 | * [Windows](#windows)
27 | * **[JQL query language](#jql)**
28 | * [Grammar](#jql-grammar)
29 | * [Quick into](#jql-quick-introduction)
30 | * [Data modification](#jql-data-modification)
31 | * [Projections](#jql-projections)
32 | * [Collection joins](#jql-collection-joins)
33 | * [Sorting](#jql-sorting)
34 | * [Query options](#jql-options)
35 | * [Indexes and performance](#jql-indexes-and-performance-tips)
36 | * [Network API](#http-restwebsocket-api-endpoint)
37 | * [HTTP API](#http-api)
38 | * [Websockets API](#websocket-api)
39 | * [C API](#c-api)
40 | * [License](#license)
41 | ---
42 |
43 | ## Status
44 |
45 | * **EJDB 2.0 core engine is well tested and used in various heavily loaded deployments**
46 | * Tested on `Linux`, `macOS` and `FreeBSD`.
47 |
48 |
49 | ## Building from sources
50 |
51 | **Prerequisites**
52 |
53 | * Linux, macOS or FreeBSD
54 | * gcc or clang compiler
55 | * pkgconf or pkg-config
56 |
57 | ## Build by [Autark](https://github.com/Softmotions/autark)
58 |
59 | ```sh
60 | ./build.sh
61 | ```
62 |
63 | **Installation**
64 |
65 | ```sh
66 | ./build.sh --prefix=$HOME/.local
67 | ```
--------------------------------------------------------------------------------
/src/bindings/archived/ejdb2_flutter/example/pubspec.yaml:
--------------------------------------------------------------------------------
1 | name: ejdb2_example
2 | description: Demonstrates how to use the ejdb2 plugin.
3 | publish_to: 'none'
4 |
5 | environment:
6 | sdk: ">=2.1.0 <3.0.0"
7 |
8 | dependencies:
9 | flutter:
10 | sdk: flutter
11 |
12 | # The following adds the Cupertino Icons font to your application.
13 | # Use with the CupertinoIcons class for iOS style icons.
14 | cupertino_icons: ^0.1.2
15 |
16 | dev_dependencies:
17 | flutter_driver:
18 | sdk: flutter
19 | test: any
20 |
21 | ejdb2_flutter:
22 | path: ../
23 |
24 | # For information on the generic Dart part of this file, see the
25 | # following page: https://dart.dev/tools/pub/pubspec
26 |
27 | # The following section is specific to Flutter.
28 | flutter:
29 |
30 | # The following line ensures that the Material Icons font is
31 | # included with your application, so that you can use the icons in
32 | # the material Icons class.
33 | uses-material-design: true
34 |
35 | # To add assets to your application, add an assets section, like this:
36 | # assets:
37 | # - images/a_dot_burr.jpeg
38 | # - images/a_dot_ham.jpeg
39 |
40 | # An image asset can refer to one or more resolution-specific "variants", see
41 | # https://flutter.dev/assets-and-images/#resolution-aware.
42 |
43 | # For details regarding adding assets from package dependencies, see
44 | # https://flutter.dev/assets-and-images/#from-packages
45 |
46 | # To add custom fonts to your application, add a fonts section here,
47 | # in this "flutter" section. Each entry in this list should have a
48 | # "family" key with the font family name, and a "fonts" key with a
49 | # list giving the asset and other descriptors for the font. For
50 | # example:
51 | # fonts:
52 | # - family: Schyler
53 | # fonts:
54 | # - asset: fonts/Schyler-Regular.ttf
55 | # - asset: fonts/Schyler-Italic.ttf
56 | # style: italic
57 | # - family: Trajan Pro
58 | # fonts:
59 | # - asset: fonts/TrajanPro.ttf
60 | # - asset: fonts/TrajanPro_Bold.ttf
61 | # weight: 700
62 | #
63 | # For details regarding fonts from package dependencies,
64 | # see https://flutter.dev/custom-fonts/#from-packages
65 |
--------------------------------------------------------------------------------
/src/bindings/archived/ejdb2_react_native/README.md:
--------------------------------------------------------------------------------
1 | # WARNING: Unsupported now. Maintainer needed.
2 |
3 | # EJDB2 React Native binding
4 |
5 | Embeddable JSON Database engine http://ejdb.org Node.js binding.
6 |
7 | See https://github.com/Softmotions/ejdb/blob/master/README.md
8 |
9 |
10 | ## Note on versioning
11 |
12 | Since `2020-12-22` a new version scheme is used and the major version
13 | of package has been incremented. Now package version is the concatenation
14 | of ejdb2 core engine version and version serial number of this binding.
15 | For example: given ejdb2 version `2.0.52` and binding serial `2`
16 | the actual package version will be `2.0.522`.
17 |
18 | ## Prerequisites
19 |
20 | - React native `0.61+`
21 | - [Yarn](https://yarnpkg.com) package manager
22 |
23 | ## Status
24 |
25 | - Android
26 | - OSX not yet implemented, work in progress.
27 |
28 | ## Getting started
29 |
30 | ```
31 | yarn add ejdb2_react_native
32 |
33 | react-native link ejdb2_react_native
34 | ```
35 |
36 | ### Usage
37 |
38 | ```js
39 | import { EJDB2, JBE } from 'ejdb2_react_native';
40 |
41 | // Simple query
42 | const db = await EJDB2.open('hello.db');
43 | await db.createQuery('@mycoll/[foo = :?]')
44 | .setString(0, 'bar')
45 | .useExecute(doc => {
46 | const doc = doc.json;
47 | console.log(`Document: `, doc);
48 | });
49 |
50 | db.close();
51 | ```
52 |
53 | [See API docs](https://github.com/Softmotions/ejdb/blob/master/src/bindings/ejdb2_react_native/binding/index.d.ts) and [Tests](https://github.com/Softmotions/ejdb/blob/master/src/bindings/ejdb2_react_native/tests/App.js);
54 |
55 | ## How build it manually
56 |
57 | ```sh
58 | mkdir build && cd build
59 | cmake .. -DCMAKE_BUILD_TYPE=Release \
60 | -DBUILD_REACT_NATIVE_BINDING=ON \
61 | -DANDROID_NDK_HOME= \
62 | -DANDROID_ABIS="x86;x86_64;arm64-v8a;armeabi-v7a"
63 | ```
64 |
65 | ## Testing
66 |
67 | ```sh
68 | mkdir build && cd build
69 |
70 | cmake .. -DCMAKE_BUILD_TYPE=Release \
71 | -DBUILD_REACT_NATIVE_BINDING=ON \
72 | -DANDROID_NDK_HOME= \
73 | -DANDROID_ABIS="x86" \
74 | -DANDROID_AVD=TestingAVD \
75 | -DBUILD_TESTS=ON
76 |
77 | ctest
78 | ```
--------------------------------------------------------------------------------
/src/bindings/archived/ejdb2_flutter/example/lib/utils/assertions.dart:
--------------------------------------------------------------------------------
1 | import 'package:collection/collection.dart';
2 |
3 | class AssertionException implements Exception {
4 | AssertionException(this.check, [this.message]);
5 |
6 | final String check;
7 | final String message;
8 |
9 | @override
10 | String toString() {
11 | if (message == null) return 'AssertionException.${check}';
12 | return 'AssertionException.${check}: $message';
13 | }
14 | }
15 |
16 | void assertTrue(bool val, [String message]) {
17 | if (!val) {
18 | throw AssertionException('assertTrue', message);
19 | }
20 | }
21 |
22 | void assertFalse(bool val, [String message]) {
23 | if (val) {
24 | throw AssertionException('assertFalse', message);
25 | }
26 | }
27 |
28 | void assertEqual(var v1, var v2, [String message]) {
29 | if (v1 != v2) {
30 | throw AssertionException('assertEqual', message);
31 | }
32 | }
33 |
34 | void assertIdentical(var v1, var v2, [String message]) {
35 | if (!identical(v1, v2)) {
36 | throw AssertionException('assertIdentical', message);
37 | }
38 | }
39 |
40 | void assertNotIdentical(var v1, var v2, [String message]) {
41 | if (identical(v1, v2)) {
42 | throw AssertionException('assertNotIdentical', message);
43 | }
44 | }
45 |
46 | void assertDeepEqual(var v1, var v2, [bool unordered = true, String message]) {
47 | final deepEq = unordered
48 | ? const DeepCollectionEquality.unordered().equals
49 | : const DeepCollectionEquality().equals;
50 | if (!deepEq(v1, v2)) {
51 | throw AssertionException('assertDeepEquals', message);
52 | }
53 | }
54 |
55 | void assertDeepNotEqual(var v1, var v2, [bool unordered = true, String message]) {
56 | final deepEq = unordered
57 | ? const DeepCollectionEquality.unordered().equals
58 | : const DeepCollectionEquality().equals;
59 | if (deepEq(v1, v2)) {
60 | throw AssertionException('assertNotDeepEquals', message);
61 | }
62 | }
63 |
64 | void assertNotEqual(var v1, var v2, [String message]) {
65 | if (v1 == v2) {
66 | throw AssertionException('assertNotEquals', message);
67 | }
68 | }
69 |
70 | void assertNotNull(var v1, [String message]) {
71 | if (v1 == null) {
72 | throw AssertionException('assertNotNull', message);
73 | }
74 | }
75 |
76 | void assertNull(var v1, [String message]) {
77 | if (v1 != null) {
78 | throw AssertionException('assertNull', message);
79 | }
80 | }
81 |
82 |
--------------------------------------------------------------------------------
/CAPI.md:
--------------------------------------------------------------------------------
1 | # C API
2 |
3 | EJDB can be embedded into any `C/C++` application.
4 | `C API` documented in the following headers:
5 |
6 | * [ejdb.h](https://github.com/Softmotions/ejdb/blob/master/src/ejdb2.h) Main API functions
7 | * [jbl.h](https://github.com/Softmotions/ejdb/blob/master/src/jbl/jbl.h) JSON documents management API
8 | * [jql.h](https://github.com/Softmotions/ejdb/blob/master/src/jql/jql.h) Query building API
9 |
10 | Example application:
11 | ```c
12 | #include
13 |
14 | #define CHECK(rc_) \
15 | if (rc_) { \
16 | iwlog_ecode_error3(rc_); \
17 | return 1; \
18 | }
19 |
20 | static iwrc documents_visitor(EJDB_EXEC *ctx, const EJDB_DOC doc, int64_t *step) {
21 | // Print document to stderr
22 | return jbl_as_json(doc->raw, jbl_fstream_json_printer, stderr, JBL_PRINT_PRETTY);
23 | }
24 |
25 | int main() {
26 |
27 | EJDB_OPTS opts = {
28 | .kv = {
29 | .path = "example.db",
30 | .oflags = IWKV_TRUNC
31 | }
32 | };
33 | EJDB db; // EJDB2 storage handle
34 | int64_t id; // Document id placeholder
35 | JQL q = 0; // Query instance
36 | JBL jbl = 0; // Json document
37 |
38 | iwrc rc = ejdb_init();
39 | CHECK(rc);
40 |
41 | rc = ejdb_open(&opts, &db);
42 | CHECK(rc);
43 |
44 | // First record
45 | rc = jbl_from_json(&jbl, "{\"name\":\"Bianca\", \"age\":4}");
46 | RCGO(rc, finish);
47 | rc = ejdb_put_new(db, "parrots", jbl, &id);
48 | RCGO(rc, finish);
49 | jbl_destroy(&jbl);
50 |
51 | // Second record
52 | rc = jbl_from_json(&jbl, "{\"name\":\"Darko\", \"age\":8}");
53 | RCGO(rc, finish);
54 | rc = ejdb_put_new(db, "parrots", jbl, &id);
55 | RCGO(rc, finish);
56 | jbl_destroy(&jbl);
57 |
58 | // Now execute a query
59 | rc = jql_create(&q, "parrots", "/[age > :age]");
60 | RCGO(rc, finish);
61 |
62 | EJDB_EXEC ux = {
63 | .db = db,
64 | .q = q,
65 | .visitor = documents_visitor
66 | };
67 |
68 | // Set query placeholder value.
69 | // Actual query will be /[age > 3]
70 | rc = jql_set_i64(q, "age", 0, 3);
71 | RCGO(rc, finish);
72 |
73 | // Now execute the query
74 | rc = ejdb_exec(&ux);
75 |
76 | finish:
77 | jql_destroy(&q);
78 | jbl_destroy(&jbl);
79 | ejdb_close(&db);
80 | CHECK(rc);
81 | return 0;
82 | }
83 | ```
84 |
85 | Compile and run:
86 | ```
87 | gcc -std=gnu11 -Wall -pedantic -c -o example1.o example1.c
88 | gcc -o example1 example1.o -lejdb2
89 |
90 | ./example1
91 | {
92 | "name": "Darko",
93 | "age": 8
94 | }{
95 | "name": "Bianca",
96 | "age": 4
97 | }
98 | ```
99 |
--------------------------------------------------------------------------------
/src/bindings/archived/ejdb2_flutter/example/ios/Runner/Base.lproj/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 |
--------------------------------------------------------------------------------
/src/bindings/archived/ejdb2_flutter/README.md:
--------------------------------------------------------------------------------
1 | # WARNING: Unsupported now. Maintainer needed.
2 |
3 | # EJDB2 Flutter integration
4 |
5 | Embeddable JSON Database engine http://ejdb.org Dart binding.
6 |
7 | See https://github.com/Softmotions/ejdb/blob/master/README.md
8 |
9 | For API usage examples take a look into [/example](https://github.com/Softmotions/ejdb/tree/master/src/bindings/ejdb2_flutter/example)
10 | application.
11 |
12 | ## Example
13 |
14 | pubspec.yaml
15 |
16 | ```yaml
17 | dependencies:
18 | ejdb2_flutter:
19 | ```
20 |
21 | ```dart
22 | import 'package:ejdb2_flutter/ejdb2_flutter.dart';
23 |
24 | var db = await EJDB2Builder('test.db').open();
25 |
26 | var id = await db.put('parrots', {'name': 'Bianca', 'age': 4});
27 | print('Bianca record: ${id}');
28 |
29 | id = await db.put('parrots', {'name': 'Darko', 'age': 8});
30 | print('Darko record: ${id}');
31 |
32 | final q = db.createQuery('/[age > :age]', 'parrots');
33 | await for (final doc in q.setInt('age', 3).execute()) {
34 | print('Found ${doc}');
35 | }
36 |
37 | await db.close();
38 | ```
39 |
40 | ## Supported platforms
41 |
42 | - iOS
43 | - Android
44 |
45 | ## iOS notes
46 |
47 | In order to build app with this binding you have
48 | to add the following code into application `Podfile`:
49 |
50 | ```ruby
51 | pre_install do |installer|
52 | # workaround for https://github.com/CocoaPods/CocoaPods/issues/3289
53 | Pod::Installer::Xcode::TargetValidator.send(:define_method, :verify_no_static_framework_transitive_dependencies) {}
54 | end
55 | ```
56 |
57 | ## Android notes
58 |
59 | For release builds you have to setup proguard rules as follows:
60 |
61 | `build.gradle`
62 | ```
63 | buildTypes {
64 | ...
65 | release {
66 | ...
67 | minifyEnabled true
68 | useProguard true
69 | proguardFiles getDefaultProguardFile("proguard-android.txt"), "proguard-rules.pro"
70 | }
71 | }
72 | ```
73 |
74 | `proguard-rules.pro`
75 | ```
76 | ...
77 |
78 | # Keep EJDB
79 | -keep class com.softmotions.ejdb2.** { *; }
80 |
81 | ```
82 |
83 | ## How build it manually
84 |
85 | ```sh
86 | git clone https://github.com/Softmotions/ejdb.git
87 |
88 | cd ./ejdb
89 | mkdir ./build && cd build
90 |
91 | cmake .. -DCMAKE_BUILD_TYPE=Release \
92 | -DANDROID_NDK_HOME= \
93 | -DBUILD_FLUTTER_BINDING=ON
94 | make
95 |
96 | # Move generate to ejdb2 flutter pub package with example app
97 | cd src/bindings/ejdb2_flutter/pub_publish
98 | flutter pub get
99 | cd ./example
100 |
101 | # Start Android emulator
102 | flutter run
103 | ```
--------------------------------------------------------------------------------
/src/bindings/archived/ejdb2_flutter/android/gradlew.bat:
--------------------------------------------------------------------------------
1 | @if "%DEBUG%" == "" @echo off
2 | @rem ##########################################################################
3 | @rem
4 | @rem Gradle startup script for Windows
5 | @rem
6 | @rem ##########################################################################
7 |
8 | @rem Set local scope for the variables with windows NT shell
9 | if "%OS%"=="Windows_NT" setlocal
10 |
11 | @rem Add default JVM options here. You can also use JAVA_OPTS and GRADLE_OPTS to pass JVM options to this script.
12 | set DEFAULT_JVM_OPTS=
13 |
14 | set DIRNAME=%~dp0
15 | if "%DIRNAME%" == "" set DIRNAME=.
16 | set APP_BASE_NAME=%~n0
17 | set APP_HOME=%DIRNAME%
18 |
19 | @rem Find java.exe
20 | if defined JAVA_HOME goto findJavaFromJavaHome
21 |
22 | set JAVA_EXE=java.exe
23 | %JAVA_EXE% -version >NUL 2>&1
24 | if "%ERRORLEVEL%" == "0" goto init
25 |
26 | echo.
27 | echo ERROR: JAVA_HOME is not set and no 'java' command could be found in your PATH.
28 | echo.
29 | echo Please set the JAVA_HOME variable in your environment to match the
30 | echo location of your Java installation.
31 |
32 | goto fail
33 |
34 | :findJavaFromJavaHome
35 | set JAVA_HOME=%JAVA_HOME:"=%
36 | set JAVA_EXE=%JAVA_HOME%/bin/java.exe
37 |
38 | if exist "%JAVA_EXE%" goto init
39 |
40 | echo.
41 | echo ERROR: JAVA_HOME is set to an invalid directory: %JAVA_HOME%
42 | echo.
43 | echo Please set the JAVA_HOME variable in your environment to match the
44 | echo location of your Java installation.
45 |
46 | goto fail
47 |
48 | :init
49 | @rem Get command-line arguments, handling Windowz variants
50 |
51 | if not "%OS%" == "Windows_NT" goto win9xME_args
52 | if "%@eval[2+2]" == "4" goto 4NT_args
53 |
54 | :win9xME_args
55 | @rem Slurp the command line arguments.
56 | set CMD_LINE_ARGS=
57 | set _SKIP=2
58 |
59 | :win9xME_args_slurp
60 | if "x%~1" == "x" goto execute
61 |
62 | set CMD_LINE_ARGS=%*
63 | goto execute
64 |
65 | :4NT_args
66 | @rem Get arguments from the 4NT Shell from JP Software
67 | set CMD_LINE_ARGS=%$
68 |
69 | :execute
70 | @rem Setup the command line
71 |
72 | set CLASSPATH=%APP_HOME%\gradle\wrapper\gradle-wrapper.jar
73 |
74 | @rem Execute Gradle
75 | "%JAVA_EXE%" %DEFAULT_JVM_OPTS% %JAVA_OPTS% %GRADLE_OPTS% "-Dorg.gradle.appname=%APP_BASE_NAME%" -classpath "%CLASSPATH%" org.gradle.wrapper.GradleWrapperMain %CMD_LINE_ARGS%
76 |
77 | :end
78 | @rem End local scope for the variables with windows NT shell
79 | if "%ERRORLEVEL%"=="0" goto mainEnd
80 |
81 | :fail
82 | rem Set variable GRADLE_EXIT_CONSOLE if you need the _script_ return code instead of
83 | rem the _cmd.exe /c_ return code!
84 | if not "" == "%GRADLE_EXIT_CONSOLE%" exit 1
85 | exit /b 1
86 |
87 | :mainEnd
88 | if "%OS%"=="Windows_NT" endlocal
89 |
90 | :omega
91 |
--------------------------------------------------------------------------------
/src/bindings/archived/ejdb2_flutter/example/android/gradlew.bat:
--------------------------------------------------------------------------------
1 | @if "%DEBUG%" == "" @echo off
2 | @rem ##########################################################################
3 | @rem
4 | @rem Gradle startup script for Windows
5 | @rem
6 | @rem ##########################################################################
7 |
8 | @rem Set local scope for the variables with windows NT shell
9 | if "%OS%"=="Windows_NT" setlocal
10 |
11 | @rem Add default JVM options here. You can also use JAVA_OPTS and GRADLE_OPTS to pass JVM options to this script.
12 | set DEFAULT_JVM_OPTS=
13 |
14 | set DIRNAME=%~dp0
15 | if "%DIRNAME%" == "" set DIRNAME=.
16 | set APP_BASE_NAME=%~n0
17 | set APP_HOME=%DIRNAME%
18 |
19 | @rem Find java.exe
20 | if defined JAVA_HOME goto findJavaFromJavaHome
21 |
22 | set JAVA_EXE=java.exe
23 | %JAVA_EXE% -version >NUL 2>&1
24 | if "%ERRORLEVEL%" == "0" goto init
25 |
26 | echo.
27 | echo ERROR: JAVA_HOME is not set and no 'java' command could be found in your PATH.
28 | echo.
29 | echo Please set the JAVA_HOME variable in your environment to match the
30 | echo location of your Java installation.
31 |
32 | goto fail
33 |
34 | :findJavaFromJavaHome
35 | set JAVA_HOME=%JAVA_HOME:"=%
36 | set JAVA_EXE=%JAVA_HOME%/bin/java.exe
37 |
38 | if exist "%JAVA_EXE%" goto init
39 |
40 | echo.
41 | echo ERROR: JAVA_HOME is set to an invalid directory: %JAVA_HOME%
42 | echo.
43 | echo Please set the JAVA_HOME variable in your environment to match the
44 | echo location of your Java installation.
45 |
46 | goto fail
47 |
48 | :init
49 | @rem Get command-line arguments, handling Windowz variants
50 |
51 | if not "%OS%" == "Windows_NT" goto win9xME_args
52 | if "%@eval[2+2]" == "4" goto 4NT_args
53 |
54 | :win9xME_args
55 | @rem Slurp the command line arguments.
56 | set CMD_LINE_ARGS=
57 | set _SKIP=2
58 |
59 | :win9xME_args_slurp
60 | if "x%~1" == "x" goto execute
61 |
62 | set CMD_LINE_ARGS=%*
63 | goto execute
64 |
65 | :4NT_args
66 | @rem Get arguments from the 4NT Shell from JP Software
67 | set CMD_LINE_ARGS=%$
68 |
69 | :execute
70 | @rem Setup the command line
71 |
72 | set CLASSPATH=%APP_HOME%\gradle\wrapper\gradle-wrapper.jar
73 |
74 | @rem Execute Gradle
75 | "%JAVA_EXE%" %DEFAULT_JVM_OPTS% %JAVA_OPTS% %GRADLE_OPTS% "-Dorg.gradle.appname=%APP_BASE_NAME%" -classpath "%CLASSPATH%" org.gradle.wrapper.GradleWrapperMain %CMD_LINE_ARGS%
76 |
77 | :end
78 | @rem End local scope for the variables with windows NT shell
79 | if "%ERRORLEVEL%"=="0" goto mainEnd
80 |
81 | :fail
82 | rem Set variable GRADLE_EXIT_CONSOLE if you need the _script_ return code instead of
83 | rem the _cmd.exe /c_ return code!
84 | if not "" == "%GRADLE_EXIT_CONSOLE%" exit 1
85 | exit /b 1
86 |
87 | :mainEnd
88 | if "%OS%"=="Windows_NT" endlocal
89 |
90 | :omega
91 |
--------------------------------------------------------------------------------
/src/tests/ejdb_test.h:
--------------------------------------------------------------------------------
1 | #pragma once
2 | #ifndef EJDB_TEST_H
3 | #define EJDB_TEST_H
4 |
5 | /**************************************************************************************************
6 | * EJDB2
7 | *
8 | * MIT License
9 | *
10 | * Copyright (c) 2012-2022 Softmotions Ltd
11 | *
12 | * Permission is hereby granted, free of charge, to any person obtaining a copy
13 | * of this software and associated documentation files (the "Software"), to deal
14 | * in the Software without restriction, including without limitation the rights
15 | * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
16 | * copies of the Software, and to permit persons to whom the Software is
17 | * furnished to do so, subject to the following conditions:
18 | *
19 | * The above copyright notice and this permission notice shall be included in all
20 | * copies or substantial portions of the Software.
21 | *
22 | * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
23 | * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
24 | * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
25 | * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
26 | * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
27 | * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
28 | * SOFTWARE.
29 | *************************************************************************************************/
30 |
31 | #include "ejdb2.h"
32 | #include "ejdb2_internal.h"
33 | #include
34 |
35 | static iwrc put_json(EJDB db, const char *coll, const char *json) {
36 | const size_t len = strlen(json);
37 | char buf[len + 1];
38 | memcpy(buf, json, len);
39 | buf[len] = '\0';
40 | for (int i = 0; buf[i]; ++i) {
41 | if (buf[i] == '\'') {
42 | buf[i] = '"';
43 | }
44 | }
45 | JBL jbl;
46 | int64_t llv;
47 | iwrc rc = jbl_from_json(&jbl, buf);
48 | RCRET(rc);
49 | rc = ejdb_put_new(db, coll, jbl, &llv);
50 | jbl_destroy(&jbl);
51 | return rc;
52 | }
53 |
54 | static iwrc put_json2(EJDB db, const char *coll, const char *json, int64_t *id) {
55 | const size_t len = strlen(json);
56 | char buf[len + 1];
57 | memcpy(buf, json, len);
58 | buf[len] = '\0';
59 | for (int i = 0; buf[i]; ++i) {
60 | if (buf[i] == '\'') {
61 | buf[i] = '"';
62 | }
63 | }
64 | JBL jbl;
65 | iwrc rc = jbl_from_json(&jbl, buf);
66 | RCRET(rc);
67 |
68 | if (*id == 0) {
69 | rc = ejdb_put_new(db, coll, jbl, id);
70 | } else {
71 | rc = ejdb_put(db, coll, jbl, *id);
72 | }
73 | jbl_destroy(&jbl);
74 | return rc;
75 | }
76 |
77 | static iwrc patch_json(EJDB db, const char *coll, const char *patchjson, int64_t id) {
78 | const size_t len = strlen(patchjson);
79 | char buf[len + 1];
80 | memcpy(buf, patchjson, len);
81 | buf[len] = '\0';
82 | for (int i = 0; buf[i]; ++i) {
83 | if (buf[i] == '\'') {
84 | buf[i] = '"';
85 | }
86 | }
87 | return ejdb_patch(db, coll, buf, id);
88 | }
89 |
90 | #endif
91 |
--------------------------------------------------------------------------------
/.autark/fetch_resource.sh:
--------------------------------------------------------------------------------
1 | #!/bin/sh
2 | set -e
3 |
4 | usage() {
5 | echo "Usage: $0 [target_dir_var] [n_strip_dirs]" >&2
6 | exit 1
7 | }
8 |
9 | [ -z "$1" ] && usage
10 | [ -z "$2" ] && usage
11 |
12 |
13 | PROJECT_URL="$1"
14 | TARGET_DIR="$2"
15 | TARGET_VAR="$3"
16 | NSTRIP="$4"
17 |
18 | rm -rf $TARGET_DIR
19 | mkdir -p "$TARGET_DIR"
20 |
21 | download_file() {
22 | URL="$1"
23 | DEST="$2"
24 | FILE=${URL#file://}
25 |
26 | if [ "$FILE" != "$URL" ]; then
27 | cp -f $FILE $DEST
28 | elif command -v curl >/dev/null 2>&1; then
29 | curl -L "$URL" -o "$DEST"
30 | elif command -v wget >/dev/null 2>&1; then
31 | wget -O "$DEST" "$URL"
32 | else
33 | echo "Error: neither wget nor curl is available on the system" >&2
34 | exit 1
35 | fi
36 | }
37 |
38 | case "$PROJECT_URL" in
39 | https://* | http://* | file://*)
40 | echo "Downloading an archive..."
41 | TMP_DIR="$(mktemp -d)"
42 | ARCHIVE="$TMP_DIR/archive"
43 |
44 | # Determine and extension
45 | case "$PROJECT_URL" in
46 | *.tar.gz|*.tgz)
47 | EXT="tar.gz"
48 | ;;
49 | *.tar.xz)
50 | EXT="tar.xz"
51 | ;;
52 | *.zip)
53 | EXT="zip"
54 | ;;
55 | *)
56 | echo "Unsupported archive format: $PROJECT_URL" >&2
57 | exit 1
58 | ;;
59 | esac
60 |
61 | download_file "$PROJECT_URL" "$ARCHIVE.$EXT"
62 |
63 | [ -z "$NSTRIP" ] && NSTRIP=1
64 |
65 | case "$EXT" in
66 | tar.gz)
67 | tar -xzf "$ARCHIVE.$EXT" -C "$TARGET_DIR" --strip-components=$NSTRIP
68 | ;;
69 | tar.xz)
70 | tar -xJf "$ARCHIVE.$EXT" -C "$TARGET_DIR" --strip-components=$NSTRIP
71 | ;;
72 | zip)
73 | unzip -q "$ARCHIVE.$EXT" -d "$TMP_DIR/unzipped"
74 | if [ "$NSTRIP" != "0" ]; then
75 | # Flatten if single top-level directory
76 | SRC_DIR="$TMP_DIR/unzipped"
77 | if [ "$(find "$SRC_DIR" -mindepth 1 -maxdepth 1 | wc -l)" -eq 1 ]; then
78 | FIRST_CHILD="$(find "$SRC_DIR" -mindepth 1 -maxdepth 1)"
79 | if [ -d "$FIRST_CHILD" ]; then
80 | SRC_DIR="$FIRST_CHILD"
81 | fi
82 | fi
83 | fi
84 | cp -a "$SRC_DIR"/. "$TARGET_DIR"/
85 | ;;
86 | esac
87 |
88 | rm -rf "$TMP_DIR"
89 | ;;
90 |
91 | dir://*)
92 | SRC_DIR="${PROJECT_URL#dir://}"
93 | if [ ! -d "$SRC_DIR" ]; then
94 | echo "Error: Source directory does not exist: $SRC_DIR" >&2
95 | exit 1
96 | fi
97 | echo "Copying directory from file system..."
98 | mkdir -p "$TARGET_DIR"
99 | cp -a "$SRC_DIR"/. "$TARGET_DIR"/
100 | ;;
101 |
102 | *)
103 | echo "Cloning Git repository..."
104 | git clone --depth=1 "$PROJECT_URL" "$TARGET_DIR"
105 | ;;
106 | esac
107 |
108 | if [ -n "$TARGET_VAR" ]; then
109 | autark set "$TARGET_VAR=$TARGET_DIR"
110 | fi
111 |
112 | rm -rf $TARGET_DIR/autark-cache
113 | touch $TARGET_DIR/.autark-fetch-dep
114 | autark dep $TARGET_DIR/.autark-fetch-dep
--------------------------------------------------------------------------------
/src/bindings/archived/ejdb2_swift/EJDB2Swift/EJDB2.xcodeproj/xcshareddata/xcschemes/EJDB2.xcscheme:
--------------------------------------------------------------------------------
1 |
2 |
5 |
8 |
9 |
15 |
21 |
22 |
23 |
24 |
25 |
30 |
31 |
33 |
39 |
40 |
41 |
42 |
43 |
53 |
54 |
60 |
61 |
67 |
68 |
69 |
70 |
72 |
73 |
76 |
77 |
78 |
--------------------------------------------------------------------------------
/.autark/system.sh:
--------------------------------------------------------------------------------
1 | #!/bin/sh
2 |
3 | set -e
4 |
5 | SYSTEM_NAME="$(uname -s)"
6 | ARCH_RAW="$(uname -m)"
7 |
8 | case "$SYSTEM_NAME" in
9 | CYGWIN*|MINGW*|MSYS*) SYSTEM_NAME="Windows" ;;
10 | esac
11 |
12 | if uname -o 2>/dev/null | grep -qi android || uname -a | grep -qi android || [ -f /system/build.prop ]; then
13 | SYSTEM_NAME=Android
14 | fi
15 |
16 | case "$ARCH_RAW" in
17 | i386|i486|i586|i686)
18 | SYSTEM_ARCH="x86"
19 | SYSTEM_ARCH_ALT="ia32"
20 | ;;
21 | x86_64|amd64)
22 | SYSTEM_ARCH="x86_64"
23 | SYSTEM_ARCH_ALT="x64"
24 | ;;
25 | armv6l|armv7l|armv7hl|arm)
26 | SYSTEM_ARCH="armv7"
27 | SYSTEM_ARCH_ALT="arm"
28 | ;;
29 | aarch64|arm64)
30 | SYSTEM_ARCH="aarch64"
31 | SYSTEM_ARCH_ALT="arm64"
32 | ;;
33 | riscv32)
34 | SYSTEM_ARCH="riscv32"
35 | SYSTEM_ARCH_ALT="riscv32"
36 | ;;
37 | riscv64)
38 | SYSTEM_ARCH="riscv64"
39 | SYSTEM_ARCH_ALT="riscv64"
40 | ;;
41 | mips|mipsel|mips64|mips64el)
42 | SYSTEM_ARCH="mips"
43 | SYSTEM_ARCH_ALT="mips"
44 | ;;
45 | ppc)
46 | SYSTEM_ARCH="powerpc"
47 | SYSTEM_ARCH_ALT="ppc"
48 | ;;
49 | ppc64|ppc64le)
50 | SYSTEM_ARCH="powerpc"
51 | SYSTEM_ARCH_ALT="ppc64"
52 | ;;
53 | s390)
54 | SYSTEM_ARCH="s390"
55 | SYSTEM_ARCH_ALT="s390"
56 | ;;
57 | s390x)
58 | SYSTEM_ARCH="s390"
59 | SYSTEM_ARCH_ALT="s390x"
60 | ;;
61 | *)
62 | SYSTEM_ARCH="unknown"
63 | SYSTEM_ARCH_ALT="unknown"
64 | ;;
65 | esac
66 |
67 | check_tool() {
68 | command -v "$1" >/dev/null 2>&1 || {
69 | echo "error: required tool '$1' not found in PATH" >&2
70 | exit 1
71 | }
72 | }
73 |
74 | if command -v pkgconf >/dev/null 2>&1; then
75 | PKGCONF=pkgconf
76 | elif command -v pkg-config >/dev/null 2>&1; then
77 | PKGCONF=pkg-config
78 | else
79 | echo "error: neither 'pkgconf' nor 'pkg-config' found in PATH" >&2
80 | exit 1
81 | fi
82 |
83 | CC=${CC:-cc}
84 | AR=${AR:-ar}
85 |
86 | autark set "PKGCONF=$PKGCONF"
87 | check_tool $CC && autark set "CC=$CC"
88 | check_tool $AR && autark set "AR=$AR"
89 | check_tool install
90 |
91 | cat > './test_system.c' << 'EOF'
92 | #include
93 | #include
94 | int main(void) {
95 |
96 | if (sizeof(void*) == 8) {
97 | puts("SYSTEM_BITNESS_64=1");
98 | } else if (sizeof(void*) == 4) {
99 | puts("SYSTEM_BITNESS_32=1");
100 | } else {
101 | puts("Unknown bitness");
102 | exit(1);
103 | }
104 |
105 | unsigned x = 1;
106 | if (*(char*)&x == 0) {
107 | puts("SYSTEM_BIGENDIAN=1");
108 | } else {
109 | puts("SYSTEM_LITTLE_ENDIAN=1");
110 | }
111 |
112 | return 0;
113 | }
114 | EOF
115 |
116 | ${CC} ./test_system.c -o ./test_system || exit 1
117 |
118 | ./test_system | xargs autark set
119 | eval "$(./test_system)"
120 |
121 | autark env CC
122 | autark env CFLAGS
123 | autark set "SYSTEM_NAME=$(echo -n "$SYSTEM_NAME" | tr '[:upper:]' '[:lower:]')"
124 | autark set "SYSTEM_$(echo -n "$SYSTEM_NAME" | tr '[:lower:]' '[:upper:]')=1"
125 | autark set "SYSTEM_ARCH=$SYSTEM_ARCH"
126 | autark set "SYSTEM_ARCH_ALT=$SYSTEM_ARCH_ALT"
127 |
--------------------------------------------------------------------------------
/src/bindings/ejdb2_node/install.js:
--------------------------------------------------------------------------------
1 | /**************************************************************************************************
2 | * EJDB2 Node.js native API binding.
3 | *
4 | * MIT License
5 | *
6 | * Copyright (c) 2012-2022 Softmotions Ltd
7 | *
8 | * Permission is hereby granted, free of charge, to any person obtaining a copy
9 | * of this software and associated documentation files (the "Software"), to deal
10 | * in the Software without restriction, including without limitation the rights
11 | * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
12 | * copies of the Software, and to permit persons to whom the Software is
13 | * furnished to do so, subject to the following conditions:
14 | *
15 | * The above copyright notice and this permission notice shall be included in all
16 | * copies or substantial portions of the Software.
17 | *
18 | * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
19 | * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
20 | * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
21 | * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
22 | * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
23 | * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
24 | * SOFTWARE.
25 | *************************************************************************************************/
26 |
27 | const { promisify } = require("util");
28 | const fs = require("fs");
29 | const os = require("os");
30 | const path = require("path");
31 | const rimraf = promisify(require("rimraf"));
32 | const extract = require("extract-zip");
33 | const readdir = promisify(fs.readdir);
34 |
35 | const utils = require("./utils");
36 | const REVISION = require("./package.json")["revision"];
37 |
38 | function hasRevision() {
39 | return REVISION && REVISION.length && REVISION != "@META_REVISION@";
40 | }
41 |
42 | async function install() {
43 | console.log("Building EJDB2 native binding...");
44 | const wdir = await promisify(fs.mkdtemp)(path.join(os.tmpdir(), "ejdb2-node"));
45 | console.log(`Git revision: ${REVISION}`);
46 | console.log(`Build temp dir: ${wdir}`);
47 |
48 | let dist = path.join(wdir, "dist.zip");
49 | await utils.download(`https://github.com/Softmotions/ejdb/archive/${REVISION}.zip`, dist);
50 | await extract(dist, { dir: wdir });
51 |
52 | dist = (await readdir(wdir)).find((fn) => fn.startsWith(`ejdb-${REVISION}`));
53 | if (dist == null) throw Error(`Invalid distrib dir ${wdir}`);
54 | dist = path.join(wdir, dist);
55 |
56 | await utils.runProcess(
57 | "build.sh",
58 | ["-DBUILD_TYPE=Release", "-DBUILD_BINDING_NODEJS=1", `-DEJDB_NODE_BIN_ROOT=${__dirname}`],
59 | dist
60 | );
61 | await rimraf(wdir);
62 | }
63 |
64 | if (process.platform.toLowerCase().indexOf("win") == 0) {
65 | // Windows system
66 | console.error("Building for windows is currently not supported");
67 | process.exit(1);
68 | }
69 |
70 | if (hasRevision() && !fs.existsSync(path.join(utils.binariesDir, "ejdb2_node.node"))) {
71 | install().catch((err) => {
72 | console.error(err);
73 | process.exit(1);
74 | });
75 | }
--------------------------------------------------------------------------------
/src/bindings/archived/ejdb2_flutter/example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Contents.json:
--------------------------------------------------------------------------------
1 | {
2 | "images" : [
3 | {
4 | "size" : "20x20",
5 | "idiom" : "iphone",
6 | "filename" : "Icon-App-20x20@2x.png",
7 | "scale" : "2x"
8 | },
9 | {
10 | "size" : "20x20",
11 | "idiom" : "iphone",
12 | "filename" : "Icon-App-20x20@3x.png",
13 | "scale" : "3x"
14 | },
15 | {
16 | "size" : "29x29",
17 | "idiom" : "iphone",
18 | "filename" : "Icon-App-29x29@1x.png",
19 | "scale" : "1x"
20 | },
21 | {
22 | "size" : "29x29",
23 | "idiom" : "iphone",
24 | "filename" : "Icon-App-29x29@2x.png",
25 | "scale" : "2x"
26 | },
27 | {
28 | "size" : "29x29",
29 | "idiom" : "iphone",
30 | "filename" : "Icon-App-29x29@3x.png",
31 | "scale" : "3x"
32 | },
33 | {
34 | "size" : "40x40",
35 | "idiom" : "iphone",
36 | "filename" : "Icon-App-40x40@2x.png",
37 | "scale" : "2x"
38 | },
39 | {
40 | "size" : "40x40",
41 | "idiom" : "iphone",
42 | "filename" : "Icon-App-40x40@3x.png",
43 | "scale" : "3x"
44 | },
45 | {
46 | "size" : "60x60",
47 | "idiom" : "iphone",
48 | "filename" : "Icon-App-60x60@2x.png",
49 | "scale" : "2x"
50 | },
51 | {
52 | "size" : "60x60",
53 | "idiom" : "iphone",
54 | "filename" : "Icon-App-60x60@3x.png",
55 | "scale" : "3x"
56 | },
57 | {
58 | "size" : "20x20",
59 | "idiom" : "ipad",
60 | "filename" : "Icon-App-20x20@1x.png",
61 | "scale" : "1x"
62 | },
63 | {
64 | "size" : "20x20",
65 | "idiom" : "ipad",
66 | "filename" : "Icon-App-20x20@2x.png",
67 | "scale" : "2x"
68 | },
69 | {
70 | "size" : "29x29",
71 | "idiom" : "ipad",
72 | "filename" : "Icon-App-29x29@1x.png",
73 | "scale" : "1x"
74 | },
75 | {
76 | "size" : "29x29",
77 | "idiom" : "ipad",
78 | "filename" : "Icon-App-29x29@2x.png",
79 | "scale" : "2x"
80 | },
81 | {
82 | "size" : "40x40",
83 | "idiom" : "ipad",
84 | "filename" : "Icon-App-40x40@1x.png",
85 | "scale" : "1x"
86 | },
87 | {
88 | "size" : "40x40",
89 | "idiom" : "ipad",
90 | "filename" : "Icon-App-40x40@2x.png",
91 | "scale" : "2x"
92 | },
93 | {
94 | "size" : "76x76",
95 | "idiom" : "ipad",
96 | "filename" : "Icon-App-76x76@1x.png",
97 | "scale" : "1x"
98 | },
99 | {
100 | "size" : "76x76",
101 | "idiom" : "ipad",
102 | "filename" : "Icon-App-76x76@2x.png",
103 | "scale" : "2x"
104 | },
105 | {
106 | "size" : "83.5x83.5",
107 | "idiom" : "ipad",
108 | "filename" : "Icon-App-83.5x83.5@2x.png",
109 | "scale" : "2x"
110 | },
111 | {
112 | "size" : "1024x1024",
113 | "idiom" : "ios-marketing",
114 | "filename" : "Icon-App-1024x1024@1x.png",
115 | "scale" : "1x"
116 | }
117 | ],
118 | "info" : {
119 | "version" : 1,
120 | "author" : "xcode"
121 | }
122 | }
123 |
--------------------------------------------------------------------------------