diff --git a/.circleci/config.yml b/.circleci/config.yml new file mode 100644 index 00000000000..867ec99a251 --- /dev/null +++ b/.circleci/config.yml @@ -0,0 +1,176 @@ +# NOTE: This yaml file will need a refactor. Right now we just need a CI/CD +# integration to ensure that we are running DB tests at every change. This +# pipeline will not do a release, or rql test right now. The later will be +# done after the drivers are extracted from the main repo. + +version: 2.1 +commands: + install_dependencies: + description: Install system requirements + parameters: + additional_packages: + type: string + default: '' + pre_hook: + type: string + default: '' + steps: + - run: | + << parameters.pre_hook >> + apt install -y git-core build-essential protobuf-compiler python ruby \ + libprotobuf-dev libboost-all-dev python nodejs npm \ + libncurses5-dev libjemalloc-dev wget m4 clang libssl1.0-dev \ + debhelper curl python3.7 python3.7-dev python3.7-distutils << parameters.additional_packages >> + configure: + description: Configure project + parameters: + fetch: + type: string + default: '--allow-fetch' + steps: + - run: ./configure << parameters.fetch >> CXX=clang++ + prepare: + description: 'Checkout, configure and unstash build' + parameters: + fetch: + type: string + default: '--allow-fetch' + additional_packages: + type: string + default: '' + steps: + - install_dependencies: + pre_hook: apt update -qqy + additional_packages: << parameters.additional_packages >> + - checkout + - restore_cache: + key: 'rethinkdb-{{ .Revision }}' + - configure: + fetch: << parameters.fetch >> + test: + description: Run RethinkDB test + parameters: + command: + type: string + default: test/run -H + pattern: + type: string + steps: + - run: git clone https://github.com/rethinkdb/rethinkdb-python.git /tmp/rethinkdb-python + - run: git clone https://github.com/rethinkdb/rethinkdb-ruby.git /tmp/rethinkdb-ruby + - run: | + curl https://bootstrap.pypa.io/get-pip.py -o get-pip.py + python3.7 get-pip.py + pip install -r /tmp/rethinkdb-python/requirements.txt + - run: | + pushd /tmp/rethinkdb-ruby + bundle install + rake protobuf + popd + - run: + environment: | + PYTHON_DRIVER="/tmp/rethinkdb-python/rethinkdb" + RUBY_DRIVER="/tmp/rethinkdb-ruby/lib" + command: | + << parameters.command >> << parameters.pattern >> + +jobs: + build: + docker: + - image: 'ubuntu:bionic' + steps: + - install_dependencies: + pre_hook: apt update -qqy + - checkout + - configure + - run: make -j7 support + - run: make -j7 DEBUG=1 + - run: 'cp build/debug_clang/rethinkdb{,-unittest} build/' + - store_artifacts: + path: build/rethinkdb + destination: rethinkdb + - store_artifacts: + path: build/rethinkdb-unittest + destination: rethinkdb-unittest + - save_cache: + key: 'rethinkdb-{{ .Revision }}' + paths: + - ./build/ + - ./config.mk + check_style: + docker: + - image: 'ubuntu:bionic' + steps: + - prepare + - run: bash scripts/check_style.sh + unit_test: + docker: + - image: 'ubuntu:bionic' + steps: + - prepare + - test: + pattern: unit + - store_artifacts: + path: test/results/ + destination: unit_tests + integration_test: + docker: + - image: 'ubuntu:bionic' + steps: + - prepare + - test: + pattern: all '!unit' '!cpplint' + - store_artifacts: + path: test/results/ + destination: integration_tests + rql_python: + docker: + - image: 'ubuntu:bionic' + steps: + - prepare + - test: + command: test/rql_test/test-runner -i py3.7 + pattern: polyglot + +workflows: + version: 2 + nightly: + triggers: + - schedule: + cron: 0 0 * * * + filters: + branches: + only: + - next + - v2.4.x + - v2.5.x + jobs: + - check_style + - build: + requires: + - check_style + - unit_test: + requires: + - build + - integration_test: + requires: + - build + - rql_python: + requires: + - build + pull_request_pipeline: + jobs: + - check_style + - build: + requires: + - check_style + - unit_test: + requires: + - build + - integration_test: + requires: + - build + - rql_python: + requires: + - build + diff --git a/.github/FUNDING.yml b/.github/FUNDING.yml new file mode 100644 index 00000000000..7b666369df1 --- /dev/null +++ b/.github/FUNDING.yml @@ -0,0 +1,12 @@ +# These are supported funding model platforms + +github: # Replace with up to 4 GitHub Sponsors-enabled usernames e.g., [user1, user2] +patreon: # Replace with a single Patreon username +open_collective: # Replace with a single Open Collective username +ko_fi: # Replace with a single Ko-fi username +tidelift: # Replace with a single Tidelift platform-name/package-name e.g., npm/babel +community_bridge: rethinkdb +liberapay: # Replace with a single Liberapay username +issuehunt: # Replace with a single IssueHunt username +otechie: # Replace with a single Otechie username +custom: # Replace with up to 4 custom sponsorship URLs e.g., ['link1', 'link2'] diff --git a/.github/PULL_REQUEST_TEMPLATE b/.github/PULL_REQUEST_TEMPLATE deleted file mode 100644 index 6e5ff73ec15..00000000000 --- a/.github/PULL_REQUEST_TEMPLATE +++ /dev/null @@ -1,4 +0,0 @@ -- [ ] I have read and agreed to the RethinkDB Contributor License Agreement http://rethinkdb.com/community/cla/ - -### Description - diff --git a/.github/PULL_REQUEST_TEMPLATE.md b/.github/PULL_REQUEST_TEMPLATE.md new file mode 100644 index 00000000000..fc4a2e027a6 --- /dev/null +++ b/.github/PULL_REQUEST_TEMPLATE.md @@ -0,0 +1,14 @@ +**Reason for the change** +If applicable, link the related issue/bug report or write down in few sentences the motivation. + +**Description** +A clear and concise description of what did you changed and why. + +**Code examples** +If applicable, add code examples to help explain your changes. + +**Checklist** +- [ ] I have read and agreed to the [RethinkDB Contributor License Agreement](http://rethinkdb.com/community/cla/) + +**References** +Anything else related to the change e.g. documentations, RFCs, etc. diff --git a/.github/issue_template.md b/.github/issue_template.md new file mode 100644 index 00000000000..e031462585e --- /dev/null +++ b/.github/issue_template.md @@ -0,0 +1 @@ +For bug reports, please remember to provide system information (e.g. Ubuntu 18.04 amd64), RethinkDB version information and/or commit hash (e.g. 2.4.1), and stack traces, logs, all other useful information. diff --git a/.gitignore b/.gitignore index 04a010715cc..00f53fb1ed9 100644 --- a/.gitignore +++ b/.gitignore @@ -51,6 +51,9 @@ last_tested_versions /RethinkDB.vcxproj.filters /RethinkDB.vcxproj.user /RethinkDB.vcxproj.xml -/precompiled *.xml *.iml +/.vscode + +virtualenv + diff --git a/CODE_OF_CONDUCT.md b/CODE_OF_CONDUCT.md new file mode 100644 index 00000000000..9c628288c2f --- /dev/null +++ b/CODE_OF_CONDUCT.md @@ -0,0 +1,71 @@ +# Contributor Covenant Code of Conduct + +## Our Pledge + +In the interest of fostering an open and welcoming environment, we as +contributors and maintainers pledge to making participation in our project and +our community a harassment-free experience for everyone, regardless of age, body +size, disability, ethnicity, sex characteristics, gender identity and expression, +level of experience, education, socio-economic status, nationality, personal +appearance, race, religion, or sexual identity and orientation. + +## Our Standards + +Examples of behaviour that contributes to creating a positive environment +include: + +* Using welcoming and inclusive language +* Being respectful of differing viewpoints and experiences +* Gracefully accepting constructive criticism +* Focusing on what is best for the community +* Showing empathy towards other community members + +Examples of unacceptable behaviour by participants include: + +* The use of sexualized language or imagery and unwelcome sexual attention or advances +* Trolling, insulting/derogatory comments, and personal or political attacks +* Public or private harassment +* Publishing others' private information, such as a physical or electronic address, without explicit permission +* Other conduct which could reasonably be considered inappropriate in a professional setting + +## Our Responsibilities + +Project maintainers are responsible for clarifying the standards of acceptable +behaviour and are expected to take appropriate and fair corrective action in +response to any instances of unacceptable behaviour. + +Project maintainers have the right and responsibility to remove, edit, or +reject comments, commits, code, wiki edits, issues, and other contributions +that are not aligned to this Code of Conduct, or to ban temporarily or +permanently any contributor for other behaviors that they deem inappropriate, +threatening, offensive, or harmful. + +## Scope + +This Code of Conduct applies both within project spaces and in public spaces +when an individual is representing the project or its community. Examples of +representing a project or community include using an official project e-mail +address, posting via an official social media account, or acting as an appointed +representative at an online or offline event. Representation of a project may be +further defined and clarified by project maintainers. + +## Enforcement + +Instances of abusive, harassing, or otherwise unacceptable behaviour may be +reported by contacting the project team at open@rethinkdb.com. All +complaints will be reviewed and investigated and will result in a response that +is deemed necessary and appropriate to the circumstances. The project team is +obligated to maintain confidentiality with regard to the reporter of an incident. +Further details of specific enforcement policies may be posted separately. + +Project maintainers who do not follow or enforce the Code of Conduct in good +faith may face temporary or permanent repercussions as determined by other +members of the project's leadership. + +## Attribution + +This Code of Conduct is adapted from the Contributor Covenant, version 1.4, +available at https://www.contributor-covenant.org/version/1/4/code-of-conduct.html + +For answers to common questions about this code of conduct, see +https://www.contributor-covenant.org/faq diff --git a/CONTRIBUTING.md b/CONTRIBUTING.md index 08ab6aeaafd..2a9c6119b74 100644 --- a/CONTRIBUTING.md +++ b/CONTRIBUTING.md @@ -1,34 +1,45 @@ # Contributing -We're happy you want to contribute! You can help us in different ways: +Contributions are welcome, and they are greatly appreciated! Every little bit helps! You can contribute in many ways, not limited to this document. -- [Open an issue][1] with suggestions for improvements -- Fork this repository and submit a pull request -- Improve the [documentation][2] (separate repository) +## Types of Contributions -[1]: https://github.com/rethinkdb/rethinkdb/issues -[2]: https://github.com/rethinkdb/docs +### Report Bugs -To submit a pull request, fork the [RethinkDB repository][3] and then clone your fork: +First of all, please check that the bug is not reported yet. If that's already reported then upvote the existing bug instead of opening a new bug report. - git clone git@github.com:/rethinkdb.git +Report bugs at https://github.com/rethinkdb/rethinkdb/issues. If you are reporting a bug, please include: -[3]: https://github.com/rethinkdb/rethinkdb +- Your operating system name and version. +- Any details about your local setup that might be helpful in troubleshooting. +- Detailed steps to reproduce the bug. -Make your suggested changes, `git push` and then [submit a pull request][4]. Note that before we can accept your pull requests, you need to sign our [Contributor License Agreement][5]. +### Fix Bugs -[4]: https://github.com/rethinkdb/rethinkdb/compare/ -[5]: http://rethinkdb.com/community/cla/ +Look through the GitHub issues for bugs. Anything tagged with "bug", "good first issue" and "help wanted" is open to whoever wants to implement it. -## Resources +### Implement Features -Some useful resources to get started: -* [Building RethinkDB][6] from source -* Overview of [what to find where][7] in the server source directory -* Introduction to the [RethinkDB driver protocol][8] -* [C++ coding style][9] for the RethinkDB server +Look through the GitHub issues for features. Anything tagged with "enhancement", "good first issue" and "help wanted" is open to whoever wants to implement it. In case you added a new Rule or Precondition, do not forget to add them to the docs as well. -[6]: http://rethinkdb.com/docs/build/ -[7]: src/README.md -[8]: http://rethinkdb.com/docs/driver-spec/ -[9]: STYLE.md +### Write Documentation + +RethinkDB could always use more documentation, whether as part of the official docs, in docstrings, or even on the web in blog posts, articles, and such. To extend the documentation on the website, visit the [www](https://github.com/rethinkdb/www) repo. For extending the docs, you can check the [docs](https://github.com/rethinkdb/docs) repo. + +### Submit A Feature + +First of all, please check that the feature request is not reported yet. If that's already reported then upvote the existing request instead of opening a new one. + +If you are proposing a feature: + +- Check if there is an opened feature request for the same idea. +- Explain in detail how it would work. +- Keep the scope as narrow as possible, to make it easier to implement. +- Remember that this is an open-source project, and that contributions are welcome :) + +## Pull Request Guidelines + +Before you submit a pull request, check that it meets these guidelines: + +1. The pull request should include tests (if applicable) +2. If the pull request adds functionality, the docs should be updated too. diff --git a/COPYRIGHT b/LICENSE similarity index 97% rename from COPYRIGHT rename to LICENSE index 35adf97582d..261eeb9e9f8 100644 --- a/COPYRIGHT +++ b/LICENSE @@ -1,12 +1,3 @@ -RethinkDB Database System - -Copyright 2010-present, The Linux Foundation, portions copyright Google and -others and used with permission or subject to their respective license -agreements. - -The software is released under the terms of the Apache License, version 2.0. - - Apache License Version 2.0, January 2004 http://www.apache.org/licenses/ diff --git a/Makefile b/Makefile index d009d39bf0e..7a388365e06 100644 --- a/Makefile +++ b/Makefile @@ -71,9 +71,6 @@ include $(TOP)/mk/configure.mk # Require CHECK_ARG_VARIABLES include $(TOP)/mk/check-env.mk -# Require pipe-stderr -include $(TOP)/mk/pipe-stderr.mk - # The cached list of phony targets PHONY_LIST = var-% -include $(TOP)/mk/gen/phony-list.mk diff --git a/NOTES.md b/NOTES.md index c65897300d2..c4503ff3e5a 100644 --- a/NOTES.md +++ b/NOTES.md @@ -1,3 +1,238 @@ +# Release 2.3.6 (Fantasia) + +Released on 2017-07-17 + +Bug fix release + +### Notes ### + +This is the first release of RethinkDB since October 2016. The +RethinkDB project has [joined the Linux +Foundation][blog-new-rethinkdb]. This release is brought to you by +volunteers from the Open RethinkDB team. The RethinkDB source code is +now licensed under an [ASLv2 license][ASLv2-license]. + +[blog-new-rethinkdb]: https://rethinkdb.com/blog/rethinkdb-joins-linux-foundation/ +[ASLv2-license]: https://www.apache.org/licenses/LICENSE-2.0 + +### Compatibility ### + +On 32-bit platforms and on Windows (64 and 32 bit), RethinkDB 2.3.6 servers should not +be mixed with servers running RethinkDB 2.3.3 or older in the same cluster. Doing so can lead to +server crashes when using the web UI or when accessing the `logs` system table. + +On 64-bit platforms, RethinkDB 2.3.6 servers can be mixed with older RethinkDB 2.3.x +servers in the same cluster. We recommend that you run a mixed-version cluster only +temporarily for upgrading purposes. + +No migration is required when upgrading from RethinkDB 2.3.x. Please read the +[RethinkDB 2.3.0 release notes][release-notes-2.3.0] if you're upgrading from an +older version. + +### Changes ### + +* Server + * Improved the compatibility of the web UI with Chrome 48 and Edge (#5878, #5426, #5300) -- @danielmewes + * Fixed a crash caused by unwanted connections (#6084) -- @danielmewes + * Fixed a crash caused by recreating indexes with active changefeeds (#6093) -- @danielmewes + * Sizes passed to `sample` are now bound by the array size limit (#6148) -- @AtnNn + * Fixed a crashing bug in the implementation of the `interleave` argument to `union` (#6139) -- @AtnNn + * Fixed a crash caused by `eqJoin` of system tables when using the `uuid` `identifierFormat` (#6108) -- @nighelles + * Fixed a bug that caused `r.match('')` to return wrong results (#6241) -- @AtnNn + * Miscellaneous regression fixes and code improvements by @srh and @VeXocide + * Fixed argument order in pretty-printed queries in the jobs table (#6240) -- @AtnNn +* Packaging + * Fix glibc version detection in RPM packaging script (#6229) -- @gamename + * Add packages for Ubuntu Yakkety and Zesty (#6364) -- @AtnNn + +-- + +# Release 2.3.5 (Fantasia) + +Released on 2016-08-26 + +Bug fix release + +### Compatibility ### + +On 32-bit platforms and on Windows (64 and 32 bit), RethinkDB 2.3.5 servers should not +be mixed with servers running RethinkDB 2.3.3 or older in the same cluster. Doing so can lead to +server crashes when using the web UI or when accessing the `logs` system table. + +On 64-bit platforms, RethinkDB 2.3.5 servers can be mixed with older RethinkDB 2.3.x +servers in the same cluster. We recommend that you run a mixed-version cluster only +temporarily for upgrading purposes. + +No migration is required when upgrading from RethinkDB 2.3.x. Please read the +[RethinkDB 2.3.0 release notes][release-notes-2.3.0] if you're upgrading from an +older version. + +[release-notes-2.3.0]: https://github.com/rethinkdb/rethinkdb/releases/tag/v2.3.0 + +### Bug fixes ### + +* Server + * Improved the efficiency of the on-disk garbage collector to reduce the risk of + excessive file growth (#5923) + * Improved the latency of read queries under heavy write loads (#6072) + * Fixed a bug that could cause the server to crash with a deserialization error + or to stop completing any table reads (#6033) + * Fixed a bug in the implementation of the `interleave` option of the `union` command, + which could potentially lead to results being generated in the wrong order (#6041) + * Fixed a bug in the batch handling of the `fold` and multi-stream `map` commands, + that would stop results from being generated correctly if these commands were + applied to a changefeed (#6007) + * Fixed an issue that could cause proxies to remain listed in the `connected_to` + field of the `server_status` table, even after they had disconnected (#5871) + * Fixed the detection of non-deterministic conflict functions in the `insert` command + (#5842) + * Improved the Raft election timeout logic to avoid infinite Raft election loops (#6038) + * Improved the response time when reading from the `table_status` system table (#4589) + * The server no longer logs the message + `Rejected a connection from server X since one is already open` when trying to connect + to itself (#5456) + * Fixed a bug that could cause an `Uncaught exception` server crash if a TLS-encrypted + connection was closed during a certain connection stage (#5904) + * Fixed a bug in `merge` that could cause `r.literal` objects to remain after the `merge` + and be stored in a table (#5977) + * On Windows: Fixed a bug in the `r.http` command that resulted in decoding issues (#5924) + * On Windows: RethinkDB now binds TCP ports exclusively (#6008) + * On Windows: No longer print an error to the log whenever a connection attempt fails + (no issue #) + * Fixed a build issue that caused system libraries to not be found during `make` on + OpenSUSE (#2363) +* JavaScript driver + * Fixed the server nonce validation in the connection handshake (#5916) + * The `host` argument to `connect` is now optional (#5846) +* Java driver + * Cursors now implement the `Closeable` interface (#5468) + * Fixed no-reply queries as run through `runNoReply` (#5938) + * Fixed a bug in the `reconnect` method (#5841) + * Fixed a memory leak in the `Connection` object that was caused by the driver not + properly cleaning up closed cursors (#5980) +* Python driver + * The `asyncio` loop type is now available when using the driver from a Python .egg + file (#6043) +* Ruby driver + * Fixed a rounding issue with time objects (#5825) + +## Contributors ## + +Many thanks to external contributors from the RethinkDB community for helping +us ship RethinkDB 2.3.5. + +* Arve Seljebu (@arve0) +* Ben Sharpe (@bsharpe) +* Brian Chavez (@bchavez) +* Dan Wiechert (@DWiechert) +* mbains (@mbains) +* QianJin2013 (@QianJin2013) +* Raman Gupta (@rocketraman) + +-- + +# Release 2.3.4 (Fantasia) + +Released on 2016-06-03 + +Bug fix release + +### Compatibility ### + +On 32-bit platforms and on Windows (64 and 32 bit), RethinkDB 2.3.4 servers should not +be mixed with older RethinkDB 2.3.x servers in the same cluster. Doing so can lead to +server crashes when using the web UI or when accessing the `logs` system table. + +On 64-bit platforms, RethinkDB 2.3.4 servers can be mixed with older RethinkDB 2.3.x +servers in the same cluster. We recommend that you run a mixed-version cluster only +temporarily for upgrading purposes. + +No migration is required when upgrading from RethinkDB 2.3.x. Please read the +[RethinkDB 2.3.0 release notes][release-notes-2.3.0] if you're upgrading from an +older version. + +[release-notes-2.3.0]: https://github.com/rethinkdb/rethinkdb/releases/tag/v2.3.0 + +### Bug fixes ### + +* Server + * Fixed a segmentation fault in the `orderBy.limit` changefeed implementation (#5824) + * Fixed an incompatibility in the cluster protocol between Windows and Linux / OS X + servers (#5819) +* Python driver + * Fixed various bugs in the connection class for the asyncio event loop (#5795, #5816, #5820) + +## Contributors ## + +Many thanks to external contributors from the RethinkDB community for helping +us ship RethinkDB 2.3.4. + +* Ultrabug (@ultrabug) + +-- + +# Release 2.3.3 (Fantasia) + +Released on 2016-06-01 + +Bug fix release + +### Compatibility ### + +RethinkDB 2.3.3 servers can be mixed with older RethinkDB 2.3.x servers in the same +cluster. We recommend that you run a mixed-version cluster only temporarily for upgrading +purposes. + +No migration is required when upgrading from RethinkDB 2.3.x. Please read the +[RethinkDB 2.3.0 release notes][release-notes-2.3.0] if you're upgrading from an +older version. + +[release-notes-2.3.0]: https://github.com/rethinkdb/rethinkdb/releases/tag/v2.3.0 + +### Windows support ### + +RethinkDB 2.3.0 was the first version to include native Windows compatibility. In +RethinkDB 2.3.3, the Windows port is ready to emerge from "beta" testing. We now +officially support RethinkDB on the Windows platform alongside our existing support for +Linux and Mac OS X. We're also extending our [commercial support][comm-support] services +to include RethinkDB on Windows. + +Although RethinkDB is now stable on Windows, there are still a few [remaining limitations][windows-tag] +that we are actively working to address. We also haven't yet carried out as much +performance tuning on the Windows port as we have on the Linux and OS X releases. + +[comm-support]: https://rethinkdb.com/services/ +[windows-tag]: https://github.com/rethinkdb/rethinkdb/issues?q=is%3Aopen+is%3Aissue+label%3Awindows + +### Bug fixes ### + +* Server + * Fixed a bug in `orderBy.limit` changefeeds that caused the server to crash with + `Guarantee failed: [sub_it != real_added.end()]` (#5561) + * Improved the performance of the `table_status` system table when the cluster is under + high load (#5586) + * Fixed a race condition in the cluster connection logic that could cause occasional + crashes with a `Guarantee failed: [refcount == 0]` error (#5783) + * Fixed a stack overflow when executing queries with a very high number of chained + commands (#5792) + * Made the `fold` command work on a changefeed stream (#5800) + * Fixed the server uptime calculation on Windows (#5388) + * Fixed source code incompatibilities with GCC 6.0 (#5757) +* JavaScript driver + * The `Connection` class is now exported from the RethinkDB JavaScript module (#5758) +* Java driver + * Added the `clientPort` and `clientAddress` methods to the `Connection` class in the + Java driver (#5571) + +## Contributors ## + +Many thanks to external contributors from the RethinkDB community for helping +us ship RethinkDB 2.3.3. + +* Gergely Nemeth (@gergelyke) + +-- + # Release 2.3.2 (Fantasia) Released on 2016-05-06 diff --git a/README.md b/README.md index 502c4dc4906..a979dfd2721 100644 --- a/README.md +++ b/README.md @@ -3,6 +3,8 @@ [RethinkDB](https://www.rethinkdb.com) ====================================== +[![CII Best Practices](https://bestpractices.coreinfrastructure.org/projects/3038/badge)](https://bestpractices.coreinfrastructure.org/projects/3038) +[![Codacy Badge](https://api.codacy.com/project/badge/Grade/6e0fed97691941b1aa3fc5098bfc9385)](https://www.codacy.com/app/RethinkDB/rethinkdb?utm_source=github.com&utm_medium=referral&utm_content=rethinkdb/rethinkdb&utm_campaign=Badge_Grade) What is RethinkDB? ------------------ @@ -12,7 +14,7 @@ What is RethinkDB? * **Distributed** database that is easy to scale * **High availability** database with automatic failover and robust fault tolerance -RethinkDB is the first open-source scalable database built for realtime applications. It exposes a new database access model -- instead of polling for changes, the developer can tell the database to continuously push updated query results to applications in realtime. RethinkDB allows developers to build scalable realtime apps in a fraction of the time with less effort. +RethinkDB is the first open-source scalable database built for realtime applications. It exposes a new database access model, in which the developer can tell the database to continuously push updated query results to applications without polling for changes. RethinkDB allows developers to build scalable realtime apps in a fraction of the time with less effort. To learn more, check out [rethinkdb.com](https://rethinkdb.com). @@ -35,16 +37,18 @@ Or, get started right away with our ten-minute guide in these languages: * [**JavaScript**](https://rethinkdb.com/docs/guide/javascript/) * [**Python**](https://rethinkdb.com/docs/guide/python/) * [**Ruby**](https://rethinkdb.com/docs/guide/ruby/) -* [**Java**](https://rethinkdb.com/docs/guide/java/) +* [**Java**](https://rethinkdb.com/docs/guide/java/) -Besides our four official drivers, we also have many [third-party drivers](https://rethinkdb.com/docs/install-drivers/) supported by the RethinkDB community. Here's a few: +Besides our four official drivers, we also have many [third-party drivers](https://rethinkdb.com/docs/install-drivers/) supported by the RethinkDB community. Here are a few of them: * **C#/.NET:** [RethinkDb.Driver](https://github.com/bchavez/RethinkDb.Driver), [rethinkdb-net](https://github.com/mfenniak/rethinkdb-net) +* **C++:** [librethinkdbxx](https://github.com/AtnNn/librethinkdbxx) * **Clojure:** [clj-rethinkdb](https://github.com/apa512/clj-rethinkdb) -* **Elixir:** [rethinkdb-elixir](https://github.com/hamiltop/rethinkdb-elixir) +* **Elixir:** [rethinkdb-elixir](https://github.com/rethinkdb/rethinkdb-elixir) * **Go:** [GoRethink](https://github.com/dancannon/gorethink) * **Haskell:** [haskell-rethinkdb](https://github.com/atnnn/haskell-rethinkdb) -* **PHP:** [php-rql](https://github.com/danielmewes/php-rql) +* **PHP:** [php-rethink-ql](https://github.com/tbolier/php-rethink-ql) +* **Rust:** [reql](https://github.com/rust-rethinkdb/reql) * **Scala:** [rethink-scala](https://github.com/kclay/rethink-scala) Looking to explore what else RethinkDB offers or the specifics of ReQL? Check out [our RethinkDB docs](https://rethinkdb.com/docs/) and [ReQL API](https://rethinkdb.com/api/). @@ -56,7 +60,7 @@ First install some dependencies. For example, on Ubuntu or Debian: sudo apt-get install build-essential protobuf-compiler python \ libprotobuf-dev libcurl4-openssl-dev libboost-all-dev \ - libncurses5-dev libjemalloc-dev wget m4 g++ + libncurses5-dev libjemalloc-dev wget m4 g++ libssl-dev Generally, you will need @@ -68,6 +72,7 @@ Generally, you will need * Python 2 * libcurl * libcrypto (OpenSSL) +* libssl-dev Then, to build: @@ -86,15 +91,28 @@ Need help? A great place to start is [rethinkdb.com/community](https://rethinkdb.com/community). Here you can find out how to ask us questions, reach out to us, or [report an issue](https://github.com/rethinkdb/rethinkdb/issues). You'll be able to find all the places we frequent online and at which conference or meetups you might be able to meet us next. -If you need help right now, you can also find us [on Slack](http://slack.rethinkdb.com/), [Twitter](https://twitter.com/rethinkdb), or IRC at [#rethinkdb](irc://chat.freenode.net/#rethinkdb) on Freenode. - -**Join us now:** +If you need help right now, you can also find us [on Slack](https://join.slack.com/t/rethinkdb/shared_invite/enQtNzAxOTUzNTk1NzMzLWY5ZTA0OTNmMWJiOWFmOGVhNTUxZjQzODQyZjIzNjgzZjdjZDFjNDg1NDY3MjFhYmNhOTY1MDVkNDgzMWZiZWM), [Twitter](https://twitter.com/rethinkdb), or IRC at [#rethinkdb](irc://chat.freenode.net/#rethinkdb) on Freenode. Contributing ------------ RethinkDB was built by a dedicated team, but it wouldn't have been possible without the support and contributions of hundreds of people from all over the world. We could use your help too! Check out our [contributing guidelines](CONTRIBUTING.md) to get started. +Donors +------ + +* [CNCF](https://www.cncf.io/) +* [Digital Ocean](https://www.digitalocean.com/) provides infrastructure and servers needed for serving mission-critical sites like download.rethinkdb.com or update.rethinkdb.com +* [Atlassian](https://www.atlassian.com/) provides OSS license to be able to handle internal tickets like vulnerability issues +* [Netlify](https://www.netlify.com/) OSS license to be able to migrate rethinkdb.com +* [DNSimple](https://dnsimple.com) provides DNS services for the RethinkDB project +* [ZeroTier](https://www.zerotier.com) sponsored the development of per-table configurable write aggregation including the ability to set write delay to infinite to create a memory-only table ([PR #6392](https://github.com/rethinkdb/rethinkdb/pull/6392)) + +Licensing +--------- + +RethinkDB is licensed by the Linux Foundation under the open-source Apache 2.0 license. Portions of the software are licensed by Google and others and used with permission or subject to their respective license agreements. + Where's the changelog? ---------------------- We keep [a list of changes and feature explanations here](NOTES.md). diff --git a/RethinkDB.svg b/RethinkDB.svg new file mode 100644 index 00000000000..ea6cd2edd29 --- /dev/null +++ b/RethinkDB.svg @@ -0,0 +1,3 @@ + + + diff --git a/WINDOWS.md b/WINDOWS.md index 486f8316d4c..97c75199231 100644 --- a/WINDOWS.md +++ b/WINDOWS.md @@ -18,6 +18,7 @@ setup.exe -q -P make setup.exe -q -P curl + setup.exe -q -P wget setup.exe -q -P patch setup.exe -q -P git diff --git a/admin/README.md b/admin/README.md index 0f301caf889..ff425ea0f78 100644 --- a/admin/README.md +++ b/admin/README.md @@ -18,6 +18,9 @@ The build dependencies are - Bump the version in `mk/support/pkg/admin-deps.sh` (this ensures make will download new dependencies if necessary) - Check in the changes to `npm-shrinkwrap.json`, `package.json` and `admin-deps.sh` +### Updating the rethinkdb JS driver +To update the rethinkdb JavaScript driver, replace the content of the external/rethinkdb_js directory. + ## Organization - `favicon.ico`: The favicon... - `Makefile`: To build from `/admin` diff --git a/admin/build.mk b/admin/build.mk index cbe5736c4cf..03d72cf33b0 100644 --- a/admin/build.mk +++ b/admin/build.mk @@ -4,7 +4,12 @@ WEB_ASSETS_SRC_FILES := $(shell find $(TOP)/admin -path $(TOP)/admin/node_module ALL_WEB_ASSETS := $(BUILD_ROOT_DIR)/web-assets -$(BUILD_ROOT_DIR)/web-assets: $(WEB_ASSETS_SRC_FILES) $(JS_BUILD_DIR)/rethinkdb.js | $(GULP_BIN_DEP) +$(BUILD_ROOT_DIR)/packages/js: + @mkdir -p $@ + @cp -r $(TOP)/external/rethinkdb_js_2.4.2/* $@ + @cd $@ && npm install + +$(BUILD_ROOT_DIR)/web-assets: $(WEB_ASSETS_SRC_FILES) $(BUILD_ROOT_DIR)/packages/js | $(GULP_BIN_DEP) $P GULP $(GULP) build --cwd $(TOP)/admin $(if $(filter $(VERBOSE),0), --silent) --version $(RETHINKDB_VERSION) $(if $(filter $(UGLIFY),1), --uglify) touch $@ @@ -16,22 +21,6 @@ web-assets-watch: .PHONY: web-assets web-assets: $(ALL_WEB_ASSETS) -ifeq (1,$(USE_PRECOMPILED_WEB_ASSETS)) - -$(BUILD_ROOT_DIR)/bundle_assets/web_assets.cc: $(PRECOMPILED_DIR)/bundle_assets/web_assets.cc | $(BUILD_ROOT_DIR)/bundle_assets/. - $P CP - cp -f $< $@ - -else # Don't use precompiled assets - -ifeq ($(OS),Windows) -$(BUILD_ROOT_DIR)/bundle_assets/web_%.cc $(BUILD_ROOT_DIR)/bundle_assets/web_%.rc: $(TOP)/scripts/build-web-%-rc.py $(ALL_WEB_ASSETS) | $(BUILD_ROOT_DIR)/bundle_assets/. - $P GENERATE - $(TOP)/scripts/build-web-assets-rc.py $(WEB_ASSETS_BUILD_DIR) $(dir $@) -else -$(BUILD_ROOT_DIR)/bundle_assets/web_assets.cc: $(TOP)/scripts/compile-web-assets.py $(ALL_WEB_ASSETS) | $(BUILD_ROOT_DIR)/bundle_assets/. - $P GENERATE - $(TOP)/scripts/compile-web-assets.py $(WEB_ASSETS_BUILD_DIR) > $@ -endif - -endif +.PHONY: generate-web-assets-cc +generate-web-assets-cc: web-assets + $(TOP)/scripts/compile-web-assets.py $(TOP)/build/web_assets > src/gen/web_assets.cc diff --git a/admin/npm-shrinkwrap.json b/admin/npm-shrinkwrap.json old mode 100755 new mode 100644 index 09d6515a7bf..bd71b19e09e --- a/admin/npm-shrinkwrap.json +++ b/admin/npm-shrinkwrap.json @@ -1,348 +1,603 @@ { "name": "rethinkdb-webui", "version": "2.0.0", + "lockfileVersion": 1, + "requires": true, "dependencies": { "array-uniq": { "version": "1.0.3", - "from": "array-uniq@1.0.3", - "resolved": "https://registry.npmjs.org/array-uniq/-/array-uniq-1.0.3.tgz" + "resolved": "https://registry.npmjs.org/array-uniq/-/array-uniq-1.0.3.tgz", + "integrity": "sha1-r2rId6Jcx/dOBYiUdThY39sk/bY=" }, "bluebird": { "version": "2.11.0", - "from": "bluebird@>=2.3.2 <3.0.0", - "resolved": "https://registry.npmjs.org/bluebird/-/bluebird-2.11.0.tgz" + "resolved": "https://registry.npmjs.org/bluebird/-/bluebird-2.11.0.tgz", + "integrity": "sha1-U0uQM8AiyVecVro7Plpcqvu2UOE=" }, "browserify": { "version": "13.1.0", - "from": "browserify@>=13.1.0 <14.0.0", "resolved": "https://registry.npmjs.org/browserify/-/browserify-13.1.0.tgz", + "integrity": "sha1-2BoBjpjdfKcG7AQlPSD4oDsq+K4=", + "requires": { + "JSONStream": "^1.0.3", + "assert": "~1.3.0", + "browser-pack": "^6.0.1", + "browser-resolve": "^1.11.0", + "browserify-zlib": "~0.1.2", + "buffer": "^4.1.0", + "concat-stream": "~1.5.1", + "console-browserify": "^1.1.0", + "constants-browserify": "~1.0.0", + "crypto-browserify": "^3.0.0", + "defined": "^1.0.0", + "deps-sort": "^2.0.0", + "domain-browser": "~1.1.0", + "duplexer2": "~0.1.2", + "events": "~1.1.0", + "glob": "^5.0.15", + "has": "^1.0.0", + "htmlescape": "^1.1.0", + "https-browserify": "~0.0.0", + "inherits": "~2.0.1", + "insert-module-globals": "^7.0.0", + "labeled-stream-splicer": "^2.0.0", + "module-deps": "^4.0.2", + "os-browserify": "~0.1.1", + "parents": "^1.0.1", + "path-browserify": "~0.0.0", + "process": "~0.11.0", + "punycode": "^1.3.2", + "querystring-es3": "~0.2.0", + "read-only-stream": "^2.0.0", + "readable-stream": "^2.0.2", + "resolve": "^1.1.4", + "shasum": "^1.0.0", + "shell-quote": "^1.4.3", + "stream-browserify": "^2.0.0", + "stream-http": "^2.0.0", + "string_decoder": "~0.10.0", + "subarg": "^1.0.0", + "syntax-error": "^1.1.1", + "through2": "^2.0.0", + "timers-browserify": "^1.0.1", + "tty-browserify": "~0.0.0", + "url": "~0.11.0", + "util": "~0.10.1", + "vm-browserify": "~0.0.1", + "xtend": "^4.0.0" + }, "dependencies": { "JSONStream": { "version": "1.1.4", - "from": "JSONStream@>=1.0.3 <2.0.0", "resolved": "https://registry.npmjs.org/JSONStream/-/JSONStream-1.1.4.tgz", + "integrity": "sha1-vhGklZOOiC0nd3PRGYbzl0qLo3o=", + "requires": { + "jsonparse": "^1.2.0", + "through": ">=2.2.7 <3" + }, "dependencies": { "jsonparse": { "version": "1.2.0", - "from": "jsonparse@>=1.2.0 <2.0.0", - "resolved": "https://registry.npmjs.org/jsonparse/-/jsonparse-1.2.0.tgz" + "resolved": "https://registry.npmjs.org/jsonparse/-/jsonparse-1.2.0.tgz", + "integrity": "sha1-XAxWhRBxYOcv50ib3eoLRMK8Z70=" } } }, "assert": { "version": "1.3.0", - "from": "assert@>=1.3.0 <1.4.0", - "resolved": "https://registry.npmjs.org/assert/-/assert-1.3.0.tgz" + "resolved": "https://registry.npmjs.org/assert/-/assert-1.3.0.tgz", + "integrity": "sha1-A5OaYiWCqBLMICMgoLmlbJuBWEk=", + "requires": { + "util": "0.10.3" + } }, "browser-pack": { "version": "6.0.1", - "from": "browser-pack@>=6.0.1 <7.0.0", "resolved": "https://registry.npmjs.org/browser-pack/-/browser-pack-6.0.1.tgz", + "integrity": "sha1-d5iHx5LqofZKRqIsjxBRzc2WdV8=", + "requires": { + "JSONStream": "^1.0.3", + "combine-source-map": "~0.7.1", + "defined": "^1.0.0", + "through2": "^2.0.0", + "umd": "^3.0.0" + }, "dependencies": { "umd": { "version": "3.0.1", - "from": "umd@>=3.0.0 <4.0.0", - "resolved": "https://registry.npmjs.org/umd/-/umd-3.0.1.tgz" + "resolved": "https://registry.npmjs.org/umd/-/umd-3.0.1.tgz", + "integrity": "sha1-iuVW4RAR9jwllnCKiDclnwGz1g4=" } } }, "browser-resolve": { "version": "1.11.2", - "from": "browser-resolve@>=1.11.0 <2.0.0", - "resolved": "https://registry.npmjs.org/browser-resolve/-/browser-resolve-1.11.2.tgz" + "resolved": "https://registry.npmjs.org/browser-resolve/-/browser-resolve-1.11.2.tgz", + "integrity": "sha1-j/CbCixCFxihBRwmCzLkj0QpOM4=", + "requires": { + "resolve": "1.1.7" + } }, "browserify-zlib": { "version": "0.1.4", - "from": "browserify-zlib@>=0.1.2 <0.2.0", "resolved": "https://registry.npmjs.org/browserify-zlib/-/browserify-zlib-0.1.4.tgz", + "integrity": "sha1-uzX4pRn2AOD6a4SFJByXnQFB+y0=", + "requires": { + "pako": "~0.2.0" + }, "dependencies": { "pako": { "version": "0.2.9", - "from": "pako@>=0.2.0 <0.3.0", - "resolved": "https://registry.npmjs.org/pako/-/pako-0.2.9.tgz" + "resolved": "https://registry.npmjs.org/pako/-/pako-0.2.9.tgz", + "integrity": "sha1-8/dSL073gjSNqBYbrZ7P1Rv4OnU=" } } }, "buffer": { "version": "4.9.1", - "from": "buffer@>=4.1.0 <5.0.0", "resolved": "https://registry.npmjs.org/buffer/-/buffer-4.9.1.tgz", + "integrity": "sha1-bRu2AbB6TvztlwlBMgkwJ8lbwpg=", + "requires": { + "base64-js": "^1.0.2", + "ieee754": "^1.1.4", + "isarray": "^1.0.0" + }, "dependencies": { "base64-js": { "version": "1.1.2", - "from": "base64-js@>=1.0.2 <2.0.0", - "resolved": "https://registry.npmjs.org/base64-js/-/base64-js-1.1.2.tgz" + "resolved": "https://registry.npmjs.org/base64-js/-/base64-js-1.1.2.tgz", + "integrity": "sha1-1kAMrBxMZgl22Q0HoENR2JOV9eg=" }, "ieee754": { "version": "1.1.6", - "from": "ieee754@>=1.1.4 <2.0.0", - "resolved": "https://registry.npmjs.org/ieee754/-/ieee754-1.1.6.tgz" + "resolved": "https://registry.npmjs.org/ieee754/-/ieee754-1.1.6.tgz", + "integrity": "sha1-LhATIZxtZxKXPsVNmB7BnlV53pc=" }, "isarray": { "version": "1.0.0", - "from": "isarray@>=1.0.0 <2.0.0", - "resolved": "https://registry.npmjs.org/isarray/-/isarray-1.0.0.tgz" + "resolved": "https://registry.npmjs.org/isarray/-/isarray-1.0.0.tgz", + "integrity": "sha1-u5NdSFgsuhaMBoNJV6VKPgcSTxE=" + } + } + }, + "combine-source-map": { + "version": "0.7.2", + "resolved": "https://registry.npmjs.org/combine-source-map/-/combine-source-map-0.7.2.tgz", + "integrity": "sha1-CHAxKFazB6h8xKxIbzqaYq7MwJ4=", + "requires": { + "convert-source-map": "~1.1.0", + "inline-source-map": "~0.6.0", + "lodash.memoize": "~3.0.3", + "source-map": "~0.5.3" + }, + "dependencies": { + "inline-source-map": { + "version": "0.6.2", + "resolved": "https://registry.npmjs.org/inline-source-map/-/inline-source-map-0.6.2.tgz", + "integrity": "sha1-+Tk0ccGKedFyT4Y/o4tYY3Ct4qU=", + "requires": { + "source-map": "~0.5.3" + } + }, + "lodash.memoize": { + "version": "3.0.4", + "resolved": "https://registry.npmjs.org/lodash.memoize/-/lodash.memoize-3.0.4.tgz", + "integrity": "sha1-LcvSwofLwKVcxCMovQxzYVDVPj8=" + }, + "source-map": { + "version": "0.5.6", + "resolved": "https://registry.npmjs.org/source-map/-/source-map-0.5.6.tgz", + "integrity": "sha1-dc449SvwczxafwwRjYEzSiu19BI=" } } }, "concat-stream": { "version": "1.5.2", - "from": "concat-stream@>=1.5.1 <1.6.0", "resolved": "https://registry.npmjs.org/concat-stream/-/concat-stream-1.5.2.tgz", + "integrity": "sha1-cIl4Yk2FavQaWnQd790mHadSwmY=", + "requires": { + "inherits": "~2.0.1", + "readable-stream": "~2.0.0", + "typedarray": "~0.0.5" + }, "dependencies": { - "typedarray": { - "version": "0.0.6", - "from": "typedarray@>=0.0.5 <0.1.0", - "resolved": "https://registry.npmjs.org/typedarray/-/typedarray-0.0.6.tgz" - }, "readable-stream": { "version": "2.0.6", - "from": "readable-stream@>=2.0.0 <2.1.0", "resolved": "https://registry.npmjs.org/readable-stream/-/readable-stream-2.0.6.tgz", + "integrity": "sha1-j5A0HmilPMySh4jaz80Rs265t44=", + "requires": { + "core-util-is": "~1.0.0", + "inherits": "~2.0.1", + "isarray": "~1.0.0", + "process-nextick-args": "~1.0.6", + "string_decoder": "~0.10.x", + "util-deprecate": "~1.0.1" + }, "dependencies": { "core-util-is": { "version": "1.0.2", - "from": "core-util-is@>=1.0.0 <1.1.0", - "resolved": "https://registry.npmjs.org/core-util-is/-/core-util-is-1.0.2.tgz" + "resolved": "https://registry.npmjs.org/core-util-is/-/core-util-is-1.0.2.tgz", + "integrity": "sha1-tf1UIgqivFq1eqtxQMlAdUUDwac=" }, "isarray": { "version": "1.0.0", - "from": "isarray@>=1.0.0 <1.1.0", - "resolved": "https://registry.npmjs.org/isarray/-/isarray-1.0.0.tgz" + "resolved": "https://registry.npmjs.org/isarray/-/isarray-1.0.0.tgz", + "integrity": "sha1-u5NdSFgsuhaMBoNJV6VKPgcSTxE=" }, "process-nextick-args": { "version": "1.0.7", - "from": "process-nextick-args@>=1.0.6 <1.1.0", - "resolved": "https://registry.npmjs.org/process-nextick-args/-/process-nextick-args-1.0.7.tgz" + "resolved": "https://registry.npmjs.org/process-nextick-args/-/process-nextick-args-1.0.7.tgz", + "integrity": "sha1-FQ4gt1ZZCtP5EJPyWk8q2L/zC6M=" }, "util-deprecate": { "version": "1.0.2", - "from": "util-deprecate@>=1.0.1 <1.1.0", - "resolved": "https://registry.npmjs.org/util-deprecate/-/util-deprecate-1.0.2.tgz" + "resolved": "https://registry.npmjs.org/util-deprecate/-/util-deprecate-1.0.2.tgz", + "integrity": "sha1-RQ1Nyfpw3nMnYvvS1KKJgUGaDM8=" } } + }, + "typedarray": { + "version": "0.0.6", + "resolved": "https://registry.npmjs.org/typedarray/-/typedarray-0.0.6.tgz", + "integrity": "sha1-hnrHTjhkGHsdPUfZlqeOxciDB3c=" } } }, "console-browserify": { "version": "1.1.0", - "from": "console-browserify@>=1.1.0 <2.0.0", "resolved": "https://registry.npmjs.org/console-browserify/-/console-browserify-1.1.0.tgz", + "integrity": "sha1-8CQcRXMKn8YyOyBtvzjtx0HQuxA=", + "requires": { + "date-now": "^0.1.4" + }, "dependencies": { "date-now": { "version": "0.1.4", - "from": "date-now@>=0.1.4 <0.2.0", - "resolved": "https://registry.npmjs.org/date-now/-/date-now-0.1.4.tgz" + "resolved": "https://registry.npmjs.org/date-now/-/date-now-0.1.4.tgz", + "integrity": "sha1-6vQ5/U1ISK105cx9vvIAZyueNFs=" } } }, "constants-browserify": { "version": "1.0.0", - "from": "constants-browserify@>=1.0.0 <1.1.0", - "resolved": "https://registry.npmjs.org/constants-browserify/-/constants-browserify-1.0.0.tgz" + "resolved": "https://registry.npmjs.org/constants-browserify/-/constants-browserify-1.0.0.tgz", + "integrity": "sha1-wguW2MYXdIqvHBYCF2DNJ/y4y3U=" }, "crypto-browserify": { "version": "3.11.0", - "from": "crypto-browserify@>=3.0.0 <4.0.0", "resolved": "https://registry.npmjs.org/crypto-browserify/-/crypto-browserify-3.11.0.tgz", + "integrity": "sha1-NlKgkGq5sqfgw85mpAjpV6JIVSI=", + "requires": { + "browserify-cipher": "^1.0.0", + "browserify-sign": "^4.0.0", + "create-ecdh": "^4.0.0", + "create-hash": "^1.1.0", + "create-hmac": "^1.1.0", + "diffie-hellman": "^5.0.0", + "inherits": "^2.0.1", + "pbkdf2": "^3.0.3", + "public-encrypt": "^4.0.0", + "randombytes": "^2.0.0" + }, "dependencies": { + "bn.js": { + "version": "4.11.6", + "resolved": "https://registry.npmjs.org/bn.js/-/bn.js-4.11.6.tgz", + "integrity": "sha1-UzRK2xRhehP26N0s4okF0cC6MhU=" + }, + "brorand": { + "version": "1.0.6", + "resolved": "https://registry.npmjs.org/brorand/-/brorand-1.0.6.tgz", + "integrity": "sha1-QChwa5FfkfezSaLgvzw3YDnSFuU=" + }, + "browserify-aes": { + "version": "1.0.6", + "resolved": "https://registry.npmjs.org/browserify-aes/-/browserify-aes-1.0.6.tgz", + "integrity": "sha1-Xncl297x/Vkw1OurSFZ85FHEigo=", + "requires": { + "buffer-xor": "^1.0.2", + "cipher-base": "^1.0.0", + "create-hash": "^1.1.0", + "evp_bytestokey": "^1.0.0", + "inherits": "^2.0.1" + }, + "dependencies": { + "buffer-xor": { + "version": "1.0.3", + "resolved": "https://registry.npmjs.org/buffer-xor/-/buffer-xor-1.0.3.tgz", + "integrity": "sha1-JuYe0UIvtw3ULm42cp7VHYVf6Nk=" + } + } + }, "browserify-cipher": { "version": "1.0.0", - "from": "browserify-cipher@>=1.0.0 <2.0.0", "resolved": "https://registry.npmjs.org/browserify-cipher/-/browserify-cipher-1.0.0.tgz", + "integrity": "sha1-mYgkSHS/XtTijalWZtzWasj8Njo=", + "requires": { + "browserify-aes": "^1.0.4", + "browserify-des": "^1.0.0", + "evp_bytestokey": "^1.0.0" + }, "dependencies": { "browserify-des": { "version": "1.0.0", - "from": "browserify-des@>=1.0.0 <2.0.0", "resolved": "https://registry.npmjs.org/browserify-des/-/browserify-des-1.0.0.tgz", + "integrity": "sha1-2qJ3cXRwki7S/hhZQRihdUOXId0=", + "requires": { + "cipher-base": "^1.0.1", + "des.js": "^1.0.0", + "inherits": "^2.0.1" + }, "dependencies": { "des.js": { "version": "1.0.0", - "from": "des.js@>=1.0.0 <2.0.0", - "resolved": "https://registry.npmjs.org/des.js/-/des.js-1.0.0.tgz" + "resolved": "https://registry.npmjs.org/des.js/-/des.js-1.0.0.tgz", + "integrity": "sha1-wHTS4qpqipoH29YfmhXCzYPsjsw=", + "requires": { + "inherits": "^2.0.1", + "minimalistic-assert": "^1.0.0" + } } } } } }, + "browserify-rsa": { + "version": "4.0.1", + "resolved": "https://registry.npmjs.org/browserify-rsa/-/browserify-rsa-4.0.1.tgz", + "integrity": "sha1-IeCr+vbyApzy+vsTNWenAdQTVSQ=", + "requires": { + "bn.js": "^4.1.0", + "randombytes": "^2.0.1" + } + }, "browserify-sign": { "version": "4.0.0", - "from": "browserify-sign@>=4.0.0 <5.0.0", - "resolved": "https://registry.npmjs.org/browserify-sign/-/browserify-sign-4.0.0.tgz" + "resolved": "https://registry.npmjs.org/browserify-sign/-/browserify-sign-4.0.0.tgz", + "integrity": "sha1-EHc5EMPCBtVCCkaq2GlPgguFlo8=", + "requires": { + "bn.js": "^4.1.1", + "browserify-rsa": "^4.0.0", + "create-hash": "^1.1.0", + "create-hmac": "^1.1.2", + "elliptic": "^6.0.0", + "inherits": "^2.0.1", + "parse-asn1": "^5.0.0" + } + }, + "cipher-base": { + "version": "1.0.3", + "resolved": "https://registry.npmjs.org/cipher-base/-/cipher-base-1.0.3.tgz", + "integrity": "sha1-7qvxlEGc6QDaMBjCB9IS8qbfCgc=", + "requires": { + "inherits": "^2.0.1" + } }, "create-ecdh": { "version": "4.0.0", - "from": "create-ecdh@>=4.0.0 <5.0.0", - "resolved": "https://registry.npmjs.org/create-ecdh/-/create-ecdh-4.0.0.tgz" + "resolved": "https://registry.npmjs.org/create-ecdh/-/create-ecdh-4.0.0.tgz", + "integrity": "sha1-iIxyNZbN92EvZJgjPuvXo1MBc30=", + "requires": { + "bn.js": "^4.1.0", + "elliptic": "^6.0.0" + } }, "create-hash": { "version": "1.1.2", - "from": "create-hash@>=1.1.0 <2.0.0", "resolved": "https://registry.npmjs.org/create-hash/-/create-hash-1.1.2.tgz", + "integrity": "sha1-USEAYte7dHn2xlu0GpIgix1hq60=", + "requires": { + "cipher-base": "^1.0.1", + "inherits": "^2.0.1", + "ripemd160": "^1.0.0", + "sha.js": "^2.3.6" + }, "dependencies": { "ripemd160": { "version": "1.0.1", - "from": "ripemd160@>=1.0.0 <2.0.0", - "resolved": "https://registry.npmjs.org/ripemd160/-/ripemd160-1.0.1.tgz" + "resolved": "https://registry.npmjs.org/ripemd160/-/ripemd160-1.0.1.tgz", + "integrity": "sha1-k6S71JQrxXS2mo+lfHHeEOzKfW4=" } } }, "create-hmac": { "version": "1.1.4", - "from": "create-hmac@>=1.1.0 <2.0.0", - "resolved": "https://registry.npmjs.org/create-hmac/-/create-hmac-1.1.4.tgz" + "resolved": "https://registry.npmjs.org/create-hmac/-/create-hmac-1.1.4.tgz", + "integrity": "sha1-0/tLolPriz9W456i+8uK90e9MXA=", + "requires": { + "create-hash": "^1.1.0", + "inherits": "^2.0.1" + } }, "diffie-hellman": { "version": "5.0.2", - "from": "diffie-hellman@>=5.0.0 <6.0.0", "resolved": "https://registry.npmjs.org/diffie-hellman/-/diffie-hellman-5.0.2.tgz", + "integrity": "sha1-tYNXOScM/ias9jIJn97SoH8gnl4=", + "requires": { + "bn.js": "^4.1.0", + "miller-rabin": "^4.0.0", + "randombytes": "^2.0.0" + }, "dependencies": { "miller-rabin": { "version": "4.0.0", - "from": "miller-rabin@>=4.0.0 <5.0.0", - "resolved": "https://registry.npmjs.org/miller-rabin/-/miller-rabin-4.0.0.tgz" - } - } - }, - "pbkdf2": { - "version": "3.0.6", - "from": "pbkdf2@>=3.0.3 <4.0.0", - "resolved": "https://registry.npmjs.org/pbkdf2/-/pbkdf2-3.0.6.tgz" - }, - "public-encrypt": { - "version": "4.0.0", - "from": "public-encrypt@>=4.0.0 <5.0.0", - "resolved": "https://registry.npmjs.org/public-encrypt/-/public-encrypt-4.0.0.tgz" - }, - "randombytes": { - "version": "2.0.3", - "from": "randombytes@>=2.0.0 <3.0.0", - "resolved": "https://registry.npmjs.org/randombytes/-/randombytes-2.0.3.tgz" - }, - "brorand": { - "version": "1.0.6", - "from": "brorand@1.0.6", - "resolved": "https://registry.npmjs.org/brorand/-/brorand-1.0.6.tgz" - }, - "bn.js": { - "version": "4.11.6", - "from": "bn.js@4.11.6", - "resolved": "https://registry.npmjs.org/bn.js/-/bn.js-4.11.6.tgz" - }, - "browserify-rsa": { - "version": "4.0.1", - "from": "browserify-rsa@4.0.1", - "resolved": "https://registry.npmjs.org/browserify-rsa/-/browserify-rsa-4.0.1.tgz" - }, - "cipher-base": { - "version": "1.0.3", - "from": "cipher-base@1.0.3", - "resolved": "https://registry.npmjs.org/cipher-base/-/cipher-base-1.0.3.tgz" - }, - "evp_bytestokey": { - "version": "1.0.0", - "from": "evp_bytestokey@1.0.0", - "resolved": "https://registry.npmjs.org/evp_bytestokey/-/evp_bytestokey-1.0.0.tgz" - }, - "minimalistic-assert": { - "version": "1.0.0", - "from": "minimalistic-assert@1.0.0", - "resolved": "https://registry.npmjs.org/minimalistic-assert/-/minimalistic-assert-1.0.0.tgz" - }, - "browserify-aes": { - "version": "1.0.6", - "from": "browserify-aes@1.0.6", - "resolved": "https://registry.npmjs.org/browserify-aes/-/browserify-aes-1.0.6.tgz", - "dependencies": { - "buffer-xor": { - "version": "1.0.3", - "from": "buffer-xor@>=1.0.2 <2.0.0", - "resolved": "https://registry.npmjs.org/buffer-xor/-/buffer-xor-1.0.3.tgz" + "resolved": "https://registry.npmjs.org/miller-rabin/-/miller-rabin-4.0.0.tgz", + "integrity": "sha1-SmL7HUKTPAVYOYL0xxb2+55sbT0=", + "requires": { + "bn.js": "^4.0.0", + "brorand": "^1.0.1" + } } } }, "elliptic": { "version": "6.3.1", - "from": "elliptic@6.3.1", "resolved": "https://registry.npmjs.org/elliptic/-/elliptic-6.3.1.tgz", + "integrity": "sha1-F3gfIQmrDsaGsUa9z/XS6Mauzto=", + "requires": { + "bn.js": "^4.4.0", + "brorand": "^1.0.1", + "hash.js": "^1.0.0", + "inherits": "^2.0.1" + }, "dependencies": { "hash.js": { "version": "1.0.3", - "from": "hash.js@>=1.0.0 <2.0.0", - "resolved": "https://registry.npmjs.org/hash.js/-/hash.js-1.0.3.tgz" + "resolved": "https://registry.npmjs.org/hash.js/-/hash.js-1.0.3.tgz", + "integrity": "sha1-EzL/ABVsCg/92CNgE9B7d6BFFXM=", + "requires": { + "inherits": "^2.0.1" + } } } }, + "evp_bytestokey": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/evp_bytestokey/-/evp_bytestokey-1.0.0.tgz", + "integrity": "sha1-SXtmrZ/vZc18CKYYCCS6FHa2blM=", + "requires": { + "create-hash": "^1.1.1" + } + }, + "minimalistic-assert": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/minimalistic-assert/-/minimalistic-assert-1.0.0.tgz", + "integrity": "sha1-cCvi3aazf0g2vLP121ZkG2Sh09M=" + }, "parse-asn1": { "version": "5.0.0", - "from": "parse-asn1@5.0.0", "resolved": "https://registry.npmjs.org/parse-asn1/-/parse-asn1-5.0.0.tgz", + "integrity": "sha1-NQYPbVAV03Yox3D04JGgtaJ4vCM=", + "requires": { + "asn1.js": "^4.0.0", + "browserify-aes": "^1.0.0", + "create-hash": "^1.1.0", + "evp_bytestokey": "^1.0.0", + "pbkdf2": "^3.0.3" + }, "dependencies": { "asn1.js": { "version": "4.8.0", - "from": "asn1.js@>=4.0.0 <5.0.0", - "resolved": "https://registry.npmjs.org/asn1.js/-/asn1.js-4.8.0.tgz" + "resolved": "https://registry.npmjs.org/asn1.js/-/asn1.js-4.8.0.tgz", + "integrity": "sha1-4OBOmSMxkWO+Rq7Z5TeJc7Fh7xM=", + "requires": { + "bn.js": "^4.0.0", + "inherits": "^2.0.1", + "minimalistic-assert": "^1.0.0" + } } } + }, + "pbkdf2": { + "version": "3.0.6", + "resolved": "https://registry.npmjs.org/pbkdf2/-/pbkdf2-3.0.6.tgz", + "integrity": "sha1-lD0onM2Ss97FXMd91pbUTWCH6L0=", + "requires": { + "create-hmac": "^1.1.2" + } + }, + "public-encrypt": { + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/public-encrypt/-/public-encrypt-4.0.0.tgz", + "integrity": "sha1-OfaZ86RlYN1eusvKaTyvfGXBjMY=", + "requires": { + "bn.js": "^4.1.0", + "browserify-rsa": "^4.0.0", + "create-hash": "^1.1.0", + "parse-asn1": "^5.0.0", + "randombytes": "^2.0.1" + } + }, + "randombytes": { + "version": "2.0.3", + "resolved": "https://registry.npmjs.org/randombytes/-/randombytes-2.0.3.tgz", + "integrity": "sha1-Z0yZdgkBw8QRJ3GjHlIdw0nMCew=" } } }, "deps-sort": { "version": "2.0.0", - "from": "deps-sort@>=2.0.0 <3.0.0", - "resolved": "https://registry.npmjs.org/deps-sort/-/deps-sort-2.0.0.tgz" + "resolved": "https://registry.npmjs.org/deps-sort/-/deps-sort-2.0.0.tgz", + "integrity": "sha1-CRckkC6EZYJg65EHSMzNGvbiH7U=", + "requires": { + "JSONStream": "^1.0.3", + "shasum": "^1.0.0", + "subarg": "^1.0.0", + "through2": "^2.0.0" + } }, "domain-browser": { "version": "1.1.7", - "from": "domain-browser@>=1.1.0 <1.2.0", - "resolved": "https://registry.npmjs.org/domain-browser/-/domain-browser-1.1.7.tgz" + "resolved": "https://registry.npmjs.org/domain-browser/-/domain-browser-1.1.7.tgz", + "integrity": "sha1-hnqksJP6oF8d4IwG9NeyH9+GmLw=" }, "duplexer2": { "version": "0.1.4", - "from": "duplexer2@>=0.1.2 <0.2.0", - "resolved": "https://registry.npmjs.org/duplexer2/-/duplexer2-0.1.4.tgz" + "resolved": "https://registry.npmjs.org/duplexer2/-/duplexer2-0.1.4.tgz", + "integrity": "sha1-ixLauHjA1p4+eJEFFmKjL8a93ME=", + "requires": { + "readable-stream": "^2.0.2" + } }, "events": { "version": "1.1.1", - "from": "events@>=1.1.0 <1.2.0", - "resolved": "https://registry.npmjs.org/events/-/events-1.1.1.tgz" + "resolved": "https://registry.npmjs.org/events/-/events-1.1.1.tgz", + "integrity": "sha1-nr23Y1rQmccNzEwqH1AEKI6L2SQ=" }, "glob": { "version": "5.0.15", - "from": "glob@>=5.0.15 <6.0.0", "resolved": "https://registry.npmjs.org/glob/-/glob-5.0.15.tgz", + "integrity": "sha1-G8k2ueAvSmA/zCIuz3Yz0wuLk7E=", + "requires": { + "inflight": "^1.0.4", + "inherits": "2", + "minimatch": "2 || 3", + "once": "^1.3.0", + "path-is-absolute": "^1.0.0" + }, "dependencies": { "inflight": { "version": "1.0.5", - "from": "inflight@>=1.0.4 <2.0.0", "resolved": "https://registry.npmjs.org/inflight/-/inflight-1.0.5.tgz", + "integrity": "sha1-2zIEzVqd4ubNiQuFxuL2a89PYgo=", + "requires": { + "once": "^1.3.0", + "wrappy": "1" + }, "dependencies": { "wrappy": { "version": "1.0.2", - "from": "wrappy@>=1.0.0 <2.0.0", - "resolved": "https://registry.npmjs.org/wrappy/-/wrappy-1.0.2.tgz" + "resolved": "https://registry.npmjs.org/wrappy/-/wrappy-1.0.2.tgz", + "integrity": "sha1-tSQ9jz7BqjXxNkYFvA0QNuMKtp8=" } } }, "minimatch": { "version": "3.0.3", - "from": "minimatch@>=2.0.0 <3.0.0||>=3.0.0 <4.0.0", "resolved": "https://registry.npmjs.org/minimatch/-/minimatch-3.0.3.tgz", + "integrity": "sha1-Kk5AkLlrLbBqnX3wEFWmKnfJt3Q=", + "requires": { + "brace-expansion": "^1.0.0" + }, "dependencies": { "brace-expansion": { "version": "1.1.6", - "from": "brace-expansion@>=1.0.0 <2.0.0", "resolved": "https://registry.npmjs.org/brace-expansion/-/brace-expansion-1.1.6.tgz", + "integrity": "sha1-cZfX6qm4fmSDkOph/GbIRCdCDfk=", + "requires": { + "balanced-match": "^0.4.1", + "concat-map": "0.0.1" + }, "dependencies": { "balanced-match": { "version": "0.4.2", - "from": "balanced-match@>=0.4.1 <0.5.0", - "resolved": "https://registry.npmjs.org/balanced-match/-/balanced-match-0.4.2.tgz" + "resolved": "https://registry.npmjs.org/balanced-match/-/balanced-match-0.4.2.tgz", + "integrity": "sha1-yz8+PHMtwPAe5wtAPzAuYddwmDg=" }, "concat-map": { "version": "0.0.1", - "from": "concat-map@0.0.1", - "resolved": "https://registry.npmjs.org/concat-map/-/concat-map-0.0.1.tgz" + "resolved": "https://registry.npmjs.org/concat-map/-/concat-map-0.0.1.tgz", + "integrity": "sha1-2Klr13/Wjfd5OnMDajug1UBdR3s=" } } } @@ -350,69 +605,91 @@ }, "once": { "version": "1.4.0", - "from": "once@>=1.3.0 <2.0.0", "resolved": "https://registry.npmjs.org/once/-/once-1.4.0.tgz", + "integrity": "sha1-WDsap3WWHUsROsF9nFC6753Xa9E=", + "requires": { + "wrappy": "1" + }, "dependencies": { "wrappy": { "version": "1.0.2", - "from": "wrappy@>=1.0.0 <2.0.0", - "resolved": "https://registry.npmjs.org/wrappy/-/wrappy-1.0.2.tgz" + "resolved": "https://registry.npmjs.org/wrappy/-/wrappy-1.0.2.tgz", + "integrity": "sha1-tSQ9jz7BqjXxNkYFvA0QNuMKtp8=" } } }, "path-is-absolute": { "version": "1.0.0", - "from": "path-is-absolute@>=1.0.0 <2.0.0", - "resolved": "https://registry.npmjs.org/path-is-absolute/-/path-is-absolute-1.0.0.tgz" + "resolved": "https://registry.npmjs.org/path-is-absolute/-/path-is-absolute-1.0.0.tgz", + "integrity": "sha1-Jj2tpmqz8vsQv3+dJN2PPlcO+RI=" } } }, "has": { "version": "1.0.1", - "from": "has@>=1.0.0 <2.0.0", "resolved": "https://registry.npmjs.org/has/-/has-1.0.1.tgz", + "integrity": "sha1-hGFzP1OLCDfJNh45qauelwTcLyg=", + "requires": { + "function-bind": "^1.0.2" + }, "dependencies": { "function-bind": { "version": "1.1.0", - "from": "function-bind@>=1.0.2 <2.0.0", - "resolved": "https://registry.npmjs.org/function-bind/-/function-bind-1.1.0.tgz" + "resolved": "https://registry.npmjs.org/function-bind/-/function-bind-1.1.0.tgz", + "integrity": "sha1-FhdnFMgBeY5Ojyz391KUZ7tKV3E=" } } }, "htmlescape": { "version": "1.1.1", - "from": "htmlescape@>=1.1.0 <2.0.0", - "resolved": "https://registry.npmjs.org/htmlescape/-/htmlescape-1.1.1.tgz" + "resolved": "https://registry.npmjs.org/htmlescape/-/htmlescape-1.1.1.tgz", + "integrity": "sha1-OgPtwiFLyjtmQko+eVk0lQnLA1E=" }, "https-browserify": { "version": "0.0.1", - "from": "https-browserify@>=0.0.0 <0.1.0", - "resolved": "https://registry.npmjs.org/https-browserify/-/https-browserify-0.0.1.tgz" + "resolved": "https://registry.npmjs.org/https-browserify/-/https-browserify-0.0.1.tgz", + "integrity": "sha1-P5E2XKvmC3ftDruiS0VOPgnZWoI=" }, "insert-module-globals": { "version": "7.0.1", - "from": "insert-module-globals@>=7.0.0 <8.0.0", "resolved": "https://registry.npmjs.org/insert-module-globals/-/insert-module-globals-7.0.1.tgz", + "integrity": "sha1-wDv04BywhtW15azorQr+eInWOMM=", + "requires": { + "JSONStream": "^1.0.3", + "combine-source-map": "~0.7.1", + "concat-stream": "~1.5.1", + "is-buffer": "^1.1.0", + "lexical-scope": "^1.2.0", + "process": "~0.11.0", + "through2": "^2.0.0", + "xtend": "^4.0.0" + }, "dependencies": { "is-buffer": { "version": "1.1.4", - "from": "is-buffer@>=1.1.0 <2.0.0", - "resolved": "https://registry.npmjs.org/is-buffer/-/is-buffer-1.1.4.tgz" + "resolved": "https://registry.npmjs.org/is-buffer/-/is-buffer-1.1.4.tgz", + "integrity": "sha1-z8hszV3FpS+oBIkRHGkgxFfi2Ys=" }, "lexical-scope": { "version": "1.2.0", - "from": "lexical-scope@>=1.2.0 <2.0.0", "resolved": "https://registry.npmjs.org/lexical-scope/-/lexical-scope-1.2.0.tgz", + "integrity": "sha1-/Ope3HBKSzqHls3KQZw6CvryLfQ=", + "requires": { + "astw": "^2.0.0" + }, "dependencies": { "astw": { "version": "2.0.0", - "from": "astw@>=2.0.0 <3.0.0", "resolved": "https://registry.npmjs.org/astw/-/astw-2.0.0.tgz", + "integrity": "sha1-CBIayCiNNWEcDO7GY/bNVFYEiX0=", + "requires": { + "acorn": "^1.0.3" + }, "dependencies": { "acorn": { "version": "1.2.2", - "from": "acorn@>=1.0.3 <2.0.0", - "resolved": "https://registry.npmjs.org/acorn/-/acorn-1.2.2.tgz" + "resolved": "https://registry.npmjs.org/acorn/-/acorn-1.2.2.tgz", + "integrity": "sha1-yM4n3grMdtiW0rH6099YjZ6C8BQ=" } } } @@ -422,204 +699,296 @@ }, "labeled-stream-splicer": { "version": "2.0.0", - "from": "labeled-stream-splicer@>=2.0.0 <3.0.0", "resolved": "https://registry.npmjs.org/labeled-stream-splicer/-/labeled-stream-splicer-2.0.0.tgz", + "integrity": "sha1-pS4dE4AkwAuGscDJH2d5GLiuClk=", + "requires": { + "inherits": "^2.0.1", + "isarray": "~0.0.1", + "stream-splicer": "^2.0.0" + }, "dependencies": { "isarray": { "version": "0.0.1", - "from": "isarray@>=0.0.1 <0.1.0", - "resolved": "https://registry.npmjs.org/isarray/-/isarray-0.0.1.tgz" + "resolved": "https://registry.npmjs.org/isarray/-/isarray-0.0.1.tgz", + "integrity": "sha1-ihis/Kmo9Bd+Cav8YDiTmwXR7t8=" }, "stream-splicer": { "version": "2.0.0", - "from": "stream-splicer@>=2.0.0 <3.0.0", - "resolved": "https://registry.npmjs.org/stream-splicer/-/stream-splicer-2.0.0.tgz" + "resolved": "https://registry.npmjs.org/stream-splicer/-/stream-splicer-2.0.0.tgz", + "integrity": "sha1-G2O+Q4oTPktnHMGTUZdgAXWRDYM=", + "requires": { + "inherits": "^2.0.1", + "readable-stream": "^2.0.2" + } } } }, "module-deps": { "version": "4.0.7", - "from": "module-deps@>=4.0.2 <5.0.0", "resolved": "https://registry.npmjs.org/module-deps/-/module-deps-4.0.7.tgz", + "integrity": "sha1-7f6zk3vnNZvBSmZywi7xJIh/btI=", + "requires": { + "JSONStream": "^1.0.3", + "browser-resolve": "^1.7.0", + "concat-stream": "~1.5.0", + "defined": "^1.0.0", + "detective": "^4.0.0", + "duplexer2": "^0.1.2", + "inherits": "^2.0.1", + "parents": "^1.0.0", + "readable-stream": "^2.0.2", + "resolve": "^1.1.3", + "stream-combiner2": "^1.1.1", + "subarg": "^1.0.0", + "through2": "^2.0.0", + "xtend": "^4.0.0" + }, "dependencies": { "detective": { "version": "4.3.1", - "from": "detective@>=4.0.0 <5.0.0", "resolved": "https://registry.npmjs.org/detective/-/detective-4.3.1.tgz", + "integrity": "sha1-n7Bt0e6PDqTbzGB82jnZzh1Pcm8=", + "requires": { + "acorn": "^1.0.3", + "defined": "^1.0.0" + }, "dependencies": { "acorn": { "version": "1.2.2", - "from": "acorn@>=1.0.3 <2.0.0", - "resolved": "https://registry.npmjs.org/acorn/-/acorn-1.2.2.tgz" + "resolved": "https://registry.npmjs.org/acorn/-/acorn-1.2.2.tgz", + "integrity": "sha1-yM4n3grMdtiW0rH6099YjZ6C8BQ=" } } }, "stream-combiner2": { "version": "1.1.1", - "from": "stream-combiner2@>=1.1.1 <2.0.0", - "resolved": "https://registry.npmjs.org/stream-combiner2/-/stream-combiner2-1.1.1.tgz" + "resolved": "https://registry.npmjs.org/stream-combiner2/-/stream-combiner2-1.1.1.tgz", + "integrity": "sha1-+02KFCDqNidk4hrUeAOXvry0HL4=", + "requires": { + "duplexer2": "~0.1.0", + "readable-stream": "^2.0.2" + } } } }, "os-browserify": { "version": "0.1.2", - "from": "os-browserify@>=0.1.1 <0.2.0", - "resolved": "https://registry.npmjs.org/os-browserify/-/os-browserify-0.1.2.tgz" + "resolved": "https://registry.npmjs.org/os-browserify/-/os-browserify-0.1.2.tgz", + "integrity": "sha1-ScoCk+CxlZCl9d4Qx/JlphfY/lQ=" }, "parents": { "version": "1.0.1", - "from": "parents@>=1.0.1 <2.0.0", "resolved": "https://registry.npmjs.org/parents/-/parents-1.0.1.tgz", + "integrity": "sha1-/t1NK/GTp3dF/nHjcdc8MwfZx1E=", + "requires": { + "path-platform": "~0.11.15" + }, "dependencies": { "path-platform": { "version": "0.11.15", - "from": "path-platform@>=0.11.15 <0.12.0", - "resolved": "https://registry.npmjs.org/path-platform/-/path-platform-0.11.15.tgz" + "resolved": "https://registry.npmjs.org/path-platform/-/path-platform-0.11.15.tgz", + "integrity": "sha1-6GQhf3TDaFDwhSt43Hv31KVyG/I=" } } }, "path-browserify": { "version": "0.0.0", - "from": "path-browserify@>=0.0.0 <0.1.0", - "resolved": "https://registry.npmjs.org/path-browserify/-/path-browserify-0.0.0.tgz" + "resolved": "https://registry.npmjs.org/path-browserify/-/path-browserify-0.0.0.tgz", + "integrity": "sha1-oLhwcpquIUAFt9UDLsLLuw+0RRo=" }, "process": { "version": "0.11.9", - "from": "process@>=0.11.0 <0.12.0", - "resolved": "https://registry.npmjs.org/process/-/process-0.11.9.tgz" + "resolved": "https://registry.npmjs.org/process/-/process-0.11.9.tgz", + "integrity": "sha1-e9WtIapiU+fahoImTx4R0RwDGME=" }, "punycode": { "version": "1.3.2", - "from": "punycode@1.3.2", - "resolved": "https://registry.npmjs.org/punycode/-/punycode-1.3.2.tgz" + "resolved": "https://registry.npmjs.org/punycode/-/punycode-1.3.2.tgz", + "integrity": "sha1-llOgNvt8HuQjQvIyXM7v6jkmxI0=" }, "querystring-es3": { "version": "0.2.1", - "from": "querystring-es3@>=0.2.0 <0.3.0", - "resolved": "https://registry.npmjs.org/querystring-es3/-/querystring-es3-0.2.1.tgz" + "resolved": "https://registry.npmjs.org/querystring-es3/-/querystring-es3-0.2.1.tgz", + "integrity": "sha1-nsYfeQSYdXB9aUFFlv2Qek1xHnM=" }, "read-only-stream": { "version": "2.0.0", - "from": "read-only-stream@>=2.0.0 <3.0.0", - "resolved": "https://registry.npmjs.org/read-only-stream/-/read-only-stream-2.0.0.tgz" + "resolved": "https://registry.npmjs.org/read-only-stream/-/read-only-stream-2.0.0.tgz", + "integrity": "sha1-JyT9aoET1zdkrCiNQ4YnDB2/F/A=", + "requires": { + "readable-stream": "^2.0.2" + } }, "readable-stream": { "version": "2.1.5", - "from": "readable-stream@>=2.0.2 <3.0.0", "resolved": "https://registry.npmjs.org/readable-stream/-/readable-stream-2.1.5.tgz", + "integrity": "sha1-ZvqLcg4UOLNkaB8q0aY8YYRIydA=", + "requires": { + "buffer-shims": "^1.0.0", + "core-util-is": "~1.0.0", + "inherits": "~2.0.1", + "isarray": "~1.0.0", + "process-nextick-args": "~1.0.6", + "string_decoder": "~0.10.x", + "util-deprecate": "~1.0.1" + }, "dependencies": { "buffer-shims": { "version": "1.0.0", - "from": "buffer-shims@>=1.0.0 <2.0.0", - "resolved": "https://registry.npmjs.org/buffer-shims/-/buffer-shims-1.0.0.tgz" + "resolved": "https://registry.npmjs.org/buffer-shims/-/buffer-shims-1.0.0.tgz", + "integrity": "sha1-mXjOMXOIxkmth5MCjDR37wRKi1E=" }, "core-util-is": { "version": "1.0.2", - "from": "core-util-is@>=1.0.0 <1.1.0", - "resolved": "https://registry.npmjs.org/core-util-is/-/core-util-is-1.0.2.tgz" + "resolved": "https://registry.npmjs.org/core-util-is/-/core-util-is-1.0.2.tgz", + "integrity": "sha1-tf1UIgqivFq1eqtxQMlAdUUDwac=" }, "isarray": { "version": "1.0.0", - "from": "isarray@>=1.0.0 <1.1.0", - "resolved": "https://registry.npmjs.org/isarray/-/isarray-1.0.0.tgz" + "resolved": "https://registry.npmjs.org/isarray/-/isarray-1.0.0.tgz", + "integrity": "sha1-u5NdSFgsuhaMBoNJV6VKPgcSTxE=" }, "process-nextick-args": { "version": "1.0.7", - "from": "process-nextick-args@>=1.0.6 <1.1.0", - "resolved": "https://registry.npmjs.org/process-nextick-args/-/process-nextick-args-1.0.7.tgz" + "resolved": "https://registry.npmjs.org/process-nextick-args/-/process-nextick-args-1.0.7.tgz", + "integrity": "sha1-FQ4gt1ZZCtP5EJPyWk8q2L/zC6M=" }, "util-deprecate": { "version": "1.0.2", - "from": "util-deprecate@>=1.0.1 <1.1.0", - "resolved": "https://registry.npmjs.org/util-deprecate/-/util-deprecate-1.0.2.tgz" + "resolved": "https://registry.npmjs.org/util-deprecate/-/util-deprecate-1.0.2.tgz", + "integrity": "sha1-RQ1Nyfpw3nMnYvvS1KKJgUGaDM8=" } } }, + "sha.js": { + "version": "2.4.5", + "resolved": "https://registry.npmjs.org/sha.js/-/sha.js-2.4.5.tgz", + "integrity": "sha1-J9Fx78yCoRi5ljn/WBZgJCtQbnw=", + "requires": { + "inherits": "^2.0.1" + } + }, "shasum": { "version": "1.0.2", - "from": "shasum@>=1.0.0 <2.0.0", "resolved": "https://registry.npmjs.org/shasum/-/shasum-1.0.2.tgz", + "integrity": "sha1-5wEjENj0F/TetXEhUOVni4euVl8=", + "requires": { + "json-stable-stringify": "~0.0.0", + "sha.js": "~2.4.4" + }, "dependencies": { "json-stable-stringify": { "version": "0.0.1", - "from": "json-stable-stringify@>=0.0.0 <0.1.0", - "resolved": "https://registry.npmjs.org/json-stable-stringify/-/json-stable-stringify-0.0.1.tgz" + "resolved": "https://registry.npmjs.org/json-stable-stringify/-/json-stable-stringify-0.0.1.tgz", + "integrity": "sha1-YRwj6BTbN1Un34URk9tZ3Sryf0U=", + "requires": { + "jsonify": "~0.0.0" + } } } }, "stream-browserify": { "version": "2.0.1", - "from": "stream-browserify@>=2.0.0 <3.0.0", - "resolved": "https://registry.npmjs.org/stream-browserify/-/stream-browserify-2.0.1.tgz" + "resolved": "https://registry.npmjs.org/stream-browserify/-/stream-browserify-2.0.1.tgz", + "integrity": "sha1-ZiZu5fm9uZQKTkUUyvtDu3Hlyds=", + "requires": { + "inherits": "~2.0.1", + "readable-stream": "^2.0.2" + } }, "stream-http": { "version": "2.4.0", - "from": "stream-http@>=2.0.0 <3.0.0", "resolved": "https://registry.npmjs.org/stream-http/-/stream-http-2.4.0.tgz", + "integrity": "sha1-lZmqjiY2Z85BkODcBKHQZdNZWn4=", + "requires": { + "builtin-status-codes": "^2.0.0", + "inherits": "^2.0.1", + "readable-stream": "^2.1.0", + "to-arraybuffer": "^1.0.0", + "xtend": "^4.0.0" + }, "dependencies": { "builtin-status-codes": { "version": "2.0.0", - "from": "builtin-status-codes@>=2.0.0 <3.0.0", - "resolved": "https://registry.npmjs.org/builtin-status-codes/-/builtin-status-codes-2.0.0.tgz" + "resolved": "https://registry.npmjs.org/builtin-status-codes/-/builtin-status-codes-2.0.0.tgz", + "integrity": "sha1-byIAO6rPADzNKHr+aHIVH93FhXk=" }, "to-arraybuffer": { "version": "1.0.1", - "from": "to-arraybuffer@>=1.0.0 <2.0.0", - "resolved": "https://registry.npmjs.org/to-arraybuffer/-/to-arraybuffer-1.0.1.tgz" + "resolved": "https://registry.npmjs.org/to-arraybuffer/-/to-arraybuffer-1.0.1.tgz", + "integrity": "sha1-fSKbH8xjfkZsoIEYCDanqr/4P0M=" } } }, "string_decoder": { "version": "0.10.31", - "from": "string_decoder@>=0.10.0 <0.11.0", - "resolved": "https://registry.npmjs.org/string_decoder/-/string_decoder-0.10.31.tgz" + "resolved": "https://registry.npmjs.org/string_decoder/-/string_decoder-0.10.31.tgz", + "integrity": "sha1-YuIDvEF2bGwoyfyEMB2rHFMQ+pQ=" }, "subarg": { "version": "1.0.0", - "from": "subarg@>=1.0.0 <2.0.0", - "resolved": "https://registry.npmjs.org/subarg/-/subarg-1.0.0.tgz" + "resolved": "https://registry.npmjs.org/subarg/-/subarg-1.0.0.tgz", + "integrity": "sha1-9izxdYHplrSPyWVpn1TAauJouNI=", + "requires": { + "minimist": "^1.1.0" + } }, "syntax-error": { "version": "1.1.6", - "from": "syntax-error@>=1.1.1 <2.0.0", "resolved": "https://registry.npmjs.org/syntax-error/-/syntax-error-1.1.6.tgz", + "integrity": "sha1-tFSXBtOGzBwdx8JCPxhXm2yt5xA=", + "requires": { + "acorn": "^2.7.0" + }, "dependencies": { "acorn": { "version": "2.7.0", - "from": "acorn@>=2.7.0 <3.0.0", - "resolved": "https://registry.npmjs.org/acorn/-/acorn-2.7.0.tgz" + "resolved": "https://registry.npmjs.org/acorn/-/acorn-2.7.0.tgz", + "integrity": "sha1-q259nYhqrKiwhbwzEreaGYQz8Oc=" } } }, "through2": { "version": "2.0.1", - "from": "through2@>=2.0.0 <3.0.0", "resolved": "https://registry.npmjs.org/through2/-/through2-2.0.1.tgz", + "integrity": "sha1-OE51MU1J8y3hLuu4E2uOtrXVnak=", + "requires": { + "readable-stream": "~2.0.0", + "xtend": "~4.0.0" + }, "dependencies": { "readable-stream": { "version": "2.0.6", - "from": "readable-stream@>=2.0.0 <2.1.0", "resolved": "https://registry.npmjs.org/readable-stream/-/readable-stream-2.0.6.tgz", + "integrity": "sha1-j5A0HmilPMySh4jaz80Rs265t44=", + "requires": { + "core-util-is": "~1.0.0", + "inherits": "~2.0.1", + "isarray": "~1.0.0", + "process-nextick-args": "~1.0.6", + "string_decoder": "~0.10.x", + "util-deprecate": "~1.0.1" + }, "dependencies": { "core-util-is": { "version": "1.0.2", - "from": "core-util-is@>=1.0.0 <1.1.0", - "resolved": "https://registry.npmjs.org/core-util-is/-/core-util-is-1.0.2.tgz" + "resolved": "https://registry.npmjs.org/core-util-is/-/core-util-is-1.0.2.tgz", + "integrity": "sha1-tf1UIgqivFq1eqtxQMlAdUUDwac=" }, "isarray": { "version": "1.0.0", - "from": "isarray@>=1.0.0 <1.1.0", - "resolved": "https://registry.npmjs.org/isarray/-/isarray-1.0.0.tgz" + "resolved": "https://registry.npmjs.org/isarray/-/isarray-1.0.0.tgz", + "integrity": "sha1-u5NdSFgsuhaMBoNJV6VKPgcSTxE=" }, "process-nextick-args": { "version": "1.0.7", - "from": "process-nextick-args@>=1.0.6 <1.1.0", - "resolved": "https://registry.npmjs.org/process-nextick-args/-/process-nextick-args-1.0.7.tgz" + "resolved": "https://registry.npmjs.org/process-nextick-args/-/process-nextick-args-1.0.7.tgz", + "integrity": "sha1-FQ4gt1ZZCtP5EJPyWk8q2L/zC6M=" }, "util-deprecate": { "version": "1.0.2", - "from": "util-deprecate@>=1.0.1 <1.1.0", - "resolved": "https://registry.npmjs.org/util-deprecate/-/util-deprecate-1.0.2.tgz" + "resolved": "https://registry.npmjs.org/util-deprecate/-/util-deprecate-1.0.2.tgz", + "integrity": "sha1-RQ1Nyfpw3nMnYvvS1KKJgUGaDM8=" } } } @@ -627,250 +996,308 @@ }, "timers-browserify": { "version": "1.4.2", - "from": "timers-browserify@>=1.0.1 <2.0.0", - "resolved": "https://registry.npmjs.org/timers-browserify/-/timers-browserify-1.4.2.tgz" + "resolved": "https://registry.npmjs.org/timers-browserify/-/timers-browserify-1.4.2.tgz", + "integrity": "sha1-ycWLV1voQHN1y14kYtrO50NZ9B0=", + "requires": { + "process": "~0.11.0" + } }, "tty-browserify": { "version": "0.0.0", - "from": "tty-browserify@>=0.0.0 <0.1.0", - "resolved": "https://registry.npmjs.org/tty-browserify/-/tty-browserify-0.0.0.tgz" + "resolved": "https://registry.npmjs.org/tty-browserify/-/tty-browserify-0.0.0.tgz", + "integrity": "sha1-oVe6QC2iTpv5V/mqadUk7tQpAaY=" }, "url": { "version": "0.11.0", - "from": "url@>=0.11.0 <0.12.0", "resolved": "https://registry.npmjs.org/url/-/url-0.11.0.tgz", + "integrity": "sha1-ODjpfPxgUh63PFJajlW/3Z4uKPE=", + "requires": { + "punycode": "1.3.2", + "querystring": "0.2.0" + }, "dependencies": { "querystring": { "version": "0.2.0", - "from": "querystring@0.2.0", - "resolved": "https://registry.npmjs.org/querystring/-/querystring-0.2.0.tgz" + "resolved": "https://registry.npmjs.org/querystring/-/querystring-0.2.0.tgz", + "integrity": "sha1-sgmEkgO7Jd+CDadW50cAWHhSFiA=" } } }, "util": { "version": "0.10.3", - "from": "util@>=0.10.1 <0.11.0", - "resolved": "https://registry.npmjs.org/util/-/util-0.10.3.tgz" + "resolved": "https://registry.npmjs.org/util/-/util-0.10.3.tgz", + "integrity": "sha1-evsa/lCAUkZInj23/g7TeTNqwPk=", + "requires": { + "inherits": "2.0.1" + } }, "vm-browserify": { "version": "0.0.4", - "from": "vm-browserify@>=0.0.1 <0.1.0", "resolved": "https://registry.npmjs.org/vm-browserify/-/vm-browserify-0.0.4.tgz", + "integrity": "sha1-XX6kW7755Kb/ZflUOOCofDV9WnM=", + "requires": { + "indexof": "0.0.1" + }, "dependencies": { "indexof": { "version": "0.0.1", - "from": "indexof@0.0.1", - "resolved": "https://registry.npmjs.org/indexof/-/indexof-0.0.1.tgz" + "resolved": "https://registry.npmjs.org/indexof/-/indexof-0.0.1.tgz", + "integrity": "sha1-gtwzbSMrkGIXnQWrMpOmYFn9Q10=" } } }, "xtend": { "version": "4.0.1", - "from": "xtend@>=4.0.0 <5.0.0", - "resolved": "https://registry.npmjs.org/xtend/-/xtend-4.0.1.tgz" - }, - "sha.js": { - "version": "2.4.5", - "from": "sha.js@2.4.5", - "resolved": "https://registry.npmjs.org/sha.js/-/sha.js-2.4.5.tgz" - }, - "combine-source-map": { - "version": "0.7.2", - "from": "combine-source-map@0.7.2", - "resolved": "https://registry.npmjs.org/combine-source-map/-/combine-source-map-0.7.2.tgz", - "dependencies": { - "inline-source-map": { - "version": "0.6.2", - "from": "inline-source-map@>=0.6.0 <0.7.0", - "resolved": "https://registry.npmjs.org/inline-source-map/-/inline-source-map-0.6.2.tgz" - }, - "lodash.memoize": { - "version": "3.0.4", - "from": "lodash.memoize@>=3.0.3 <3.1.0", - "resolved": "https://registry.npmjs.org/lodash.memoize/-/lodash.memoize-3.0.4.tgz" - }, - "source-map": { - "version": "0.5.6", - "from": "source-map@>=0.5.3 <0.6.0", - "resolved": "https://registry.npmjs.org/source-map/-/source-map-0.5.6.tgz" - } - } + "resolved": "https://registry.npmjs.org/xtend/-/xtend-4.0.1.tgz", + "integrity": "sha1-pcbVMr5lbiPbgg77lDofBJmNY68=" } } }, "chalk": { "version": "1.1.3", - "from": "chalk@1.1.3", "resolved": "https://registry.npmjs.org/chalk/-/chalk-1.1.3.tgz", + "integrity": "sha1-qBFcVeSnAv5NFQq9OHKCKn4J/Jg=", + "requires": { + "ansi-styles": "^2.2.1", + "escape-string-regexp": "^1.0.2", + "has-ansi": "^2.0.0", + "strip-ansi": "^3.0.0", + "supports-color": "^2.0.0" + }, "dependencies": { "ansi-styles": { "version": "2.2.1", - "from": "ansi-styles@>=2.2.1 <3.0.0", - "resolved": "https://registry.npmjs.org/ansi-styles/-/ansi-styles-2.2.1.tgz" + "resolved": "https://registry.npmjs.org/ansi-styles/-/ansi-styles-2.2.1.tgz", + "integrity": "sha1-tDLdM1i2NM914eRmQ2gkBTPB3b4=" }, "has-ansi": { "version": "2.0.0", - "from": "has-ansi@>=2.0.0 <3.0.0", "resolved": "https://registry.npmjs.org/has-ansi/-/has-ansi-2.0.0.tgz", + "integrity": "sha1-NPUEnOHs3ysGSa8+8k5F7TVBbZE=", + "requires": { + "ansi-regex": "^2.0.0" + }, "dependencies": { "ansi-regex": { "version": "2.0.0", - "from": "ansi-regex@>=2.0.0 <3.0.0", - "resolved": "https://registry.npmjs.org/ansi-regex/-/ansi-regex-2.0.0.tgz" + "resolved": "https://registry.npmjs.org/ansi-regex/-/ansi-regex-2.0.0.tgz", + "integrity": "sha1-xQYbbg74qBd15Q9dZhUb9r83EQc=" } } }, "supports-color": { "version": "2.0.0", - "from": "supports-color@>=2.0.0 <3.0.0", - "resolved": "https://registry.npmjs.org/supports-color/-/supports-color-2.0.0.tgz" + "resolved": "https://registry.npmjs.org/supports-color/-/supports-color-2.0.0.tgz", + "integrity": "sha1-U10EXOa2Nj+kARcIRimZXp3zJMc=" } } }, "coffeeify": { "version": "2.0.1", - "from": "coffeeify@>=2.0.0 <3.0.0", "resolved": "https://registry.npmjs.org/coffeeify/-/coffeeify-2.0.1.tgz", + "integrity": "sha1-Zjc3khlziXNdGaRbJQOz/S8VEvA=", + "requires": { + "coffee-script": "^1.10.0", + "convert-source-map": "^1.1.2", + "through2": "^2.0.0" + }, "dependencies": { "coffee-script": { "version": "1.10.0", - "from": "coffee-script@>=1.10.0 <2.0.0", - "resolved": "https://registry.npmjs.org/coffee-script/-/coffee-script-1.10.0.tgz" + "resolved": "https://registry.npmjs.org/coffee-script/-/coffee-script-1.10.0.tgz", + "integrity": "sha1-EpOLz5vhlI+gBvkuDEyegXBRCMA=" }, "through2": { "version": "2.0.1", - "from": "through2@>=2.0.0 <3.0.0", "resolved": "https://registry.npmjs.org/through2/-/through2-2.0.1.tgz", + "integrity": "sha1-OE51MU1J8y3hLuu4E2uOtrXVnak=", + "requires": { + "readable-stream": "~2.0.0", + "xtend": "~4.0.0" + }, "dependencies": { "readable-stream": { "version": "2.0.6", - "from": "readable-stream@>=2.0.0 <2.1.0", "resolved": "https://registry.npmjs.org/readable-stream/-/readable-stream-2.0.6.tgz", + "integrity": "sha1-j5A0HmilPMySh4jaz80Rs265t44=", + "requires": { + "core-util-is": "~1.0.0", + "inherits": "~2.0.1", + "isarray": "~1.0.0", + "process-nextick-args": "~1.0.6", + "string_decoder": "~0.10.x", + "util-deprecate": "~1.0.1" + }, "dependencies": { "core-util-is": { "version": "1.0.2", - "from": "core-util-is@>=1.0.0 <1.1.0", - "resolved": "https://registry.npmjs.org/core-util-is/-/core-util-is-1.0.2.tgz" + "resolved": "https://registry.npmjs.org/core-util-is/-/core-util-is-1.0.2.tgz", + "integrity": "sha1-tf1UIgqivFq1eqtxQMlAdUUDwac=" }, "inherits": { "version": "2.0.3", - "from": "inherits@>=2.0.1 <2.1.0", - "resolved": "https://registry.npmjs.org/inherits/-/inherits-2.0.3.tgz" + "resolved": "https://registry.npmjs.org/inherits/-/inherits-2.0.3.tgz", + "integrity": "sha1-Yzwsg+PaQqUC9SRmAiSA9CCCYd4=" }, "isarray": { "version": "1.0.0", - "from": "isarray@>=1.0.0 <1.1.0", - "resolved": "https://registry.npmjs.org/isarray/-/isarray-1.0.0.tgz" + "resolved": "https://registry.npmjs.org/isarray/-/isarray-1.0.0.tgz", + "integrity": "sha1-u5NdSFgsuhaMBoNJV6VKPgcSTxE=" }, "process-nextick-args": { "version": "1.0.7", - "from": "process-nextick-args@>=1.0.6 <1.1.0", - "resolved": "https://registry.npmjs.org/process-nextick-args/-/process-nextick-args-1.0.7.tgz" + "resolved": "https://registry.npmjs.org/process-nextick-args/-/process-nextick-args-1.0.7.tgz", + "integrity": "sha1-FQ4gt1ZZCtP5EJPyWk8q2L/zC6M=" }, "string_decoder": { "version": "0.10.31", - "from": "string_decoder@>=0.10.0 <0.11.0", - "resolved": "https://registry.npmjs.org/string_decoder/-/string_decoder-0.10.31.tgz" + "resolved": "https://registry.npmjs.org/string_decoder/-/string_decoder-0.10.31.tgz", + "integrity": "sha1-YuIDvEF2bGwoyfyEMB2rHFMQ+pQ=" }, "util-deprecate": { "version": "1.0.2", - "from": "util-deprecate@>=1.0.1 <1.1.0", - "resolved": "https://registry.npmjs.org/util-deprecate/-/util-deprecate-1.0.2.tgz" + "resolved": "https://registry.npmjs.org/util-deprecate/-/util-deprecate-1.0.2.tgz", + "integrity": "sha1-RQ1Nyfpw3nMnYvvS1KKJgUGaDM8=" } } }, "xtend": { "version": "4.0.1", - "from": "xtend@>=4.0.0 <4.1.0", - "resolved": "https://registry.npmjs.org/xtend/-/xtend-4.0.1.tgz" + "resolved": "https://registry.npmjs.org/xtend/-/xtend-4.0.1.tgz", + "integrity": "sha1-pcbVMr5lbiPbgg77lDofBJmNY68=" } } } } }, + "commander": { + "version": "2.20.3", + "resolved": "https://registry.npmjs.org/commander/-/commander-2.20.3.tgz", + "integrity": "sha512-GpVkmM8vF2vQUkj2LvZmD35JxeJOLCwJ9cUkugyk2nuhbv3+mJvpLYYt+0+USMxE+oj+ey/lJEnhZw75x/OMcQ==", + "optional": true + }, "convert-source-map": { "version": "1.1.3", - "from": "convert-source-map@1.1.3", - "resolved": "https://registry.npmjs.org/convert-source-map/-/convert-source-map-1.1.3.tgz" + "resolved": "https://registry.npmjs.org/convert-source-map/-/convert-source-map-1.1.3.tgz", + "integrity": "sha1-SCnId+n+SbMWHzvzZziI4gRpmGA=" }, "defined": { "version": "1.0.0", - "from": "defined@1.0.0", - "resolved": "https://registry.npmjs.org/defined/-/defined-1.0.0.tgz" + "resolved": "https://registry.npmjs.org/defined/-/defined-1.0.0.tgz", + "integrity": "sha1-yY2bzvdWdBiOEQlpFRGZ45sfppM=" }, "del": { "version": "1.2.1", - "from": "del@>=1.1.1 <2.0.0", "resolved": "https://registry.npmjs.org/del/-/del-1.2.1.tgz", + "integrity": "sha1-rtblvNfLcyXfNPVjEl+iZbLBoBQ=", + "requires": { + "each-async": "^1.0.0", + "globby": "^2.0.0", + "is-path-cwd": "^1.0.0", + "is-path-in-cwd": "^1.0.0", + "object-assign": "^3.0.0", + "rimraf": "^2.2.8" + }, "dependencies": { "each-async": { "version": "1.1.1", - "from": "each-async@>=1.0.0 <2.0.0", "resolved": "https://registry.npmjs.org/each-async/-/each-async-1.1.1.tgz", + "integrity": "sha1-3uUim98KtrogEqOV4bhpq/iBNHM=", + "requires": { + "onetime": "^1.0.0", + "set-immediate-shim": "^1.0.0" + }, "dependencies": { "onetime": { "version": "1.1.0", - "from": "onetime@>=1.0.0 <2.0.0", - "resolved": "https://registry.npmjs.org/onetime/-/onetime-1.1.0.tgz" + "resolved": "https://registry.npmjs.org/onetime/-/onetime-1.1.0.tgz", + "integrity": "sha1-ofeDj4MUxRbwXs78vEzP4EtO14k=" } } }, "globby": { "version": "2.1.0", - "from": "globby@>=2.0.0 <3.0.0", "resolved": "https://registry.npmjs.org/globby/-/globby-2.1.0.tgz", + "integrity": "sha1-npGSvNM/Srak+JTl5+qLcTITxII=", + "requires": { + "array-union": "^1.0.1", + "async": "^1.2.1", + "glob": "^5.0.3", + "object-assign": "^3.0.0" + }, "dependencies": { "array-union": { "version": "1.0.2", - "from": "array-union@>=1.0.1 <2.0.0", - "resolved": "https://registry.npmjs.org/array-union/-/array-union-1.0.2.tgz" + "resolved": "https://registry.npmjs.org/array-union/-/array-union-1.0.2.tgz", + "integrity": "sha1-mjRBDk9OPaI96jdb5b5w8kd47Dk=", + "requires": { + "array-uniq": "^1.0.1" + } }, "async": { "version": "1.5.2", - "from": "async@>=1.2.1 <2.0.0", - "resolved": "https://registry.npmjs.org/async/-/async-1.5.2.tgz" + "resolved": "https://registry.npmjs.org/async/-/async-1.5.2.tgz", + "integrity": "sha1-7GphrlZIDAw8skHJVhjiCJL5Zyo=" }, "glob": { "version": "5.0.15", - "from": "glob@>=5.0.3 <6.0.0", "resolved": "https://registry.npmjs.org/glob/-/glob-5.0.15.tgz", + "integrity": "sha1-G8k2ueAvSmA/zCIuz3Yz0wuLk7E=", + "requires": { + "inflight": "^1.0.4", + "inherits": "2", + "minimatch": "2 || 3", + "once": "^1.3.0", + "path-is-absolute": "^1.0.0" + }, "dependencies": { "inflight": { "version": "1.0.5", - "from": "inflight@>=1.0.4 <2.0.0", "resolved": "https://registry.npmjs.org/inflight/-/inflight-1.0.5.tgz", + "integrity": "sha1-2zIEzVqd4ubNiQuFxuL2a89PYgo=", + "requires": { + "once": "^1.3.0", + "wrappy": "1" + }, "dependencies": { "wrappy": { "version": "1.0.2", - "from": "wrappy@>=1.0.0 <2.0.0", - "resolved": "https://registry.npmjs.org/wrappy/-/wrappy-1.0.2.tgz" + "resolved": "https://registry.npmjs.org/wrappy/-/wrappy-1.0.2.tgz", + "integrity": "sha1-tSQ9jz7BqjXxNkYFvA0QNuMKtp8=" } } }, "inherits": { "version": "2.0.3", - "from": "inherits@>=2.0.0 <3.0.0", - "resolved": "https://registry.npmjs.org/inherits/-/inherits-2.0.3.tgz" + "resolved": "https://registry.npmjs.org/inherits/-/inherits-2.0.3.tgz", + "integrity": "sha1-Yzwsg+PaQqUC9SRmAiSA9CCCYd4=" }, "minimatch": { "version": "3.0.3", - "from": "minimatch@>=2.0.0 <3.0.0||>=3.0.0 <4.0.0", "resolved": "https://registry.npmjs.org/minimatch/-/minimatch-3.0.3.tgz", + "integrity": "sha1-Kk5AkLlrLbBqnX3wEFWmKnfJt3Q=", + "requires": { + "brace-expansion": "^1.0.0" + }, "dependencies": { "brace-expansion": { "version": "1.1.6", - "from": "brace-expansion@>=1.0.0 <2.0.0", "resolved": "https://registry.npmjs.org/brace-expansion/-/brace-expansion-1.1.6.tgz", + "integrity": "sha1-cZfX6qm4fmSDkOph/GbIRCdCDfk=", + "requires": { + "balanced-match": "^0.4.1", + "concat-map": "0.0.1" + }, "dependencies": { "balanced-match": { "version": "0.4.2", - "from": "balanced-match@>=0.4.1 <0.5.0", - "resolved": "https://registry.npmjs.org/balanced-match/-/balanced-match-0.4.2.tgz" + "resolved": "https://registry.npmjs.org/balanced-match/-/balanced-match-0.4.2.tgz", + "integrity": "sha1-yz8+PHMtwPAe5wtAPzAuYddwmDg=" }, "concat-map": { "version": "0.0.1", - "from": "concat-map@0.0.1", - "resolved": "https://registry.npmjs.org/concat-map/-/concat-map-0.0.1.tgz" + "resolved": "https://registry.npmjs.org/concat-map/-/concat-map-0.0.1.tgz", + "integrity": "sha1-2Klr13/Wjfd5OnMDajug1UBdR3s=" } } } @@ -878,20 +1305,23 @@ }, "once": { "version": "1.4.0", - "from": "once@>=1.3.0 <2.0.0", "resolved": "https://registry.npmjs.org/once/-/once-1.4.0.tgz", + "integrity": "sha1-WDsap3WWHUsROsF9nFC6753Xa9E=", + "requires": { + "wrappy": "1" + }, "dependencies": { "wrappy": { "version": "1.0.2", - "from": "wrappy@>=1.0.0 <2.0.0", - "resolved": "https://registry.npmjs.org/wrappy/-/wrappy-1.0.2.tgz" + "resolved": "https://registry.npmjs.org/wrappy/-/wrappy-1.0.2.tgz", + "integrity": "sha1-tSQ9jz7BqjXxNkYFvA0QNuMKtp8=" } } }, "path-is-absolute": { "version": "1.0.0", - "from": "path-is-absolute@>=1.0.0 <2.0.0", - "resolved": "https://registry.npmjs.org/path-is-absolute/-/path-is-absolute-1.0.0.tgz" + "resolved": "https://registry.npmjs.org/path-is-absolute/-/path-is-absolute-1.0.0.tgz", + "integrity": "sha1-Jj2tpmqz8vsQv3+dJN2PPlcO+RI=" } } } @@ -899,23 +1329,29 @@ }, "is-path-cwd": { "version": "1.0.0", - "from": "is-path-cwd@>=1.0.0 <2.0.0", - "resolved": "https://registry.npmjs.org/is-path-cwd/-/is-path-cwd-1.0.0.tgz" + "resolved": "https://registry.npmjs.org/is-path-cwd/-/is-path-cwd-1.0.0.tgz", + "integrity": "sha1-0iXsIxMuie3Tj9p2dHLmLmXxEG0=" }, "is-path-in-cwd": { "version": "1.0.0", - "from": "is-path-in-cwd@>=1.0.0 <2.0.0", "resolved": "https://registry.npmjs.org/is-path-in-cwd/-/is-path-in-cwd-1.0.0.tgz", + "integrity": "sha1-ZHdYK4IU1gI0YJRWcAO+ip6sBNw=", + "requires": { + "is-path-inside": "^1.0.0" + }, "dependencies": { "is-path-inside": { "version": "1.0.0", - "from": "is-path-inside@>=1.0.0 <2.0.0", "resolved": "https://registry.npmjs.org/is-path-inside/-/is-path-inside-1.0.0.tgz", + "integrity": "sha1-/AbloWg/vaE95mev9xe7wQpI838=", + "requires": { + "path-is-inside": "^1.0.1" + }, "dependencies": { "path-is-inside": { "version": "1.0.2", - "from": "path-is-inside@>=1.0.1 <2.0.0", - "resolved": "https://registry.npmjs.org/path-is-inside/-/path-is-inside-1.0.2.tgz" + "resolved": "https://registry.npmjs.org/path-is-inside/-/path-is-inside-1.0.2.tgz", + "integrity": "sha1-NlQX3t5EQw0cEa9hAn+s8HS9/FM=" } } } @@ -923,60 +1359,82 @@ }, "object-assign": { "version": "3.0.0", - "from": "object-assign@>=3.0.0 <4.0.0", - "resolved": "https://registry.npmjs.org/object-assign/-/object-assign-3.0.0.tgz" + "resolved": "https://registry.npmjs.org/object-assign/-/object-assign-3.0.0.tgz", + "integrity": "sha1-m+3VygiXlJvKR+f/QIBi1Un1h/I=" }, "rimraf": { "version": "2.5.4", - "from": "rimraf@>=2.2.8 <3.0.0", "resolved": "https://registry.npmjs.org/rimraf/-/rimraf-2.5.4.tgz", + "integrity": "sha1-loAAk8vxoMhr2VtGJUZ1NcKd+gQ=", + "requires": { + "glob": "^7.0.5" + }, "dependencies": { "glob": { "version": "7.0.6", - "from": "glob@>=7.0.5 <8.0.0", "resolved": "https://registry.npmjs.org/glob/-/glob-7.0.6.tgz", + "integrity": "sha1-IRuvr0nlJbjNkyYNFKsTYVKz9Xo=", + "requires": { + "fs.realpath": "^1.0.0", + "inflight": "^1.0.4", + "inherits": "2", + "minimatch": "^3.0.2", + "once": "^1.3.0", + "path-is-absolute": "^1.0.0" + }, "dependencies": { "fs.realpath": { "version": "1.0.0", - "from": "fs.realpath@>=1.0.0 <2.0.0", - "resolved": "https://registry.npmjs.org/fs.realpath/-/fs.realpath-1.0.0.tgz" + "resolved": "https://registry.npmjs.org/fs.realpath/-/fs.realpath-1.0.0.tgz", + "integrity": "sha1-FQStJSMVjKpA20onh8sBQRmU6k8=" }, "inflight": { "version": "1.0.5", - "from": "inflight@>=1.0.4 <2.0.0", "resolved": "https://registry.npmjs.org/inflight/-/inflight-1.0.5.tgz", + "integrity": "sha1-2zIEzVqd4ubNiQuFxuL2a89PYgo=", + "requires": { + "once": "^1.3.0", + "wrappy": "1" + }, "dependencies": { "wrappy": { "version": "1.0.2", - "from": "wrappy@>=1.0.0 <2.0.0", - "resolved": "https://registry.npmjs.org/wrappy/-/wrappy-1.0.2.tgz" + "resolved": "https://registry.npmjs.org/wrappy/-/wrappy-1.0.2.tgz", + "integrity": "sha1-tSQ9jz7BqjXxNkYFvA0QNuMKtp8=" } } }, "inherits": { "version": "2.0.3", - "from": "inherits@>=2.0.0 <3.0.0", - "resolved": "https://registry.npmjs.org/inherits/-/inherits-2.0.3.tgz" + "resolved": "https://registry.npmjs.org/inherits/-/inherits-2.0.3.tgz", + "integrity": "sha1-Yzwsg+PaQqUC9SRmAiSA9CCCYd4=" }, "minimatch": { "version": "3.0.3", - "from": "minimatch@>=3.0.2 <4.0.0", "resolved": "https://registry.npmjs.org/minimatch/-/minimatch-3.0.3.tgz", + "integrity": "sha1-Kk5AkLlrLbBqnX3wEFWmKnfJt3Q=", + "requires": { + "brace-expansion": "^1.0.0" + }, "dependencies": { "brace-expansion": { "version": "1.1.6", - "from": "brace-expansion@>=1.0.0 <2.0.0", "resolved": "https://registry.npmjs.org/brace-expansion/-/brace-expansion-1.1.6.tgz", + "integrity": "sha1-cZfX6qm4fmSDkOph/GbIRCdCDfk=", + "requires": { + "balanced-match": "^0.4.1", + "concat-map": "0.0.1" + }, "dependencies": { "balanced-match": { "version": "0.4.2", - "from": "balanced-match@>=0.4.1 <0.5.0", - "resolved": "https://registry.npmjs.org/balanced-match/-/balanced-match-0.4.2.tgz" + "resolved": "https://registry.npmjs.org/balanced-match/-/balanced-match-0.4.2.tgz", + "integrity": "sha1-yz8+PHMtwPAe5wtAPzAuYddwmDg=" }, "concat-map": { "version": "0.0.1", - "from": "concat-map@0.0.1", - "resolved": "https://registry.npmjs.org/concat-map/-/concat-map-0.0.1.tgz" + "resolved": "https://registry.npmjs.org/concat-map/-/concat-map-0.0.1.tgz", + "integrity": "sha1-2Klr13/Wjfd5OnMDajug1UBdR3s=" } } } @@ -984,20 +1442,23 @@ }, "once": { "version": "1.4.0", - "from": "once@>=1.3.0 <2.0.0", "resolved": "https://registry.npmjs.org/once/-/once-1.4.0.tgz", + "integrity": "sha1-WDsap3WWHUsROsF9nFC6753Xa9E=", + "requires": { + "wrappy": "1" + }, "dependencies": { "wrappy": { "version": "1.0.2", - "from": "wrappy@>=1.0.0 <2.0.0", - "resolved": "https://registry.npmjs.org/wrappy/-/wrappy-1.0.2.tgz" + "resolved": "https://registry.npmjs.org/wrappy/-/wrappy-1.0.2.tgz", + "integrity": "sha1-tSQ9jz7BqjXxNkYFvA0QNuMKtp8=" } } }, "path-is-absolute": { "version": "1.0.0", - "from": "path-is-absolute@>=1.0.0 <2.0.0", - "resolved": "https://registry.npmjs.org/path-is-absolute/-/path-is-absolute-1.0.0.tgz" + "resolved": "https://registry.npmjs.org/path-is-absolute/-/path-is-absolute-1.0.0.tgz", + "integrity": "sha1-Jj2tpmqz8vsQv3+dJN2PPlcO+RI=" } } } @@ -1007,102 +1468,650 @@ }, "escape-string-regexp": { "version": "1.0.5", - "from": "escape-string-regexp@1.0.5", - "resolved": "https://registry.npmjs.org/escape-string-regexp/-/escape-string-regexp-1.0.5.tgz" + "resolved": "https://registry.npmjs.org/escape-string-regexp/-/escape-string-regexp-1.0.5.tgz", + "integrity": "sha1-G2HAViGQqN/2rjuyzwIAyhMLhtQ=" + }, + "fsevents": { + "version": "1.2.9", + "resolved": "https://registry.npmjs.org/fsevents/-/fsevents-1.2.9.tgz", + "integrity": "sha512-oeyj2H3EjjonWcFjD5NvZNE9Rqe4UW+nQBU2HNeKw0koVLEFIhtyETyAakeAM3de7Z/SW5kcA+fZUait9EApnw==", + "optional": true, + "requires": { + "nan": "^2.12.1", + "node-pre-gyp": "^0.12.0" + }, + "dependencies": { + "abbrev": { + "version": "1.1.1", + "bundled": true, + "optional": true + }, + "ansi-regex": { + "version": "2.1.1", + "bundled": true, + "optional": true + }, + "aproba": { + "version": "1.2.0", + "bundled": true, + "optional": true + }, + "are-we-there-yet": { + "version": "1.1.5", + "bundled": true, + "optional": true, + "requires": { + "delegates": "^1.0.0", + "readable-stream": "^2.0.6" + } + }, + "balanced-match": { + "version": "1.0.0", + "bundled": true, + "optional": true + }, + "brace-expansion": { + "version": "1.1.11", + "bundled": true, + "optional": true, + "requires": { + "balanced-match": "^1.0.0", + "concat-map": "0.0.1" + } + }, + "chownr": { + "version": "1.1.1", + "bundled": true, + "optional": true + }, + "code-point-at": { + "version": "1.1.0", + "bundled": true, + "optional": true + }, + "concat-map": { + "version": "0.0.1", + "bundled": true, + "optional": true + }, + "console-control-strings": { + "version": "1.1.0", + "bundled": true, + "optional": true + }, + "core-util-is": { + "version": "1.0.2", + "bundled": true, + "optional": true + }, + "debug": { + "version": "4.1.1", + "bundled": true, + "optional": true, + "requires": { + "ms": "^2.1.1" + } + }, + "deep-extend": { + "version": "0.6.0", + "bundled": true, + "optional": true + }, + "delegates": { + "version": "1.0.0", + "bundled": true, + "optional": true + }, + "detect-libc": { + "version": "1.0.3", + "bundled": true, + "optional": true + }, + "fs-minipass": { + "version": "1.2.5", + "bundled": true, + "optional": true, + "requires": { + "minipass": "^2.2.1" + } + }, + "fs.realpath": { + "version": "1.0.0", + "bundled": true, + "optional": true + }, + "gauge": { + "version": "2.7.4", + "bundled": true, + "optional": true, + "requires": { + "aproba": "^1.0.3", + "console-control-strings": "^1.0.0", + "has-unicode": "^2.0.0", + "object-assign": "^4.1.0", + "signal-exit": "^3.0.0", + "string-width": "^1.0.1", + "strip-ansi": "^3.0.1", + "wide-align": "^1.1.0" + } + }, + "glob": { + "version": "7.1.3", + "bundled": true, + "optional": true, + "requires": { + "fs.realpath": "^1.0.0", + "inflight": "^1.0.4", + "inherits": "2", + "minimatch": "^3.0.4", + "once": "^1.3.0", + "path-is-absolute": "^1.0.0" + } + }, + "has-unicode": { + "version": "2.0.1", + "bundled": true, + "optional": true + }, + "iconv-lite": { + "version": "0.4.24", + "bundled": true, + "optional": true, + "requires": { + "safer-buffer": ">= 2.1.2 < 3" + } + }, + "ignore-walk": { + "version": "3.0.1", + "bundled": true, + "optional": true, + "requires": { + "minimatch": "^3.0.4" + } + }, + "inflight": { + "version": "1.0.6", + "bundled": true, + "optional": true, + "requires": { + "once": "^1.3.0", + "wrappy": "1" + } + }, + "inherits": { + "version": "2.0.3", + "bundled": true, + "optional": true + }, + "ini": { + "version": "1.3.5", + "bundled": true, + "optional": true + }, + "is-fullwidth-code-point": { + "version": "1.0.0", + "bundled": true, + "optional": true, + "requires": { + "number-is-nan": "^1.0.0" + } + }, + "isarray": { + "version": "1.0.0", + "bundled": true, + "optional": true + }, + "minimatch": { + "version": "3.0.4", + "bundled": true, + "optional": true, + "requires": { + "brace-expansion": "^1.1.7" + } + }, + "minimist": { + "version": "0.0.8", + "bundled": true, + "optional": true + }, + "minipass": { + "version": "2.3.5", + "bundled": true, + "optional": true, + "requires": { + "safe-buffer": "^5.1.2", + "yallist": "^3.0.0" + } + }, + "minizlib": { + "version": "1.2.1", + "bundled": true, + "optional": true, + "requires": { + "minipass": "^2.2.1" + } + }, + "mkdirp": { + "version": "0.5.1", + "bundled": true, + "optional": true, + "requires": { + "minimist": "0.0.8" + } + }, + "ms": { + "version": "2.1.1", + "bundled": true, + "optional": true + }, + "needle": { + "version": "2.3.0", + "bundled": true, + "optional": true, + "requires": { + "debug": "^4.1.0", + "iconv-lite": "^0.4.4", + "sax": "^1.2.4" + } + }, + "node-pre-gyp": { + "version": "0.12.0", + "bundled": true, + "optional": true, + "requires": { + "detect-libc": "^1.0.2", + "mkdirp": "^0.5.1", + "needle": "^2.2.1", + "nopt": "^4.0.1", + "npm-packlist": "^1.1.6", + "npmlog": "^4.0.2", + "rc": "^1.2.7", + "rimraf": "^2.6.1", + "semver": "^5.3.0", + "tar": "^4" + } + }, + "nopt": { + "version": "4.0.1", + "bundled": true, + "optional": true, + "requires": { + "abbrev": "1", + "osenv": "^0.1.4" + } + }, + "npm-bundled": { + "version": "1.0.6", + "bundled": true, + "optional": true + }, + "npm-packlist": { + "version": "1.4.1", + "bundled": true, + "optional": true, + "requires": { + "ignore-walk": "^3.0.1", + "npm-bundled": "^1.0.1" + } + }, + "npmlog": { + "version": "4.1.2", + "bundled": true, + "optional": true, + "requires": { + "are-we-there-yet": "~1.1.2", + "console-control-strings": "~1.1.0", + "gauge": "~2.7.3", + "set-blocking": "~2.0.0" + } + }, + "number-is-nan": { + "version": "1.0.1", + "bundled": true, + "optional": true + }, + "object-assign": { + "version": "4.1.1", + "bundled": true, + "optional": true + }, + "once": { + "version": "1.4.0", + "bundled": true, + "optional": true, + "requires": { + "wrappy": "1" + } + }, + "os-homedir": { + "version": "1.0.2", + "bundled": true, + "optional": true + }, + "os-tmpdir": { + "version": "1.0.2", + "bundled": true, + "optional": true + }, + "osenv": { + "version": "0.1.5", + "bundled": true, + "optional": true, + "requires": { + "os-homedir": "^1.0.0", + "os-tmpdir": "^1.0.0" + } + }, + "path-is-absolute": { + "version": "1.0.1", + "bundled": true, + "optional": true + }, + "process-nextick-args": { + "version": "2.0.0", + "bundled": true, + "optional": true + }, + "rc": { + "version": "1.2.8", + "bundled": true, + "optional": true, + "requires": { + "deep-extend": "^0.6.0", + "ini": "~1.3.0", + "minimist": "^1.2.0", + "strip-json-comments": "~2.0.1" + }, + "dependencies": { + "minimist": { + "version": "1.2.0", + "bundled": true, + "optional": true + } + } + }, + "readable-stream": { + "version": "2.3.6", + "bundled": true, + "optional": true, + "requires": { + "core-util-is": "~1.0.0", + "inherits": "~2.0.3", + "isarray": "~1.0.0", + "process-nextick-args": "~2.0.0", + "safe-buffer": "~5.1.1", + "string_decoder": "~1.1.1", + "util-deprecate": "~1.0.1" + } + }, + "rimraf": { + "version": "2.6.3", + "bundled": true, + "optional": true, + "requires": { + "glob": "^7.1.3" + } + }, + "safe-buffer": { + "version": "5.1.2", + "bundled": true, + "optional": true + }, + "safer-buffer": { + "version": "2.1.2", + "bundled": true, + "optional": true + }, + "sax": { + "version": "1.2.4", + "bundled": true, + "optional": true + }, + "semver": { + "version": "5.7.0", + "bundled": true, + "optional": true + }, + "set-blocking": { + "version": "2.0.0", + "bundled": true, + "optional": true + }, + "signal-exit": { + "version": "3.0.2", + "bundled": true, + "optional": true + }, + "string-width": { + "version": "1.0.2", + "bundled": true, + "optional": true, + "requires": { + "code-point-at": "^1.0.0", + "is-fullwidth-code-point": "^1.0.0", + "strip-ansi": "^3.0.0" + } + }, + "string_decoder": { + "version": "1.1.1", + "bundled": true, + "optional": true, + "requires": { + "safe-buffer": "~5.1.0" + } + }, + "strip-ansi": { + "version": "3.0.1", + "bundled": true, + "optional": true, + "requires": { + "ansi-regex": "^2.0.0" + } + }, + "strip-json-comments": { + "version": "2.0.1", + "bundled": true, + "optional": true + }, + "tar": { + "version": "4.4.8", + "bundled": true, + "optional": true, + "requires": { + "chownr": "^1.1.1", + "fs-minipass": "^1.2.5", + "minipass": "^2.3.4", + "minizlib": "^1.1.1", + "mkdirp": "^0.5.0", + "safe-buffer": "^5.1.2", + "yallist": "^3.0.2" + } + }, + "util-deprecate": { + "version": "1.0.2", + "bundled": true, + "optional": true + }, + "wide-align": { + "version": "1.1.3", + "bundled": true, + "optional": true, + "requires": { + "string-width": "^1.0.2 || 2" + } + }, + "wrappy": { + "version": "1.0.2", + "bundled": true, + "optional": true + }, + "yallist": { + "version": "3.0.3", + "bundled": true, + "optional": true + } + } }, "glob-parent": { "version": "2.0.0", - "from": "glob-parent@2.0.0", - "resolved": "https://registry.npmjs.org/glob-parent/-/glob-parent-2.0.0.tgz" + "resolved": "https://registry.npmjs.org/glob-parent/-/glob-parent-2.0.0.tgz", + "integrity": "sha1-gTg9ctsFT8zPUzbaqQLxgvbtuyg=", + "requires": { + "is-glob": "^2.0.0" + } }, "gulp": { "version": "3.9.1", - "from": "gulp@>=3.8.11 <4.0.0", "resolved": "https://registry.npmjs.org/gulp/-/gulp-3.9.1.tgz", + "integrity": "sha1-VxzkWSjdQK9lFPxAEYZgFsE4RbQ=", + "requires": { + "archy": "^1.0.0", + "chalk": "^1.0.0", + "deprecated": "^0.0.1", + "gulp-util": "^3.0.0", + "interpret": "^1.0.0", + "liftoff": "^2.1.0", + "minimist": "^1.1.0", + "orchestrator": "^0.3.0", + "pretty-hrtime": "^1.0.0", + "semver": "^4.1.0", + "tildify": "^1.0.0", + "v8flags": "^2.0.2", + "vinyl-fs": "^0.3.0" + }, "dependencies": { "archy": { "version": "1.0.0", - "from": "archy@>=1.0.0 <2.0.0", - "resolved": "https://registry.npmjs.org/archy/-/archy-1.0.0.tgz" + "resolved": "https://registry.npmjs.org/archy/-/archy-1.0.0.tgz", + "integrity": "sha1-+cjBN1fMHde8N5rHeyxipcKGjEA=" }, "deprecated": { "version": "0.0.1", - "from": "deprecated@>=0.0.1 <0.0.2", - "resolved": "https://registry.npmjs.org/deprecated/-/deprecated-0.0.1.tgz" + "resolved": "https://registry.npmjs.org/deprecated/-/deprecated-0.0.1.tgz", + "integrity": "sha1-+cmvVGSvoeepcUWKi97yqpTVuxk=" }, "interpret": { "version": "1.0.1", - "from": "interpret@>=1.0.0 <2.0.0", - "resolved": "https://registry.npmjs.org/interpret/-/interpret-1.0.1.tgz" + "resolved": "https://registry.npmjs.org/interpret/-/interpret-1.0.1.tgz", + "integrity": "sha1-1Xn7f2k7hYAElHrzn6DbSfeVYCw=" }, "liftoff": { "version": "2.3.0", - "from": "liftoff@>=2.1.0 <3.0.0", "resolved": "https://registry.npmjs.org/liftoff/-/liftoff-2.3.0.tgz", + "integrity": "sha1-qY8v9nGD2Lp8+soQVIvX/wVQs4U=", + "requires": { + "extend": "^3.0.0", + "findup-sync": "^0.4.2", + "fined": "^1.0.1", + "flagged-respawn": "^0.3.2", + "lodash.isplainobject": "^4.0.4", + "lodash.isstring": "^4.0.1", + "lodash.mapvalues": "^4.4.0", + "rechoir": "^0.6.2", + "resolve": "^1.1.7" + }, "dependencies": { + "expand-tilde": { + "version": "1.2.2", + "resolved": "https://registry.npmjs.org/expand-tilde/-/expand-tilde-1.2.2.tgz", + "integrity": "sha1-C4HrqJflo9MdHD0QL48BRB5VlEk=", + "requires": { + "os-homedir": "^1.0.1" + } + }, "extend": { "version": "3.0.0", - "from": "extend@>=3.0.0 <4.0.0", - "resolved": "https://registry.npmjs.org/extend/-/extend-3.0.0.tgz" + "resolved": "https://registry.npmjs.org/extend/-/extend-3.0.0.tgz", + "integrity": "sha1-WkdDU7nzNT3dgXbf03uRyDpG8dQ=" }, "findup-sync": { "version": "0.4.2", - "from": "findup-sync@>=0.4.2 <0.5.0", "resolved": "https://registry.npmjs.org/findup-sync/-/findup-sync-0.4.2.tgz", + "integrity": "sha1-qBF9D3MST1pFRoOVef5S1xKfteU=", + "requires": { + "detect-file": "^0.1.0", + "is-glob": "^2.0.1", + "micromatch": "^2.3.7", + "resolve-dir": "^0.1.0" + }, "dependencies": { "detect-file": { "version": "0.1.0", - "from": "detect-file@>=0.1.0 <0.2.0", "resolved": "https://registry.npmjs.org/detect-file/-/detect-file-0.1.0.tgz", + "integrity": "sha1-STXe39lIhkjgBrASlWbpOGcR6mM=", + "requires": { + "fs-exists-sync": "^0.1.0" + }, "dependencies": { "fs-exists-sync": { "version": "0.1.0", - "from": "fs-exists-sync@>=0.1.0 <0.2.0", - "resolved": "https://registry.npmjs.org/fs-exists-sync/-/fs-exists-sync-0.1.0.tgz" + "resolved": "https://registry.npmjs.org/fs-exists-sync/-/fs-exists-sync-0.1.0.tgz", + "integrity": "sha1-mC1ok6+RjnLQjeyehnP/K1qNat0=" } } }, "resolve-dir": { "version": "0.1.1", - "from": "resolve-dir@>=0.1.0 <0.2.0", "resolved": "https://registry.npmjs.org/resolve-dir/-/resolve-dir-0.1.1.tgz", + "integrity": "sha1-shklmlYC+sXFxJatiUpujMQwJh4=", + "requires": { + "expand-tilde": "^1.2.2", + "global-modules": "^0.2.3" + }, "dependencies": { "global-modules": { "version": "0.2.3", - "from": "global-modules@>=0.2.3 <0.3.0", "resolved": "https://registry.npmjs.org/global-modules/-/global-modules-0.2.3.tgz", + "integrity": "sha1-6lo77ULG1s6ZWk+KEmm12uIjgo0=", + "requires": { + "global-prefix": "^0.1.4", + "is-windows": "^0.2.0" + }, "dependencies": { "global-prefix": { "version": "0.1.4", - "from": "global-prefix@>=0.1.4 <0.2.0", "resolved": "https://registry.npmjs.org/global-prefix/-/global-prefix-0.1.4.tgz", + "integrity": "sha1-BRWNsc3i3UkbRV4pDrOri/xFxuE=", + "requires": { + "ini": "^1.3.4", + "is-windows": "^0.2.0", + "osenv": "^0.1.3", + "which": "^1.2.10" + }, "dependencies": { "ini": { "version": "1.3.4", - "from": "ini@>=1.3.4 <2.0.0", - "resolved": "https://registry.npmjs.org/ini/-/ini-1.3.4.tgz" + "resolved": "https://registry.npmjs.org/ini/-/ini-1.3.4.tgz", + "integrity": "sha1-BTfLedr1m1mhpRff9wbIbsA5Fi4=" }, "osenv": { "version": "0.1.3", - "from": "osenv@>=0.1.3 <0.2.0", "resolved": "https://registry.npmjs.org/osenv/-/osenv-0.1.3.tgz", + "integrity": "sha1-g88FxtZFj8TVrGNi6jJdkvJ1Qhc=", + "requires": { + "os-homedir": "^1.0.0", + "os-tmpdir": "^1.0.0" + }, "dependencies": { "os-tmpdir": { "version": "1.0.1", - "from": "os-tmpdir@>=1.0.0 <2.0.0", - "resolved": "https://registry.npmjs.org/os-tmpdir/-/os-tmpdir-1.0.1.tgz" + "resolved": "https://registry.npmjs.org/os-tmpdir/-/os-tmpdir-1.0.1.tgz", + "integrity": "sha1-6bQjoe2vR5iCVi6S7XHXdDoHG24=" } } }, "which": { "version": "1.2.11", - "from": "which@>=1.2.10 <2.0.0", "resolved": "https://registry.npmjs.org/which/-/which-1.2.11.tgz", + "integrity": "sha1-yLLu6muMFln6fB3U/aq+lTPcXos=", + "requires": { + "isexe": "^1.1.1" + }, "dependencies": { "isexe": { "version": "1.1.2", - "from": "isexe@>=1.1.1 <2.0.0", - "resolved": "https://registry.npmjs.org/isexe/-/isexe-1.1.2.tgz" + "resolved": "https://registry.npmjs.org/isexe/-/isexe-1.1.2.tgz", + "integrity": "sha1-NvPiLmB1CSD15yQaR2qMakInWtA=" } } } @@ -1110,8 +2119,8 @@ }, "is-windows": { "version": "0.2.0", - "from": "is-windows@>=0.2.0 <0.3.0", - "resolved": "https://registry.npmjs.org/is-windows/-/is-windows-0.2.0.tgz" + "resolved": "https://registry.npmjs.org/is-windows/-/is-windows-0.2.0.tgz", + "integrity": "sha1-3hqm1j6indJIc3tp8f+LgALSEIw=" } } } @@ -1121,53 +2130,78 @@ }, "fined": { "version": "1.0.1", - "from": "fined@>=1.0.1 <2.0.0", "resolved": "https://registry.npmjs.org/fined/-/fined-1.0.1.tgz", + "integrity": "sha1-xIr5q1qOD0AKA3XoQVTDdnTav9Q=", + "requires": { + "expand-tilde": "^1.2.1", + "lodash.assignwith": "^4.0.7", + "lodash.isarray": "^4.0.0", + "lodash.isempty": "^4.2.1", + "lodash.isplainobject": "^4.0.4", + "lodash.isstring": "^4.0.1", + "lodash.pick": "^4.2.1", + "parse-filepath": "^1.0.1" + }, "dependencies": { "lodash.assignwith": { "version": "4.2.0", - "from": "lodash.assignwith@>=4.0.7 <5.0.0", - "resolved": "https://registry.npmjs.org/lodash.assignwith/-/lodash.assignwith-4.2.0.tgz" + "resolved": "https://registry.npmjs.org/lodash.assignwith/-/lodash.assignwith-4.2.0.tgz", + "integrity": "sha1-EnqX8CrcQXUalU0ksN4X4QDgOOs=" }, "lodash.isarray": { "version": "4.0.0", - "from": "lodash.isarray@>=4.0.0 <5.0.0", - "resolved": "https://registry.npmjs.org/lodash.isarray/-/lodash.isarray-4.0.0.tgz" + "resolved": "https://registry.npmjs.org/lodash.isarray/-/lodash.isarray-4.0.0.tgz", + "integrity": "sha1-KspJayjEym1yZxUxNZDALm6jRAM=" }, "lodash.isempty": { "version": "4.4.0", - "from": "lodash.isempty@>=4.2.1 <5.0.0", - "resolved": "https://registry.npmjs.org/lodash.isempty/-/lodash.isempty-4.4.0.tgz" + "resolved": "https://registry.npmjs.org/lodash.isempty/-/lodash.isempty-4.4.0.tgz", + "integrity": "sha1-b4bL7di+TsmHvpqvM8loTbGzHn4=" }, "lodash.pick": { "version": "4.4.0", - "from": "lodash.pick@>=4.2.1 <5.0.0", - "resolved": "https://registry.npmjs.org/lodash.pick/-/lodash.pick-4.4.0.tgz" + "resolved": "https://registry.npmjs.org/lodash.pick/-/lodash.pick-4.4.0.tgz", + "integrity": "sha1-UvBWEP/53tQiYRRB7R/BI6AwAbM=" }, "parse-filepath": { "version": "1.0.1", - "from": "parse-filepath@>=1.0.1 <2.0.0", "resolved": "https://registry.npmjs.org/parse-filepath/-/parse-filepath-1.0.1.tgz", + "integrity": "sha1-FZ1hVdQ5BNFsEO9piRHaHpGWm3M=", + "requires": { + "is-absolute": "^0.2.3", + "map-cache": "^0.2.0", + "path-root": "^0.1.1" + }, "dependencies": { "is-absolute": { "version": "0.2.5", - "from": "is-absolute@>=0.2.3 <0.3.0", "resolved": "https://registry.npmjs.org/is-absolute/-/is-absolute-0.2.5.tgz", + "integrity": "sha1-mUFCufRo0nwU+/DNMP5325NMp20=", + "requires": { + "is-relative": "^0.2.1", + "is-windows": "^0.1.1" + }, "dependencies": { "is-relative": { "version": "0.2.1", - "from": "is-relative@>=0.2.1 <0.3.0", "resolved": "https://registry.npmjs.org/is-relative/-/is-relative-0.2.1.tgz", + "integrity": "sha1-0n9MfVFtF1+2ENuEu+7yPDvJeqU=", + "requires": { + "is-unc-path": "^0.1.1" + }, "dependencies": { "is-unc-path": { "version": "0.1.1", - "from": "is-unc-path@>=0.1.1 <0.2.0", "resolved": "https://registry.npmjs.org/is-unc-path/-/is-unc-path-0.1.1.tgz", + "integrity": "sha1-qyUz13rXM1YRJMPcD1zYuQBUyGs=", + "requires": { + "unc-path-regex": "^0.1.0" + }, "dependencies": { "unc-path-regex": { "version": "0.1.2", - "from": "unc-path-regex@>=0.1.0 <0.2.0", - "resolved": "https://registry.npmjs.org/unc-path-regex/-/unc-path-regex-0.1.2.tgz" + "resolved": "https://registry.npmjs.org/unc-path-regex/-/unc-path-regex-0.1.2.tgz", + "integrity": "sha1-5z3T17DXxe2G+6xrCufYxqadUPo=" } } } @@ -1175,25 +2209,28 @@ }, "is-windows": { "version": "0.1.1", - "from": "is-windows@>=0.1.1 <0.2.0", - "resolved": "https://registry.npmjs.org/is-windows/-/is-windows-0.1.1.tgz" + "resolved": "https://registry.npmjs.org/is-windows/-/is-windows-0.1.1.tgz", + "integrity": "sha1-vjEHFUMc+rzMVKs5USEPoLbQGr4=" } } }, "map-cache": { "version": "0.2.2", - "from": "map-cache@>=0.2.0 <0.3.0", - "resolved": "https://registry.npmjs.org/map-cache/-/map-cache-0.2.2.tgz" + "resolved": "https://registry.npmjs.org/map-cache/-/map-cache-0.2.2.tgz", + "integrity": "sha1-wyq9C9ZSXZsFFkW7TyasXcmKDb8=" }, "path-root": { "version": "0.1.1", - "from": "path-root@>=0.1.1 <0.2.0", "resolved": "https://registry.npmjs.org/path-root/-/path-root-0.1.1.tgz", + "integrity": "sha1-mkpoFMrBwM1zNgqV8yCDyOpHRbc=", + "requires": { + "path-root-regex": "^0.1.0" + }, "dependencies": { "path-root-regex": { "version": "0.1.2", - "from": "path-root-regex@>=0.1.0 <0.2.0", - "resolved": "https://registry.npmjs.org/path-root-regex/-/path-root-regex-0.1.2.tgz" + "resolved": "https://registry.npmjs.org/path-root-regex/-/path-root-regex-0.1.2.tgz", + "integrity": "sha1-v8zcjfWxLcUsi0PsONGNcsBLqW0=" } } } @@ -1203,55 +2240,64 @@ }, "flagged-respawn": { "version": "0.3.2", - "from": "flagged-respawn@>=0.3.2 <0.4.0", - "resolved": "https://registry.npmjs.org/flagged-respawn/-/flagged-respawn-0.3.2.tgz" + "resolved": "https://registry.npmjs.org/flagged-respawn/-/flagged-respawn-0.3.2.tgz", + "integrity": "sha1-/xke3c1wiKZ1smEP/8l2vpuAdLU=" }, "lodash.isplainobject": { "version": "4.0.6", - "from": "lodash.isplainobject@>=4.0.4 <5.0.0", - "resolved": "https://registry.npmjs.org/lodash.isplainobject/-/lodash.isplainobject-4.0.6.tgz" + "resolved": "https://registry.npmjs.org/lodash.isplainobject/-/lodash.isplainobject-4.0.6.tgz", + "integrity": "sha1-fFJqUtibRcRcxpC4gWO+BJf1UMs=" }, "lodash.isstring": { "version": "4.0.1", - "from": "lodash.isstring@>=4.0.1 <5.0.0", - "resolved": "https://registry.npmjs.org/lodash.isstring/-/lodash.isstring-4.0.1.tgz" + "resolved": "https://registry.npmjs.org/lodash.isstring/-/lodash.isstring-4.0.1.tgz", + "integrity": "sha1-1SfftUVuynzJu5XV2ur4i6VKVFE=" }, "lodash.mapvalues": { "version": "4.6.0", - "from": "lodash.mapvalues@>=4.4.0 <5.0.0", - "resolved": "https://registry.npmjs.org/lodash.mapvalues/-/lodash.mapvalues-4.6.0.tgz" + "resolved": "https://registry.npmjs.org/lodash.mapvalues/-/lodash.mapvalues-4.6.0.tgz", + "integrity": "sha1-G6+lAF3p3W9PJmaMMMo3IwzJaJw=" }, "rechoir": { "version": "0.6.2", - "from": "rechoir@>=0.6.2 <0.7.0", - "resolved": "https://registry.npmjs.org/rechoir/-/rechoir-0.6.2.tgz" - }, - "expand-tilde": { - "version": "1.2.2", - "from": "expand-tilde@1.2.2", - "resolved": "https://registry.npmjs.org/expand-tilde/-/expand-tilde-1.2.2.tgz" + "resolved": "https://registry.npmjs.org/rechoir/-/rechoir-0.6.2.tgz", + "integrity": "sha1-hSBLVNuoLVdC4oyWdW70OvUOM4Q=", + "requires": { + "resolve": "^1.1.6" + } } } }, "orchestrator": { "version": "0.3.7", - "from": "orchestrator@>=0.3.0 <0.4.0", "resolved": "https://registry.npmjs.org/orchestrator/-/orchestrator-0.3.7.tgz", + "integrity": "sha1-xFBk4ixaKnuZc09AmpX/7cfTw98=", + "requires": { + "end-of-stream": "~0.1.5", + "sequencify": "~0.0.7", + "stream-consume": "~0.1.0" + }, "dependencies": { "end-of-stream": { "version": "0.1.5", - "from": "end-of-stream@>=0.1.5 <0.2.0", "resolved": "https://registry.npmjs.org/end-of-stream/-/end-of-stream-0.1.5.tgz", + "integrity": "sha1-jhdyBsPICDfYVjLouTWd/osvbq8=", + "requires": { + "once": "~1.3.0" + }, "dependencies": { "once": { "version": "1.3.3", - "from": "once@>=1.3.0 <1.4.0", "resolved": "https://registry.npmjs.org/once/-/once-1.3.3.tgz", + "integrity": "sha1-suJhVXzkwxTsgwTz+oJmPkKXyiA=", + "requires": { + "wrappy": "1" + }, "dependencies": { "wrappy": { "version": "1.0.2", - "from": "wrappy@>=1.0.0 <2.0.0", - "resolved": "https://registry.npmjs.org/wrappy/-/wrappy-1.0.2.tgz" + "resolved": "https://registry.npmjs.org/wrappy/-/wrappy-1.0.2.tgz", + "integrity": "sha1-tSQ9jz7BqjXxNkYFvA0QNuMKtp8=" } } } @@ -1259,120 +2305,187 @@ }, "sequencify": { "version": "0.0.7", - "from": "sequencify@>=0.0.7 <0.1.0", - "resolved": "https://registry.npmjs.org/sequencify/-/sequencify-0.0.7.tgz" + "resolved": "https://registry.npmjs.org/sequencify/-/sequencify-0.0.7.tgz", + "integrity": "sha1-kM/xnQLgcCf9dn9erT57ldHnOAw=" }, "stream-consume": { "version": "0.1.0", - "from": "stream-consume@>=0.1.0 <0.2.0", - "resolved": "https://registry.npmjs.org/stream-consume/-/stream-consume-0.1.0.tgz" + "resolved": "https://registry.npmjs.org/stream-consume/-/stream-consume-0.1.0.tgz", + "integrity": "sha1-pB6tGm1ggc63n2WwYZAbbY89HQ8=" } } }, + "os-homedir": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/os-homedir/-/os-homedir-1.0.1.tgz", + "integrity": "sha1-DWK99EuRb9O73PLKsZGUj7CU8Ac=" + }, "pretty-hrtime": { "version": "1.0.2", - "from": "pretty-hrtime@>=1.0.0 <2.0.0", - "resolved": "https://registry.npmjs.org/pretty-hrtime/-/pretty-hrtime-1.0.2.tgz" + "resolved": "https://registry.npmjs.org/pretty-hrtime/-/pretty-hrtime-1.0.2.tgz", + "integrity": "sha1-cMqW9NBiikQ7kYdY95QWqae8n6g=" }, "semver": { "version": "4.3.6", - "from": "semver@>=4.1.0 <5.0.0", - "resolved": "https://registry.npmjs.org/semver/-/semver-4.3.6.tgz" + "resolved": "https://registry.npmjs.org/semver/-/semver-4.3.6.tgz", + "integrity": "sha1-MAvG4OhjdPe6YQaLWx7NV/xlMto=" }, "tildify": { "version": "1.2.0", - "from": "tildify@>=1.0.0 <2.0.0", - "resolved": "https://registry.npmjs.org/tildify/-/tildify-1.2.0.tgz" + "resolved": "https://registry.npmjs.org/tildify/-/tildify-1.2.0.tgz", + "integrity": "sha1-3OwD9V3Km3qj5bBPIYF+tW5jWIo=", + "requires": { + "os-homedir": "^1.0.0" + } }, "v8flags": { "version": "2.0.11", - "from": "v8flags@>=2.0.2 <3.0.0", "resolved": "https://registry.npmjs.org/v8flags/-/v8flags-2.0.11.tgz", + "integrity": "sha1-vKjzDw1tYGEswsAGQeaWLUKuaIE=", + "requires": { + "user-home": "^1.1.1" + }, "dependencies": { "user-home": { "version": "1.1.1", - "from": "user-home@>=1.1.1 <2.0.0", - "resolved": "https://registry.npmjs.org/user-home/-/user-home-1.1.1.tgz" + "resolved": "https://registry.npmjs.org/user-home/-/user-home-1.1.1.tgz", + "integrity": "sha1-K1viOjK2Onyd640PKNSFcko98ZA=" } } }, "vinyl-fs": { "version": "0.3.14", - "from": "vinyl-fs@>=0.3.0 <0.4.0", "resolved": "https://registry.npmjs.org/vinyl-fs/-/vinyl-fs-0.3.14.tgz", + "integrity": "sha1-mmhRzhysHBzqX+hsCTHWIMLPqeY=", + "requires": { + "defaults": "^1.0.0", + "glob-stream": "^3.1.5", + "glob-watcher": "^0.0.6", + "graceful-fs": "^3.0.0", + "mkdirp": "^0.5.0", + "strip-bom": "^1.0.0", + "through2": "^0.6.1", + "vinyl": "^0.4.0" + }, "dependencies": { "defaults": { "version": "1.0.3", - "from": "defaults@>=1.0.0 <2.0.0", "resolved": "https://registry.npmjs.org/defaults/-/defaults-1.0.3.tgz", + "integrity": "sha1-xlYFHpgX2f8I7YgUd/P+QBnz730=", + "requires": { + "clone": "^1.0.2" + }, "dependencies": { "clone": { "version": "1.0.2", - "from": "clone@>=1.0.2 <2.0.0", - "resolved": "https://registry.npmjs.org/clone/-/clone-1.0.2.tgz" + "resolved": "https://registry.npmjs.org/clone/-/clone-1.0.2.tgz", + "integrity": "sha1-Jgt6meux7f4kdTgXX3gyQ8sZ0Uk=" } } }, "glob-stream": { "version": "3.1.18", - "from": "glob-stream@>=3.1.5 <4.0.0", "resolved": "https://registry.npmjs.org/glob-stream/-/glob-stream-3.1.18.tgz", + "integrity": "sha1-kXCl8St5Awb9/lmPMT+PeVT9FDs=", + "requires": { + "glob": "^4.3.1", + "glob2base": "^0.0.12", + "minimatch": "^2.0.1", + "ordered-read-streams": "^0.1.0", + "through2": "^0.6.1", + "unique-stream": "^1.0.0" + }, "dependencies": { "glob": { "version": "4.5.3", - "from": "glob@>=4.3.1 <5.0.0", "resolved": "https://registry.npmjs.org/glob/-/glob-4.5.3.tgz", + "integrity": "sha1-xstz0yJsHv7wTePFbQEvAzd+4V8=", + "requires": { + "inflight": "^1.0.4", + "inherits": "2", + "minimatch": "^2.0.1", + "once": "^1.3.0" + }, "dependencies": { "inflight": { "version": "1.0.5", - "from": "inflight@>=1.0.4 <2.0.0", "resolved": "https://registry.npmjs.org/inflight/-/inflight-1.0.5.tgz", + "integrity": "sha1-2zIEzVqd4ubNiQuFxuL2a89PYgo=", + "requires": { + "once": "^1.3.0", + "wrappy": "1" + }, "dependencies": { "wrappy": { "version": "1.0.2", - "from": "wrappy@>=1.0.0 <2.0.0", - "resolved": "https://registry.npmjs.org/wrappy/-/wrappy-1.0.2.tgz" + "resolved": "https://registry.npmjs.org/wrappy/-/wrappy-1.0.2.tgz", + "integrity": "sha1-tSQ9jz7BqjXxNkYFvA0QNuMKtp8=" } } }, "inherits": { "version": "2.0.3", - "from": "inherits@>=2.0.0 <3.0.0", - "resolved": "https://registry.npmjs.org/inherits/-/inherits-2.0.3.tgz" + "resolved": "https://registry.npmjs.org/inherits/-/inherits-2.0.3.tgz", + "integrity": "sha1-Yzwsg+PaQqUC9SRmAiSA9CCCYd4=" }, "once": { "version": "1.4.0", - "from": "once@>=1.3.0 <2.0.0", "resolved": "https://registry.npmjs.org/once/-/once-1.4.0.tgz", + "integrity": "sha1-WDsap3WWHUsROsF9nFC6753Xa9E=", + "requires": { + "wrappy": "1" + }, "dependencies": { "wrappy": { "version": "1.0.2", - "from": "wrappy@>=1.0.0 <2.0.0", - "resolved": "https://registry.npmjs.org/wrappy/-/wrappy-1.0.2.tgz" + "resolved": "https://registry.npmjs.org/wrappy/-/wrappy-1.0.2.tgz", + "integrity": "sha1-tSQ9jz7BqjXxNkYFvA0QNuMKtp8=" } } } } }, + "glob2base": { + "version": "0.0.12", + "resolved": "https://registry.npmjs.org/glob2base/-/glob2base-0.0.12.tgz", + "integrity": "sha1-nUGbPijxLoOjYhZKJ3BVkiycDVY=", + "requires": { + "find-index": "^0.1.1" + }, + "dependencies": { + "find-index": { + "version": "0.1.1", + "resolved": "https://registry.npmjs.org/find-index/-/find-index-0.1.1.tgz", + "integrity": "sha1-Z101iyyjiS15Whq0cjL4tuLg3eQ=" + } + } + }, "minimatch": { "version": "2.0.10", - "from": "minimatch@>=2.0.1 <3.0.0", "resolved": "https://registry.npmjs.org/minimatch/-/minimatch-2.0.10.tgz", + "integrity": "sha1-jQh8OcazjAAbl/ynzm0OHoCvusc=", + "requires": { + "brace-expansion": "^1.0.0" + }, "dependencies": { "brace-expansion": { "version": "1.1.6", - "from": "brace-expansion@>=1.0.0 <2.0.0", "resolved": "https://registry.npmjs.org/brace-expansion/-/brace-expansion-1.1.6.tgz", + "integrity": "sha1-cZfX6qm4fmSDkOph/GbIRCdCDfk=", + "requires": { + "balanced-match": "^0.4.1", + "concat-map": "0.0.1" + }, "dependencies": { "balanced-match": { "version": "0.4.2", - "from": "balanced-match@>=0.4.1 <0.5.0", - "resolved": "https://registry.npmjs.org/balanced-match/-/balanced-match-0.4.2.tgz" + "resolved": "https://registry.npmjs.org/balanced-match/-/balanced-match-0.4.2.tgz", + "integrity": "sha1-yz8+PHMtwPAe5wtAPzAuYddwmDg=" }, "concat-map": { "version": "0.0.1", - "from": "concat-map@0.0.1", - "resolved": "https://registry.npmjs.org/concat-map/-/concat-map-0.0.1.tgz" + "resolved": "https://registry.npmjs.org/concat-map/-/concat-map-0.0.1.tgz", + "integrity": "sha1-2Klr13/Wjfd5OnMDajug1UBdR3s=" } } } @@ -1380,79 +2493,87 @@ }, "ordered-read-streams": { "version": "0.1.0", - "from": "ordered-read-streams@>=0.1.0 <0.2.0", - "resolved": "https://registry.npmjs.org/ordered-read-streams/-/ordered-read-streams-0.1.0.tgz" - }, - "glob2base": { - "version": "0.0.12", - "from": "glob2base@>=0.0.12 <0.0.13", - "resolved": "https://registry.npmjs.org/glob2base/-/glob2base-0.0.12.tgz", - "dependencies": { - "find-index": { - "version": "0.1.1", - "from": "find-index@>=0.1.1 <0.2.0", - "resolved": "https://registry.npmjs.org/find-index/-/find-index-0.1.1.tgz" - } - } + "resolved": "https://registry.npmjs.org/ordered-read-streams/-/ordered-read-streams-0.1.0.tgz", + "integrity": "sha1-/VZamvjrRHO6abbtijQ1LLVS8SY=" }, "unique-stream": { "version": "1.0.0", - "from": "unique-stream@>=1.0.0 <2.0.0", - "resolved": "https://registry.npmjs.org/unique-stream/-/unique-stream-1.0.0.tgz" + "resolved": "https://registry.npmjs.org/unique-stream/-/unique-stream-1.0.0.tgz", + "integrity": "sha1-1ZpKdUJ0R9mqbJHnAmP40mpLEEs=" } } }, "glob-watcher": { "version": "0.0.6", - "from": "glob-watcher@>=0.0.6 <0.0.7", "resolved": "https://registry.npmjs.org/glob-watcher/-/glob-watcher-0.0.6.tgz", + "integrity": "sha1-uVtKjfdLOcgymLDAXJeLTZo7cQs=", + "requires": { + "gaze": "^0.5.1" + }, "dependencies": { "gaze": { "version": "0.5.2", - "from": "gaze@>=0.5.1 <0.6.0", "resolved": "https://registry.npmjs.org/gaze/-/gaze-0.5.2.tgz", + "integrity": "sha1-QLcJU30k0dRXZ9takIaJ3+aaxE8=", + "requires": { + "globule": "~0.1.0" + }, "dependencies": { "globule": { "version": "0.1.0", - "from": "globule@>=0.1.0 <0.2.0", "resolved": "https://registry.npmjs.org/globule/-/globule-0.1.0.tgz", + "integrity": "sha1-2cjt3h2nnRJaFRt5UzuXhnY0auU=", + "requires": { + "glob": "~3.1.21", + "lodash": "~1.0.1", + "minimatch": "~0.2.11" + }, "dependencies": { - "lodash": { - "version": "1.0.2", - "from": "lodash@>=1.0.1 <1.1.0", - "resolved": "https://registry.npmjs.org/lodash/-/lodash-1.0.2.tgz" - }, "glob": { "version": "3.1.21", - "from": "glob@>=3.1.21 <3.2.0", "resolved": "https://registry.npmjs.org/glob/-/glob-3.1.21.tgz", + "integrity": "sha1-0p4KBV3qUTj00H7UDomC6DwgZs0=", + "requires": { + "graceful-fs": "~1.2.0", + "inherits": "1", + "minimatch": "~0.2.11" + }, "dependencies": { "graceful-fs": { "version": "1.2.3", - "from": "graceful-fs@>=1.2.0 <1.3.0", - "resolved": "https://registry.npmjs.org/graceful-fs/-/graceful-fs-1.2.3.tgz" + "resolved": "https://registry.npmjs.org/graceful-fs/-/graceful-fs-1.2.3.tgz", + "integrity": "sha1-FaSAaldUfLLS2/J/QuiajDRRs2Q=" }, "inherits": { "version": "1.0.2", - "from": "inherits@>=1.0.0 <2.0.0", - "resolved": "https://registry.npmjs.org/inherits/-/inherits-1.0.2.tgz" + "resolved": "https://registry.npmjs.org/inherits/-/inherits-1.0.2.tgz", + "integrity": "sha1-ykMJ2t7mtUzAuNJH6NfHoJdb3Js=" } } }, + "lodash": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/lodash/-/lodash-1.0.2.tgz", + "integrity": "sha1-j1dWDIO1n8JwvT1WG2kAQ0MOJVE=" + }, "minimatch": { "version": "0.2.14", - "from": "minimatch@>=0.2.11 <0.3.0", "resolved": "https://registry.npmjs.org/minimatch/-/minimatch-0.2.14.tgz", + "integrity": "sha1-x054BXT2PG+aCQ6Q775u9TpqdWo=", + "requires": { + "lru-cache": "2", + "sigmund": "~1.0.0" + }, "dependencies": { "lru-cache": { "version": "2.7.3", - "from": "lru-cache@>=2.0.0 <3.0.0", - "resolved": "https://registry.npmjs.org/lru-cache/-/lru-cache-2.7.3.tgz" + "resolved": "https://registry.npmjs.org/lru-cache/-/lru-cache-2.7.3.tgz", + "integrity": "sha1-bUUk6LlV+V1PW1iFHOId1y+06VI=" }, "sigmund": { "version": "1.0.1", - "from": "sigmund@>=1.0.0 <1.1.0", - "resolved": "https://registry.npmjs.org/sigmund/-/sigmund-1.0.1.tgz" + "resolved": "https://registry.npmjs.org/sigmund/-/sigmund-1.0.1.tgz", + "integrity": "sha1-P/IfGYytIXX587eBhT/ZTQ0ZtZA=" } } } @@ -1464,144 +2585,175 @@ }, "graceful-fs": { "version": "3.0.11", - "from": "graceful-fs@>=3.0.0 <4.0.0", "resolved": "https://registry.npmjs.org/graceful-fs/-/graceful-fs-3.0.11.tgz", + "integrity": "sha1-dhPHeKGv6mLyXGMKCG1/Osu92Bg=", + "requires": { + "natives": "^1.1.0" + }, "dependencies": { "natives": { "version": "1.1.0", - "from": "natives@>=1.1.0 <2.0.0", - "resolved": "https://registry.npmjs.org/natives/-/natives-1.1.0.tgz" + "resolved": "https://registry.npmjs.org/natives/-/natives-1.1.0.tgz", + "integrity": "sha1-6f+EFBimsux6SV6TmYT3jxY+bjE=" } } }, "mkdirp": { "version": "0.5.1", - "from": "mkdirp@>=0.5.0 <0.6.0", "resolved": "https://registry.npmjs.org/mkdirp/-/mkdirp-0.5.1.tgz", + "integrity": "sha1-MAV0OOrGz3+MR2fzhkjWaX11yQM=", + "requires": { + "minimist": "0.0.8" + }, "dependencies": { "minimist": { "version": "0.0.8", - "from": "minimist@0.0.8", - "resolved": "https://registry.npmjs.org/minimist/-/minimist-0.0.8.tgz" + "resolved": "https://registry.npmjs.org/minimist/-/minimist-0.0.8.tgz", + "integrity": "sha1-hX/Kv8M5fSYluCKCYuhqp6ARsF0=" } } }, "strip-bom": { "version": "1.0.0", - "from": "strip-bom@>=1.0.0 <2.0.0", "resolved": "https://registry.npmjs.org/strip-bom/-/strip-bom-1.0.0.tgz", + "integrity": "sha1-hbiGLzhEtabV7IRnqTWYFzo295Q=", + "requires": { + "first-chunk-stream": "^1.0.0", + "is-utf8": "^0.2.0" + }, "dependencies": { "first-chunk-stream": { "version": "1.0.0", - "from": "first-chunk-stream@>=1.0.0 <2.0.0", - "resolved": "https://registry.npmjs.org/first-chunk-stream/-/first-chunk-stream-1.0.0.tgz" + "resolved": "https://registry.npmjs.org/first-chunk-stream/-/first-chunk-stream-1.0.0.tgz", + "integrity": "sha1-Wb+1DNkF9g18OUzT2ayqtOatk04=" }, "is-utf8": { "version": "0.2.1", - "from": "is-utf8@>=0.2.0 <0.3.0", - "resolved": "https://registry.npmjs.org/is-utf8/-/is-utf8-0.2.1.tgz" + "resolved": "https://registry.npmjs.org/is-utf8/-/is-utf8-0.2.1.tgz", + "integrity": "sha1-Sw2hRCEE0bM2NA6AeX6GXPOffXI=" } } }, "through2": { "version": "0.6.5", - "from": "through2@>=0.6.1 <0.7.0", "resolved": "https://registry.npmjs.org/through2/-/through2-0.6.5.tgz", + "integrity": "sha1-QaucZ7KdVyCQcUEOHXp6lozTrUg=", + "requires": { + "readable-stream": ">=1.0.33-1 <1.1.0-0", + "xtend": ">=4.0.0 <4.1.0-0" + }, "dependencies": { "readable-stream": { "version": "1.0.34", - "from": "readable-stream@>=1.0.33-1 <1.1.0-0", "resolved": "https://registry.npmjs.org/readable-stream/-/readable-stream-1.0.34.tgz", + "integrity": "sha1-Elgg40vIQtLyqq+v5MKRbuMsFXw=", + "requires": { + "core-util-is": "~1.0.0", + "inherits": "~2.0.1", + "isarray": "0.0.1", + "string_decoder": "~0.10.x" + }, "dependencies": { "core-util-is": { "version": "1.0.2", - "from": "core-util-is@>=1.0.0 <1.1.0", - "resolved": "https://registry.npmjs.org/core-util-is/-/core-util-is-1.0.2.tgz" + "resolved": "https://registry.npmjs.org/core-util-is/-/core-util-is-1.0.2.tgz", + "integrity": "sha1-tf1UIgqivFq1eqtxQMlAdUUDwac=" + }, + "inherits": { + "version": "2.0.3", + "resolved": "https://registry.npmjs.org/inherits/-/inherits-2.0.3.tgz", + "integrity": "sha1-Yzwsg+PaQqUC9SRmAiSA9CCCYd4=" }, "isarray": { "version": "0.0.1", - "from": "isarray@0.0.1", - "resolved": "https://registry.npmjs.org/isarray/-/isarray-0.0.1.tgz" + "resolved": "https://registry.npmjs.org/isarray/-/isarray-0.0.1.tgz", + "integrity": "sha1-ihis/Kmo9Bd+Cav8YDiTmwXR7t8=" }, "string_decoder": { "version": "0.10.31", - "from": "string_decoder@>=0.10.0 <0.11.0", - "resolved": "https://registry.npmjs.org/string_decoder/-/string_decoder-0.10.31.tgz" - }, - "inherits": { - "version": "2.0.3", - "from": "inherits@>=2.0.1 <2.1.0", - "resolved": "https://registry.npmjs.org/inherits/-/inherits-2.0.3.tgz" + "resolved": "https://registry.npmjs.org/string_decoder/-/string_decoder-0.10.31.tgz", + "integrity": "sha1-YuIDvEF2bGwoyfyEMB2rHFMQ+pQ=" } } }, "xtend": { "version": "4.0.1", - "from": "xtend@>=4.0.0 <4.1.0-0", - "resolved": "https://registry.npmjs.org/xtend/-/xtend-4.0.1.tgz" + "resolved": "https://registry.npmjs.org/xtend/-/xtend-4.0.1.tgz", + "integrity": "sha1-pcbVMr5lbiPbgg77lDofBJmNY68=" } } } } - }, - "os-homedir": { - "version": "1.0.1", - "from": "os-homedir@1.0.1", - "resolved": "https://registry.npmjs.org/os-homedir/-/os-homedir-1.0.1.tgz" } } }, "gulp-changed": { "version": "1.3.2", - "from": "gulp-changed@>=1.1.1 <2.0.0", "resolved": "https://registry.npmjs.org/gulp-changed/-/gulp-changed-1.3.2.tgz", + "integrity": "sha1-nvyNMl+YBcx2aP3059YNSxQQ8s8=", + "requires": { + "gulp-util": "^3.0.0", + "through2": "^2.0.0" + }, "dependencies": { "through2": { "version": "2.0.1", - "from": "through2@>=2.0.0 <3.0.0", "resolved": "https://registry.npmjs.org/through2/-/through2-2.0.1.tgz", + "integrity": "sha1-OE51MU1J8y3hLuu4E2uOtrXVnak=", + "requires": { + "readable-stream": "~2.0.0", + "xtend": "~4.0.0" + }, "dependencies": { "readable-stream": { "version": "2.0.6", - "from": "readable-stream@>=2.0.0 <2.1.0", "resolved": "https://registry.npmjs.org/readable-stream/-/readable-stream-2.0.6.tgz", + "integrity": "sha1-j5A0HmilPMySh4jaz80Rs265t44=", + "requires": { + "core-util-is": "~1.0.0", + "inherits": "~2.0.1", + "isarray": "~1.0.0", + "process-nextick-args": "~1.0.6", + "string_decoder": "~0.10.x", + "util-deprecate": "~1.0.1" + }, "dependencies": { "core-util-is": { "version": "1.0.2", - "from": "core-util-is@>=1.0.0 <1.1.0", - "resolved": "https://registry.npmjs.org/core-util-is/-/core-util-is-1.0.2.tgz" + "resolved": "https://registry.npmjs.org/core-util-is/-/core-util-is-1.0.2.tgz", + "integrity": "sha1-tf1UIgqivFq1eqtxQMlAdUUDwac=" }, "inherits": { "version": "2.0.3", - "from": "inherits@>=2.0.1 <2.1.0", - "resolved": "https://registry.npmjs.org/inherits/-/inherits-2.0.3.tgz" + "resolved": "https://registry.npmjs.org/inherits/-/inherits-2.0.3.tgz", + "integrity": "sha1-Yzwsg+PaQqUC9SRmAiSA9CCCYd4=" }, "isarray": { "version": "1.0.0", - "from": "isarray@>=1.0.0 <1.1.0", - "resolved": "https://registry.npmjs.org/isarray/-/isarray-1.0.0.tgz" + "resolved": "https://registry.npmjs.org/isarray/-/isarray-1.0.0.tgz", + "integrity": "sha1-u5NdSFgsuhaMBoNJV6VKPgcSTxE=" }, "process-nextick-args": { "version": "1.0.7", - "from": "process-nextick-args@>=1.0.6 <1.1.0", - "resolved": "https://registry.npmjs.org/process-nextick-args/-/process-nextick-args-1.0.7.tgz" + "resolved": "https://registry.npmjs.org/process-nextick-args/-/process-nextick-args-1.0.7.tgz", + "integrity": "sha1-FQ4gt1ZZCtP5EJPyWk8q2L/zC6M=" }, "string_decoder": { "version": "0.10.31", - "from": "string_decoder@>=0.10.0 <0.11.0", - "resolved": "https://registry.npmjs.org/string_decoder/-/string_decoder-0.10.31.tgz" + "resolved": "https://registry.npmjs.org/string_decoder/-/string_decoder-0.10.31.tgz", + "integrity": "sha1-YuIDvEF2bGwoyfyEMB2rHFMQ+pQ=" }, "util-deprecate": { "version": "1.0.2", - "from": "util-deprecate@>=1.0.1 <1.1.0", - "resolved": "https://registry.npmjs.org/util-deprecate/-/util-deprecate-1.0.2.tgz" + "resolved": "https://registry.npmjs.org/util-deprecate/-/util-deprecate-1.0.2.tgz", + "integrity": "sha1-RQ1Nyfpw3nMnYvvS1KKJgUGaDM8=" } } }, "xtend": { "version": "4.0.1", - "from": "xtend@>=4.0.0 <4.1.0", - "resolved": "https://registry.npmjs.org/xtend/-/xtend-4.0.1.tgz" + "resolved": "https://registry.npmjs.org/xtend/-/xtend-4.0.1.tgz", + "integrity": "sha1-pcbVMr5lbiPbgg77lDofBJmNY68=" } } } @@ -1609,67 +2761,109 @@ }, "gulp-less": { "version": "3.1.0", - "from": "gulp-less@>=3.0.1 <4.0.0", "resolved": "https://registry.npmjs.org/gulp-less/-/gulp-less-3.1.0.tgz", + "integrity": "sha1-xUwu4BTr5uE1v8sBadtN25NQbeY=", + "requires": { + "accord": "^0.23.0", + "gulp-util": "^3.0.7", + "less": "^2.6.0", + "object-assign": "^4.0.1", + "through2": "^2.0.0", + "vinyl-sourcemaps-apply": "^0.2.0" + }, "dependencies": { "accord": { "version": "0.23.0", - "from": "accord@>=0.23.0 <0.24.0", "resolved": "https://registry.npmjs.org/accord/-/accord-0.23.0.tgz", + "integrity": "sha1-JGjHjlZBLbqTEdOD+4c0UNKGfK8=", + "requires": { + "convert-source-map": "1.x", + "fobject": "0.0.4", + "glob": "7.0.3", + "indx": "0.2.x", + "lodash": "4.11.2", + "resolve": "1.x", + "semver": "^5.1.0", + "uglify-js": "^2.6.0", + "when": "3.x" + }, "dependencies": { "fobject": { "version": "0.0.4", - "from": "fobject@0.0.4", "resolved": "https://registry.npmjs.org/fobject/-/fobject-0.0.4.tgz", + "integrity": "sha1-g5nmuRBdLrjm353MQRI6FxaIrf4=", + "requires": { + "graceful-fs": "^4.1.3", + "semver": "^5.1.0", + "when": "^3.7.7" + }, "dependencies": { "graceful-fs": { "version": "4.1.6", - "from": "graceful-fs@>=4.1.3 <5.0.0", - "resolved": "https://registry.npmjs.org/graceful-fs/-/graceful-fs-4.1.6.tgz" + "resolved": "https://registry.npmjs.org/graceful-fs/-/graceful-fs-4.1.6.tgz", + "integrity": "sha1-UUw4dysxvuLgi+3CGgrrOr9UwZ4=" } } }, "glob": { "version": "7.0.3", - "from": "glob@7.0.3", "resolved": "https://registry.npmjs.org/glob/-/glob-7.0.3.tgz", + "integrity": "sha1-CqI1kxpKlqwT1g/6wvuHe9btT1g=", + "requires": { + "inflight": "^1.0.4", + "inherits": "2", + "minimatch": "2 || 3", + "once": "^1.3.0", + "path-is-absolute": "^1.0.0" + }, "dependencies": { "inflight": { "version": "1.0.5", - "from": "inflight@>=1.0.4 <2.0.0", "resolved": "https://registry.npmjs.org/inflight/-/inflight-1.0.5.tgz", + "integrity": "sha1-2zIEzVqd4ubNiQuFxuL2a89PYgo=", + "requires": { + "once": "^1.3.0", + "wrappy": "1" + }, "dependencies": { "wrappy": { "version": "1.0.2", - "from": "wrappy@>=1.0.0 <2.0.0", - "resolved": "https://registry.npmjs.org/wrappy/-/wrappy-1.0.2.tgz" + "resolved": "https://registry.npmjs.org/wrappy/-/wrappy-1.0.2.tgz", + "integrity": "sha1-tSQ9jz7BqjXxNkYFvA0QNuMKtp8=" } } }, "inherits": { "version": "2.0.3", - "from": "inherits@>=2.0.0 <3.0.0", - "resolved": "https://registry.npmjs.org/inherits/-/inherits-2.0.3.tgz" + "resolved": "https://registry.npmjs.org/inherits/-/inherits-2.0.3.tgz", + "integrity": "sha1-Yzwsg+PaQqUC9SRmAiSA9CCCYd4=" }, "minimatch": { "version": "3.0.3", - "from": "minimatch@>=2.0.0 <3.0.0||>=3.0.0 <4.0.0", "resolved": "https://registry.npmjs.org/minimatch/-/minimatch-3.0.3.tgz", + "integrity": "sha1-Kk5AkLlrLbBqnX3wEFWmKnfJt3Q=", + "requires": { + "brace-expansion": "^1.0.0" + }, "dependencies": { "brace-expansion": { "version": "1.1.6", - "from": "brace-expansion@>=1.0.0 <2.0.0", "resolved": "https://registry.npmjs.org/brace-expansion/-/brace-expansion-1.1.6.tgz", + "integrity": "sha1-cZfX6qm4fmSDkOph/GbIRCdCDfk=", + "requires": { + "balanced-match": "^0.4.1", + "concat-map": "0.0.1" + }, "dependencies": { "balanced-match": { "version": "0.4.2", - "from": "balanced-match@>=0.4.1 <0.5.0", - "resolved": "https://registry.npmjs.org/balanced-match/-/balanced-match-0.4.2.tgz" + "resolved": "https://registry.npmjs.org/balanced-match/-/balanced-match-0.4.2.tgz", + "integrity": "sha1-yz8+PHMtwPAe5wtAPzAuYddwmDg=" }, "concat-map": { "version": "0.0.1", - "from": "concat-map@0.0.1", - "resolved": "https://registry.npmjs.org/concat-map/-/concat-map-0.0.1.tgz" + "resolved": "https://registry.npmjs.org/concat-map/-/concat-map-0.0.1.tgz", + "integrity": "sha1-2Klr13/Wjfd5OnMDajug1UBdR3s=" } } } @@ -1677,145 +2871,188 @@ }, "once": { "version": "1.4.0", - "from": "once@>=1.3.0 <2.0.0", "resolved": "https://registry.npmjs.org/once/-/once-1.4.0.tgz", + "integrity": "sha1-WDsap3WWHUsROsF9nFC6753Xa9E=", + "requires": { + "wrappy": "1" + }, "dependencies": { "wrappy": { "version": "1.0.2", - "from": "wrappy@>=1.0.0 <2.0.0", - "resolved": "https://registry.npmjs.org/wrappy/-/wrappy-1.0.2.tgz" + "resolved": "https://registry.npmjs.org/wrappy/-/wrappy-1.0.2.tgz", + "integrity": "sha1-tSQ9jz7BqjXxNkYFvA0QNuMKtp8=" } } }, "path-is-absolute": { "version": "1.0.0", - "from": "path-is-absolute@>=1.0.0 <2.0.0", - "resolved": "https://registry.npmjs.org/path-is-absolute/-/path-is-absolute-1.0.0.tgz" + "resolved": "https://registry.npmjs.org/path-is-absolute/-/path-is-absolute-1.0.0.tgz", + "integrity": "sha1-Jj2tpmqz8vsQv3+dJN2PPlcO+RI=" } } }, "indx": { "version": "0.2.3", - "from": "indx@>=0.2.0 <0.3.0", - "resolved": "https://registry.npmjs.org/indx/-/indx-0.2.3.tgz" + "resolved": "https://registry.npmjs.org/indx/-/indx-0.2.3.tgz", + "integrity": "sha1-Fdz1bunPZcAjTFE8J/vVgOcPvFA=" }, "lodash": { "version": "4.11.2", - "from": "lodash@4.11.2", - "resolved": "https://registry.npmjs.org/lodash/-/lodash-4.11.2.tgz" + "resolved": "https://registry.npmjs.org/lodash/-/lodash-4.11.2.tgz", + "integrity": "sha1-1rQzixEKWOIdrlzrz9u/0rxM2zs=" }, "semver": { "version": "5.3.0", - "from": "semver@>=5.1.0 <6.0.0", - "resolved": "https://registry.npmjs.org/semver/-/semver-5.3.0.tgz" + "resolved": "https://registry.npmjs.org/semver/-/semver-5.3.0.tgz", + "integrity": "sha1-myzl094C0XxgEq0yaqa00M9U+U8=" }, "uglify-js": { "version": "2.7.3", - "from": "uglify-js@>=2.6.0 <3.0.0", "resolved": "https://registry.npmjs.org/uglify-js/-/uglify-js-2.7.3.tgz", + "integrity": "sha1-ObOnMpuJ9exQfjRMbiJWhpjvSGg=", + "requires": { + "async": "~0.2.6", + "source-map": "~0.5.1", + "uglify-to-browserify": "~1.0.0", + "yargs": "~3.10.0" + }, "dependencies": { "async": { "version": "0.2.10", - "from": "async@>=0.2.6 <0.3.0", - "resolved": "https://registry.npmjs.org/async/-/async-0.2.10.tgz" + "resolved": "https://registry.npmjs.org/async/-/async-0.2.10.tgz", + "integrity": "sha1-trvgsGdLnXGXCMo43owjfLUmw9E=" }, "source-map": { "version": "0.5.6", - "from": "source-map@>=0.5.1 <0.6.0", - "resolved": "https://registry.npmjs.org/source-map/-/source-map-0.5.6.tgz" + "resolved": "https://registry.npmjs.org/source-map/-/source-map-0.5.6.tgz", + "integrity": "sha1-dc449SvwczxafwwRjYEzSiu19BI=" }, "uglify-to-browserify": { "version": "1.0.2", - "from": "uglify-to-browserify@>=1.0.0 <1.1.0", - "resolved": "https://registry.npmjs.org/uglify-to-browserify/-/uglify-to-browserify-1.0.2.tgz" + "resolved": "https://registry.npmjs.org/uglify-to-browserify/-/uglify-to-browserify-1.0.2.tgz", + "integrity": "sha1-bgkk1r2mta/jSeOabWMoUKD4grc=" }, "yargs": { "version": "3.10.0", - "from": "yargs@>=3.10.0 <3.11.0", "resolved": "https://registry.npmjs.org/yargs/-/yargs-3.10.0.tgz", + "integrity": "sha1-9+572FfdfB0tOMDnTvvWgdFDH9E=", + "requires": { + "camelcase": "^1.0.2", + "cliui": "^2.1.0", + "decamelize": "^1.0.0", + "window-size": "0.1.0" + }, "dependencies": { "camelcase": { "version": "1.2.1", - "from": "camelcase@>=1.0.2 <2.0.0", - "resolved": "https://registry.npmjs.org/camelcase/-/camelcase-1.2.1.tgz" + "resolved": "https://registry.npmjs.org/camelcase/-/camelcase-1.2.1.tgz", + "integrity": "sha1-m7UwTS4LVmmLLHWLCKPqqdqlijk=" }, "cliui": { "version": "2.1.0", - "from": "cliui@>=2.1.0 <3.0.0", "resolved": "https://registry.npmjs.org/cliui/-/cliui-2.1.0.tgz", + "integrity": "sha1-S0dXYP+AJkx2LDoXGQMukcf+oNE=", + "requires": { + "center-align": "^0.1.1", + "right-align": "^0.1.1", + "wordwrap": "0.0.2" + }, "dependencies": { "center-align": { "version": "0.1.3", - "from": "center-align@>=0.1.1 <0.2.0", "resolved": "https://registry.npmjs.org/center-align/-/center-align-0.1.3.tgz", + "integrity": "sha1-qg0yYptu6XIgBBHL1EYckHvCt60=", + "requires": { + "align-text": "^0.1.3", + "lazy-cache": "^1.0.3" + }, "dependencies": { "align-text": { "version": "0.1.4", - "from": "align-text@>=0.1.1 <0.2.0", "resolved": "https://registry.npmjs.org/align-text/-/align-text-0.1.4.tgz", + "integrity": "sha1-DNkKVhCT810KmSVsIrcGlDP60Rc=", + "requires": { + "kind-of": "^3.0.2", + "longest": "^1.0.1", + "repeat-string": "^1.5.2" + }, "dependencies": { "kind-of": { "version": "3.0.4", - "from": "kind-of@>=3.0.2 <4.0.0", "resolved": "https://registry.npmjs.org/kind-of/-/kind-of-3.0.4.tgz", + "integrity": "sha1-e47PGKThf4Jp1ztQHJ8jLJaIenQ=", + "requires": { + "is-buffer": "^1.0.2" + }, "dependencies": { "is-buffer": { "version": "1.1.4", - "from": "is-buffer@>=1.0.2 <2.0.0", - "resolved": "https://registry.npmjs.org/is-buffer/-/is-buffer-1.1.4.tgz" + "resolved": "https://registry.npmjs.org/is-buffer/-/is-buffer-1.1.4.tgz", + "integrity": "sha1-z8hszV3FpS+oBIkRHGkgxFfi2Ys=" } } }, "longest": { "version": "1.0.1", - "from": "longest@>=1.0.1 <2.0.0", - "resolved": "https://registry.npmjs.org/longest/-/longest-1.0.1.tgz" + "resolved": "https://registry.npmjs.org/longest/-/longest-1.0.1.tgz", + "integrity": "sha1-MKCy2jj3N3DoKUoNIuZiXtd9AJc=" }, "repeat-string": { "version": "1.5.4", - "from": "repeat-string@>=1.5.2 <2.0.0", - "resolved": "https://registry.npmjs.org/repeat-string/-/repeat-string-1.5.4.tgz" + "resolved": "https://registry.npmjs.org/repeat-string/-/repeat-string-1.5.4.tgz", + "integrity": "sha1-ZOwMkeD0tHX5DVtkNlHj5uW2wtU=" } } }, "lazy-cache": { "version": "1.0.4", - "from": "lazy-cache@>=1.0.3 <2.0.0", - "resolved": "https://registry.npmjs.org/lazy-cache/-/lazy-cache-1.0.4.tgz" + "resolved": "https://registry.npmjs.org/lazy-cache/-/lazy-cache-1.0.4.tgz", + "integrity": "sha1-odePw6UEdMuAhF07O24dpJpEbo4=" } } }, "right-align": { "version": "0.1.3", - "from": "right-align@>=0.1.1 <0.2.0", "resolved": "https://registry.npmjs.org/right-align/-/right-align-0.1.3.tgz", + "integrity": "sha1-YTObci/mo1FWiSENJOFMlhSGE+8=", + "requires": { + "align-text": "^0.1.1" + }, "dependencies": { "align-text": { "version": "0.1.4", - "from": "align-text@>=0.1.1 <0.2.0", "resolved": "https://registry.npmjs.org/align-text/-/align-text-0.1.4.tgz", + "integrity": "sha1-DNkKVhCT810KmSVsIrcGlDP60Rc=", + "requires": { + "kind-of": "^3.0.2", + "longest": "^1.0.1", + "repeat-string": "^1.5.2" + }, "dependencies": { "kind-of": { "version": "3.0.4", - "from": "kind-of@>=3.0.2 <4.0.0", "resolved": "https://registry.npmjs.org/kind-of/-/kind-of-3.0.4.tgz", + "integrity": "sha1-e47PGKThf4Jp1ztQHJ8jLJaIenQ=", + "requires": { + "is-buffer": "^1.0.2" + }, "dependencies": { "is-buffer": { "version": "1.1.4", - "from": "is-buffer@>=1.0.2 <2.0.0", - "resolved": "https://registry.npmjs.org/is-buffer/-/is-buffer-1.1.4.tgz" + "resolved": "https://registry.npmjs.org/is-buffer/-/is-buffer-1.1.4.tgz", + "integrity": "sha1-z8hszV3FpS+oBIkRHGkgxFfi2Ys=" } } }, "longest": { "version": "1.0.1", - "from": "longest@>=1.0.1 <2.0.0", - "resolved": "https://registry.npmjs.org/longest/-/longest-1.0.1.tgz" + "resolved": "https://registry.npmjs.org/longest/-/longest-1.0.1.tgz", + "integrity": "sha1-MKCy2jj3N3DoKUoNIuZiXtd9AJc=" }, "repeat-string": { "version": "1.5.4", - "from": "repeat-string@>=1.5.2 <2.0.0", - "resolved": "https://registry.npmjs.org/repeat-string/-/repeat-string-1.5.4.tgz" + "resolved": "https://registry.npmjs.org/repeat-string/-/repeat-string-1.5.4.tgz", + "integrity": "sha1-ZOwMkeD0tHX5DVtkNlHj5uW2wtU=" } } } @@ -1823,20 +3060,20 @@ }, "wordwrap": { "version": "0.0.2", - "from": "wordwrap@0.0.2", - "resolved": "https://registry.npmjs.org/wordwrap/-/wordwrap-0.0.2.tgz" + "resolved": "https://registry.npmjs.org/wordwrap/-/wordwrap-0.0.2.tgz", + "integrity": "sha1-t5Zpu0LstAn4PVg8rVLKF+qhZD8=" } } }, "decamelize": { "version": "1.2.0", - "from": "decamelize@>=1.0.0 <2.0.0", - "resolved": "https://registry.npmjs.org/decamelize/-/decamelize-1.2.0.tgz" + "resolved": "https://registry.npmjs.org/decamelize/-/decamelize-1.2.0.tgz", + "integrity": "sha1-9lNNFRSCabIDUue+4m9QH5oZEpA=" }, "window-size": { "version": "0.1.0", - "from": "window-size@0.1.0", - "resolved": "https://registry.npmjs.org/window-size/-/window-size-0.1.0.tgz" + "resolved": "https://registry.npmjs.org/window-size/-/window-size-0.1.0.tgz", + "integrity": "sha1-VDjNLqk7IC76Ohn+iIeu58lPnJ0=" } } } @@ -1844,74 +3081,89 @@ }, "when": { "version": "3.7.7", - "from": "when@>=3.0.0 <4.0.0", - "resolved": "https://registry.npmjs.org/when/-/when-3.7.7.tgz" + "resolved": "https://registry.npmjs.org/when/-/when-3.7.7.tgz", + "integrity": "sha1-q6A/w7tzbWyIsJHQE9io5ZDYRxg=" } } }, "object-assign": { "version": "4.1.0", - "from": "object-assign@>=4.0.1 <5.0.0", - "resolved": "https://registry.npmjs.org/object-assign/-/object-assign-4.1.0.tgz" + "resolved": "https://registry.npmjs.org/object-assign/-/object-assign-4.1.0.tgz", + "integrity": "sha1-ejs9DpgGPUP0wD8uiubNUahog6A=" }, "through2": { "version": "2.0.1", - "from": "through2@>=2.0.0 <3.0.0", "resolved": "https://registry.npmjs.org/through2/-/through2-2.0.1.tgz", + "integrity": "sha1-OE51MU1J8y3hLuu4E2uOtrXVnak=", + "requires": { + "readable-stream": "~2.0.0", + "xtend": "~4.0.0" + }, "dependencies": { "readable-stream": { "version": "2.0.6", - "from": "readable-stream@>=2.0.0 <2.1.0", "resolved": "https://registry.npmjs.org/readable-stream/-/readable-stream-2.0.6.tgz", + "integrity": "sha1-j5A0HmilPMySh4jaz80Rs265t44=", + "requires": { + "core-util-is": "~1.0.0", + "inherits": "~2.0.1", + "isarray": "~1.0.0", + "process-nextick-args": "~1.0.6", + "string_decoder": "~0.10.x", + "util-deprecate": "~1.0.1" + }, "dependencies": { "core-util-is": { "version": "1.0.2", - "from": "core-util-is@>=1.0.0 <1.1.0", - "resolved": "https://registry.npmjs.org/core-util-is/-/core-util-is-1.0.2.tgz" + "resolved": "https://registry.npmjs.org/core-util-is/-/core-util-is-1.0.2.tgz", + "integrity": "sha1-tf1UIgqivFq1eqtxQMlAdUUDwac=" }, "inherits": { "version": "2.0.3", - "from": "inherits@>=2.0.1 <2.1.0", - "resolved": "https://registry.npmjs.org/inherits/-/inherits-2.0.3.tgz" + "resolved": "https://registry.npmjs.org/inherits/-/inherits-2.0.3.tgz", + "integrity": "sha1-Yzwsg+PaQqUC9SRmAiSA9CCCYd4=" }, "isarray": { "version": "1.0.0", - "from": "isarray@>=1.0.0 <1.1.0", - "resolved": "https://registry.npmjs.org/isarray/-/isarray-1.0.0.tgz" + "resolved": "https://registry.npmjs.org/isarray/-/isarray-1.0.0.tgz", + "integrity": "sha1-u5NdSFgsuhaMBoNJV6VKPgcSTxE=" }, "process-nextick-args": { "version": "1.0.7", - "from": "process-nextick-args@>=1.0.6 <1.1.0", - "resolved": "https://registry.npmjs.org/process-nextick-args/-/process-nextick-args-1.0.7.tgz" + "resolved": "https://registry.npmjs.org/process-nextick-args/-/process-nextick-args-1.0.7.tgz", + "integrity": "sha1-FQ4gt1ZZCtP5EJPyWk8q2L/zC6M=" }, "string_decoder": { "version": "0.10.31", - "from": "string_decoder@>=0.10.0 <0.11.0", - "resolved": "https://registry.npmjs.org/string_decoder/-/string_decoder-0.10.31.tgz" + "resolved": "https://registry.npmjs.org/string_decoder/-/string_decoder-0.10.31.tgz", + "integrity": "sha1-YuIDvEF2bGwoyfyEMB2rHFMQ+pQ=" }, "util-deprecate": { "version": "1.0.2", - "from": "util-deprecate@>=1.0.1 <1.1.0", - "resolved": "https://registry.npmjs.org/util-deprecate/-/util-deprecate-1.0.2.tgz" + "resolved": "https://registry.npmjs.org/util-deprecate/-/util-deprecate-1.0.2.tgz", + "integrity": "sha1-RQ1Nyfpw3nMnYvvS1KKJgUGaDM8=" } } }, "xtend": { "version": "4.0.1", - "from": "xtend@>=4.0.0 <4.1.0", - "resolved": "https://registry.npmjs.org/xtend/-/xtend-4.0.1.tgz" + "resolved": "https://registry.npmjs.org/xtend/-/xtend-4.0.1.tgz", + "integrity": "sha1-pcbVMr5lbiPbgg77lDofBJmNY68=" } } }, "vinyl-sourcemaps-apply": { "version": "0.2.1", - "from": "vinyl-sourcemaps-apply@>=0.2.0 <0.3.0", "resolved": "https://registry.npmjs.org/vinyl-sourcemaps-apply/-/vinyl-sourcemaps-apply-0.2.1.tgz", + "integrity": "sha1-q2VJ1h0XLCsbh75cUI0jnI74dwU=", + "requires": { + "source-map": "^0.5.1" + }, "dependencies": { "source-map": { "version": "0.5.6", - "from": "source-map@>=0.5.1 <0.6.0", - "resolved": "https://registry.npmjs.org/source-map/-/source-map-0.5.6.tgz" + "resolved": "https://registry.npmjs.org/source-map/-/source-map-0.5.6.tgz", + "integrity": "sha1-dc449SvwczxafwwRjYEzSiu19BI=" } } } @@ -1919,94 +3171,121 @@ }, "gulp-newer": { "version": "0.5.2", - "from": "gulp-newer@>=0.5.0 <0.6.0", "resolved": "https://registry.npmjs.org/gulp-newer/-/gulp-newer-0.5.2.tgz", + "integrity": "sha1-2T7QyWUH8o2tCSKKLJflK6HB2r4=", + "requires": { + "gulp-util": "^3.0.7", + "kew": "^0.7.0" + }, "dependencies": { "kew": { "version": "0.7.0", - "from": "kew@>=0.7.0 <0.8.0", - "resolved": "https://registry.npmjs.org/kew/-/kew-0.7.0.tgz" + "resolved": "https://registry.npmjs.org/kew/-/kew-0.7.0.tgz", + "integrity": "sha1-edk9LTM2PW/dKXCzNdkUGtWR15s=" } } }, "gulp-rename": { "version": "1.2.2", - "from": "gulp-rename@>=1.2.0 <2.0.0", - "resolved": "https://registry.npmjs.org/gulp-rename/-/gulp-rename-1.2.2.tgz" + "resolved": "https://registry.npmjs.org/gulp-rename/-/gulp-rename-1.2.2.tgz", + "integrity": "sha1-OtRCh2PwXidk3sHGfYaNsnVoeBc=" }, "gulp-replace": { "version": "0.5.4", - "from": "gulp-replace@>=0.5.3 <0.6.0", "resolved": "https://registry.npmjs.org/gulp-replace/-/gulp-replace-0.5.4.tgz", + "integrity": "sha1-aaZ5FLvRPFYr/xT1BKQDeWqg2qk=", + "requires": { + "istextorbinary": "1.0.2", + "readable-stream": "^2.0.1", + "replacestream": "^4.0.0" + }, "dependencies": { "istextorbinary": { "version": "1.0.2", - "from": "istextorbinary@1.0.2", "resolved": "https://registry.npmjs.org/istextorbinary/-/istextorbinary-1.0.2.tgz", + "integrity": "sha1-rOGTVNGpoBc+/rEITOD4ewrX3s8=", + "requires": { + "binaryextensions": "~1.0.0", + "textextensions": "~1.0.0" + }, "dependencies": { - "textextensions": { - "version": "1.0.2", - "from": "textextensions@>=1.0.0 <1.1.0", - "resolved": "https://registry.npmjs.org/textextensions/-/textextensions-1.0.2.tgz" - }, "binaryextensions": { "version": "1.0.1", - "from": "binaryextensions@>=1.0.0 <1.1.0", - "resolved": "https://registry.npmjs.org/binaryextensions/-/binaryextensions-1.0.1.tgz" + "resolved": "https://registry.npmjs.org/binaryextensions/-/binaryextensions-1.0.1.tgz", + "integrity": "sha1-HmN0iLNbWL2l9HdL+WpSEqjJB1U=" + }, + "textextensions": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/textextensions/-/textextensions-1.0.2.tgz", + "integrity": "sha1-ZUhjk+4fK7A5pgy7oFsLaL2VAdI=" } } }, "readable-stream": { "version": "2.1.5", - "from": "readable-stream@>=2.0.1 <3.0.0", "resolved": "https://registry.npmjs.org/readable-stream/-/readable-stream-2.1.5.tgz", + "integrity": "sha1-ZvqLcg4UOLNkaB8q0aY8YYRIydA=", + "requires": { + "buffer-shims": "^1.0.0", + "core-util-is": "~1.0.0", + "inherits": "~2.0.1", + "isarray": "~1.0.0", + "process-nextick-args": "~1.0.6", + "string_decoder": "~0.10.x", + "util-deprecate": "~1.0.1" + }, "dependencies": { "buffer-shims": { "version": "1.0.0", - "from": "buffer-shims@>=1.0.0 <2.0.0", - "resolved": "https://registry.npmjs.org/buffer-shims/-/buffer-shims-1.0.0.tgz" + "resolved": "https://registry.npmjs.org/buffer-shims/-/buffer-shims-1.0.0.tgz", + "integrity": "sha1-mXjOMXOIxkmth5MCjDR37wRKi1E=" }, "core-util-is": { "version": "1.0.2", - "from": "core-util-is@>=1.0.0 <1.1.0", - "resolved": "https://registry.npmjs.org/core-util-is/-/core-util-is-1.0.2.tgz" + "resolved": "https://registry.npmjs.org/core-util-is/-/core-util-is-1.0.2.tgz", + "integrity": "sha1-tf1UIgqivFq1eqtxQMlAdUUDwac=" }, "inherits": { "version": "2.0.3", - "from": "inherits@>=2.0.0 <3.0.0", - "resolved": "https://registry.npmjs.org/inherits/-/inherits-2.0.3.tgz" + "resolved": "https://registry.npmjs.org/inherits/-/inherits-2.0.3.tgz", + "integrity": "sha1-Yzwsg+PaQqUC9SRmAiSA9CCCYd4=" }, "isarray": { "version": "1.0.0", - "from": "isarray@>=1.0.0 <1.1.0", - "resolved": "https://registry.npmjs.org/isarray/-/isarray-1.0.0.tgz" + "resolved": "https://registry.npmjs.org/isarray/-/isarray-1.0.0.tgz", + "integrity": "sha1-u5NdSFgsuhaMBoNJV6VKPgcSTxE=" }, "process-nextick-args": { "version": "1.0.7", - "from": "process-nextick-args@>=1.0.6 <1.1.0", - "resolved": "https://registry.npmjs.org/process-nextick-args/-/process-nextick-args-1.0.7.tgz" + "resolved": "https://registry.npmjs.org/process-nextick-args/-/process-nextick-args-1.0.7.tgz", + "integrity": "sha1-FQ4gt1ZZCtP5EJPyWk8q2L/zC6M=" }, "string_decoder": { "version": "0.10.31", - "from": "string_decoder@>=0.10.0 <0.11.0", - "resolved": "https://registry.npmjs.org/string_decoder/-/string_decoder-0.10.31.tgz" + "resolved": "https://registry.npmjs.org/string_decoder/-/string_decoder-0.10.31.tgz", + "integrity": "sha1-YuIDvEF2bGwoyfyEMB2rHFMQ+pQ=" }, "util-deprecate": { "version": "1.0.2", - "from": "util-deprecate@>=1.0.1 <1.1.0", - "resolved": "https://registry.npmjs.org/util-deprecate/-/util-deprecate-1.0.2.tgz" + "resolved": "https://registry.npmjs.org/util-deprecate/-/util-deprecate-1.0.2.tgz", + "integrity": "sha1-RQ1Nyfpw3nMnYvvS1KKJgUGaDM8=" } } }, "replacestream": { "version": "4.0.2", - "from": "replacestream@>=4.0.0 <5.0.0", "resolved": "https://registry.npmjs.org/replacestream/-/replacestream-4.0.2.tgz", + "integrity": "sha1-DEFAcH5PAyP1DeBEhRcIz1i8N70=", + "requires": { + "escape-string-regexp": "^1.0.3", + "object-assign": "^4.0.1", + "readable-stream": "^2.0.2" + }, "dependencies": { "object-assign": { "version": "4.1.0", - "from": "object-assign@>=4.0.1 <5.0.0", - "resolved": "https://registry.npmjs.org/object-assign/-/object-assign-4.1.0.tgz" + "resolved": "https://registry.npmjs.org/object-assign/-/object-assign-4.1.0.tgz", + "integrity": "sha1-ejs9DpgGPUP0wD8uiubNUahog6A=" } } } @@ -2014,94 +3293,121 @@ }, "gulp-sourcemaps": { "version": "1.6.0", - "from": "gulp-sourcemaps@>=1.4.0 <2.0.0", "resolved": "https://registry.npmjs.org/gulp-sourcemaps/-/gulp-sourcemaps-1.6.0.tgz", + "integrity": "sha1-uG/zSdgBzrVuHZ59x7vLS33uYAw=", + "requires": { + "convert-source-map": "^1.1.1", + "graceful-fs": "^4.1.2", + "strip-bom": "^2.0.0", + "through2": "^2.0.0", + "vinyl": "^1.0.0" + }, "dependencies": { "graceful-fs": { "version": "4.1.6", - "from": "graceful-fs@>=4.1.2 <5.0.0", - "resolved": "https://registry.npmjs.org/graceful-fs/-/graceful-fs-4.1.6.tgz" + "resolved": "https://registry.npmjs.org/graceful-fs/-/graceful-fs-4.1.6.tgz", + "integrity": "sha1-UUw4dysxvuLgi+3CGgrrOr9UwZ4=" }, "strip-bom": { "version": "2.0.0", - "from": "strip-bom@>=2.0.0 <3.0.0", "resolved": "https://registry.npmjs.org/strip-bom/-/strip-bom-2.0.0.tgz", + "integrity": "sha1-YhmoVhZSBJHzV4i9vxRHqZx+aw4=", + "requires": { + "is-utf8": "^0.2.0" + }, "dependencies": { "is-utf8": { "version": "0.2.1", - "from": "is-utf8@>=0.2.0 <0.3.0", - "resolved": "https://registry.npmjs.org/is-utf8/-/is-utf8-0.2.1.tgz" + "resolved": "https://registry.npmjs.org/is-utf8/-/is-utf8-0.2.1.tgz", + "integrity": "sha1-Sw2hRCEE0bM2NA6AeX6GXPOffXI=" } } }, "through2": { "version": "2.0.1", - "from": "through2@>=2.0.0 <3.0.0", "resolved": "https://registry.npmjs.org/through2/-/through2-2.0.1.tgz", + "integrity": "sha1-OE51MU1J8y3hLuu4E2uOtrXVnak=", + "requires": { + "readable-stream": "~2.0.0", + "xtend": "~4.0.0" + }, "dependencies": { "readable-stream": { "version": "2.0.6", - "from": "readable-stream@>=2.0.0 <2.1.0", "resolved": "https://registry.npmjs.org/readable-stream/-/readable-stream-2.0.6.tgz", + "integrity": "sha1-j5A0HmilPMySh4jaz80Rs265t44=", + "requires": { + "core-util-is": "~1.0.0", + "inherits": "~2.0.1", + "isarray": "~1.0.0", + "process-nextick-args": "~1.0.6", + "string_decoder": "~0.10.x", + "util-deprecate": "~1.0.1" + }, "dependencies": { "core-util-is": { "version": "1.0.2", - "from": "core-util-is@>=1.0.0 <1.1.0", - "resolved": "https://registry.npmjs.org/core-util-is/-/core-util-is-1.0.2.tgz" + "resolved": "https://registry.npmjs.org/core-util-is/-/core-util-is-1.0.2.tgz", + "integrity": "sha1-tf1UIgqivFq1eqtxQMlAdUUDwac=" }, "inherits": { "version": "2.0.3", - "from": "inherits@>=2.0.1 <2.1.0", - "resolved": "https://registry.npmjs.org/inherits/-/inherits-2.0.3.tgz" + "resolved": "https://registry.npmjs.org/inherits/-/inherits-2.0.3.tgz", + "integrity": "sha1-Yzwsg+PaQqUC9SRmAiSA9CCCYd4=" }, "isarray": { "version": "1.0.0", - "from": "isarray@>=1.0.0 <1.1.0", - "resolved": "https://registry.npmjs.org/isarray/-/isarray-1.0.0.tgz" + "resolved": "https://registry.npmjs.org/isarray/-/isarray-1.0.0.tgz", + "integrity": "sha1-u5NdSFgsuhaMBoNJV6VKPgcSTxE=" }, "process-nextick-args": { "version": "1.0.7", - "from": "process-nextick-args@>=1.0.6 <1.1.0", - "resolved": "https://registry.npmjs.org/process-nextick-args/-/process-nextick-args-1.0.7.tgz" + "resolved": "https://registry.npmjs.org/process-nextick-args/-/process-nextick-args-1.0.7.tgz", + "integrity": "sha1-FQ4gt1ZZCtP5EJPyWk8q2L/zC6M=" }, "string_decoder": { "version": "0.10.31", - "from": "string_decoder@>=0.10.0 <0.11.0", - "resolved": "https://registry.npmjs.org/string_decoder/-/string_decoder-0.10.31.tgz" + "resolved": "https://registry.npmjs.org/string_decoder/-/string_decoder-0.10.31.tgz", + "integrity": "sha1-YuIDvEF2bGwoyfyEMB2rHFMQ+pQ=" }, "util-deprecate": { "version": "1.0.2", - "from": "util-deprecate@>=1.0.1 <1.1.0", - "resolved": "https://registry.npmjs.org/util-deprecate/-/util-deprecate-1.0.2.tgz" + "resolved": "https://registry.npmjs.org/util-deprecate/-/util-deprecate-1.0.2.tgz", + "integrity": "sha1-RQ1Nyfpw3nMnYvvS1KKJgUGaDM8=" } } }, "xtend": { "version": "4.0.1", - "from": "xtend@>=4.0.0 <4.1.0", - "resolved": "https://registry.npmjs.org/xtend/-/xtend-4.0.1.tgz" + "resolved": "https://registry.npmjs.org/xtend/-/xtend-4.0.1.tgz", + "integrity": "sha1-pcbVMr5lbiPbgg77lDofBJmNY68=" } } }, "vinyl": { "version": "1.2.0", - "from": "vinyl@>=1.0.0 <2.0.0", "resolved": "https://registry.npmjs.org/vinyl/-/vinyl-1.2.0.tgz", + "integrity": "sha1-XIgDbPVl5d8FVYv8kR+GVt8hiIQ=", + "requires": { + "clone": "^1.0.0", + "clone-stats": "^0.0.1", + "replace-ext": "0.0.1" + }, "dependencies": { "clone": { "version": "1.0.2", - "from": "clone@>=1.0.0 <2.0.0", - "resolved": "https://registry.npmjs.org/clone/-/clone-1.0.2.tgz" + "resolved": "https://registry.npmjs.org/clone/-/clone-1.0.2.tgz", + "integrity": "sha1-Jgt6meux7f4kdTgXX3gyQ8sZ0Uk=" }, "clone-stats": { "version": "0.0.1", - "from": "clone-stats@>=0.0.1 <0.0.2", - "resolved": "https://registry.npmjs.org/clone-stats/-/clone-stats-0.0.1.tgz" + "resolved": "https://registry.npmjs.org/clone-stats/-/clone-stats-0.0.1.tgz", + "integrity": "sha1-uI+UqCzzi4eR1YBG6kAprYjKmdE=" }, "replace-ext": { "version": "0.0.1", - "from": "replace-ext@0.0.1", - "resolved": "https://registry.npmjs.org/replace-ext/-/replace-ext-0.0.1.tgz" + "resolved": "https://registry.npmjs.org/replace-ext/-/replace-ext-0.0.1.tgz", + "integrity": "sha1-KbvZIHinOfC8zitO5B6DeVNSKSQ=" } } } @@ -2109,128 +3415,191 @@ }, "gulp-util": { "version": "3.0.7", - "from": "gulp-util@>=3.0.4 <4.0.0", "resolved": "https://registry.npmjs.org/gulp-util/-/gulp-util-3.0.7.tgz", + "integrity": "sha1-eJJcS4+LSQBawBoBHFV+YhiUHLs=", + "requires": { + "array-differ": "^1.0.0", + "array-uniq": "^1.0.2", + "beeper": "^1.0.0", + "chalk": "^1.0.0", + "dateformat": "^1.0.11", + "fancy-log": "^1.1.0", + "gulplog": "^1.0.0", + "has-gulplog": "^0.1.0", + "lodash._reescape": "^3.0.0", + "lodash._reevaluate": "^3.0.0", + "lodash._reinterpolate": "^3.0.0", + "lodash.template": "^3.0.0", + "minimist": "^1.1.0", + "multipipe": "^0.1.2", + "object-assign": "^3.0.0", + "replace-ext": "0.0.1", + "through2": "^2.0.0", + "vinyl": "^0.5.0" + }, "dependencies": { "array-differ": { "version": "1.0.0", - "from": "array-differ@>=1.0.0 <2.0.0", - "resolved": "https://registry.npmjs.org/array-differ/-/array-differ-1.0.0.tgz" + "resolved": "https://registry.npmjs.org/array-differ/-/array-differ-1.0.0.tgz", + "integrity": "sha1-7/UuN1gknTO+QCuLuOVkuytdQDE=" }, "beeper": { "version": "1.1.0", - "from": "beeper@>=1.0.0 <2.0.0", - "resolved": "https://registry.npmjs.org/beeper/-/beeper-1.1.0.tgz" + "resolved": "https://registry.npmjs.org/beeper/-/beeper-1.1.0.tgz", + "integrity": "sha1-nub8HOf1T+qs585zWIsFYDeGaiw=" }, "dateformat": { "version": "1.0.12", - "from": "dateformat@>=1.0.11 <2.0.0", "resolved": "https://registry.npmjs.org/dateformat/-/dateformat-1.0.12.tgz", + "integrity": "sha1-nxJLZ1lMk3/3BpMuSmQsyo27/uk=", + "requires": { + "get-stdin": "^4.0.1", + "meow": "^3.3.0" + }, "dependencies": { "get-stdin": { "version": "4.0.1", - "from": "get-stdin@>=4.0.1 <5.0.0", - "resolved": "https://registry.npmjs.org/get-stdin/-/get-stdin-4.0.1.tgz" + "resolved": "https://registry.npmjs.org/get-stdin/-/get-stdin-4.0.1.tgz", + "integrity": "sha1-uWjGsKBDhDJJAui/Gl3zJXmkUP4=" }, "meow": { "version": "3.7.0", - "from": "meow@>=3.3.0 <4.0.0", "resolved": "https://registry.npmjs.org/meow/-/meow-3.7.0.tgz", + "integrity": "sha1-cstmi0JSKCkKu/qFaJJYcwioAfs=", + "requires": { + "camelcase-keys": "^2.0.0", + "decamelize": "^1.1.2", + "loud-rejection": "^1.0.0", + "map-obj": "^1.0.1", + "minimist": "^1.1.3", + "normalize-package-data": "^2.3.4", + "object-assign": "^4.0.1", + "read-pkg-up": "^1.0.1", + "redent": "^1.0.0", + "trim-newlines": "^1.0.0" + }, "dependencies": { "camelcase-keys": { "version": "2.1.0", - "from": "camelcase-keys@>=2.0.0 <3.0.0", "resolved": "https://registry.npmjs.org/camelcase-keys/-/camelcase-keys-2.1.0.tgz", + "integrity": "sha1-MIvur/3ygRkFHvodkyITyRuPkuc=", + "requires": { + "camelcase": "^2.0.0", + "map-obj": "^1.0.0" + }, "dependencies": { "camelcase": { "version": "2.1.1", - "from": "camelcase@>=2.0.0 <3.0.0", - "resolved": "https://registry.npmjs.org/camelcase/-/camelcase-2.1.1.tgz" + "resolved": "https://registry.npmjs.org/camelcase/-/camelcase-2.1.1.tgz", + "integrity": "sha1-fB0W1nmhu+WcoCys7PsBHiAfWh8=" } } }, "decamelize": { "version": "1.2.0", - "from": "decamelize@>=1.1.2 <2.0.0", - "resolved": "https://registry.npmjs.org/decamelize/-/decamelize-1.2.0.tgz" + "resolved": "https://registry.npmjs.org/decamelize/-/decamelize-1.2.0.tgz", + "integrity": "sha1-9lNNFRSCabIDUue+4m9QH5oZEpA=" }, "loud-rejection": { "version": "1.6.0", - "from": "loud-rejection@>=1.0.0 <2.0.0", "resolved": "https://registry.npmjs.org/loud-rejection/-/loud-rejection-1.6.0.tgz", + "integrity": "sha1-W0b4AUft7leIcPCG0Eghz5mOVR8=", + "requires": { + "currently-unhandled": "^0.4.1", + "signal-exit": "^3.0.0" + }, "dependencies": { "currently-unhandled": { "version": "0.4.1", - "from": "currently-unhandled@>=0.4.1 <0.5.0", "resolved": "https://registry.npmjs.org/currently-unhandled/-/currently-unhandled-0.4.1.tgz", + "integrity": "sha1-mI3zP+qxke95mmE2nddsF635V+o=", + "requires": { + "array-find-index": "^1.0.1" + }, "dependencies": { "array-find-index": { "version": "1.0.1", - "from": "array-find-index@>=1.0.1 <2.0.0", - "resolved": "https://registry.npmjs.org/array-find-index/-/array-find-index-1.0.1.tgz" + "resolved": "https://registry.npmjs.org/array-find-index/-/array-find-index-1.0.1.tgz", + "integrity": "sha1-C8Jd2slB7IpJauJY/UrBiAA+868=" } } }, "signal-exit": { "version": "3.0.1", - "from": "signal-exit@>=3.0.0 <4.0.0", - "resolved": "https://registry.npmjs.org/signal-exit/-/signal-exit-3.0.1.tgz" + "resolved": "https://registry.npmjs.org/signal-exit/-/signal-exit-3.0.1.tgz", + "integrity": "sha1-WkyISZK2OnrNm623iUw+6c/MrYE=" } } }, "map-obj": { "version": "1.0.1", - "from": "map-obj@>=1.0.1 <2.0.0", - "resolved": "https://registry.npmjs.org/map-obj/-/map-obj-1.0.1.tgz" + "resolved": "https://registry.npmjs.org/map-obj/-/map-obj-1.0.1.tgz", + "integrity": "sha1-2TPOuSBdgr3PSIb2dCvcK03qFG0=" }, "normalize-package-data": { "version": "2.3.5", - "from": "normalize-package-data@>=2.3.4 <3.0.0", "resolved": "https://registry.npmjs.org/normalize-package-data/-/normalize-package-data-2.3.5.tgz", + "integrity": "sha1-jZJPFClg4Xd+f/4XBUNjHMfLAt8=", + "requires": { + "hosted-git-info": "^2.1.4", + "is-builtin-module": "^1.0.0", + "semver": "2 || 3 || 4 || 5", + "validate-npm-package-license": "^3.0.1" + }, "dependencies": { "hosted-git-info": { "version": "2.1.5", - "from": "hosted-git-info@>=2.1.4 <3.0.0", - "resolved": "https://registry.npmjs.org/hosted-git-info/-/hosted-git-info-2.1.5.tgz" + "resolved": "https://registry.npmjs.org/hosted-git-info/-/hosted-git-info-2.1.5.tgz", + "integrity": "sha1-C6gdkNouJas0ozLm7HeTbhWYEYs=" }, "is-builtin-module": { "version": "1.0.0", - "from": "is-builtin-module@>=1.0.0 <2.0.0", "resolved": "https://registry.npmjs.org/is-builtin-module/-/is-builtin-module-1.0.0.tgz", + "integrity": "sha1-VAVy0096wxGfj3bDDLwbHgN6/74=", + "requires": { + "builtin-modules": "^1.0.0" + }, "dependencies": { "builtin-modules": { "version": "1.1.1", - "from": "builtin-modules@>=1.0.0 <2.0.0", - "resolved": "https://registry.npmjs.org/builtin-modules/-/builtin-modules-1.1.1.tgz" + "resolved": "https://registry.npmjs.org/builtin-modules/-/builtin-modules-1.1.1.tgz", + "integrity": "sha1-Jw8HbFpywC9bZaR9+Uxf46J4iS8=" } } }, "semver": { "version": "5.3.0", - "from": "semver@>=2.0.0 <3.0.0||>=3.0.0 <4.0.0||>=4.0.0 <5.0.0||>=5.0.0 <6.0.0", - "resolved": "https://registry.npmjs.org/semver/-/semver-5.3.0.tgz" + "resolved": "https://registry.npmjs.org/semver/-/semver-5.3.0.tgz", + "integrity": "sha1-myzl094C0XxgEq0yaqa00M9U+U8=" }, "validate-npm-package-license": { "version": "3.0.1", - "from": "validate-npm-package-license@>=3.0.1 <4.0.0", "resolved": "https://registry.npmjs.org/validate-npm-package-license/-/validate-npm-package-license-3.0.1.tgz", + "integrity": "sha1-KAS6vnEq0zeUWaz74kdGqywwP7w=", + "requires": { + "spdx-correct": "~1.0.0", + "spdx-expression-parse": "~1.0.0" + }, "dependencies": { "spdx-correct": { "version": "1.0.2", - "from": "spdx-correct@>=1.0.0 <1.1.0", "resolved": "https://registry.npmjs.org/spdx-correct/-/spdx-correct-1.0.2.tgz", + "integrity": "sha1-SzBz2TP/UfORLwOsVRlJikFQ20A=", + "requires": { + "spdx-license-ids": "^1.0.2" + }, "dependencies": { "spdx-license-ids": { "version": "1.2.2", - "from": "spdx-license-ids@>=1.0.2 <2.0.0", - "resolved": "https://registry.npmjs.org/spdx-license-ids/-/spdx-license-ids-1.2.2.tgz" + "resolved": "https://registry.npmjs.org/spdx-license-ids/-/spdx-license-ids-1.2.2.tgz", + "integrity": "sha1-yd96NCRZSt5r0RkA1ZZpbcBrrFc=" } } }, "spdx-expression-parse": { "version": "1.0.3", - "from": "spdx-expression-parse@>=1.0.0 <1.1.0", - "resolved": "https://registry.npmjs.org/spdx-expression-parse/-/spdx-expression-parse-1.0.3.tgz" + "resolved": "https://registry.npmjs.org/spdx-expression-parse/-/spdx-expression-parse-1.0.3.tgz", + "integrity": "sha1-yjw4KMT+qKpEmXiEs5j8XWdDZEI=" } } } @@ -2238,55 +3607,99 @@ }, "object-assign": { "version": "4.1.0", - "from": "object-assign@>=4.0.1 <5.0.0", - "resolved": "https://registry.npmjs.org/object-assign/-/object-assign-4.1.0.tgz" + "resolved": "https://registry.npmjs.org/object-assign/-/object-assign-4.1.0.tgz", + "integrity": "sha1-ejs9DpgGPUP0wD8uiubNUahog6A=" }, "read-pkg-up": { "version": "1.0.1", - "from": "read-pkg-up@>=1.0.1 <2.0.0", "resolved": "https://registry.npmjs.org/read-pkg-up/-/read-pkg-up-1.0.1.tgz", + "integrity": "sha1-nWPBMnbAZZGNV/ACpX9AobZD+wI=", + "requires": { + "find-up": "^1.0.0", + "read-pkg": "^1.0.0" + }, "dependencies": { "find-up": { "version": "1.1.2", - "from": "find-up@>=1.0.0 <2.0.0", "resolved": "https://registry.npmjs.org/find-up/-/find-up-1.1.2.tgz", + "integrity": "sha1-ay6YIrGizgpgq2TWEOzK1TyyTQ8=", + "requires": { + "path-exists": "^2.0.0", + "pinkie-promise": "^2.0.0" + }, "dependencies": { "path-exists": { "version": "2.1.0", - "from": "path-exists@>=2.0.0 <3.0.0", - "resolved": "https://registry.npmjs.org/path-exists/-/path-exists-2.1.0.tgz" + "resolved": "https://registry.npmjs.org/path-exists/-/path-exists-2.1.0.tgz", + "integrity": "sha1-D+tsZPD8UY2adU3V77YscCJ2H0s=", + "requires": { + "pinkie-promise": "^2.0.0" + } + } + } + }, + "pinkie-promise": { + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/pinkie-promise/-/pinkie-promise-2.0.1.tgz", + "integrity": "sha1-ITXW36ejWMBprJsXh3YogihFD/o=", + "requires": { + "pinkie": "^2.0.0" + }, + "dependencies": { + "pinkie": { + "version": "2.0.4", + "resolved": "https://registry.npmjs.org/pinkie/-/pinkie-2.0.4.tgz", + "integrity": "sha1-clVrgM+g1IqXToDnckjoDtT3+HA=" } } }, "read-pkg": { "version": "1.1.0", - "from": "read-pkg@>=1.0.0 <2.0.0", "resolved": "https://registry.npmjs.org/read-pkg/-/read-pkg-1.1.0.tgz", + "integrity": "sha1-9f+qXs0pyzHAR0vKfXVra7KePyg=", + "requires": { + "load-json-file": "^1.0.0", + "normalize-package-data": "^2.3.2", + "path-type": "^1.0.0" + }, "dependencies": { "load-json-file": { "version": "1.1.0", - "from": "load-json-file@>=1.0.0 <2.0.0", "resolved": "https://registry.npmjs.org/load-json-file/-/load-json-file-1.1.0.tgz", + "integrity": "sha1-lWkFcI1YtLq0wiYbBPWfMcmTdMA=", + "requires": { + "graceful-fs": "^4.1.2", + "parse-json": "^2.2.0", + "pify": "^2.0.0", + "pinkie-promise": "^2.0.0", + "strip-bom": "^2.0.0" + }, "dependencies": { "graceful-fs": { "version": "4.1.6", - "from": "graceful-fs@>=4.1.2 <5.0.0", - "resolved": "https://registry.npmjs.org/graceful-fs/-/graceful-fs-4.1.6.tgz" + "resolved": "https://registry.npmjs.org/graceful-fs/-/graceful-fs-4.1.6.tgz", + "integrity": "sha1-UUw4dysxvuLgi+3CGgrrOr9UwZ4=" }, "parse-json": { "version": "2.2.0", - "from": "parse-json@>=2.2.0 <3.0.0", "resolved": "https://registry.npmjs.org/parse-json/-/parse-json-2.2.0.tgz", + "integrity": "sha1-9ID0BDTvgHQfhGkJn43qGPVaTck=", + "requires": { + "error-ex": "^1.2.0" + }, "dependencies": { "error-ex": { "version": "1.3.0", - "from": "error-ex@>=1.2.0 <2.0.0", "resolved": "https://registry.npmjs.org/error-ex/-/error-ex-1.3.0.tgz", + "integrity": "sha1-5ntD8+gsluo6WE/+4Ln8MyXYAtk=", + "requires": { + "is-arrayish": "^0.2.1" + }, "dependencies": { "is-arrayish": { "version": "0.2.1", - "from": "is-arrayish@>=0.2.1 <0.3.0", - "resolved": "https://registry.npmjs.org/is-arrayish/-/is-arrayish-0.2.1.tgz" + "resolved": "https://registry.npmjs.org/is-arrayish/-/is-arrayish-0.2.1.tgz", + "integrity": "sha1-d8mYQFJ6qOyxqLppe4BkWnqSap0=" } } } @@ -2294,13 +3707,16 @@ }, "strip-bom": { "version": "2.0.0", - "from": "strip-bom@>=2.0.0 <3.0.0", "resolved": "https://registry.npmjs.org/strip-bom/-/strip-bom-2.0.0.tgz", + "integrity": "sha1-YhmoVhZSBJHzV4i9vxRHqZx+aw4=", + "requires": { + "is-utf8": "^0.2.0" + }, "dependencies": { "is-utf8": { "version": "0.2.1", - "from": "is-utf8@>=0.2.0 <0.3.0", - "resolved": "https://registry.npmjs.org/is-utf8/-/is-utf8-0.2.1.tgz" + "resolved": "https://registry.npmjs.org/is-utf8/-/is-utf8-0.2.1.tgz", + "integrity": "sha1-Sw2hRCEE0bM2NA6AeX6GXPOffXI=" } } } @@ -2308,32 +3724,25 @@ }, "path-type": { "version": "1.1.0", - "from": "path-type@>=1.0.0 <2.0.0", "resolved": "https://registry.npmjs.org/path-type/-/path-type-1.1.0.tgz", + "integrity": "sha1-WcRPfuSR2nBNpBXaWkBwuk+P5EE=", + "requires": { + "graceful-fs": "^4.1.2", + "pify": "^2.0.0", + "pinkie-promise": "^2.0.0" + }, "dependencies": { "graceful-fs": { "version": "4.1.6", - "from": "graceful-fs@>=4.1.2 <5.0.0", - "resolved": "https://registry.npmjs.org/graceful-fs/-/graceful-fs-4.1.6.tgz" + "resolved": "https://registry.npmjs.org/graceful-fs/-/graceful-fs-4.1.6.tgz", + "integrity": "sha1-UUw4dysxvuLgi+3CGgrrOr9UwZ4=" } } }, "pify": { "version": "2.3.0", - "from": "pify@2.3.0", - "resolved": "https://registry.npmjs.org/pify/-/pify-2.3.0.tgz" - } - } - }, - "pinkie-promise": { - "version": "2.0.1", - "from": "pinkie-promise@2.0.1", - "resolved": "https://registry.npmjs.org/pinkie-promise/-/pinkie-promise-2.0.1.tgz", - "dependencies": { - "pinkie": { - "version": "2.0.4", - "from": "pinkie@>=2.0.0 <3.0.0", - "resolved": "https://registry.npmjs.org/pinkie/-/pinkie-2.0.4.tgz" + "resolved": "https://registry.npmjs.org/pify/-/pify-2.3.0.tgz", + "integrity": "sha1-7RQaasBDqEnqWISY59yosVMw6Qw=" } } } @@ -2341,23 +3750,36 @@ }, "redent": { "version": "1.0.0", - "from": "redent@>=1.0.0 <2.0.0", "resolved": "https://registry.npmjs.org/redent/-/redent-1.0.0.tgz", + "integrity": "sha1-z5Fqsf1fHxbfsggi3W7H9zDCr94=", + "requires": { + "indent-string": "^2.1.0", + "strip-indent": "^1.0.1" + }, "dependencies": { "indent-string": { "version": "2.1.0", - "from": "indent-string@>=2.1.0 <3.0.0", "resolved": "https://registry.npmjs.org/indent-string/-/indent-string-2.1.0.tgz", + "integrity": "sha1-ji1INIdCEhtKghi3oTfppSBJ3IA=", + "requires": { + "repeating": "^2.0.0" + }, "dependencies": { "repeating": { "version": "2.0.1", - "from": "repeating@>=2.0.0 <3.0.0", "resolved": "https://registry.npmjs.org/repeating/-/repeating-2.0.1.tgz", + "integrity": "sha1-UhTFOpJtNVJwdSf7q0FdvAjQbdo=", + "requires": { + "is-finite": "^1.0.0" + }, "dependencies": { "is-finite": { "version": "1.0.1", - "from": "is-finite@>=1.0.0 <2.0.0", - "resolved": "https://registry.npmjs.org/is-finite/-/is-finite-1.0.1.tgz" + "resolved": "https://registry.npmjs.org/is-finite/-/is-finite-1.0.1.tgz", + "integrity": "sha1-ZDhgPq6+J5OUj/SkJi7I2z1iWXs=", + "requires": { + "number-is-nan": "^1.0.0" + } } } } @@ -2365,15 +3787,18 @@ }, "strip-indent": { "version": "1.0.1", - "from": "strip-indent@>=1.0.1 <2.0.0", - "resolved": "https://registry.npmjs.org/strip-indent/-/strip-indent-1.0.1.tgz" + "resolved": "https://registry.npmjs.org/strip-indent/-/strip-indent-1.0.1.tgz", + "integrity": "sha1-DHlipq3vp7vUrDZkYKY4VSrhoKI=", + "requires": { + "get-stdin": "^4.0.1" + } } } }, "trim-newlines": { "version": "1.0.0", - "from": "trim-newlines@>=1.0.0 <2.0.0", - "resolved": "https://registry.npmjs.org/trim-newlines/-/trim-newlines-1.0.0.tgz" + "resolved": "https://registry.npmjs.org/trim-newlines/-/trim-newlines-1.0.0.tgz", + "integrity": "sha1-WIeWa7WCpFA6QetST301ARgVphM=" } } } @@ -2381,153 +3806,201 @@ }, "fancy-log": { "version": "1.2.0", - "from": "fancy-log@>=1.1.0 <2.0.0", "resolved": "https://registry.npmjs.org/fancy-log/-/fancy-log-1.2.0.tgz", + "integrity": "sha1-1aUbU+mrIsoH1VjytnrlX9tfy9g=", + "requires": { + "chalk": "^1.1.1", + "time-stamp": "^1.0.0" + }, "dependencies": { "time-stamp": { "version": "1.0.1", - "from": "time-stamp@>=1.0.0 <2.0.0", - "resolved": "https://registry.npmjs.org/time-stamp/-/time-stamp-1.0.1.tgz" + "resolved": "https://registry.npmjs.org/time-stamp/-/time-stamp-1.0.1.tgz", + "integrity": "sha1-n0vSNVnJNllm8zAtu6KwfGuZsVE=" } } }, "gulplog": { "version": "1.0.0", - "from": "gulplog@>=1.0.0 <2.0.0", "resolved": "https://registry.npmjs.org/gulplog/-/gulplog-1.0.0.tgz", + "integrity": "sha1-4oxNRdBey77YGDY86PnFkmIp/+U=", + "requires": { + "glogg": "^1.0.0" + }, "dependencies": { "glogg": { "version": "1.0.0", - "from": "glogg@>=1.0.0 <2.0.0", - "resolved": "https://registry.npmjs.org/glogg/-/glogg-1.0.0.tgz" + "resolved": "https://registry.npmjs.org/glogg/-/glogg-1.0.0.tgz", + "integrity": "sha1-f+DxmfV6yQbPUS/urY+Q7kooT8U=", + "requires": { + "sparkles": "^1.0.0" + } } } }, "has-gulplog": { "version": "0.1.0", - "from": "has-gulplog@>=0.1.0 <0.2.0", - "resolved": "https://registry.npmjs.org/has-gulplog/-/has-gulplog-0.1.0.tgz" + "resolved": "https://registry.npmjs.org/has-gulplog/-/has-gulplog-0.1.0.tgz", + "integrity": "sha1-ZBTIKRNpfaUVkDl9r7EvIpZ4Ec4=", + "requires": { + "sparkles": "^1.0.0" + } }, "lodash._reescape": { "version": "3.0.0", - "from": "lodash._reescape@>=3.0.0 <4.0.0", - "resolved": "https://registry.npmjs.org/lodash._reescape/-/lodash._reescape-3.0.0.tgz" + "resolved": "https://registry.npmjs.org/lodash._reescape/-/lodash._reescape-3.0.0.tgz", + "integrity": "sha1-Kx1vXf4HyKNVdT5fJ/rH8c3hYWo=" }, "lodash._reevaluate": { "version": "3.0.0", - "from": "lodash._reevaluate@>=3.0.0 <4.0.0", - "resolved": "https://registry.npmjs.org/lodash._reevaluate/-/lodash._reevaluate-3.0.0.tgz" + "resolved": "https://registry.npmjs.org/lodash._reevaluate/-/lodash._reevaluate-3.0.0.tgz", + "integrity": "sha1-WLx0xAZklTrgsSTYBpltrKQx4u0=" }, "lodash._reinterpolate": { "version": "3.0.0", - "from": "lodash._reinterpolate@>=3.0.0 <4.0.0", - "resolved": "https://registry.npmjs.org/lodash._reinterpolate/-/lodash._reinterpolate-3.0.0.tgz" + "resolved": "https://registry.npmjs.org/lodash._reinterpolate/-/lodash._reinterpolate-3.0.0.tgz", + "integrity": "sha1-DM8tiRZq8Ds2Y8eWU4t1rG4RTZ0=" }, "lodash.template": { "version": "3.6.2", - "from": "lodash.template@>=3.0.0 <4.0.0", "resolved": "https://registry.npmjs.org/lodash.template/-/lodash.template-3.6.2.tgz", + "integrity": "sha1-+M3sxhaaJVvpCYrosMU9N4kx0U8=", + "requires": { + "lodash._basecopy": "^3.0.0", + "lodash._basetostring": "^3.0.0", + "lodash._basevalues": "^3.0.0", + "lodash._isiterateecall": "^3.0.0", + "lodash._reinterpolate": "^3.0.0", + "lodash.escape": "^3.0.0", + "lodash.keys": "^3.0.0", + "lodash.restparam": "^3.0.0", + "lodash.templatesettings": "^3.0.0" + }, "dependencies": { "lodash._basecopy": { "version": "3.0.1", - "from": "lodash._basecopy@>=3.0.0 <4.0.0", - "resolved": "https://registry.npmjs.org/lodash._basecopy/-/lodash._basecopy-3.0.1.tgz" + "resolved": "https://registry.npmjs.org/lodash._basecopy/-/lodash._basecopy-3.0.1.tgz", + "integrity": "sha1-jaDmqHbPNEwK2KVIghEd08XHyjY=" }, "lodash._basetostring": { "version": "3.0.1", - "from": "lodash._basetostring@>=3.0.0 <4.0.0", - "resolved": "https://registry.npmjs.org/lodash._basetostring/-/lodash._basetostring-3.0.1.tgz" + "resolved": "https://registry.npmjs.org/lodash._basetostring/-/lodash._basetostring-3.0.1.tgz", + "integrity": "sha1-0YYdh3+CSlL2aYMtyvPuFVZqB9U=" }, "lodash._basevalues": { "version": "3.0.0", - "from": "lodash._basevalues@>=3.0.0 <4.0.0", - "resolved": "https://registry.npmjs.org/lodash._basevalues/-/lodash._basevalues-3.0.0.tgz" + "resolved": "https://registry.npmjs.org/lodash._basevalues/-/lodash._basevalues-3.0.0.tgz", + "integrity": "sha1-W3dXYoAr3j0yl1A+JjAIIP32Ybc=" }, "lodash._isiterateecall": { "version": "3.0.9", - "from": "lodash._isiterateecall@>=3.0.0 <4.0.0", - "resolved": "https://registry.npmjs.org/lodash._isiterateecall/-/lodash._isiterateecall-3.0.9.tgz" + "resolved": "https://registry.npmjs.org/lodash._isiterateecall/-/lodash._isiterateecall-3.0.9.tgz", + "integrity": "sha1-UgOte6Ql+uhCRg5pbbnPPmqsBXw=" }, "lodash.escape": { "version": "3.2.0", - "from": "lodash.escape@>=3.0.0 <4.0.0", "resolved": "https://registry.npmjs.org/lodash.escape/-/lodash.escape-3.2.0.tgz", + "integrity": "sha1-mV7g3BjBtIzJLv+ucaEKq1tIdpg=", + "requires": { + "lodash._root": "^3.0.0" + }, "dependencies": { "lodash._root": { "version": "3.0.1", - "from": "lodash._root@>=3.0.0 <4.0.0", - "resolved": "https://registry.npmjs.org/lodash._root/-/lodash._root-3.0.1.tgz" + "resolved": "https://registry.npmjs.org/lodash._root/-/lodash._root-3.0.1.tgz", + "integrity": "sha1-+6HEUkwZ7ppfgTa0YJ8BfPTe1pI=" } } }, "lodash.keys": { "version": "3.1.2", - "from": "lodash.keys@>=3.0.0 <4.0.0", "resolved": "https://registry.npmjs.org/lodash.keys/-/lodash.keys-3.1.2.tgz", + "integrity": "sha1-TbwEcrFWvlCgsoaFXRvQsMZWCYo=", + "requires": { + "lodash._getnative": "^3.0.0", + "lodash.isarguments": "^3.0.0", + "lodash.isarray": "^3.0.0" + }, "dependencies": { "lodash._getnative": { "version": "3.9.1", - "from": "lodash._getnative@>=3.0.0 <4.0.0", - "resolved": "https://registry.npmjs.org/lodash._getnative/-/lodash._getnative-3.9.1.tgz" + "resolved": "https://registry.npmjs.org/lodash._getnative/-/lodash._getnative-3.9.1.tgz", + "integrity": "sha1-VwvH3t5G1hzc3mh9ZdPuy6o6r/U=" }, "lodash.isarguments": { "version": "3.1.0", - "from": "lodash.isarguments@>=3.0.0 <4.0.0", - "resolved": "https://registry.npmjs.org/lodash.isarguments/-/lodash.isarguments-3.1.0.tgz" + "resolved": "https://registry.npmjs.org/lodash.isarguments/-/lodash.isarguments-3.1.0.tgz", + "integrity": "sha1-L1c9hcaiQon/AGY7SRwdM4/zRYo=" }, "lodash.isarray": { "version": "3.0.4", - "from": "lodash.isarray@>=3.0.0 <4.0.0", - "resolved": "https://registry.npmjs.org/lodash.isarray/-/lodash.isarray-3.0.4.tgz" + "resolved": "https://registry.npmjs.org/lodash.isarray/-/lodash.isarray-3.0.4.tgz", + "integrity": "sha1-eeTriMNqgSKvhvhEqpvNhRtfu1U=" } } }, "lodash.restparam": { "version": "3.6.1", - "from": "lodash.restparam@>=3.0.0 <4.0.0", - "resolved": "https://registry.npmjs.org/lodash.restparam/-/lodash.restparam-3.6.1.tgz" + "resolved": "https://registry.npmjs.org/lodash.restparam/-/lodash.restparam-3.6.1.tgz", + "integrity": "sha1-k2pOMJ7zMKdkXtQUWYbIWuWyCAU=" }, "lodash.templatesettings": { "version": "3.1.1", - "from": "lodash.templatesettings@>=3.0.0 <4.0.0", - "resolved": "https://registry.npmjs.org/lodash.templatesettings/-/lodash.templatesettings-3.1.1.tgz" + "resolved": "https://registry.npmjs.org/lodash.templatesettings/-/lodash.templatesettings-3.1.1.tgz", + "integrity": "sha1-+zB4RHU7Zrnxr6VOJix0UwfbqOU=", + "requires": { + "lodash._reinterpolate": "^3.0.0", + "lodash.escape": "^3.0.0" + } } } }, "multipipe": { "version": "0.1.2", - "from": "multipipe@>=0.1.2 <0.2.0", "resolved": "https://registry.npmjs.org/multipipe/-/multipipe-0.1.2.tgz", + "integrity": "sha1-Ko8t33Du1WTf8tV/HhoTfZ8FB4s=", + "requires": { + "duplexer2": "0.0.2" + }, "dependencies": { "duplexer2": { "version": "0.0.2", - "from": "duplexer2@0.0.2", "resolved": "https://registry.npmjs.org/duplexer2/-/duplexer2-0.0.2.tgz", + "integrity": "sha1-xhTc9n4vsUmVqRcR5aYX6KYKMds=", + "requires": { + "readable-stream": "~1.1.9" + }, "dependencies": { "readable-stream": { "version": "1.1.14", - "from": "readable-stream@>=1.1.9 <1.2.0", "resolved": "https://registry.npmjs.org/readable-stream/-/readable-stream-1.1.14.tgz", + "integrity": "sha1-fPTFTvZI44EwhMY23SB54WbAgdk=", + "requires": { + "core-util-is": "~1.0.0", + "inherits": "~2.0.1", + "isarray": "0.0.1", + "string_decoder": "~0.10.x" + }, "dependencies": { "core-util-is": { "version": "1.0.2", - "from": "core-util-is@>=1.0.0 <1.1.0", - "resolved": "https://registry.npmjs.org/core-util-is/-/core-util-is-1.0.2.tgz" + "resolved": "https://registry.npmjs.org/core-util-is/-/core-util-is-1.0.2.tgz", + "integrity": "sha1-tf1UIgqivFq1eqtxQMlAdUUDwac=" + }, + "inherits": { + "version": "2.0.3", + "resolved": "https://registry.npmjs.org/inherits/-/inherits-2.0.3.tgz", + "integrity": "sha1-Yzwsg+PaQqUC9SRmAiSA9CCCYd4=" }, "isarray": { "version": "0.0.1", - "from": "isarray@0.0.1", - "resolved": "https://registry.npmjs.org/isarray/-/isarray-0.0.1.tgz" + "resolved": "https://registry.npmjs.org/isarray/-/isarray-0.0.1.tgz", + "integrity": "sha1-ihis/Kmo9Bd+Cav8YDiTmwXR7t8=" }, "string_decoder": { "version": "0.10.31", - "from": "string_decoder@>=0.10.0 <0.11.0", - "resolved": "https://registry.npmjs.org/string_decoder/-/string_decoder-0.10.31.tgz" - }, - "inherits": { - "version": "2.0.3", - "from": "inherits@>=2.0.1 <2.1.0", - "resolved": "https://registry.npmjs.org/inherits/-/inherits-2.0.3.tgz" + "resolved": "https://registry.npmjs.org/string_decoder/-/string_decoder-0.10.31.tgz", + "integrity": "sha1-YuIDvEF2bGwoyfyEMB2rHFMQ+pQ=" } } } @@ -2537,305 +4010,351 @@ }, "object-assign": { "version": "3.0.0", - "from": "object-assign@>=3.0.0 <4.0.0", - "resolved": "https://registry.npmjs.org/object-assign/-/object-assign-3.0.0.tgz" + "resolved": "https://registry.npmjs.org/object-assign/-/object-assign-3.0.0.tgz", + "integrity": "sha1-m+3VygiXlJvKR+f/QIBi1Un1h/I=" }, "replace-ext": { "version": "0.0.1", - "from": "replace-ext@0.0.1", - "resolved": "https://registry.npmjs.org/replace-ext/-/replace-ext-0.0.1.tgz" + "resolved": "https://registry.npmjs.org/replace-ext/-/replace-ext-0.0.1.tgz", + "integrity": "sha1-KbvZIHinOfC8zitO5B6DeVNSKSQ=" + }, + "sparkles": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/sparkles/-/sparkles-1.0.0.tgz", + "integrity": "sha1-Gsu/tZJDbRC76PeFt8xvgoFQEsM=" }, "through2": { "version": "2.0.1", - "from": "through2@>=2.0.0 <3.0.0", "resolved": "https://registry.npmjs.org/through2/-/through2-2.0.1.tgz", + "integrity": "sha1-OE51MU1J8y3hLuu4E2uOtrXVnak=", + "requires": { + "readable-stream": "~2.0.0", + "xtend": "~4.0.0" + }, "dependencies": { "readable-stream": { "version": "2.0.6", - "from": "readable-stream@>=2.0.0 <2.1.0", "resolved": "https://registry.npmjs.org/readable-stream/-/readable-stream-2.0.6.tgz", + "integrity": "sha1-j5A0HmilPMySh4jaz80Rs265t44=", + "requires": { + "core-util-is": "~1.0.0", + "inherits": "~2.0.1", + "isarray": "~1.0.0", + "process-nextick-args": "~1.0.6", + "string_decoder": "~0.10.x", + "util-deprecate": "~1.0.1" + }, "dependencies": { "core-util-is": { "version": "1.0.2", - "from": "core-util-is@>=1.0.0 <1.1.0", - "resolved": "https://registry.npmjs.org/core-util-is/-/core-util-is-1.0.2.tgz" + "resolved": "https://registry.npmjs.org/core-util-is/-/core-util-is-1.0.2.tgz", + "integrity": "sha1-tf1UIgqivFq1eqtxQMlAdUUDwac=" }, "inherits": { "version": "2.0.3", - "from": "inherits@>=2.0.1 <3.0.0", - "resolved": "https://registry.npmjs.org/inherits/-/inherits-2.0.3.tgz" + "resolved": "https://registry.npmjs.org/inherits/-/inherits-2.0.3.tgz", + "integrity": "sha1-Yzwsg+PaQqUC9SRmAiSA9CCCYd4=" }, "isarray": { "version": "1.0.0", - "from": "isarray@>=1.0.0 <1.1.0", - "resolved": "https://registry.npmjs.org/isarray/-/isarray-1.0.0.tgz" + "resolved": "https://registry.npmjs.org/isarray/-/isarray-1.0.0.tgz", + "integrity": "sha1-u5NdSFgsuhaMBoNJV6VKPgcSTxE=" }, "process-nextick-args": { "version": "1.0.7", - "from": "process-nextick-args@>=1.0.6 <1.1.0", - "resolved": "https://registry.npmjs.org/process-nextick-args/-/process-nextick-args-1.0.7.tgz" + "resolved": "https://registry.npmjs.org/process-nextick-args/-/process-nextick-args-1.0.7.tgz", + "integrity": "sha1-FQ4gt1ZZCtP5EJPyWk8q2L/zC6M=" }, "string_decoder": { "version": "0.10.31", - "from": "string_decoder@>=0.10.0 <0.11.0", - "resolved": "https://registry.npmjs.org/string_decoder/-/string_decoder-0.10.31.tgz" + "resolved": "https://registry.npmjs.org/string_decoder/-/string_decoder-0.10.31.tgz", + "integrity": "sha1-YuIDvEF2bGwoyfyEMB2rHFMQ+pQ=" }, "util-deprecate": { "version": "1.0.2", - "from": "util-deprecate@>=1.0.1 <1.1.0", - "resolved": "https://registry.npmjs.org/util-deprecate/-/util-deprecate-1.0.2.tgz" + "resolved": "https://registry.npmjs.org/util-deprecate/-/util-deprecate-1.0.2.tgz", + "integrity": "sha1-RQ1Nyfpw3nMnYvvS1KKJgUGaDM8=" } } }, "xtend": { "version": "4.0.1", - "from": "xtend@>=4.0.0 <4.1.0", - "resolved": "https://registry.npmjs.org/xtend/-/xtend-4.0.1.tgz" + "resolved": "https://registry.npmjs.org/xtend/-/xtend-4.0.1.tgz", + "integrity": "sha1-pcbVMr5lbiPbgg77lDofBJmNY68=" } } }, "vinyl": { "version": "0.5.3", - "from": "vinyl@>=0.5.0 <0.6.0", "resolved": "https://registry.npmjs.org/vinyl/-/vinyl-0.5.3.tgz", + "integrity": "sha1-sEVbOPxeDPMNQyUTLkYZcMIJHN4=", + "requires": { + "clone": "^1.0.0", + "clone-stats": "^0.0.1", + "replace-ext": "0.0.1" + }, "dependencies": { "clone": { "version": "1.0.2", - "from": "clone@>=1.0.0 <2.0.0", - "resolved": "https://registry.npmjs.org/clone/-/clone-1.0.2.tgz" + "resolved": "https://registry.npmjs.org/clone/-/clone-1.0.2.tgz", + "integrity": "sha1-Jgt6meux7f4kdTgXX3gyQ8sZ0Uk=" }, "clone-stats": { "version": "0.0.1", - "from": "clone-stats@>=0.0.1 <0.0.2", - "resolved": "https://registry.npmjs.org/clone-stats/-/clone-stats-0.0.1.tgz" + "resolved": "https://registry.npmjs.org/clone-stats/-/clone-stats-0.0.1.tgz", + "integrity": "sha1-uI+UqCzzi4eR1YBG6kAprYjKmdE=" } } - }, - "sparkles": { - "version": "1.0.0", - "from": "sparkles@1.0.0", - "resolved": "https://registry.npmjs.org/sparkles/-/sparkles-1.0.0.tgz" } } }, "handlebars": { - "version": "3.0.3", - "from": "handlebars@>=3.0.1 <4.0.0", - "resolved": "https://registry.npmjs.org/handlebars/-/handlebars-3.0.3.tgz", - "dependencies": { - "optimist": { - "version": "0.6.1", - "from": "optimist@>=0.6.1 <0.7.0", - "resolved": "https://registry.npmjs.org/optimist/-/optimist-0.6.1.tgz", - "dependencies": { - "wordwrap": { - "version": "0.0.3", - "from": "wordwrap@>=0.0.2 <0.1.0", - "resolved": "https://registry.npmjs.org/wordwrap/-/wordwrap-0.0.3.tgz" - }, - "minimist": { - "version": "0.0.10", - "from": "minimist@>=0.0.1 <0.1.0", - "resolved": "https://registry.npmjs.org/minimist/-/minimist-0.0.10.tgz" - } - } - }, - "source-map": { - "version": "0.1.43", - "from": "source-map@>=0.1.40 <0.2.0", - "resolved": "https://registry.npmjs.org/source-map/-/source-map-0.1.43.tgz", - "dependencies": { - "amdefine": { - "version": "1.0.0", - "from": "amdefine@>=0.0.4", - "resolved": "https://registry.npmjs.org/amdefine/-/amdefine-1.0.0.tgz" - } - } - }, - "uglify-js": { - "version": "2.3.6", - "from": "uglify-js@>=2.3.0 <2.4.0", - "resolved": "https://registry.npmjs.org/uglify-js/-/uglify-js-2.3.6.tgz", - "dependencies": { - "async": { - "version": "0.2.10", - "from": "async@>=0.2.6 <0.3.0", - "resolved": "https://registry.npmjs.org/async/-/async-0.2.10.tgz" - }, - "optimist": { - "version": "0.3.7", - "from": "optimist@>=0.3.5 <0.4.0", - "resolved": "https://registry.npmjs.org/optimist/-/optimist-0.3.7.tgz", - "dependencies": { - "wordwrap": { - "version": "0.0.3", - "from": "wordwrap@>=0.0.2 <0.1.0", - "resolved": "https://registry.npmjs.org/wordwrap/-/wordwrap-0.0.3.tgz" - } - } - } - } - } + "version": "4.1.2", + "resolved": "https://registry.npmjs.org/handlebars/-/handlebars-4.1.2.tgz", + "integrity": "sha512-nvfrjqvt9xQ8Z/w0ijewdD/vvWDTOweBUm96NTr66Wfvo1mJenBLwcYmPs3TIBP5ruzYGD7Hx/DaM9RmhroGPw==", + "requires": { + "neo-async": "^2.6.0", + "optimist": "^0.6.1", + "source-map": "^0.6.1", + "uglify-js": "^3.1.4" } }, "hbsfy": { "version": "2.7.0", - "from": "hbsfy@>=2.2.1 <3.0.0", "resolved": "https://registry.npmjs.org/hbsfy/-/hbsfy-2.7.0.tgz", + "integrity": "sha1-2HkGLbbovBgRSCS3XC08YI4YG3M=", + "requires": { + "through": "~2.3.4", + "xtend": "~3.0.0" + }, "dependencies": { "xtend": { "version": "3.0.0", - "from": "xtend@>=3.0.0 <3.1.0", - "resolved": "https://registry.npmjs.org/xtend/-/xtend-3.0.0.tgz" + "resolved": "https://registry.npmjs.org/xtend/-/xtend-3.0.0.tgz", + "integrity": "sha1-XM50B7r2Qsunvs2laBEcST9ZZlo=" } } }, "inherits": { "version": "2.0.1", - "from": "inherits@2.0.1", - "resolved": "https://registry.npmjs.org/inherits/-/inherits-2.0.1.tgz" + "resolved": "https://registry.npmjs.org/inherits/-/inherits-2.0.1.tgz", + "integrity": "sha1-sX0I0ya0Qj5Wjv9xn5GwscvfafE=" }, "is-extglob": { "version": "1.0.0", - "from": "is-extglob@1.0.0", - "resolved": "https://registry.npmjs.org/is-extglob/-/is-extglob-1.0.0.tgz" + "resolved": "https://registry.npmjs.org/is-extglob/-/is-extglob-1.0.0.tgz", + "integrity": "sha1-rEaBd8SUNAWgkvyPKXYMb/xiBsA=" }, "is-glob": { "version": "2.0.1", - "from": "is-glob@2.0.1", - "resolved": "https://registry.npmjs.org/is-glob/-/is-glob-2.0.1.tgz" + "resolved": "https://registry.npmjs.org/is-glob/-/is-glob-2.0.1.tgz", + "integrity": "sha1-0Jb5JqPe1WAPP9/ZEZjLCIjC2GM=", + "requires": { + "is-extglob": "^1.0.0" + } }, "jsonify": { "version": "0.0.0", - "from": "jsonify@0.0.0", - "resolved": "https://registry.npmjs.org/jsonify/-/jsonify-0.0.0.tgz" + "resolved": "https://registry.npmjs.org/jsonify/-/jsonify-0.0.0.tgz", + "integrity": "sha1-LHS27kHZPKUbe1qu6PUDYx0lKnM=" }, "less": { "version": "2.7.1", - "from": "less@>=2.4.0 <3.0.0", "resolved": "https://registry.npmjs.org/less/-/less-2.7.1.tgz", + "integrity": "sha1-bL/qIrO4MDBOml+zcdVPpIDJ188=", + "requires": { + "errno": "^0.1.1", + "graceful-fs": "^4.1.2", + "image-size": "~0.5.0", + "mime": "^1.2.11", + "mkdirp": "^0.5.0", + "promise": "^7.1.1", + "source-map": "^0.5.3" + }, "dependencies": { "errno": { "version": "0.1.4", - "from": "errno@>=0.1.1 <0.2.0", "resolved": "https://registry.npmjs.org/errno/-/errno-0.1.4.tgz", + "integrity": "sha1-uJbiOp5ei6M4cfyZar02NfyaHH0=", + "optional": true, + "requires": { + "prr": "~0.0.0" + }, "dependencies": { "prr": { "version": "0.0.0", - "from": "prr@>=0.0.0 <0.1.0", - "resolved": "https://registry.npmjs.org/prr/-/prr-0.0.0.tgz" + "resolved": "https://registry.npmjs.org/prr/-/prr-0.0.0.tgz", + "integrity": "sha1-GoS4WQgyVQFBGFPQCB7j+obikmo=", + "optional": true } } }, "graceful-fs": { "version": "4.1.6", - "from": "graceful-fs@>=4.1.2 <5.0.0", - "resolved": "https://registry.npmjs.org/graceful-fs/-/graceful-fs-4.1.6.tgz" + "resolved": "https://registry.npmjs.org/graceful-fs/-/graceful-fs-4.1.6.tgz", + "integrity": "sha1-UUw4dysxvuLgi+3CGgrrOr9UwZ4=", + "optional": true }, "image-size": { "version": "0.5.0", - "from": "image-size@>=0.5.0 <0.6.0", - "resolved": "https://registry.npmjs.org/image-size/-/image-size-0.5.0.tgz" + "resolved": "https://registry.npmjs.org/image-size/-/image-size-0.5.0.tgz", + "integrity": "sha1-vnrtHDe1rD2bodZqJLTEf/g5dlE=", + "optional": true }, "mime": { "version": "1.3.4", - "from": "mime@>=1.2.11 <2.0.0", - "resolved": "https://registry.npmjs.org/mime/-/mime-1.3.4.tgz" + "resolved": "https://registry.npmjs.org/mime/-/mime-1.3.4.tgz", + "integrity": "sha1-EV+eO2s9rylZmDyzjxSaLUDrXVM=", + "optional": true }, "mkdirp": { "version": "0.5.1", - "from": "mkdirp@>=0.5.0 <0.6.0", "resolved": "https://registry.npmjs.org/mkdirp/-/mkdirp-0.5.1.tgz", + "integrity": "sha1-MAV0OOrGz3+MR2fzhkjWaX11yQM=", + "optional": true, + "requires": { + "minimist": "0.0.8" + }, "dependencies": { "minimist": { "version": "0.0.8", - "from": "minimist@0.0.8", - "resolved": "https://registry.npmjs.org/minimist/-/minimist-0.0.8.tgz" + "resolved": "https://registry.npmjs.org/minimist/-/minimist-0.0.8.tgz", + "integrity": "sha1-hX/Kv8M5fSYluCKCYuhqp6ARsF0=", + "optional": true } } }, "promise": { "version": "7.1.1", - "from": "promise@>=7.1.1 <8.0.0", "resolved": "https://registry.npmjs.org/promise/-/promise-7.1.1.tgz", + "integrity": "sha1-SJZUxpJha4qlWwck+oCbt9tJxb8=", + "optional": true, + "requires": { + "asap": "~2.0.3" + }, "dependencies": { "asap": { "version": "2.0.4", - "from": "asap@>=2.0.3 <2.1.0", - "resolved": "https://registry.npmjs.org/asap/-/asap-2.0.4.tgz" + "resolved": "https://registry.npmjs.org/asap/-/asap-2.0.4.tgz", + "integrity": "sha1-s5G/f2v7xlcGAi/sj0nEsH/s9Yk=", + "optional": true } } }, "source-map": { "version": "0.5.6", - "from": "source-map@>=0.5.3 <0.6.0", - "resolved": "https://registry.npmjs.org/source-map/-/source-map-0.5.6.tgz" + "resolved": "https://registry.npmjs.org/source-map/-/source-map-0.5.6.tgz", + "integrity": "sha1-dc449SvwczxafwwRjYEzSiu19BI=", + "optional": true } } }, "micromatch": { "version": "2.3.11", - "from": "micromatch@2.3.11", "resolved": "https://registry.npmjs.org/micromatch/-/micromatch-2.3.11.tgz", + "integrity": "sha1-hmd8l9FyCzY0MdBNDRUpO9OMFWU=", + "requires": { + "arr-diff": "^2.0.0", + "array-unique": "^0.2.1", + "braces": "^1.8.2", + "expand-brackets": "^0.1.4", + "extglob": "^0.3.1", + "filename-regex": "^2.0.0", + "is-extglob": "^1.0.0", + "is-glob": "^2.0.1", + "kind-of": "^3.0.2", + "normalize-path": "^2.0.1", + "object.omit": "^2.0.0", + "parse-glob": "^3.0.4", + "regex-cache": "^0.4.2" + }, "dependencies": { "arr-diff": { "version": "2.0.0", - "from": "arr-diff@>=2.0.0 <3.0.0", "resolved": "https://registry.npmjs.org/arr-diff/-/arr-diff-2.0.0.tgz", + "integrity": "sha1-jzuCf5Vai9ZpaX5KQlasPOrjVs8=", + "requires": { + "arr-flatten": "^1.0.1" + }, "dependencies": { "arr-flatten": { "version": "1.0.1", - "from": "arr-flatten@>=1.0.1 <2.0.0", - "resolved": "https://registry.npmjs.org/arr-flatten/-/arr-flatten-1.0.1.tgz" + "resolved": "https://registry.npmjs.org/arr-flatten/-/arr-flatten-1.0.1.tgz", + "integrity": "sha1-5f/lTUXhnzLyFukeuZyM6JK7YEs=" } } }, "array-unique": { "version": "0.2.1", - "from": "array-unique@>=0.2.1 <0.3.0", - "resolved": "https://registry.npmjs.org/array-unique/-/array-unique-0.2.1.tgz" + "resolved": "https://registry.npmjs.org/array-unique/-/array-unique-0.2.1.tgz", + "integrity": "sha1-odl8yvy8JiXMcPrc6zalDFiwGlM=" }, "braces": { "version": "1.8.5", - "from": "braces@>=1.8.2 <2.0.0", "resolved": "https://registry.npmjs.org/braces/-/braces-1.8.5.tgz", + "integrity": "sha1-uneWLhLf+WnWt2cR6RS3N4V79qc=", + "requires": { + "expand-range": "^1.8.1", + "preserve": "^0.2.0", + "repeat-element": "^1.1.2" + }, "dependencies": { "expand-range": { "version": "1.8.2", - "from": "expand-range@>=1.8.1 <2.0.0", "resolved": "https://registry.npmjs.org/expand-range/-/expand-range-1.8.2.tgz", + "integrity": "sha1-opnv/TNf4nIeuujiV+x5ZE/IUzc=", + "requires": { + "fill-range": "^2.1.0" + }, "dependencies": { "fill-range": { "version": "2.2.3", - "from": "fill-range@>=2.1.0 <3.0.0", "resolved": "https://registry.npmjs.org/fill-range/-/fill-range-2.2.3.tgz", + "integrity": "sha1-ULd9/X5Gm8dJJHCWNpn+eoSFpyM=", + "requires": { + "is-number": "^2.1.0", + "isobject": "^2.0.0", + "randomatic": "^1.1.3", + "repeat-element": "^1.1.2", + "repeat-string": "^1.5.2" + }, "dependencies": { "is-number": { "version": "2.1.0", - "from": "is-number@>=2.1.0 <3.0.0", - "resolved": "https://registry.npmjs.org/is-number/-/is-number-2.1.0.tgz" + "resolved": "https://registry.npmjs.org/is-number/-/is-number-2.1.0.tgz", + "integrity": "sha1-Afy7s5NGOlSPL0ZszhbezknbkI8=", + "requires": { + "kind-of": "^3.0.2" + } }, "isobject": { "version": "2.1.0", - "from": "isobject@>=2.0.0 <3.0.0", "resolved": "https://registry.npmjs.org/isobject/-/isobject-2.1.0.tgz", + "integrity": "sha1-8GVWEJaj8dou9GJy+BXIQNh+DIk=", + "requires": { + "isarray": "1.0.0" + }, "dependencies": { "isarray": { "version": "1.0.0", - "from": "isarray@1.0.0", - "resolved": "https://registry.npmjs.org/isarray/-/isarray-1.0.0.tgz" + "resolved": "https://registry.npmjs.org/isarray/-/isarray-1.0.0.tgz", + "integrity": "sha1-u5NdSFgsuhaMBoNJV6VKPgcSTxE=" } } }, "randomatic": { "version": "1.1.5", - "from": "randomatic@>=1.1.3 <2.0.0", - "resolved": "https://registry.npmjs.org/randomatic/-/randomatic-1.1.5.tgz" + "resolved": "https://registry.npmjs.org/randomatic/-/randomatic-1.1.5.tgz", + "integrity": "sha1-Xp718tVzxnvSuBJK6QtRVuRXhAs=", + "requires": { + "is-number": "^2.0.2", + "kind-of": "^3.0.2" + } }, "repeat-string": { "version": "1.5.4", - "from": "repeat-string@>=1.5.2 <2.0.0", - "resolved": "https://registry.npmjs.org/repeat-string/-/repeat-string-1.5.4.tgz" + "resolved": "https://registry.npmjs.org/repeat-string/-/repeat-string-1.5.4.tgz", + "integrity": "sha1-ZOwMkeD0tHX5DVtkNlHj5uW2wtU=" } } } @@ -2843,110 +4362,143 @@ }, "preserve": { "version": "0.2.0", - "from": "preserve@>=0.2.0 <0.3.0", - "resolved": "https://registry.npmjs.org/preserve/-/preserve-0.2.0.tgz" + "resolved": "https://registry.npmjs.org/preserve/-/preserve-0.2.0.tgz", + "integrity": "sha1-gV7R9uvGWSb4ZbMQwHE7yzMVzks=" }, "repeat-element": { "version": "1.1.2", - "from": "repeat-element@>=1.1.2 <2.0.0", - "resolved": "https://registry.npmjs.org/repeat-element/-/repeat-element-1.1.2.tgz" + "resolved": "https://registry.npmjs.org/repeat-element/-/repeat-element-1.1.2.tgz", + "integrity": "sha1-7wiaF40Ug7quTZPrmLT55OEdmQo=" } } }, "expand-brackets": { "version": "0.1.5", - "from": "expand-brackets@>=0.1.4 <0.2.0", "resolved": "https://registry.npmjs.org/expand-brackets/-/expand-brackets-0.1.5.tgz", + "integrity": "sha1-3wcoTjQqgHzXM6xa9yQR5YHRF3s=", + "requires": { + "is-posix-bracket": "^0.1.0" + }, "dependencies": { "is-posix-bracket": { "version": "0.1.1", - "from": "is-posix-bracket@>=0.1.0 <0.2.0", - "resolved": "https://registry.npmjs.org/is-posix-bracket/-/is-posix-bracket-0.1.1.tgz" + "resolved": "https://registry.npmjs.org/is-posix-bracket/-/is-posix-bracket-0.1.1.tgz", + "integrity": "sha1-MzTceXdDaOkvAW5vvAqI9c1ua8Q=" } } }, "extglob": { "version": "0.3.2", - "from": "extglob@>=0.3.1 <0.4.0", - "resolved": "https://registry.npmjs.org/extglob/-/extglob-0.3.2.tgz" + "resolved": "https://registry.npmjs.org/extglob/-/extglob-0.3.2.tgz", + "integrity": "sha1-Lhj/PS9JqydlzskCPwEdqo2DSaE=", + "requires": { + "is-extglob": "^1.0.0" + } }, "filename-regex": { "version": "2.0.0", - "from": "filename-regex@>=2.0.0 <3.0.0", - "resolved": "https://registry.npmjs.org/filename-regex/-/filename-regex-2.0.0.tgz" + "resolved": "https://registry.npmjs.org/filename-regex/-/filename-regex-2.0.0.tgz", + "integrity": "sha1-mW4+gEebmLmJfxWopYs9CE6SZ3U=" }, "kind-of": { "version": "3.0.4", - "from": "kind-of@>=3.0.2 <4.0.0", "resolved": "https://registry.npmjs.org/kind-of/-/kind-of-3.0.4.tgz", + "integrity": "sha1-e47PGKThf4Jp1ztQHJ8jLJaIenQ=", + "requires": { + "is-buffer": "^1.0.2" + }, "dependencies": { "is-buffer": { "version": "1.1.4", - "from": "is-buffer@>=1.0.2 <2.0.0", - "resolved": "https://registry.npmjs.org/is-buffer/-/is-buffer-1.1.4.tgz" + "resolved": "https://registry.npmjs.org/is-buffer/-/is-buffer-1.1.4.tgz", + "integrity": "sha1-z8hszV3FpS+oBIkRHGkgxFfi2Ys=" } } }, "normalize-path": { "version": "2.0.1", - "from": "normalize-path@>=2.0.1 <3.0.0", - "resolved": "https://registry.npmjs.org/normalize-path/-/normalize-path-2.0.1.tgz" + "resolved": "https://registry.npmjs.org/normalize-path/-/normalize-path-2.0.1.tgz", + "integrity": "sha1-R4hqwWYnYNQmG32XnSQXCdPOP3o=" }, "object.omit": { "version": "2.0.0", - "from": "object.omit@>=2.0.0 <3.0.0", "resolved": "https://registry.npmjs.org/object.omit/-/object.omit-2.0.0.tgz", + "integrity": "sha1-hoWXMz1U5gZilAu0WGBd1q4S/pQ=", + "requires": { + "for-own": "^0.1.3", + "is-extendable": "^0.1.1" + }, "dependencies": { "for-own": { "version": "0.1.4", - "from": "for-own@>=0.1.3 <0.2.0", "resolved": "https://registry.npmjs.org/for-own/-/for-own-0.1.4.tgz", + "integrity": "sha1-AUm0GjkIjHUV9R6+HBOG1F+TUHI=", + "requires": { + "for-in": "^0.1.5" + }, "dependencies": { "for-in": { "version": "0.1.6", - "from": "for-in@>=0.1.5 <0.2.0", - "resolved": "https://registry.npmjs.org/for-in/-/for-in-0.1.6.tgz" + "resolved": "https://registry.npmjs.org/for-in/-/for-in-0.1.6.tgz", + "integrity": "sha1-yfluib+tGKVFr17D7TUqHZ5bTcg=" } } }, "is-extendable": { "version": "0.1.1", - "from": "is-extendable@>=0.1.1 <0.2.0", - "resolved": "https://registry.npmjs.org/is-extendable/-/is-extendable-0.1.1.tgz" + "resolved": "https://registry.npmjs.org/is-extendable/-/is-extendable-0.1.1.tgz", + "integrity": "sha1-YrEQ4omkcUGOPsNqYX1HLjAd/Ik=" } } }, "parse-glob": { "version": "3.0.4", - "from": "parse-glob@>=3.0.4 <4.0.0", "resolved": "https://registry.npmjs.org/parse-glob/-/parse-glob-3.0.4.tgz", + "integrity": "sha1-ssN2z7EfNVE7rdFz7wu246OIORw=", + "requires": { + "glob-base": "^0.3.0", + "is-dotfile": "^1.0.0", + "is-extglob": "^1.0.0", + "is-glob": "^2.0.0" + }, "dependencies": { "glob-base": { "version": "0.3.0", - "from": "glob-base@>=0.3.0 <0.4.0", - "resolved": "https://registry.npmjs.org/glob-base/-/glob-base-0.3.0.tgz" + "resolved": "https://registry.npmjs.org/glob-base/-/glob-base-0.3.0.tgz", + "integrity": "sha1-27Fk9iIbHAscz4Kuoyi0l98Oo8Q=", + "requires": { + "glob-parent": "^2.0.0", + "is-glob": "^2.0.0" + } }, "is-dotfile": { "version": "1.0.2", - "from": "is-dotfile@>=1.0.0 <2.0.0", - "resolved": "https://registry.npmjs.org/is-dotfile/-/is-dotfile-1.0.2.tgz" + "resolved": "https://registry.npmjs.org/is-dotfile/-/is-dotfile-1.0.2.tgz", + "integrity": "sha1-LBMjg/ORmfjtwmjKAbmwB9IFzE0=" } } }, "regex-cache": { "version": "0.4.3", - "from": "regex-cache@>=0.4.2 <0.5.0", "resolved": "https://registry.npmjs.org/regex-cache/-/regex-cache-0.4.3.tgz", + "integrity": "sha1-mxpsNdTQ3871cRrmUejp09cRQUU=", + "requires": { + "is-equal-shallow": "^0.1.3", + "is-primitive": "^2.0.0" + }, "dependencies": { "is-equal-shallow": { "version": "0.1.3", - "from": "is-equal-shallow@>=0.1.3 <0.2.0", - "resolved": "https://registry.npmjs.org/is-equal-shallow/-/is-equal-shallow-0.1.3.tgz" + "resolved": "https://registry.npmjs.org/is-equal-shallow/-/is-equal-shallow-0.1.3.tgz", + "integrity": "sha1-IjgJj8Ih3gvPpdnqxMRdY4qhxTQ=", + "requires": { + "is-primitive": "^2.0.0" + } }, "is-primitive": { "version": "2.0.0", - "from": "is-primitive@>=2.0.0 <3.0.0", - "resolved": "https://registry.npmjs.org/is-primitive/-/is-primitive-2.0.0.tgz" + "resolved": "https://registry.npmjs.org/is-primitive/-/is-primitive-2.0.0.tgz", + "integrity": "sha1-IHurkWOEmcB7Kt8kCkGochADRXU=" } } } @@ -2954,141 +4506,224 @@ }, "minimist": { "version": "1.2.0", - "from": "minimist@1.2.0", - "resolved": "https://registry.npmjs.org/minimist/-/minimist-1.2.0.tgz" + "resolved": "https://registry.npmjs.org/minimist/-/minimist-1.2.0.tgz", + "integrity": "sha1-o1AIsg9BOD7sH7kU9M1d95omQoQ=" }, "moment": { "version": "2.15.0", - "from": "moment@>=2.10.3 <3.0.0", - "resolved": "https://registry.npmjs.org/moment/-/moment-2.15.0.tgz" + "resolved": "https://registry.npmjs.org/moment/-/moment-2.15.0.tgz", + "integrity": "sha1-zJ4zlYv0qZ3qcRHV5i7TwT/JZEA=" + }, + "nan": { + "version": "2.14.0", + "resolved": "https://registry.npmjs.org/nan/-/nan-2.14.0.tgz", + "integrity": "sha512-INOFj37C7k3AfaNTtX8RhsTw7qRy7eLET14cROi9+5HAVbbHuIWUHEauBv5qT4Av2tWasiTY1Jw6puUNqRJXQg==", + "optional": true + }, + "neo-async": { + "version": "2.6.1", + "resolved": "https://registry.npmjs.org/neo-async/-/neo-async-2.6.1.tgz", + "integrity": "sha512-iyam8fBuCUpWeKPGpaNMetEocMt364qkCsfL9JuhjXX6dRnguRVOfk2GZaDpPjcOKiiXCPINZC1GczQ7iTq3Zw==" }, "number-is-nan": { "version": "1.0.0", - "from": "number-is-nan@1.0.0", - "resolved": "https://registry.npmjs.org/number-is-nan/-/number-is-nan-1.0.0.tgz" + "resolved": "https://registry.npmjs.org/number-is-nan/-/number-is-nan-1.0.0.tgz", + "integrity": "sha1-wCD1KcUoKt/dIz2R1LGBw9aG3Es=" + }, + "optimist": { + "version": "0.6.1", + "resolved": "https://registry.npmjs.org/optimist/-/optimist-0.6.1.tgz", + "integrity": "sha1-2j6nRob6IaGaERwybpDrFaAZZoY=", + "requires": { + "minimist": "~0.0.1", + "wordwrap": "~0.0.2" + }, + "dependencies": { + "minimist": { + "version": "0.0.10", + "resolved": "https://registry.npmjs.org/minimist/-/minimist-0.0.10.tgz", + "integrity": "sha1-3j+YVD2/lggr5IrRoMfNqDYwHc8=" + } + } }, "resolve": { "version": "1.1.7", - "from": "resolve@1.1.7", - "resolved": "https://registry.npmjs.org/resolve/-/resolve-1.1.7.tgz" + "resolved": "https://registry.npmjs.org/resolve/-/resolve-1.1.7.tgz", + "integrity": "sha1-IDEU2CrSxe2ejgQRs5ModeiJ6Xs=" }, "set-immediate-shim": { "version": "1.0.1", - "from": "set-immediate-shim@1.0.1", - "resolved": "https://registry.npmjs.org/set-immediate-shim/-/set-immediate-shim-1.0.1.tgz" + "resolved": "https://registry.npmjs.org/set-immediate-shim/-/set-immediate-shim-1.0.1.tgz", + "integrity": "sha1-SysbJ+uAip+NzEgaWOXlb1mfP2E=" }, "shell-quote": { "version": "1.6.1", - "from": "shell-quote@1.6.1", "resolved": "https://registry.npmjs.org/shell-quote/-/shell-quote-1.6.1.tgz", + "integrity": "sha1-9HgZSczkAmlxJ0MOo7PFR29IF2c=", + "requires": { + "array-filter": "~0.0.0", + "array-map": "~0.0.0", + "array-reduce": "~0.0.0", + "jsonify": "~0.0.0" + }, "dependencies": { "array-filter": { "version": "0.0.1", - "from": "array-filter@>=0.0.0 <0.1.0", - "resolved": "https://registry.npmjs.org/array-filter/-/array-filter-0.0.1.tgz" + "resolved": "https://registry.npmjs.org/array-filter/-/array-filter-0.0.1.tgz", + "integrity": "sha1-fajPLiZijtcygDWB/SH2fKzS7uw=" }, - "array-reduce": { + "array-map": { "version": "0.0.0", - "from": "array-reduce@>=0.0.0 <0.1.0", - "resolved": "https://registry.npmjs.org/array-reduce/-/array-reduce-0.0.0.tgz" + "resolved": "https://registry.npmjs.org/array-map/-/array-map-0.0.0.tgz", + "integrity": "sha1-iKK6tz0c97zVwbEYoAP2b2ZfpmI=" }, - "array-map": { + "array-reduce": { "version": "0.0.0", - "from": "array-map@>=0.0.0 <0.1.0", - "resolved": "https://registry.npmjs.org/array-map/-/array-map-0.0.0.tgz" + "resolved": "https://registry.npmjs.org/array-reduce/-/array-reduce-0.0.0.tgz", + "integrity": "sha1-FziZ0//Rx9k4PkR5Ul2+J4yrXys=" } } }, + "source-map": { + "version": "0.6.1", + "resolved": "https://registry.npmjs.org/source-map/-/source-map-0.6.1.tgz", + "integrity": "sha512-UjgapumWlbMhkBgzT7Ykc5YXUT46F0iKu8SGXq0bcwP5dz/h0Plj6enJqjz1Zbq2l5WaqYnrVbwWOWMyF3F47g==" + }, "strip-ansi": { "version": "3.0.1", - "from": "strip-ansi@3.0.1", "resolved": "https://registry.npmjs.org/strip-ansi/-/strip-ansi-3.0.1.tgz", + "integrity": "sha1-ajhfuIU9lS1f8F0Oiq+UJ43GPc8=", + "requires": { + "ansi-regex": "^2.0.0" + }, "dependencies": { "ansi-regex": { "version": "2.0.0", - "from": "ansi-regex@>=2.0.0 <3.0.0", - "resolved": "https://registry.npmjs.org/ansi-regex/-/ansi-regex-2.0.0.tgz" + "resolved": "https://registry.npmjs.org/ansi-regex/-/ansi-regex-2.0.0.tgz", + "integrity": "sha1-xQYbbg74qBd15Q9dZhUb9r83EQc=" } } }, "through": { "version": "2.3.8", - "from": "through@2.3.8", - "resolved": "https://registry.npmjs.org/through/-/through-2.3.8.tgz" + "resolved": "https://registry.npmjs.org/through/-/through-2.3.8.tgz", + "integrity": "sha1-DdTJ/6q8NXlgsbckEV1+Doai4fU=" }, "uber-watchify": { "version": "3.6.0", - "from": "uber-watchify@>=3.6.0 <4.0.0", "resolved": "https://registry.npmjs.org/uber-watchify/-/uber-watchify-3.6.0.tgz", + "integrity": "sha1-e7FlVzqgCTzkHAmlzFGnoM1YeIg=", + "requires": { + "anymatch": "^1.3.0", + "browserify": "^13.1.0", + "chokidar": "^1.0.0", + "defined": "^1.0.0", + "jsonfile": "^2.2.1", + "mkdirp": "~0.3.5", + "outpipe": "^1.1.0", + "through2": "~0.6.3", + "xtend": "^4.0.0" + }, "dependencies": { "anymatch": { "version": "1.3.0", - "from": "anymatch@>=1.3.0 <2.0.0", "resolved": "https://registry.npmjs.org/anymatch/-/anymatch-1.3.0.tgz", + "integrity": "sha1-o+Uvo5FoyCX/V7AkgSbOWo/5VQc=", + "requires": { + "arrify": "^1.0.0", + "micromatch": "^2.1.5" + }, "dependencies": { "arrify": { "version": "1.0.1", - "from": "arrify@>=1.0.0 <2.0.0", - "resolved": "https://registry.npmjs.org/arrify/-/arrify-1.0.1.tgz" + "resolved": "https://registry.npmjs.org/arrify/-/arrify-1.0.1.tgz", + "integrity": "sha1-iYUI2iIm84DfkEcoRWhJwVAaSw0=" } } }, "chokidar": { "version": "1.6.0", - "from": "chokidar@>=1.0.0 <2.0.0", "resolved": "https://registry.npmjs.org/chokidar/-/chokidar-1.6.0.tgz", + "integrity": "sha1-kMMq1IApAddxPeUy3ChOlqY60Fg=", + "requires": { + "anymatch": "^1.3.0", + "async-each": "^1.0.0", + "fsevents": "^1.0.0", + "glob-parent": "^2.0.0", + "inherits": "^2.0.1", + "is-binary-path": "^1.0.0", + "is-glob": "^2.0.0", + "path-is-absolute": "^1.0.0", + "readdirp": "^2.0.0" + }, "dependencies": { "async-each": { "version": "1.0.1", - "from": "async-each@>=1.0.0 <2.0.0", - "resolved": "https://registry.npmjs.org/async-each/-/async-each-1.0.1.tgz" + "resolved": "https://registry.npmjs.org/async-each/-/async-each-1.0.1.tgz", + "integrity": "sha1-GdOGodntxufByF04iu28xW0zYC0=" }, "is-binary-path": { "version": "1.0.1", - "from": "is-binary-path@>=1.0.0 <2.0.0", "resolved": "https://registry.npmjs.org/is-binary-path/-/is-binary-path-1.0.1.tgz", + "integrity": "sha1-dfFmQrSA8YenEcgUFh/TpKdlWJg=", + "requires": { + "binary-extensions": "^1.0.0" + }, "dependencies": { "binary-extensions": { "version": "1.6.0", - "from": "binary-extensions@>=1.0.0 <2.0.0", - "resolved": "https://registry.npmjs.org/binary-extensions/-/binary-extensions-1.6.0.tgz" + "resolved": "https://registry.npmjs.org/binary-extensions/-/binary-extensions-1.6.0.tgz", + "integrity": "sha1-qiGEy8Q00phixmppv4HMCjOD7nk=" } } }, "path-is-absolute": { "version": "1.0.0", - "from": "path-is-absolute@>=1.0.0 <2.0.0", - "resolved": "https://registry.npmjs.org/path-is-absolute/-/path-is-absolute-1.0.0.tgz" + "resolved": "https://registry.npmjs.org/path-is-absolute/-/path-is-absolute-1.0.0.tgz", + "integrity": "sha1-Jj2tpmqz8vsQv3+dJN2PPlcO+RI=" }, "readdirp": { "version": "2.1.0", - "from": "readdirp@>=2.0.0 <3.0.0", "resolved": "https://registry.npmjs.org/readdirp/-/readdirp-2.1.0.tgz", + "integrity": "sha1-TtCtBg3zBzMAxIRANz9y0cxkLXg=", + "requires": { + "graceful-fs": "^4.1.2", + "minimatch": "^3.0.2", + "readable-stream": "^2.0.2", + "set-immediate-shim": "^1.0.1" + }, "dependencies": { "graceful-fs": { "version": "4.1.6", - "from": "graceful-fs@>=4.1.2 <5.0.0", - "resolved": "https://registry.npmjs.org/graceful-fs/-/graceful-fs-4.1.6.tgz" + "resolved": "https://registry.npmjs.org/graceful-fs/-/graceful-fs-4.1.6.tgz", + "integrity": "sha1-UUw4dysxvuLgi+3CGgrrOr9UwZ4=" }, "minimatch": { "version": "3.0.3", - "from": "minimatch@>=3.0.2 <4.0.0", "resolved": "https://registry.npmjs.org/minimatch/-/minimatch-3.0.3.tgz", + "integrity": "sha1-Kk5AkLlrLbBqnX3wEFWmKnfJt3Q=", + "requires": { + "brace-expansion": "^1.0.0" + }, "dependencies": { "brace-expansion": { "version": "1.1.6", - "from": "brace-expansion@>=1.0.0 <2.0.0", "resolved": "https://registry.npmjs.org/brace-expansion/-/brace-expansion-1.1.6.tgz", + "integrity": "sha1-cZfX6qm4fmSDkOph/GbIRCdCDfk=", + "requires": { + "balanced-match": "^0.4.1", + "concat-map": "0.0.1" + }, "dependencies": { "balanced-match": { "version": "0.4.2", - "from": "balanced-match@>=0.4.1 <0.5.0", - "resolved": "https://registry.npmjs.org/balanced-match/-/balanced-match-0.4.2.tgz" + "resolved": "https://registry.npmjs.org/balanced-match/-/balanced-match-0.4.2.tgz", + "integrity": "sha1-yz8+PHMtwPAe5wtAPzAuYddwmDg=" }, "concat-map": { "version": "0.0.1", - "from": "concat-map@0.0.1", - "resolved": "https://registry.npmjs.org/concat-map/-/concat-map-0.0.1.tgz" + "resolved": "https://registry.npmjs.org/concat-map/-/concat-map-0.0.1.tgz", + "integrity": "sha1-2Klr13/Wjfd5OnMDajug1UBdR3s=" } } } @@ -3096,38 +4731,47 @@ }, "readable-stream": { "version": "2.1.5", - "from": "readable-stream@>=2.0.2 <3.0.0", "resolved": "https://registry.npmjs.org/readable-stream/-/readable-stream-2.1.5.tgz", + "integrity": "sha1-ZvqLcg4UOLNkaB8q0aY8YYRIydA=", + "requires": { + "buffer-shims": "^1.0.0", + "core-util-is": "~1.0.0", + "inherits": "~2.0.1", + "isarray": "~1.0.0", + "process-nextick-args": "~1.0.6", + "string_decoder": "~0.10.x", + "util-deprecate": "~1.0.1" + }, "dependencies": { "buffer-shims": { "version": "1.0.0", - "from": "buffer-shims@>=1.0.0 <2.0.0", - "resolved": "https://registry.npmjs.org/buffer-shims/-/buffer-shims-1.0.0.tgz" + "resolved": "https://registry.npmjs.org/buffer-shims/-/buffer-shims-1.0.0.tgz", + "integrity": "sha1-mXjOMXOIxkmth5MCjDR37wRKi1E=" }, "core-util-is": { "version": "1.0.2", - "from": "core-util-is@>=1.0.0 <1.1.0", - "resolved": "https://registry.npmjs.org/core-util-is/-/core-util-is-1.0.2.tgz" + "resolved": "https://registry.npmjs.org/core-util-is/-/core-util-is-1.0.2.tgz", + "integrity": "sha1-tf1UIgqivFq1eqtxQMlAdUUDwac=" }, "isarray": { "version": "1.0.0", - "from": "isarray@>=1.0.0 <1.1.0", - "resolved": "https://registry.npmjs.org/isarray/-/isarray-1.0.0.tgz" + "resolved": "https://registry.npmjs.org/isarray/-/isarray-1.0.0.tgz", + "integrity": "sha1-u5NdSFgsuhaMBoNJV6VKPgcSTxE=" }, "process-nextick-args": { "version": "1.0.7", - "from": "process-nextick-args@>=1.0.6 <1.1.0", - "resolved": "https://registry.npmjs.org/process-nextick-args/-/process-nextick-args-1.0.7.tgz" + "resolved": "https://registry.npmjs.org/process-nextick-args/-/process-nextick-args-1.0.7.tgz", + "integrity": "sha1-FQ4gt1ZZCtP5EJPyWk8q2L/zC6M=" }, "string_decoder": { "version": "0.10.31", - "from": "string_decoder@>=0.10.0 <0.11.0", - "resolved": "https://registry.npmjs.org/string_decoder/-/string_decoder-0.10.31.tgz" + "resolved": "https://registry.npmjs.org/string_decoder/-/string_decoder-0.10.31.tgz", + "integrity": "sha1-YuIDvEF2bGwoyfyEMB2rHFMQ+pQ=" }, "util-deprecate": { "version": "1.0.2", - "from": "util-deprecate@>=1.0.1 <1.1.0", - "resolved": "https://registry.npmjs.org/util-deprecate/-/util-deprecate-1.0.2.tgz" + "resolved": "https://registry.npmjs.org/util-deprecate/-/util-deprecate-1.0.2.tgz", + "integrity": "sha1-RQ1Nyfpw3nMnYvvS1KKJgUGaDM8=" } } } @@ -3137,48 +4781,61 @@ }, "jsonfile": { "version": "2.3.1", - "from": "jsonfile@>=2.2.1 <3.0.0", - "resolved": "https://registry.npmjs.org/jsonfile/-/jsonfile-2.3.1.tgz" + "resolved": "https://registry.npmjs.org/jsonfile/-/jsonfile-2.3.1.tgz", + "integrity": "sha1-KLyynFlrW3qv005mKjKbpizYQvw=" }, "mkdirp": { "version": "0.3.5", - "from": "mkdirp@>=0.3.5 <0.4.0", - "resolved": "https://registry.npmjs.org/mkdirp/-/mkdirp-0.3.5.tgz" + "resolved": "https://registry.npmjs.org/mkdirp/-/mkdirp-0.3.5.tgz", + "integrity": "sha1-3j5fiWHIjHh+4TaN+EmsRBPsqNc=" }, "outpipe": { "version": "1.1.1", - "from": "outpipe@>=1.1.0 <2.0.0", - "resolved": "https://registry.npmjs.org/outpipe/-/outpipe-1.1.1.tgz" + "resolved": "https://registry.npmjs.org/outpipe/-/outpipe-1.1.1.tgz", + "integrity": "sha1-UM+GFjZeh+Ax4ppeyTOaPaRyX6I=", + "requires": { + "shell-quote": "^1.4.2" + } }, "through2": { "version": "0.6.5", - "from": "through2@>=0.6.3 <0.7.0", "resolved": "https://registry.npmjs.org/through2/-/through2-0.6.5.tgz", + "integrity": "sha1-QaucZ7KdVyCQcUEOHXp6lozTrUg=", + "requires": { + "readable-stream": ">=1.0.33-1 <1.1.0-0", + "xtend": ">=4.0.0 <4.1.0-0" + }, "dependencies": { "readable-stream": { "version": "1.0.34", - "from": "readable-stream@>=1.0.33-1 <1.1.0-0", "resolved": "https://registry.npmjs.org/readable-stream/-/readable-stream-1.0.34.tgz", + "integrity": "sha1-Elgg40vIQtLyqq+v5MKRbuMsFXw=", + "requires": { + "core-util-is": "~1.0.0", + "inherits": "~2.0.1", + "isarray": "0.0.1", + "string_decoder": "~0.10.x" + }, "dependencies": { "core-util-is": { "version": "1.0.2", - "from": "core-util-is@>=1.0.0 <1.1.0", - "resolved": "https://registry.npmjs.org/core-util-is/-/core-util-is-1.0.2.tgz" + "resolved": "https://registry.npmjs.org/core-util-is/-/core-util-is-1.0.2.tgz", + "integrity": "sha1-tf1UIgqivFq1eqtxQMlAdUUDwac=" + }, + "inherits": { + "version": "2.0.3", + "resolved": "https://registry.npmjs.org/inherits/-/inherits-2.0.3.tgz", + "integrity": "sha1-Yzwsg+PaQqUC9SRmAiSA9CCCYd4=" }, "isarray": { "version": "0.0.1", - "from": "isarray@0.0.1", - "resolved": "https://registry.npmjs.org/isarray/-/isarray-0.0.1.tgz" + "resolved": "https://registry.npmjs.org/isarray/-/isarray-0.0.1.tgz", + "integrity": "sha1-ihis/Kmo9Bd+Cav8YDiTmwXR7t8=" }, "string_decoder": { "version": "0.10.31", - "from": "string_decoder@>=0.10.0 <0.11.0", - "resolved": "https://registry.npmjs.org/string_decoder/-/string_decoder-0.10.31.tgz" - }, - "inherits": { - "version": "2.0.3", - "from": "inherits@>=2.0.1 <2.1.0", - "resolved": "https://registry.npmjs.org/inherits/-/inherits-2.0.3.tgz" + "resolved": "https://registry.npmjs.org/string_decoder/-/string_decoder-0.10.31.tgz", + "integrity": "sha1-YuIDvEF2bGwoyfyEMB2rHFMQ+pQ=" } } } @@ -3186,40 +4843,64 @@ }, "xtend": { "version": "4.0.1", - "from": "xtend@>=4.0.0 <5.0.0", - "resolved": "https://registry.npmjs.org/xtend/-/xtend-4.0.1.tgz" + "resolved": "https://registry.npmjs.org/xtend/-/xtend-4.0.1.tgz", + "integrity": "sha1-pcbVMr5lbiPbgg77lDofBJmNY68=" } } }, + "uglify-js": { + "version": "3.7.2", + "resolved": "https://registry.npmjs.org/uglify-js/-/uglify-js-3.7.2.tgz", + "integrity": "sha512-uhRwZcANNWVLrxLfNFEdltoPNhECUR3lc+UdJoG9CBpMcSnKyWA94tc3eAujB1GcMY5Uwq8ZMp4qWpxWYDQmaA==", + "optional": true, + "requires": { + "commander": "~2.20.3", + "source-map": "~0.6.1" + } + }, "uglifyify": { "version": "3.0.3", - "from": "uglifyify@>=3.0.1 <4.0.0", "resolved": "https://registry.npmjs.org/uglifyify/-/uglifyify-3.0.3.tgz", + "integrity": "sha1-5TunGXfb/3c+NA5eNSkoJZZdZtI=", + "requires": { + "convert-source-map": "~1.1.0", + "extend": "^1.2.1", + "minimatch": "^3.0.2", + "through": "~2.3.4", + "uglify-js": "2.x.x" + }, "dependencies": { "extend": { "version": "1.3.0", - "from": "extend@>=1.2.1 <2.0.0", - "resolved": "https://registry.npmjs.org/extend/-/extend-1.3.0.tgz" + "resolved": "https://registry.npmjs.org/extend/-/extend-1.3.0.tgz", + "integrity": "sha1-0VFvsP9WJNLr+RI+odrFoZlABPg=" }, "minimatch": { "version": "3.0.3", - "from": "minimatch@>=3.0.2 <4.0.0", "resolved": "https://registry.npmjs.org/minimatch/-/minimatch-3.0.3.tgz", + "integrity": "sha1-Kk5AkLlrLbBqnX3wEFWmKnfJt3Q=", + "requires": { + "brace-expansion": "^1.0.0" + }, "dependencies": { "brace-expansion": { "version": "1.1.6", - "from": "brace-expansion@>=1.0.0 <2.0.0", "resolved": "https://registry.npmjs.org/brace-expansion/-/brace-expansion-1.1.6.tgz", + "integrity": "sha1-cZfX6qm4fmSDkOph/GbIRCdCDfk=", + "requires": { + "balanced-match": "^0.4.1", + "concat-map": "0.0.1" + }, "dependencies": { "balanced-match": { "version": "0.4.2", - "from": "balanced-match@>=0.4.1 <0.5.0", - "resolved": "https://registry.npmjs.org/balanced-match/-/balanced-match-0.4.2.tgz" + "resolved": "https://registry.npmjs.org/balanced-match/-/balanced-match-0.4.2.tgz", + "integrity": "sha1-yz8+PHMtwPAe5wtAPzAuYddwmDg=" }, "concat-map": { "version": "0.0.1", - "from": "concat-map@0.0.1", - "resolved": "https://registry.npmjs.org/concat-map/-/concat-map-0.0.1.tgz" + "resolved": "https://registry.npmjs.org/concat-map/-/concat-map-0.0.1.tgz", + "integrity": "sha1-2Klr13/Wjfd5OnMDajug1UBdR3s=" } } } @@ -3227,111 +4908,151 @@ }, "uglify-js": { "version": "2.7.3", - "from": "uglify-js@>=2.0.0 <3.0.0", "resolved": "https://registry.npmjs.org/uglify-js/-/uglify-js-2.7.3.tgz", + "integrity": "sha1-ObOnMpuJ9exQfjRMbiJWhpjvSGg=", + "requires": { + "async": "~0.2.6", + "source-map": "~0.5.1", + "uglify-to-browserify": "~1.0.0", + "yargs": "~3.10.0" + }, "dependencies": { "async": { "version": "0.2.10", - "from": "async@>=0.2.6 <0.3.0", - "resolved": "https://registry.npmjs.org/async/-/async-0.2.10.tgz" + "resolved": "https://registry.npmjs.org/async/-/async-0.2.10.tgz", + "integrity": "sha1-trvgsGdLnXGXCMo43owjfLUmw9E=" }, "source-map": { "version": "0.5.6", - "from": "source-map@>=0.5.1 <0.6.0", - "resolved": "https://registry.npmjs.org/source-map/-/source-map-0.5.6.tgz" + "resolved": "https://registry.npmjs.org/source-map/-/source-map-0.5.6.tgz", + "integrity": "sha1-dc449SvwczxafwwRjYEzSiu19BI=" }, "uglify-to-browserify": { "version": "1.0.2", - "from": "uglify-to-browserify@>=1.0.0 <1.1.0", - "resolved": "https://registry.npmjs.org/uglify-to-browserify/-/uglify-to-browserify-1.0.2.tgz" + "resolved": "https://registry.npmjs.org/uglify-to-browserify/-/uglify-to-browserify-1.0.2.tgz", + "integrity": "sha1-bgkk1r2mta/jSeOabWMoUKD4grc=" }, "yargs": { "version": "3.10.0", - "from": "yargs@>=3.10.0 <3.11.0", "resolved": "https://registry.npmjs.org/yargs/-/yargs-3.10.0.tgz", + "integrity": "sha1-9+572FfdfB0tOMDnTvvWgdFDH9E=", + "requires": { + "camelcase": "^1.0.2", + "cliui": "^2.1.0", + "decamelize": "^1.0.0", + "window-size": "0.1.0" + }, "dependencies": { "camelcase": { "version": "1.2.1", - "from": "camelcase@>=1.0.2 <2.0.0", - "resolved": "https://registry.npmjs.org/camelcase/-/camelcase-1.2.1.tgz" + "resolved": "https://registry.npmjs.org/camelcase/-/camelcase-1.2.1.tgz", + "integrity": "sha1-m7UwTS4LVmmLLHWLCKPqqdqlijk=" }, "cliui": { "version": "2.1.0", - "from": "cliui@>=2.1.0 <3.0.0", "resolved": "https://registry.npmjs.org/cliui/-/cliui-2.1.0.tgz", + "integrity": "sha1-S0dXYP+AJkx2LDoXGQMukcf+oNE=", + "requires": { + "center-align": "^0.1.1", + "right-align": "^0.1.1", + "wordwrap": "0.0.2" + }, "dependencies": { "center-align": { "version": "0.1.3", - "from": "center-align@>=0.1.1 <0.2.0", "resolved": "https://registry.npmjs.org/center-align/-/center-align-0.1.3.tgz", + "integrity": "sha1-qg0yYptu6XIgBBHL1EYckHvCt60=", + "requires": { + "align-text": "^0.1.3", + "lazy-cache": "^1.0.3" + }, "dependencies": { "align-text": { "version": "0.1.4", - "from": "align-text@>=0.1.1 <0.2.0", "resolved": "https://registry.npmjs.org/align-text/-/align-text-0.1.4.tgz", + "integrity": "sha1-DNkKVhCT810KmSVsIrcGlDP60Rc=", + "requires": { + "kind-of": "^3.0.2", + "longest": "^1.0.1", + "repeat-string": "^1.5.2" + }, "dependencies": { "kind-of": { "version": "3.0.4", - "from": "kind-of@>=3.0.2 <4.0.0", "resolved": "https://registry.npmjs.org/kind-of/-/kind-of-3.0.4.tgz", + "integrity": "sha1-e47PGKThf4Jp1ztQHJ8jLJaIenQ=", + "requires": { + "is-buffer": "^1.0.2" + }, "dependencies": { "is-buffer": { "version": "1.1.4", - "from": "is-buffer@>=1.0.2 <2.0.0", - "resolved": "https://registry.npmjs.org/is-buffer/-/is-buffer-1.1.4.tgz" + "resolved": "https://registry.npmjs.org/is-buffer/-/is-buffer-1.1.4.tgz", + "integrity": "sha1-z8hszV3FpS+oBIkRHGkgxFfi2Ys=" } } }, "longest": { "version": "1.0.1", - "from": "longest@>=1.0.1 <2.0.0", - "resolved": "https://registry.npmjs.org/longest/-/longest-1.0.1.tgz" + "resolved": "https://registry.npmjs.org/longest/-/longest-1.0.1.tgz", + "integrity": "sha1-MKCy2jj3N3DoKUoNIuZiXtd9AJc=" }, "repeat-string": { "version": "1.5.4", - "from": "repeat-string@>=1.5.2 <2.0.0", - "resolved": "https://registry.npmjs.org/repeat-string/-/repeat-string-1.5.4.tgz" + "resolved": "https://registry.npmjs.org/repeat-string/-/repeat-string-1.5.4.tgz", + "integrity": "sha1-ZOwMkeD0tHX5DVtkNlHj5uW2wtU=" } } }, "lazy-cache": { "version": "1.0.4", - "from": "lazy-cache@>=1.0.3 <2.0.0", - "resolved": "https://registry.npmjs.org/lazy-cache/-/lazy-cache-1.0.4.tgz" + "resolved": "https://registry.npmjs.org/lazy-cache/-/lazy-cache-1.0.4.tgz", + "integrity": "sha1-odePw6UEdMuAhF07O24dpJpEbo4=" } } }, "right-align": { "version": "0.1.3", - "from": "right-align@>=0.1.1 <0.2.0", "resolved": "https://registry.npmjs.org/right-align/-/right-align-0.1.3.tgz", + "integrity": "sha1-YTObci/mo1FWiSENJOFMlhSGE+8=", + "requires": { + "align-text": "^0.1.1" + }, "dependencies": { "align-text": { "version": "0.1.4", - "from": "align-text@>=0.1.1 <0.2.0", "resolved": "https://registry.npmjs.org/align-text/-/align-text-0.1.4.tgz", + "integrity": "sha1-DNkKVhCT810KmSVsIrcGlDP60Rc=", + "requires": { + "kind-of": "^3.0.2", + "longest": "^1.0.1", + "repeat-string": "^1.5.2" + }, "dependencies": { "kind-of": { "version": "3.0.4", - "from": "kind-of@>=3.0.2 <4.0.0", "resolved": "https://registry.npmjs.org/kind-of/-/kind-of-3.0.4.tgz", + "integrity": "sha1-e47PGKThf4Jp1ztQHJ8jLJaIenQ=", + "requires": { + "is-buffer": "^1.0.2" + }, "dependencies": { "is-buffer": { "version": "1.1.4", - "from": "is-buffer@>=1.0.2 <2.0.0", - "resolved": "https://registry.npmjs.org/is-buffer/-/is-buffer-1.1.4.tgz" + "resolved": "https://registry.npmjs.org/is-buffer/-/is-buffer-1.1.4.tgz", + "integrity": "sha1-z8hszV3FpS+oBIkRHGkgxFfi2Ys=" } } }, "longest": { "version": "1.0.1", - "from": "longest@>=1.0.1 <2.0.0", - "resolved": "https://registry.npmjs.org/longest/-/longest-1.0.1.tgz" + "resolved": "https://registry.npmjs.org/longest/-/longest-1.0.1.tgz", + "integrity": "sha1-MKCy2jj3N3DoKUoNIuZiXtd9AJc=" }, "repeat-string": { "version": "1.5.4", - "from": "repeat-string@>=1.5.2 <2.0.0", - "resolved": "https://registry.npmjs.org/repeat-string/-/repeat-string-1.5.4.tgz" + "resolved": "https://registry.npmjs.org/repeat-string/-/repeat-string-1.5.4.tgz", + "integrity": "sha1-ZOwMkeD0tHX5DVtkNlHj5uW2wtU=" } } } @@ -3339,20 +5060,20 @@ }, "wordwrap": { "version": "0.0.2", - "from": "wordwrap@0.0.2", - "resolved": "https://registry.npmjs.org/wordwrap/-/wordwrap-0.0.2.tgz" + "resolved": "https://registry.npmjs.org/wordwrap/-/wordwrap-0.0.2.tgz", + "integrity": "sha1-t5Zpu0LstAn4PVg8rVLKF+qhZD8=" } } }, "decamelize": { "version": "1.2.0", - "from": "decamelize@>=1.0.0 <2.0.0", - "resolved": "https://registry.npmjs.org/decamelize/-/decamelize-1.2.0.tgz" + "resolved": "https://registry.npmjs.org/decamelize/-/decamelize-1.2.0.tgz", + "integrity": "sha1-9lNNFRSCabIDUue+4m9QH5oZEpA=" }, "window-size": { "version": "0.1.0", - "from": "window-size@0.1.0", - "resolved": "https://registry.npmjs.org/window-size/-/window-size-0.1.0.tgz" + "resolved": "https://registry.npmjs.org/window-size/-/window-size-0.1.0.tgz", + "integrity": "sha1-VDjNLqk7IC76Ohn+iIeu58lPnJ0=" } } } @@ -3362,55 +5083,72 @@ }, "vinyl": { "version": "0.4.6", - "from": "vinyl@>=0.4.6 <0.5.0", "resolved": "https://registry.npmjs.org/vinyl/-/vinyl-0.4.6.tgz", + "integrity": "sha1-LzVsh6VQolVGHza76ypbqL94SEc=", + "requires": { + "clone": "^0.2.0", + "clone-stats": "^0.0.1" + }, "dependencies": { "clone": { "version": "0.2.0", - "from": "clone@>=0.2.0 <0.3.0", - "resolved": "https://registry.npmjs.org/clone/-/clone-0.2.0.tgz" + "resolved": "https://registry.npmjs.org/clone/-/clone-0.2.0.tgz", + "integrity": "sha1-xhJqkK1Pctv1rNskPMN3JP6T/B8=" }, "clone-stats": { "version": "0.0.1", - "from": "clone-stats@>=0.0.1 <0.0.2", - "resolved": "https://registry.npmjs.org/clone-stats/-/clone-stats-0.0.1.tgz" + "resolved": "https://registry.npmjs.org/clone-stats/-/clone-stats-0.0.1.tgz", + "integrity": "sha1-uI+UqCzzi4eR1YBG6kAprYjKmdE=" } } }, "vinyl-buffer": { "version": "1.0.0", - "from": "vinyl-buffer@>=1.0.0 <2.0.0", "resolved": "https://registry.npmjs.org/vinyl-buffer/-/vinyl-buffer-1.0.0.tgz", + "integrity": "sha1-ygZ+oIQx1QdyKx3lCD9gJhbrwjQ=", + "requires": { + "bl": "^0.9.1", + "through2": "^0.6.1" + }, "dependencies": { "bl": { "version": "0.9.5", - "from": "bl@>=0.9.1 <0.10.0", "resolved": "https://registry.npmjs.org/bl/-/bl-0.9.5.tgz", + "integrity": "sha1-wGt5evCF6gC8Unr8jvzxHeIjIFQ=", + "requires": { + "readable-stream": "~1.0.26" + }, "dependencies": { "readable-stream": { "version": "1.0.34", - "from": "readable-stream@>=1.0.26 <1.1.0", "resolved": "https://registry.npmjs.org/readable-stream/-/readable-stream-1.0.34.tgz", + "integrity": "sha1-Elgg40vIQtLyqq+v5MKRbuMsFXw=", + "requires": { + "core-util-is": "~1.0.0", + "inherits": "~2.0.1", + "isarray": "0.0.1", + "string_decoder": "~0.10.x" + }, "dependencies": { "core-util-is": { "version": "1.0.2", - "from": "core-util-is@>=1.0.0 <1.1.0", - "resolved": "https://registry.npmjs.org/core-util-is/-/core-util-is-1.0.2.tgz" + "resolved": "https://registry.npmjs.org/core-util-is/-/core-util-is-1.0.2.tgz", + "integrity": "sha1-tf1UIgqivFq1eqtxQMlAdUUDwac=" + }, + "inherits": { + "version": "2.0.3", + "resolved": "https://registry.npmjs.org/inherits/-/inherits-2.0.3.tgz", + "integrity": "sha1-Yzwsg+PaQqUC9SRmAiSA9CCCYd4=" }, "isarray": { "version": "0.0.1", - "from": "isarray@0.0.1", - "resolved": "https://registry.npmjs.org/isarray/-/isarray-0.0.1.tgz" + "resolved": "https://registry.npmjs.org/isarray/-/isarray-0.0.1.tgz", + "integrity": "sha1-ihis/Kmo9Bd+Cav8YDiTmwXR7t8=" }, "string_decoder": { "version": "0.10.31", - "from": "string_decoder@>=0.10.0 <0.11.0", - "resolved": "https://registry.npmjs.org/string_decoder/-/string_decoder-0.10.31.tgz" - }, - "inherits": { - "version": "2.0.3", - "from": "inherits@>=2.0.1 <2.1.0", - "resolved": "https://registry.npmjs.org/inherits/-/inherits-2.0.3.tgz" + "resolved": "https://registry.npmjs.org/string_decoder/-/string_decoder-0.10.31.tgz", + "integrity": "sha1-YuIDvEF2bGwoyfyEMB2rHFMQ+pQ=" } } } @@ -3418,40 +5156,50 @@ }, "through2": { "version": "0.6.5", - "from": "through2@>=0.6.1 <0.7.0", "resolved": "https://registry.npmjs.org/through2/-/through2-0.6.5.tgz", + "integrity": "sha1-QaucZ7KdVyCQcUEOHXp6lozTrUg=", + "requires": { + "readable-stream": ">=1.0.33-1 <1.1.0-0", + "xtend": ">=4.0.0 <4.1.0-0" + }, "dependencies": { "readable-stream": { "version": "1.0.34", - "from": "readable-stream@>=1.0.33-1 <1.1.0-0", "resolved": "https://registry.npmjs.org/readable-stream/-/readable-stream-1.0.34.tgz", + "integrity": "sha1-Elgg40vIQtLyqq+v5MKRbuMsFXw=", + "requires": { + "core-util-is": "~1.0.0", + "inherits": "~2.0.1", + "isarray": "0.0.1", + "string_decoder": "~0.10.x" + }, "dependencies": { "core-util-is": { "version": "1.0.2", - "from": "core-util-is@>=1.0.0 <1.1.0", - "resolved": "https://registry.npmjs.org/core-util-is/-/core-util-is-1.0.2.tgz" + "resolved": "https://registry.npmjs.org/core-util-is/-/core-util-is-1.0.2.tgz", + "integrity": "sha1-tf1UIgqivFq1eqtxQMlAdUUDwac=" + }, + "inherits": { + "version": "2.0.3", + "resolved": "https://registry.npmjs.org/inherits/-/inherits-2.0.3.tgz", + "integrity": "sha1-Yzwsg+PaQqUC9SRmAiSA9CCCYd4=" }, "isarray": { "version": "0.0.1", - "from": "isarray@0.0.1", - "resolved": "https://registry.npmjs.org/isarray/-/isarray-0.0.1.tgz" + "resolved": "https://registry.npmjs.org/isarray/-/isarray-0.0.1.tgz", + "integrity": "sha1-ihis/Kmo9Bd+Cav8YDiTmwXR7t8=" }, "string_decoder": { "version": "0.10.31", - "from": "string_decoder@>=0.10.0 <0.11.0", - "resolved": "https://registry.npmjs.org/string_decoder/-/string_decoder-0.10.31.tgz" - }, - "inherits": { - "version": "2.0.3", - "from": "inherits@>=2.0.1 <2.1.0", - "resolved": "https://registry.npmjs.org/inherits/-/inherits-2.0.3.tgz" + "resolved": "https://registry.npmjs.org/string_decoder/-/string_decoder-0.10.31.tgz", + "integrity": "sha1-YuIDvEF2bGwoyfyEMB2rHFMQ+pQ=" } } }, "xtend": { "version": "4.0.1", - "from": "xtend@>=4.0.0 <4.1.0", - "resolved": "https://registry.npmjs.org/xtend/-/xtend-4.0.1.tgz" + "resolved": "https://registry.npmjs.org/xtend/-/xtend-4.0.1.tgz", + "integrity": "sha1-pcbVMr5lbiPbgg77lDofBJmNY68=" } } } @@ -3459,45 +5207,59 @@ }, "vinyl-source-stream": { "version": "1.1.0", - "from": "vinyl-source-stream@>=1.0.0 <2.0.0", "resolved": "https://registry.npmjs.org/vinyl-source-stream/-/vinyl-source-stream-1.1.0.tgz", + "integrity": "sha1-RMvlEIIFJ53rDFZTwJSiiHk4sas=", + "requires": { + "through2": "^0.6.1", + "vinyl": "^0.4.3" + }, "dependencies": { "through2": { "version": "0.6.5", - "from": "through2@>=0.6.1 <0.7.0", "resolved": "https://registry.npmjs.org/through2/-/through2-0.6.5.tgz", + "integrity": "sha1-QaucZ7KdVyCQcUEOHXp6lozTrUg=", + "requires": { + "readable-stream": ">=1.0.33-1 <1.1.0-0", + "xtend": ">=4.0.0 <4.1.0-0" + }, "dependencies": { "readable-stream": { "version": "1.0.34", - "from": "readable-stream@>=1.0.33-1 <1.1.0-0", "resolved": "https://registry.npmjs.org/readable-stream/-/readable-stream-1.0.34.tgz", + "integrity": "sha1-Elgg40vIQtLyqq+v5MKRbuMsFXw=", + "requires": { + "core-util-is": "~1.0.0", + "inherits": "~2.0.1", + "isarray": "0.0.1", + "string_decoder": "~0.10.x" + }, "dependencies": { "core-util-is": { "version": "1.0.2", - "from": "core-util-is@>=1.0.0 <1.1.0", - "resolved": "https://registry.npmjs.org/core-util-is/-/core-util-is-1.0.2.tgz" + "resolved": "https://registry.npmjs.org/core-util-is/-/core-util-is-1.0.2.tgz", + "integrity": "sha1-tf1UIgqivFq1eqtxQMlAdUUDwac=" + }, + "inherits": { + "version": "2.0.3", + "resolved": "https://registry.npmjs.org/inherits/-/inherits-2.0.3.tgz", + "integrity": "sha1-Yzwsg+PaQqUC9SRmAiSA9CCCYd4=" }, "isarray": { "version": "0.0.1", - "from": "isarray@0.0.1", - "resolved": "https://registry.npmjs.org/isarray/-/isarray-0.0.1.tgz" + "resolved": "https://registry.npmjs.org/isarray/-/isarray-0.0.1.tgz", + "integrity": "sha1-ihis/Kmo9Bd+Cav8YDiTmwXR7t8=" }, "string_decoder": { "version": "0.10.31", - "from": "string_decoder@>=0.10.0 <0.11.0", - "resolved": "https://registry.npmjs.org/string_decoder/-/string_decoder-0.10.31.tgz" - }, - "inherits": { - "version": "2.0.3", - "from": "inherits@>=2.0.1 <2.1.0", - "resolved": "https://registry.npmjs.org/inherits/-/inherits-2.0.3.tgz" + "resolved": "https://registry.npmjs.org/string_decoder/-/string_decoder-0.10.31.tgz", + "integrity": "sha1-YuIDvEF2bGwoyfyEMB2rHFMQ+pQ=" } } }, "xtend": { "version": "4.0.1", - "from": "xtend@>=4.0.0 <4.1.0", - "resolved": "https://registry.npmjs.org/xtend/-/xtend-4.0.1.tgz" + "resolved": "https://registry.npmjs.org/xtend/-/xtend-4.0.1.tgz", + "integrity": "sha1-pcbVMr5lbiPbgg77lDofBJmNY68=" } } } @@ -3505,147 +5267,203 @@ }, "virtual-dom": { "version": "2.1.1", - "from": "virtual-dom@>=2.0.1 <3.0.0", "resolved": "https://registry.npmjs.org/virtual-dom/-/virtual-dom-2.1.1.tgz", + "integrity": "sha1-gO2i1IG57eDASRGM78tKBfIdE3U=", + "requires": { + "browser-split": "0.0.1", + "error": "^4.3.0", + "ev-store": "^7.0.0", + "global": "^4.3.0", + "is-object": "^1.0.1", + "next-tick": "^0.2.2", + "x-is-array": "0.1.0", + "x-is-string": "0.1.0" + }, "dependencies": { "browser-split": { "version": "0.0.1", - "from": "browser-split@0.0.1", - "resolved": "https://registry.npmjs.org/browser-split/-/browser-split-0.0.1.tgz" + "resolved": "https://registry.npmjs.org/browser-split/-/browser-split-0.0.1.tgz", + "integrity": "sha1-ewl1dPjj6tYG+0Zk5krf3aKYGpM=" }, "error": { "version": "4.4.0", - "from": "error@>=4.3.0 <5.0.0", "resolved": "https://registry.npmjs.org/error/-/error-4.4.0.tgz", + "integrity": "sha1-v2n/JR+0onnBmtzNqmth6Q2b8So=", + "requires": { + "camelize": "^1.0.0", + "string-template": "~0.2.0", + "xtend": "~4.0.0" + }, "dependencies": { "camelize": { "version": "1.0.0", - "from": "camelize@>=1.0.0 <2.0.0", - "resolved": "https://registry.npmjs.org/camelize/-/camelize-1.0.0.tgz" + "resolved": "https://registry.npmjs.org/camelize/-/camelize-1.0.0.tgz", + "integrity": "sha1-FkpUg+Yw+kMh5a8HAg5TGDGyYJs=" }, "string-template": { "version": "0.2.1", - "from": "string-template@>=0.2.0 <0.3.0", - "resolved": "https://registry.npmjs.org/string-template/-/string-template-0.2.1.tgz" + "resolved": "https://registry.npmjs.org/string-template/-/string-template-0.2.1.tgz", + "integrity": "sha1-QpMuWYo1LQH8IuwzZ9nYTuxsmt0=" }, "xtend": { "version": "4.0.1", - "from": "xtend@>=4.0.0 <4.1.0", - "resolved": "https://registry.npmjs.org/xtend/-/xtend-4.0.1.tgz" + "resolved": "https://registry.npmjs.org/xtend/-/xtend-4.0.1.tgz", + "integrity": "sha1-pcbVMr5lbiPbgg77lDofBJmNY68=" } } }, "ev-store": { "version": "7.0.0", - "from": "ev-store@>=7.0.0 <8.0.0", "resolved": "https://registry.npmjs.org/ev-store/-/ev-store-7.0.0.tgz", + "integrity": "sha1-GrDH+CE2UF3XSzHRdwHLK+bSZVg=", + "requires": { + "individual": "^3.0.0" + }, "dependencies": { "individual": { "version": "3.0.0", - "from": "individual@>=3.0.0 <4.0.0", - "resolved": "https://registry.npmjs.org/individual/-/individual-3.0.0.tgz" + "resolved": "https://registry.npmjs.org/individual/-/individual-3.0.0.tgz", + "integrity": "sha1-58pPhfiVewGHNPKFdQ3CLsL5hi0=" } } }, "global": { "version": "4.3.0", - "from": "global@>=4.3.0 <5.0.0", "resolved": "https://registry.npmjs.org/global/-/global-4.3.0.tgz", + "integrity": "sha1-737EvurVebRU9evV5/MD21T0Kis=", + "requires": { + "min-document": "^2.6.1", + "process": "~0.5.1" + }, "dependencies": { "min-document": { "version": "2.18.1", - "from": "min-document@>=2.6.1 <3.0.0", "resolved": "https://registry.npmjs.org/min-document/-/min-document-2.18.1.tgz", + "integrity": "sha1-YQHhcjT7EqgZX0Bvqttp2FlSM7I=", + "requires": { + "dom-walk": "^0.1.0" + }, "dependencies": { "dom-walk": { "version": "0.1.1", - "from": "dom-walk@>=0.1.0 <0.2.0", - "resolved": "https://registry.npmjs.org/dom-walk/-/dom-walk-0.1.1.tgz" + "resolved": "https://registry.npmjs.org/dom-walk/-/dom-walk-0.1.1.tgz", + "integrity": "sha1-ZyIm3HTI95mtNTB9+TaroRrNYBg=" } } }, "process": { "version": "0.5.2", - "from": "process@>=0.5.1 <0.6.0", - "resolved": "https://registry.npmjs.org/process/-/process-0.5.2.tgz" + "resolved": "https://registry.npmjs.org/process/-/process-0.5.2.tgz", + "integrity": "sha1-FjjYqONML0QKkduVq5rrZ3/Bhc8=" } } }, "is-object": { "version": "1.0.1", - "from": "is-object@>=1.0.1 <2.0.0", - "resolved": "https://registry.npmjs.org/is-object/-/is-object-1.0.1.tgz" + "resolved": "https://registry.npmjs.org/is-object/-/is-object-1.0.1.tgz", + "integrity": "sha1-iVJojF7C/9awPsyF52ngKQMINHA=" }, "next-tick": { "version": "0.2.2", - "from": "next-tick@>=0.2.2 <0.3.0", - "resolved": "https://registry.npmjs.org/next-tick/-/next-tick-0.2.2.tgz" + "resolved": "https://registry.npmjs.org/next-tick/-/next-tick-0.2.2.tgz", + "integrity": "sha1-ddpKkn7liH45BliABltzNkE7MQ0=" }, "x-is-array": { "version": "0.1.0", - "from": "x-is-array@0.1.0", - "resolved": "https://registry.npmjs.org/x-is-array/-/x-is-array-0.1.0.tgz" + "resolved": "https://registry.npmjs.org/x-is-array/-/x-is-array-0.1.0.tgz", + "integrity": "sha1-3lIBcdR7P0FvVYfWKbidJrEtwp0=" }, "x-is-string": { "version": "0.1.0", - "from": "x-is-string@0.1.0", - "resolved": "https://registry.npmjs.org/x-is-string/-/x-is-string-0.1.0.tgz" + "resolved": "https://registry.npmjs.org/x-is-string/-/x-is-string-0.1.0.tgz", + "integrity": "sha1-R0tQhlrzpJqcRlfwWs0UVFj3fYI=" } } }, + "wordwrap": { + "version": "0.0.3", + "resolved": "https://registry.npmjs.org/wordwrap/-/wordwrap-0.0.3.tgz", + "integrity": "sha1-o9XabNXAvAAI03I0u68b7WMFkQc=" + }, "yargs": { "version": "3.32.0", - "from": "yargs@>=3.4.5 <4.0.0", "resolved": "https://registry.npmjs.org/yargs/-/yargs-3.32.0.tgz", + "integrity": "sha1-AwiOnr+edWtpdRYR0qXvWRSCyZU=", + "requires": { + "camelcase": "^2.0.1", + "cliui": "^3.0.3", + "decamelize": "^1.1.1", + "os-locale": "^1.4.0", + "string-width": "^1.0.1", + "window-size": "^0.1.4", + "y18n": "^3.2.0" + }, "dependencies": { "camelcase": { "version": "2.1.1", - "from": "camelcase@>=2.0.1 <3.0.0", - "resolved": "https://registry.npmjs.org/camelcase/-/camelcase-2.1.1.tgz" + "resolved": "https://registry.npmjs.org/camelcase/-/camelcase-2.1.1.tgz", + "integrity": "sha1-fB0W1nmhu+WcoCys7PsBHiAfWh8=" }, "cliui": { "version": "3.2.0", - "from": "cliui@>=3.0.3 <4.0.0", "resolved": "https://registry.npmjs.org/cliui/-/cliui-3.2.0.tgz", + "integrity": "sha1-EgYBU3qRbSmUD5NNo7SNWFo5IT0=", + "requires": { + "string-width": "^1.0.1", + "strip-ansi": "^3.0.1", + "wrap-ansi": "^2.0.0" + }, "dependencies": { "strip-ansi": { "version": "3.0.1", - "from": "strip-ansi@>=3.0.1 <4.0.0", "resolved": "https://registry.npmjs.org/strip-ansi/-/strip-ansi-3.0.1.tgz", + "integrity": "sha1-ajhfuIU9lS1f8F0Oiq+UJ43GPc8=", + "requires": { + "ansi-regex": "^2.0.0" + }, "dependencies": { "ansi-regex": { "version": "2.0.0", - "from": "ansi-regex@>=2.0.0 <3.0.0", - "resolved": "https://registry.npmjs.org/ansi-regex/-/ansi-regex-2.0.0.tgz" + "resolved": "https://registry.npmjs.org/ansi-regex/-/ansi-regex-2.0.0.tgz", + "integrity": "sha1-xQYbbg74qBd15Q9dZhUb9r83EQc=" } } }, "wrap-ansi": { "version": "2.0.0", - "from": "wrap-ansi@>=2.0.0 <3.0.0", - "resolved": "https://registry.npmjs.org/wrap-ansi/-/wrap-ansi-2.0.0.tgz" + "resolved": "https://registry.npmjs.org/wrap-ansi/-/wrap-ansi-2.0.0.tgz", + "integrity": "sha1-fTD4+HP5pbvDpk2ryNF34HGuQm8=", + "requires": { + "string-width": "^1.0.1" + } } } }, "decamelize": { "version": "1.2.0", - "from": "decamelize@>=1.1.1 <2.0.0", - "resolved": "https://registry.npmjs.org/decamelize/-/decamelize-1.2.0.tgz" + "resolved": "https://registry.npmjs.org/decamelize/-/decamelize-1.2.0.tgz", + "integrity": "sha1-9lNNFRSCabIDUue+4m9QH5oZEpA=" }, "os-locale": { "version": "1.4.0", - "from": "os-locale@>=1.4.0 <2.0.0", "resolved": "https://registry.npmjs.org/os-locale/-/os-locale-1.4.0.tgz", + "integrity": "sha1-IPnxeuKe00XoveWDsT0gCYA8FNk=", + "requires": { + "lcid": "^1.0.0" + }, "dependencies": { "lcid": { "version": "1.0.0", - "from": "lcid@>=1.0.0 <2.0.0", "resolved": "https://registry.npmjs.org/lcid/-/lcid-1.0.0.tgz", + "integrity": "sha1-MIrMr6C8SDo4Z7S28rlQYlHRuDU=", + "requires": { + "invert-kv": "^1.0.0" + }, "dependencies": { "invert-kv": { "version": "1.0.0", - "from": "invert-kv@>=1.0.0 <2.0.0", - "resolved": "https://registry.npmjs.org/invert-kv/-/invert-kv-1.0.0.tgz" + "resolved": "https://registry.npmjs.org/invert-kv/-/invert-kv-1.0.0.tgz", + "integrity": "sha1-EEqOSqym09jNFXqO+L+rLXo//bY=" } } } @@ -3653,30 +5471,41 @@ }, "string-width": { "version": "1.0.2", - "from": "string-width@>=1.0.1 <2.0.0", "resolved": "https://registry.npmjs.org/string-width/-/string-width-1.0.2.tgz", + "integrity": "sha1-EYvfW4zcUaKn5w0hHgfisLmxB9M=", + "requires": { + "code-point-at": "^1.0.0", + "is-fullwidth-code-point": "^1.0.0", + "strip-ansi": "^3.0.0" + }, "dependencies": { "code-point-at": { "version": "1.0.0", - "from": "code-point-at@>=1.0.0 <2.0.0", - "resolved": "https://registry.npmjs.org/code-point-at/-/code-point-at-1.0.0.tgz" + "resolved": "https://registry.npmjs.org/code-point-at/-/code-point-at-1.0.0.tgz", + "integrity": "sha1-9psZLT99keOC5Lcb3bd4eGGasMY=", + "requires": { + "number-is-nan": "^1.0.0" + } }, "is-fullwidth-code-point": { "version": "1.0.0", - "from": "is-fullwidth-code-point@>=1.0.0 <2.0.0", - "resolved": "https://registry.npmjs.org/is-fullwidth-code-point/-/is-fullwidth-code-point-1.0.0.tgz" + "resolved": "https://registry.npmjs.org/is-fullwidth-code-point/-/is-fullwidth-code-point-1.0.0.tgz", + "integrity": "sha1-754xOG8DGn8NZDr4L95QxFfvAMs=", + "requires": { + "number-is-nan": "^1.0.0" + } } } }, "window-size": { "version": "0.1.4", - "from": "window-size@>=0.1.4 <0.2.0", - "resolved": "https://registry.npmjs.org/window-size/-/window-size-0.1.4.tgz" + "resolved": "https://registry.npmjs.org/window-size/-/window-size-0.1.4.tgz", + "integrity": "sha1-+OGqHuWlPsW/FR/6CXQqatdpeHY=" }, "y18n": { "version": "3.2.1", - "from": "y18n@>=3.2.0 <4.0.0", - "resolved": "https://registry.npmjs.org/y18n/-/y18n-3.2.1.tgz" + "resolved": "https://registry.npmjs.org/y18n/-/y18n-3.2.1.tgz", + "integrity": "sha1-bRX7qITAhnnA136I53WegR4H+kE=" } } } diff --git a/admin/package.json b/admin/package.json index 460ba7ecded..d0bf1f60f88 100644 --- a/admin/package.json +++ b/admin/package.json @@ -11,7 +11,7 @@ "url": "https://github.com/rethinkdb/rethinkdb" }, "author": "RethinkDB", - "license": "AGPL 3.0", + "license": "Apache-2.0", "bugs": { "url": "https://github.com/rethinkdb/rethinkdb/issues" }, @@ -29,7 +29,7 @@ "gulp-replace": "^0.5.3", "gulp-sourcemaps": "^1.4.0", "gulp-util": "^3.0.4", - "handlebars": "^3.0.1", + "handlebars": "^4.1.2", "hbsfy": "^2.2.1", "less": "^2.4.0", "moment": "^2.10.3", diff --git a/admin/static/coffee/tables/index.coffee b/admin/static/coffee/tables/index.coffee index b9f292c6b10..e30b8694328 100644 --- a/admin/static/coffee/tables/index.coffee +++ b/admin/static/coffee/tables/index.coffee @@ -288,9 +288,18 @@ class DatabaseView extends Backbone.View class TableView extends Backbone.View className: 'table_container' template: require('../../handlebars/table.hbs') + + events: + 'click button.explore-table': 'explore_table' + initialize: => @listenTo @model, 'change', @render + + explore_table: => + window.localStorage.current_query = JSON.stringify "r.db('#{@model.get('db')}').table('#{@model.get('name')}')" + app.main.router.navigate("#dataexplorer", trigger: true) + render: => @$el.html @template id: @model.get 'id' @@ -302,6 +311,7 @@ class TableView extends Backbone.View replicas: @model.get 'replicas' replicas_ready: @model.get 'replicas_ready' status: @model.get 'status' + displayExploreButton: window.hasOwnProperty('localStorage') @ remove: => diff --git a/admin/static/handlebars/table.hbs b/admin/static/handlebars/table.hbs index 69334d70151..2f2317e3956 100644 --- a/admin/static/handlebars/table.hbs +++ b/admin/static/handlebars/table.hbs @@ -1,9 +1,14 @@
- +

{{name}}

+ {{#if displayExploreButton}} +

+ +

+ {{/if}}

{{shards}} {{pluralize_noun "shard" shards}}, {{replicas}} {{pluralize_noun "replica" replicas}}

diff --git a/admin/static/js/reql_docs.js b/admin/static/js/reql_docs.js index 3417f563fd2..250d861ac40 100644 --- a/admin/static/js/reql_docs.js +++ b/admin/static/js/reql_docs.js @@ -108,6 +108,84 @@ reql_docs = { "name": "binary", "url": "binary" }, + "api/javascript/bit_and/": { + "body": "number.bitAnd(number[, number, ...]) → number", + "description": "

Compute the arithmetic \"and\" of one or more values.

", + "example": "

Example:

\n
> r.expr(6).bitAnd(4).run(conn, callback)\n// result passed to callback\n4\n
", + "io": [ + [ + "number", + "number" + ] + ], + "name": "bitAnd", + "url": "bit_and" + }, + "api/javascript/bit_not/": { + "body": "number.bitNot() → number", + "description": "

Compute the arithmetic inverse (not) of an expression.

", + "example": "

Example:

\n
> r.expr(15).bitNot().run(conn, callback)\n// result passed to callback\n-16\n
", + "io": [ + [ + "number", + "number" + ] + ], + "name": "bitNot", + "url": "bit_not" + }, + "api/javascript/bit_or/": { + "body": "number.bitOr(number[, number, ...]) → number", + "description": "

Compute the arithmetic \"or\" of one or more values.

", + "example": "

Example:

\n
> r.expr(6).bitOr(4).run(conn, callback)\n// result passed to callback\n6\n
", + "io": [ + [ + "number", + "number" + ] + ], + "name": "bitOr", + "url": "bit_or" + }, + "api/javascript/bit_sal/": { + "body": "number.bitSal(number, number) → numbernumber.bitSal(number[, number, ...]) → number", + "description": "

Compute the left arithmetic shift of one or more values..

", + "example": "

Example:

\n
> r.expr(5).bitSal(4).run(conn, callback)\n// result passed to callback\n80\n
", + "io": [ + [ + "number", + "number" + ] + ], + "name": "bitSal", + "url": "bit_sal" + }, + "api/javascript/bit_sar/": { + "body": "number.bitSar(number, number) → number", + "description": "

Compute the right arithmetic shift of one or more values.

", + "example": "

Example:

\n
> r.expr(32).bitSar(3).run(conn, callback)\n// result passed to callback\n4\n
", + "io": [ + [ + "number", + "number" + ] + ], + "name": "bitSar", + "url": "bit_sar" + }, + "api/javascript/bit_xor/": { + "body": "number.bitXor(number[, number, ...]) → number", + "description": "

Compute the arithmetic \"xor\" of one or more values.

", + "example": "

Example:

\n
> r.expr(6).bitXor(4).run(conn, callback)\n// result passed to callback\n2\n
", + "io": [ + [ + "number", + "number" + ] + ], + "name": "bitXor", + "url": "bit_xor" + }, "api/javascript/bracket/": { "body": "sequence(attr) → sequencesingleSelection(attr) → valueobject(attr) → valuearray(index) → value", "description": "

Get a single field from an object. If called on a sequence, gets that field from every object in the sequence, skipping objects that lack it.

", diff --git a/admin/static/less/styles.less b/admin/static/less/styles.less index 1afda99012e..635cf2c41be 100644 --- a/admin/static/less/styles.less +++ b/admin/static/less/styles.less @@ -1008,7 +1008,7 @@ TODO: retire this margin: 0; font-family: @sans; } - .name, .quick_info, .status { + .name, .quick_info, .status, .explore { @offset: 8px; padding: 0 @offset * 2; border-left: thin solid #e4e4e4; @@ -1033,6 +1033,14 @@ TODO: retire this text-overflow: ellipsis; .flex-grow(2); } + .explore { + border-left: none; + + .btn { + opacity: 0; + .transition(~"0.1s opacity ease-out"); + } + } .quick_info { .with-icon('images/graph-icon.png'); color: #626264; @@ -1051,6 +1059,11 @@ TODO: retire this .with-icon('images/yellow-light_glow.png'); } } + + + &:hover .explore .btn { + opacity: 1; + } } } } diff --git a/configure b/configure index 305f76031ff..608271a1377 100755 --- a/configure +++ b/configure @@ -21,13 +21,13 @@ init () { max_browserify_version=13.1.0 min_python_version=2.6.0 - osx_min_version=10.7 + osx_min_version=10.9 min_msbuild_version=14.0 min_nmake_version=14.0 min_cl_version=19.0 - must_fetch_list='bluebird v8' + must_fetch_list='v8' please_fetch_list="handlebars gtest re2 $must_fetch_list" optional_libs="gtest termcap boost_system" @@ -36,10 +36,10 @@ init () { all_libs="$required_libs $optional_libs $other_libs" default_static="tcmalloc jemalloc" - web_assets_deps="npm coffee browserify bluebird" + web_assets_deps="npm coffee browserify" required_bin_deps="protoc python" optional_bin_deps="wget curl" - bin_deps="cxx $web_assets_deps $required_bin_deps $optional_bin_deps" + bin_deps="cxx $required_bin_deps $optional_bin_deps" all_deps="$bin_deps $all_libs boost" default_allocator_linux=jemalloc @@ -102,9 +102,13 @@ configure_unixlike () { case "${MACHINE%%-*}" in x86_64|i?86) true ;; - arm*) + arm*|arm64*|aarch64*) var_append LDFLAGS -ldl final_warning="ARM support is still experimental" ;; + s390x) + final_warning="s390x support is still experimental" ;; + ppc64le|powerpc64le|powerpc64el) + final_warning="PowerPC support is still experimental" ;; *) error "unsupported architecture: $MACHINE" esac @@ -127,17 +131,12 @@ configure_unixlike () { fi check_cxx11 - check_precompiled_web for bin in $required_bin_deps; do require_dep $bin check_bin $bin done for bin in $web_assets_deps; do - if $enable_precompiled_web; then - optional_dep $bin - else - require_dep $bin - fi + require_dep $bin check_bin $bin done check_admin_deps @@ -197,7 +196,6 @@ configure_windows () { var PTHREAD_LIBS var CROSS_COMPILING 0 var CXX false - var USE_PRECOMPILED_WEB_ASSETS 0 for pkg in protobuf curl v8 zlib re2 openssl gtest boost; do require_dep $pkg fetch_lib $pkg @@ -207,8 +205,6 @@ configure_windows () { check_bin npm require_dep coffee fetch_bin coffee - require_dep bluebird - fetch_pkg bluebird require_dep browserify fetch_bin browserify check_admin_deps @@ -275,7 +271,6 @@ read_args () { arg_sysconfdir= arg_localstatedir= custom_allocator= - enable_precompiled_web= use_ccache=false while [[ $# -ne 0 ]]; do @@ -331,8 +326,6 @@ read_args () { --with-tcmalloc) $no_arg; set_custom_allocator tcmalloc ;; --with-jemalloc) $no_arg; set_custom_allocator jemalloc ;; --with-system-malloc) $no_arg; set_custom_allocator system ;; - --enable-precompiled-web) $no_arg; enable_precompiled_web=true ;; - --disable-precompiled-web) $no_arg; enable_precompiled_web=false ;; --ccache) $no_arg; use_ccache=true ;; --prefix) $has_arg; arg_prefix=$arg ;; --sysconfdir) $has_arg; arg_sysconfdir=$arg ;; @@ -407,8 +400,6 @@ EOF --with-tcmalloc Use TCMalloc --with-jemalloc Use jemalloc (default on Linux) --with-system-malloc Use the system malloc (default on OS X) - --enable-precompiled-web - --disable-precompiled-web Use precompiled web assets located in precompiled/web (default: autodetect) --ccache Speed up the build using ccache --windows-platform Windows platform: Win32 (32 bit, default) or x64 (64 bit) EOF @@ -1114,12 +1105,12 @@ test_protobuf () { fi local pbdir=$root/mk/gen/protoc/ mkdir -p "$pbdir" - echo 'message Foo { enum Bar { Baz = 1; } }' > "$pbdir/test.proto" + echo 'syntax = "proto2"; message Foo { enum Bar { Baz = 1; } }' > "$pbdir/test.proto" echo 'int main(){ return 0; }' > "$pbdir/main.cc" local out if ! out=$( "$PROTOC" "$pbdir/test.proto" --cpp_out=. 2>&1 && - $CXX "$pbdir/test.pb.cc" "$pbdir/main.cc" -I "$root" $PROTOBUF_LIBS $PTHREAD_LIBS $M_LIBS ${CXXFLAGS:-} ${LDFLAGS:-} ${LIB_SEARCH_PATHS:-} -o "$pbdir/a.out" 2>&1) + $CXX -std=c++11 "$pbdir/test.pb.cc" "$pbdir/main.cc" -I "$root" $PROTOBUF_LIBS $PTHREAD_LIBS $M_LIBS ${CXXFLAGS:-} ${LDFLAGS:-} ${LIB_SEARCH_PATHS:-} -o "$pbdir/a.out" 2>&1) then error_details="$out" error "Unable to compile sample protobuf file. Try running ./configure with the --fetch protoc option" @@ -1340,18 +1331,6 @@ check_windows_platform () { fi } -check_precompiled_web () { - optional "Precompiled web assets" - if [[ -z "$enable_precompiled_web" ]]; then - if test -d precompiled/bundle_assets; then - enable_precompiled_web=true - else - enable_precompiled_web=false - fi - fi - boolvar USE_PRECOMPILED_WEB_ASSETS $enable_precompiled_web -} - # The root of the source tree root=$(dirname $0) diff --git a/drivers/COPYRIGHT b/drivers/COPYRIGHT deleted file mode 100644 index c25145d5af6..00000000000 --- a/drivers/COPYRIGHT +++ /dev/null @@ -1,16 +0,0 @@ -RethinkDB Language Drivers - -Copyright 2010-2012 RethinkDB - - Licensed under the Apache License, Version 2.0 (the "License"); - you may not use this product except in compliance with the License. - You may obtain a copy of the License at - - http://www.apache.org/licenses/LICENSE-2.0 - - Unless required by applicable law or agreed to in writing, software - distributed under the License is distributed on an "AS IS" BASIS, - WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - See the License for the specific language governing permissions and - limitations under the License. - diff --git a/drivers/Makefile b/drivers/Makefile deleted file mode 100644 index 6c1db17c194..00000000000 --- a/drivers/Makefile +++ /dev/null @@ -1,2 +0,0 @@ -TOP := .. -include $(TOP)/Makefile diff --git a/drivers/build.mk b/drivers/build.mk deleted file mode 100644 index 1c1ffa27fe4..00000000000 --- a/drivers/build.mk +++ /dev/null @@ -1,18 +0,0 @@ -# Copyright 2010-2015 RethinkDB, all rights reserved. - -DRIVERS_DIR := $(TOP)/drivers - -include $(DRIVERS_DIR)/javascript/build.mk -include $(DRIVERS_DIR)/python/build.mk -include $(DRIVERS_DIR)/ruby/build.mk -include $(DRIVERS_DIR)/java/build.mk - -.PHONY: drivers -drivers: js-driver rb-driver py-driver - -.PHONY: $(DRIVERS_DIR)/all -ifeq (1,$(USE_PRECOMPILED_WEB_ASSETS)) - $(DRIVERS_DIR)/all: rb-driver py-driver -else - $(DRIVERS_DIR)/all: drivers -endif diff --git a/drivers/convert_protofile b/drivers/convert_protofile deleted file mode 100755 index 213dd0a1618..00000000000 --- a/drivers/convert_protofile +++ /dev/null @@ -1,182 +0,0 @@ -#!/usr/bin/env python - -''' -Take a .proto file as input and output the a definitions file for a -supported language: javascript, python, ruby - -Usually the input file should be ../src/rdb_protocol/ql2.proto -''' - -import os -import re -import sys - -languageDefs = { - "python": { - "initialIndentLevel": 0, - "header": "# DO NOT EDIT\n# Autogenerated by %s\n" % - os.path.basename(__file__), - "separator": "", - "open": "\n%(tabs)sclass %(name)s:", - "value": "\n%(tabs)s%(name)s = %(value)s", - "empty": "pass", - "close": None, - "closeAlwaysNewLine": False, - "footer": "\n" - }, - "ruby": { - "initialIndentLevel": 1, - "header": "# DO NOT EDIT\n# Autogenerated by %s\n\nmodule RethinkDB" - % os.path.basename(__file__), - "separator": "", - "open": "\n%(tabs)smodule %(name)s", - "value": "\n%(tabs)s%(name)s = %(value)s", - "empty": None, - "close": "end", - "closeAlwaysNewLine": True, - "footer": "\nend\n" - }, - "javascript": { - "initialIndentLevel": 1, - "header": - "// DO NOT EDIT\n// Autogenerated by %s\n\nmodule.exports = {" - % os.path.basename(__file__), - "separator": ",", - "open": "\n%(tabs)s%(name)s: {", - "value": "\n%(tabs)s%(name)s: %(value)s", - "empty": None, - "close": "}", - "closeAlwaysNewLine": False, - "footer": "\n}\n" - } -} - - -def convertFile(inputFile, outputFile, language): - assert(inputFile is not None and hasattr(inputFile, 'read')) - assert(outputFile is not None and hasattr(outputFile, 'write')) - assert(language in languageDefs) - - messageRegex = re.compile('\s*(message|enum) (?P\w+) \{') - valueRegex = re.compile('\s*(?P\w+)\s*=\s*(?P\w+)') - endRegex = re.compile('\s*\}') - - indentLevel = languageDefs[language]["initialIndentLevel"] - lastIndentLevel = languageDefs[language]["initialIndentLevel"] - 1 - - # -- write headers - - outputFile.write(languageDefs[language]["header"]) - - # -- convert the body - - levelHasContent = False - - for line in inputFile: - # - open - match = messageRegex.match(line) - if match is not None: - if indentLevel == lastIndentLevel: - outputFile.write(languageDefs[language]["separator"]) - if levelHasContent: - outputFile.write("\n" + "\t" * indentLevel) - outputFile.write(languageDefs[language]["open"] % { - 'tabs': "\t" * indentLevel, - 'name': match.group('name') - }) - lastIndentLevel = indentLevel - indentLevel += 1 - levelHasContent = False - continue - - # - value - match = valueRegex.match(line) - if match is not None: - if indentLevel == lastIndentLevel: - outputFile.write(languageDefs[language]["separator"]) - value = match.group('value') - if value.startswith('0x'): - value = int(value, 0) - outputFile.write(languageDefs[language]["value"] % { - 'tabs': "\t" * indentLevel, - 'name': match.group('name'), - 'value': value, - }) - lastIndentLevel = indentLevel - levelHasContent = True - continue - - # - close - match = endRegex.match(line) - if match is not None: - if not levelHasContent and \ - languageDefs[language]["empty"] is not None: - outputFile.write( - "\n" + "\t" * indentLevel + - languageDefs[language]["empty"] - ) - lastIndentLevel = indentLevel - if languageDefs[language]["close"] is not None: - if indentLevel == lastIndentLevel or \ - languageDefs[language]["closeAlwaysNewLine"] is True: - outputFile.write("\n" + "\t" * (indentLevel - 1)) - outputFile.write(languageDefs[language]["close"]) - indentLevel -= 1 - lastIndentLevel = indentLevel - levelHasContent = True - - # -- write footer - outputFile.write(languageDefs[language]["footer"]) - -if __name__ == '__main__': - import optparse - - inputFile = sys.stdin - outputFile = sys.stdout - - # -- parse input - - parser = optparse.OptionParser() - parser.add_option( - "-l", "--language", - dest="language", - help="write output for language", - metavar="LANG", - choices=list(languageDefs.keys()), - default=None, - ) - parser.add_option( - "-i", "--input-file", - dest="inputFile", - help="read from FILE (default STDIN)", - metavar="FILE", - default=None, - ) - parser.add_option( - "-o", "--output-file", - dest="outputFile", - help="write to FILE (default STDOUT)", - metavar="FILE", - default=None, - ) - - (options, args) = parser.parse_args() - - if options.language is None: - parser.error("A language option is required") - - if options.inputFile is not None: - try: - inputFile = open(options.inputFile, 'r') - except Exception as e: - parser.error("Unable to open the given input file <<%s>>" - ", got error: %s" % (inputFile, str(e))) - - if options.outputFile is not None: - try: - outputFile = open(options.outputFile, 'w') - except Exception as e: - parser.error("Unable to open the given output file <<%s>>," - " got error: %s" % (outputFile, str(e))) - - convertFile(inputFile, outputFile, options.language) diff --git a/drivers/java/.gitignore b/drivers/java/.gitignore deleted file mode 100644 index a0b82bb0a7b..00000000000 --- a/drivers/java/.gitignore +++ /dev/null @@ -1,7 +0,0 @@ -build/ -.gradle/ -.#* -*.iml -.idea/ -test-config-override.properties -gradle.properties diff --git a/drivers/java/Makefile b/drivers/java/Makefile deleted file mode 100644 index 80065867b07..00000000000 --- a/drivers/java/Makefile +++ /dev/null @@ -1,4 +0,0 @@ -OVERRIDE_GOALS := clean=java-clean default-goal=java-driver super-clean=java-super-clean test=java-test - -TOP := ../.. -include $(TOP)/Makefile diff --git a/drivers/java/README.md b/drivers/java/README.md deleted file mode 100644 index 45416037db9..00000000000 --- a/drivers/java/README.md +++ /dev/null @@ -1,138 +0,0 @@ -# RethinkDB Java driver hacking guide - -This readme is for anyone who wants to dive in and hack on the Java -driver. If you want to learn to use the Java driver, checkout out the -documentation at [java-api-docs][] - -[java-api-docs]: http://rethinkdb.com/api/java/ - -## Basics - -The Java driver is built using gradle (2.7+). To build the driver from -source, you need gradle, Java, and python3.4 installed: - -```bash -$ make -``` - -The build process runs a python script (`metajava.py`) that -automatically generates the required Java classes for reql terms. The -process looks like this: - -``` -metajava.py creates: - -ql2.proto -> proto_basic.json ---+ - | | - | v - +--> term_info.json -> $BUILD_DIR/java_term_info.json - | - v -global_info.json ------------> templates/ -> $PACKAGE_DIR/gen/ast/{Term}.java - | - +---> $PACKAGE_DIR/gen/proto/{ProtocolType}.java - +---> $PACKAGE_DIR/gen/model/TopLevel.java - +---> $PACKAGE_DIR/gen/exc/Reql{Exception}Error.java -``` - -Generally, you won't need to use metajava.py if you only want to build -the current driver, since all generated files are checked into -git. Only if you want to modify the templates in `templates/` will you -need python3 and mako installed. - -If you're building the java driver without changing the template -files, you can simply do: - -```bash -$ gradle assemble -# or if you want to run tests as well -$ gradle build -``` - -This will create the .jar files in -`$BUILD_DIR/drivers/java/gradle/libs` where `$BUILD_DIR` is usually -`../../build` from the directory where this README is located. - -## Testing - -Tests are created from the polyglot yaml tests located in -`../../test/rql_test/src/`. The script `convert_tests.py` is used to -run it, which requires python3 to be installed, but otherwise has no -external dependencies. - -`convert_tests.py` will output junit test files into -`src/test/java/gen`. These are also checked into git, so you don't -need to run the conversion script if you just want to verify that the -existing tests pass. - -`convert_tests.py` makes use of -`process_polyglot.py`. `process_polyglot.py` is intended to be -independent of the java driver, and only handles reading in the -polyglot tests and normalizing them into a format that's easier to use -to generate new tests from. Short version: `process_polyglot.py` -doesn't have the word "java" anywhere in it, while `convert_tests.py` -has all of the java specific behavior in it and builds on top of the -stream of test definitions that `process_polyglot.py` emits. - -## Deploying a release or snapshot - -To deploy you'll need to create a file called `gradle.properties` with -the following format: - -``` -signing.keyId= -signing.password= -signing.secretKeyRingFile= - -ossrhUsername= -ossrhPassword= -``` - -It goes without saying that this file should not be checked back into -git, it's in the `.gitignore` file to prevent accidents. You'll need -to add your gpg signing key id and keyring file. Usually the keyring -file is located at `~/.gnupg/secring.gpg` but it won't expand -home-dirs in the config file so you have to put the absolute path -in. If you don't have a password on your private key for package -signing, you must leave the `signing.password=` line in the properties -file, just empty. - -If you have a gpg version >= 2.1 there is no `secring.gpg` file. If -that's the case, either use a gpg 2.0 or below, or maybe newer -versions of the `signing` plugin for gradle have been released and you -can fix this for gpg 2.1. (PRs welcome) - -For the sonatype username and password, you'll have to sign up on the -sonatype jira website -(https://issues.sonatype.org/secure/Signup!default.jspa), and you'll -need to be added to the `com.rethinkdb` group (someone internal will -have to do that for you). - -Next, you'll need to run - -```bash -$ gradle uploadArchives -``` - -This should sign and upload the package to the release -repository. This is for official releases/betas etc. If you just want -to upload a snapshot, add the suffix `-SNAPSHOT` to the `version` -value in `build.gradle`. The gradle maven plugin decides which repo to -upload to depending on whether the version looks like `2.2` or -`2.2-SNAPSHOT`, so this is important to get right or it won't go to -the right place. - -If you just want to do a snapshot: if `gradle uploadArchives` -succeeds, you're done. The snapshot will be located at -https://oss.sonatype.org/content/repositories/snapshots/com/rethinkdb/rethinkdb-driver/ -with the version you gave it. - -If you are doing a full release, you need to go to -https://oss.sonatype.org/#stagingRepositories and search for -"rethinkdb" in the search box, find the release that is in status -`open`. Select it and then click the `Close` button. This will check -it and make it ready for release. If that stage passes you can click -the `Release` button. - -For full instructions see: -http://central.sonatype.org/pages/releasing-the-deployment.html diff --git a/drivers/java/astdump.py b/drivers/java/astdump.py deleted file mode 100755 index b0e2eb43e3b..00000000000 --- a/drivers/java/astdump.py +++ /dev/null @@ -1,43 +0,0 @@ -#!/usr/bin/env python3 -'''This is a helper script. It takes in python statements on the -command line and dumps out a json-like representation of the AST -returned by ast.parse(expression, mode='eval').body - -It is useful if you're making changes to the convert_java.py script -and want to know what the ast of some python expression looks like. -''' - -import ast -import json - - -def convert_to_dict(node): - if isinstance(node, list): - return [convert_to_dict(n) for n in node] - elif isinstance(node, dict): - return {k: convert_to_dict(v) for k, v in node.items()} - elif isinstance(node, ast.AST): - nodedict = node.__dict__.copy() - nodedict[''] = node.__class__.__name__ - return convert_to_dict(nodedict) - elif isinstance(node, (int, float, str, bool)): - return node - else: - return repr(node) - - -def get_astjson(expr, mode='eval'): - asta = ast.parse(expr, mode=mode).body - if isinstance(asta, list): - asta = asta[0] - converted = convert_to_dict(asta) - return json.dumps(converted, indent=4, sort_keys=True) - - -def ppast(expr, mode='eval'): - astjson = get_astjson(expr, mode=mode) - print(astjson) - -if __name__ == "__main__": - import sys - ppast(sys.argv[1]) diff --git a/drivers/java/build.gradle b/drivers/java/build.gradle deleted file mode 100644 index 59404bdf020..00000000000 --- a/drivers/java/build.gradle +++ /dev/null @@ -1,136 +0,0 @@ -apply plugin: 'java' -apply plugin: 'maven' -apply plugin: 'maven-publish' -apply plugin: 'ivy-publish' -apply plugin: 'signing' - -tasks.withType(JavaCompile) { - options.compilerArgs << "-parameters" - options.encoding = 'UTF-8' -} - -version = '2.3.0' -ext.isReleaseVersion = !version.endsWith("-SNAPSHOT") -group = "com.rethinkdb" -archivesBaseName = "rethinkdb-driver" - -sourceCompatibility = 1.8 -targetCompatibility = 1.8 - -//create a single Jar with all dependencies baked in -task fatJar(type: Jar) { - archiveName = "rethinkdb-driver-"+version+".jar" - from { configurations.compile.collect { it.isDirectory() ? it : zipTree(it) } } - with jar -} - -task sourcesJar(type: Jar) { - classifier = 'sources' - from sourceSets.main.allSource -} - -task javadocJar(type: Jar) { - classifier = 'javadoc' - from javadoc -} - -repositories { - mavenCentral() -} - -artifacts { - archives sourcesJar, fatJar, javadocJar -} - -signing { - // Don't sign unless this is a release version - required { isReleaseVersion && gradle.taskGraph.hasTask("uploadArchives") } - sign configurations.archives -} - -dependencies { - testCompile 'junit:junit:4.12' - testCompile 'net.jodah:concurrentunit:0.4.2' - testRuntime 'ch.qos.logback:logback-classic:1.1.3' - compile 'org.slf4j:slf4j-api:1.7.12' - compile 'com.googlecode.json-simple:json-simple:1.1.1' - compile group: 'com.fasterxml.jackson.core', name: 'jackson-databind', version: '2.0.1' - -} - -test { - testLogging { - events 'started', 'passed' - } -} - -buildDir = '../../build/drivers/java/gradle' - - -repositories { - ivy { - url "${System.properties['user.home']}/.ivy2/local" - layout 'pattern', { - artifact "[organisation]/[module]/jars/[artifact](-[classifier])-[revision](.[ext])" - ivy "[organisation]/[module]/[artifact](-[classifier])-[revision](.[ext])" - } - } -} -publishing { - publications { - ivyJava(IvyPublication) { - from components.java - } - } - repositories { - add project.repositories.ivy - } -} -uploadArchives { - repositories { - mavenDeployer { - beforeDeployment { - MavenDeployment deployment -> signing.signPom(deployment) - } - - repository(url: "https://oss.sonatype.org/service/local/staging/deploy/maven2/") { - authentication(userName: project.hasProperty('ossrhUsername') ? ossrhUsername : '', - password: project.hasProperty('ossrhPassword') ? ossrhPassword : '') - } - - snapshotRepository(url: "https://oss.sonatype.org/content/repositories/snapshots/") { - authentication(userName: project.hasProperty('ossrhUsername') ? ossrhUsername : '', - password: project.hasProperty('ossrhPassword') ? ossrhPassword : '') - } - - pom.project { - name 'RethinkDB Java driver' - packaging 'jar' - // optionally artifactId can be defined here - description 'Official java driver for RethinkDB' - url 'http://rethinkdb.com' - - scm { - connection 'scm:git:https://github.com/rethinkdb/rethinkdb' - developerConnection 'scm:git:https://github.com/rethinkdb/rethinkdb' - url 'https://github.com/rethinkdb/rethinkdb' - } - - licenses { - license { - name 'The Apache License, Version 2.0' - url 'http://www.apache.org/licenses/LICENSE-2.0.txt' - } - } - - developers { - developer { - id 'josh-rethinkdb' - name 'Josh Kuhn' - email 'josh@rethinkdb.com' - } - } - } - } - } -} diff --git a/drivers/java/build.mk b/drivers/java/build.mk deleted file mode 100644 index 7910b99d917..00000000000 --- a/drivers/java/build.mk +++ /dev/null @@ -1,91 +0,0 @@ -# Copyright 2010-2015 RethinkDB - -JAVA_SRC_DIR=$(TOP)/drivers/java -JAVA_BUILD_DIR=$(TOP)/build/drivers/java -JAVA_PKG_DIR=$(TOP)/build/package/java - -JAVA_PACKAGE_DIR=$(JAVA_SRC_DIR)/src/main/java/com/rethinkdb - -JAVA_GEN_DIR=$(JAVA_PACKAGE_DIR)/gen -JAVA_PROTO_DIR=$(JAVA_GEN_DIR)/proto -JAVA_AST_DIR=$(JAVA_GEN_DIR)/ast -JAVA_MODEL_DIR=$(JAVA_GEN_DIR)/model -JAVA_EXC_DIR=$(JAVA_GEN_DIR)/exc -JAVA_TEST_DIR=$(JAVA_SRC_DIR)/src/test/java/com/rethinkdb -JAVA_TEST_GEN_DIR=$(JAVA_TEST_DIR)/gen - -METAJAVA=$(JAVA_SRC_DIR)/metajava.py -JAVA_CONVERT_PROTO=$(JAVA_SRC_DIR)/convert_protofile.py -JAVA_CONVERT_TESTS=$(JAVA_SRC_DIR)/convert_tests.py - -JAVA_TEMPLATE_DIR=$(JAVA_SRC_DIR)/templates -JAVA_PROTO_FILE=$(TOP)/src/rdb_protocol/ql2.proto -JAVA_PROTO_JSON=$(JAVA_BUILD_DIR)/proto_basic.json -JAVA_TERM_INFO=$(JAVA_SRC_DIR)/term_info.json -JAVA_JAVA_TERM_INFO=$(JAVA_BUILD_DIR)/java_term_info.json -JAVA_GLOBAL_INFO=$(JAVA_SRC_DIR)/global_info.json - -GRADLE=gradle --build-file=$(JAVA_SRC_DIR)/build.gradle \ - --settings-file=$(JAVA_SRC_DIR)/settings.gradle \ - --quiet - -.PHONY: java-driver -java-driver: | $(JAVA_BUILD_DIR)/. - $P GRADLE ASSEMBLING JAVA DRIVER - $(GRADLE) assemble - -.PHONY: java-clean -java-clean: - $P CLEAN - $(GRADLE) clean - rm -rf $(JAVA_BUILD_DIR) - -.PHONY: clean-autogenerated -# this deletes all generated files, even ones checked into git -clean-autogenerated: | java-clean - $P SUPER-CLEAN - rm -rf $(JAVA_GEN_DIR)/* - rm -rf $(JAVA_TEST_GEN_DIR)/* - -.PHONY: java-convert-tests -java-convert-tests: | py-driver java-driver - $P CONVERT JAVA TESTS - $(JAVA_CONVERT_TESTS) \ - --test-dir=$(TOP)/test/rql_test/src \ - --python-driver-dir=$(TOP)/build/drivers/python \ - --test-output-dir=$(JAVA_TEST_GEN_DIR) \ - --template-dir=$(JAVA_TEMPLATE_DIR) - -.PHONY: java-test -java-test: | java-convert-tests - $P JAVA DRIVER TESTS - $(GRADLE) test - -$(JAVA_PROTO_JSON): $(JAVA_PROTO_FILE) $(JAVA_CONVERT_PROTO) - $P CONVERT - $(PYTHON) $(JAVA_CONVERT_PROTO) $(JAVA_PROTO_FILE) $(JAVA_PROTO_JSON) - -$(JAVA_TERM_INFO): $(JAVA_PROTO_JSON) $(METAJAVA) - $P UPDATING $(notdir $@) - $(PYTHON) $(METAJAVA) update-terminfo \ - --term-info=$(JAVA_TERM_INFO) \ - --proto-json=$(JAVA_PROTO_JSON) - -$(JAVA_JAVA_TERM_INFO): $(JAVA_TERM_INFO) $(METAJAVA) | $(JAVA_BUILD_DIR)/. - $P GENERATING - $(PYTHON) $(METAJAVA) generate-java-terminfo \ - --term-info=$(JAVA_TERM_INFO) \ - --output-file=$@ - -.PHONY: update-driver -# This generates source files needed for the driver. Should be fairly -# autonomous, but may need some manual intervention in some cases. -update-driver: $(JAVA_JAVA_TERM_INFO) $(JAVA_GLOBAL_INFO) $(METAJAVA) \ - | $(JAVA_MODEL_DIR) $(JAVA_AST_DIR) $(JAVA_PROTO_DIR) $(JAVA_EXC_DIR) - $P GENERATING JAVA CLASSES - $(PYTHON) $(METAJAVA) generate-java-classes \ - --global-info=$(JAVA_GLOBAL_INFO) \ - --proto-json=$(JAVA_PROTO_JSON) \ - --java-term-info=$(JAVA_JAVA_TERM_INFO) \ - --template-dir=$(JAVA_TEMPLATE_DIR) \ - --package-dir=$(JAVA_PACKAGE_DIR) diff --git a/drivers/java/convert_protofile.py b/drivers/java/convert_protofile.py deleted file mode 100644 index 66ac038a429..00000000000 --- a/drivers/java/convert_protofile.py +++ /dev/null @@ -1,70 +0,0 @@ -'''Converts the protobuf file into proto_basic.json''' - -import codecs -import json -import re -from collections import OrderedDict - - -def convert_protofile(proto_filename, proto_json_filename): - with open(proto_filename) as ql2: - proto = Proto2Dict(ql2)() - with codecs.open(proto_json_filename, "w") as pb: - json.dump(proto, pb, separators=(",", ": "), indent=2) - - -# Used in parsing protofile -MESSAGE_REGEX = re.compile('\s*(message|enum) (?P\w+) \{') -VALUE_REGEX = re.compile('\s*(?P\w+)\s*=\s*(?P\w+)') -END_REGEX = re.compile('\s*\}') - - -class Proto2Dict(object): - def __init__(self, input_file): - self._in = input_file - self.d = OrderedDict() - self.parents = [] - - def __call__(self): - for line in self._in: - (self.match_message(line) or - self.match_value(line) or - self.match_end(line)) - while self.parents: - self.pop_stack() - return self.d - - def push_message(self, name): - new_level = OrderedDict() - self.d[name] = new_level - self.parents.append(self.d) - self.d = new_level - - def pop_stack(self): - self.d = self.parents.pop() - - def match_message(self, line): - match = MESSAGE_REGEX.match(line) - if match is None: - return False - self.push_message(match.group('name')) - return True - - def match_value(self, line): - match = VALUE_REGEX.match(line) - if match is None: - return False - self.d[match.group('name')] = int(match.group('value'), 0) - return True - - def match_end(self, line): - if END_REGEX.match(line): - self.pop_stack() - return True - else: - return False - - -if __name__ == '__main__': - import sys - convert_protofile(sys.argv[1], sys.argv[2]) diff --git a/drivers/java/convert_tests.py b/drivers/java/convert_tests.py deleted file mode 100755 index a1cd5785a48..00000000000 --- a/drivers/java/convert_tests.py +++ /dev/null @@ -1,952 +0,0 @@ -#!/usr/bin/env python3.4 -# -*- coding: utf-8 -*- -'''Finds yaml tests, converts them to Java tests.''' -from __future__ import print_function - -import sys -import os -import os.path -import re -import time -import ast -import argparse -import metajava -import process_polyglot -import logging -from process_polyglot import Unhandled, Skip, FatalSkip, SkippedTest -try: - from cStringIO import StringIO -except ImportError: - from io import StringIO -from collections import namedtuple - -sys.path.append( - os.path.abspath(os.path.join(__file__, "../../../test/common"))) - -import parsePolyglot -parsePolyglot.printDebug = False - -logger = logging.getLogger("convert_tests") - -# Supplied by import_python_driver -r = None - - -TEST_EXCLUSIONS = [ - # python only tests - # 'regression/1133', - # 'regression/767', - # 'regression/1005', - 'regression/', - 'limits', # pending fix in issue #4965 - # double run - 'changefeeds/squash', - # arity checked at compile time - 'arity', - '.rb.yaml', -] - - -def main(): - logging.basicConfig(format="[%(name)s] %(message)s", level=logging.INFO) - start = time.clock() - args = parse_args() - if args.debug: - logger.setLevel(logging.DEBUG) - logging.getLogger('process_polyglot').setLevel(logging.DEBUG) - elif args.info: - logger.setLevel(logging.INFO) - logging.getLogger('process_polyglot').setLevel(logging.INFO) - else: - logger.root.setLevel(logging.WARNING) - if args.e: - evaluate_snippet(args.e) - exit(0) - global r - r = import_python_driver(args.python_driver_dir) - renderer = metajava.Renderer( - args.template_dir, - invoking_filenames=[ - __file__, - process_polyglot.__file__, - ]) - for testfile in process_polyglot.all_yaml_tests( - args.test_dir, - TEST_EXCLUSIONS): - logger.info("Working on %s", testfile) - TestFile( - test_dir=args.test_dir, - filename=testfile, - test_output_dir=args.test_output_dir, - renderer=renderer, - ).load().render() - logger.info("Finished in %s seconds", time.clock() - start) - - -def parse_args(): - '''Parse command line arguments''' - parser = argparse.ArgumentParser(description=__doc__) - parser.add_argument( - "--test-dir", - help="Directory where yaml tests are", - default="../../test/rql_test/src" - ) - parser.add_argument( - "--test-output-dir", - help="Directory to render tests to", - default="./src/test/java/com/rethinkdb/gen", - ) - parser.add_argument( - "--template-dir", - help="Where to find test generation templates", - default="./templates", - ) - parser.add_argument( - "--python-driver-dir", - help="Where the built python driver is located", - default="../../build/drivers/python" - ) - parser.add_argument( - "--test-file", - help="Only convert the specified yaml file", - ) - parser.add_argument( - '--debug', - help="Print debug output", - dest='debug', - action='store_true') - parser.set_defaults(debug=False) - parser.add_argument( - '--info', - help="Print info level output", - dest='info', - action='store_true') - parser.set_defaults(info=False) - parser.add_argument( - '-e', - help="Convert an inline python reql to java reql snippet", - ) - return parser.parse_args() - - -def import_python_driver(py_driver_dir): - '''Imports the test driver header''' - stashed_path = sys.path - sys.path.insert(0, os.path.realpath(py_driver_dir)) - import rethinkdb as r - sys.path = stashed_path - return r - -JavaQuery = namedtuple( - 'JavaQuery', - ('line', - 'expected_type', - 'expected_line', - 'testfile', - 'line_num', - 'runopts') -) -JavaDef = namedtuple( - 'JavaDef', - ('line', - 'varname', - 'vartype', - 'value', - 'run_if_query', - 'testfile', - 'line_num', - 'runopts') -) -Version = namedtuple("Version", "original java") - -JAVA_DECL = re.compile(r'(?P.+) (?P\w+) = (?P.*);') - - -def evaluate_snippet(snippet): - '''Just converts a single expression snippet into java''' - try: - parsed = ast.parse(snippet, mode='eval').body - except Exception as e: - return print("Error:", e) - try: - print(ReQLVisitor(smart_bracket=True).convert(parsed)) - except Exception as e: - return print("Error:", e) - - -class TestFile(object): - '''Represents a single test file''' - - def __init__(self, test_dir, filename, test_output_dir, renderer): - self.filename = filename - self.full_path = os.path.join(test_dir, filename) - self.module_name = metajava.camel( - filename.split('.')[0].replace('/', '_')) - self.test_output_dir = test_output_dir - self.reql_vars = {'r'} - self.renderer = renderer - - def load(self): - '''Load the test file, yaml parse it, extract file-level metadata''' - with open(self.full_path, encoding='utf-8') as f: - parsed_yaml = parsePolyglot.parseYAML(f) - self.description = parsed_yaml.get('desc', 'No description') - self.table_var_names = self.get_varnames(parsed_yaml) - self.reql_vars.update(self.table_var_names) - self.raw_test_data = parsed_yaml['tests'] - self.test_generator = process_polyglot.tests_and_defs( - self.filename, - self.raw_test_data, - context=process_polyglot.create_context(r, self.table_var_names), - custom_field='java', - ) - return self - - def get_varnames(self, yaml_file): - '''Extract table variable names from yaml variable - They can be specified just space separated, or comma separated''' - raw_var_names = yaml_file.get('table_variable_name', '') - if not raw_var_names: - return set() - return set(re.split(r'[, ]+', raw_var_names)) - - def render(self): - '''Renders the converted tests to a runnable test file''' - defs_and_test = ast_to_java(self.test_generator, self.reql_vars) - self.renderer.source_files = [self.full_path] - self.renderer.render( - 'Test.java', - output_dir=self.test_output_dir, - output_name=self.module_name + '.java', - dependencies=[self.full_path], - defs_and_test=defs_and_test, - table_var_names=list(sorted(self.table_var_names)), - module_name=self.module_name, - JavaQuery=JavaQuery, - JavaDef=JavaDef, - description=self.description, - ) - - -def py_to_java_type(py_type): - '''Converts python types to their Java equivalents''' - if py_type is None: - return None - elif isinstance(py_type, str): - # This can be called on something already converted - return py_type - elif py_type.__name__ == 'function': - return 'ReqlFunction1' - elif (py_type.__module__ == 'datetime' and - py_type.__name__ == 'datetime'): - return 'OffsetDateTime' - elif py_type.__module__ == 'builtins': - return { - bool: 'Boolean', - bytes: 'byte[]', - int: 'Long', - float: 'Double', - str: 'String', - dict: 'Map', - list: 'List', - object: 'Object', - type(None): 'Object', - }[py_type] - elif py_type.__module__ == 'rethinkdb.ast': - # Anomalous non-rule based capitalization in the python driver - return { - 'DB': 'Db' - }.get(py_type.__name__, py_type.__name__) - elif py_type.__module__ == 'rethinkdb.errors': - return py_type.__name__ - elif py_type.__module__ == '?test?': - return { - 'uuid': 'UUIDMatch', # clashes with ast.Uuid - }.get(py_type.__name__, metajava.camel(py_type.__name__)) - elif py_type.__module__ == 'rethinkdb.query': - # All of the constants like minval maxval etc are defined in - # query.py, but no type name is provided to `type`, so we have - # to pull it out of a class variable - return metajava.camel(py_type.st) - else: - raise Unhandled( - "Don't know how to convert python type {}.{} to java" - .format(py_type.__module__, py_type.__name__)) - - -def is_reql(t): - '''Determines if a type is a reql term''' - # Other options for module: builtins, ?test?, datetime - return t.__module__ == 'rethinkdb.ast' - - -def escape_string(s, out): - out.write('"') - for codepoint in s: - rpr = repr(codepoint)[1:-1] - if rpr.startswith('\\x'): - # Python will shorten unicode escapes that are less than a - # byte to use \x instead of \u . Java doesn't accept \x so - # we have to expand it back out. - rpr = '\\u00' + rpr[2:] - elif rpr == '"': - rpr = r'\"' - out.write(rpr) - out.write('"') - - -def attr_matches(path, node): - '''Helper function. Several places need to know if they are an - attribute of some root object''' - root, name = path.split('.') - ret = is_name(root, node.value) and node.attr == name - return ret - - -def is_name(name, node): - '''Determine if the current attribute node is a Name with the - given name''' - return type(node) == ast.Name and node.id == name - - -def def_to_java(item, reql_vars): - if is_reql(item.term.type): - reql_vars.add(item.varname) - try: - if is_reql(item.term.type): - visitor = ReQLVisitor - else: - visitor = JavaVisitor - java_line = visitor(reql_vars, - type_=item.term.type, - is_def=True, - ).convert(item.term.ast) - except Skip as skip: - return SkippedTest(line=item.term.line, reason=str(skip)) - java_decl = JAVA_DECL.match(java_line).groupdict() - return JavaDef( - line=Version( - original=item.term.line, - java=java_line, - ), - varname=java_decl['var'], - vartype=java_decl['type'], - value=java_decl['value'], - run_if_query=item.run_if_query, - testfile=item.testfile, - line_num=item.line_num, - runopts=convert_runopts(reql_vars, java_decl['type'], item.runopts) - ) - - -def convert_runopts(reql_vars, type_, runopts): - if runopts is None: - return None - return { - key: JavaVisitor( - reql_vars, type_=type_).convert(val) - for key, val in runopts.items() - } - - -def query_to_java(item, reql_vars): - if item.runopts is not None: - converted_runopts = convert_runopts( - reql_vars, item.query.type, item.runopts) - else: - converted_runopts = item.runopts - try: - java_line = ReQLVisitor( - reql_vars, type_=item.query.type).convert(item.query.ast) - if is_reql(item.expected.type): - visitor = ReQLVisitor - else: - visitor = JavaVisitor - java_expected_line = visitor( - reql_vars, type_=item.expected.type)\ - .convert(item.expected.ast) - except Skip as skip: - return SkippedTest(line=item.query.line, reason=str(skip)) - return JavaQuery( - line=Version( - original=item.query.line, - java=java_line, - ), - expected_type=py_to_java_type(item.expected.type), - expected_line=Version( - original=item.expected.line, - java=java_expected_line, - ), - testfile=item.testfile, - line_num=item.line_num, - runopts=converted_runopts, - ) - - -def ast_to_java(sequence, reql_vars): - '''Converts the the parsed test data to java source lines using the - visitor classes''' - reql_vars = set(reql_vars) - for item in sequence: - if type(item) == process_polyglot.Def: - yield def_to_java(item, reql_vars) - elif type(item) == process_polyglot.CustomDef: - yield JavaDef(line=Version(item.line, item.line), - testfile=item.testfile, - line_num=item.line_num) - elif type(item) == process_polyglot.Query: - yield query_to_java(item, reql_vars) - elif type(item) == SkippedTest: - yield item - else: - assert False, "shouldn't happen, item was {}".format(item) - - -class JavaVisitor(ast.NodeVisitor): - '''Converts python ast nodes into a java string''' - - def __init__(self, - reql_vars=frozenset("r"), - out=None, - type_=None, - is_def=False, - smart_bracket=False, - ): - self.out = StringIO() if out is None else out - self.reql_vars = reql_vars - self.type = py_to_java_type(type_) - self._type = type_ - self.is_def = is_def - self.smart_bracket = smart_bracket - super(JavaVisitor, self).__init__() - self.write = self.out.write - - def skip(self, message, *args, **kwargs): - cls = Skip - is_fatal = kwargs.pop('fatal', False) - if self.is_def or is_fatal: - cls = FatalSkip - raise cls(message, *args, **kwargs) - - def convert(self, node): - '''Convert a text line to another text line''' - self.visit(node) - return self.out.getvalue() - - def join(self, sep, items): - first = True - for item in items: - if first: - first = False - else: - self.write(sep) - self.visit(item) - - def to_str(self, s): - escape_string(s, self.out) - - def cast_null(self, arg, cast='ReqlExpr'): - '''Emits a cast to (ReqlExpr) if the node represents null''' - if (type(arg) == ast.Name and arg.id == 'null') or \ - (type(arg) == ast.NameConstant and arg.value == None): - self.write("(") - self.write(cast) - self.write(") ") - self.visit(arg) - - def to_args(self, args, optargs=[]): - self.write("(") - if args: - self.cast_null(args[0]) - for arg in args[1:]: - self.write(', ') - self.cast_null(arg) - self.write(")") - for optarg in optargs: - self.write(".optArg(") - self.to_str(optarg.arg) - self.write(", ") - self.cast_null(optarg.value) - self.write(")") - - def generic_visit(self, node): - logger.error("While translating: %s", ast.dump(node)) - logger.error("Got as far as: %s", ''.join(self.out)) - raise Unhandled("Don't know what this thing is: " + str(type(node))) - - def visit_Assign(self, node): - if len(node.targets) != 1: - Unhandled("We only support assigning to one variable") - self.write(self.type + " ") - self.write(node.targets[0].id) - self.write(" = (") - self.write(self.type) - self.write(") (") - if is_reql(self._type): - ReQLVisitor(self.reql_vars, - out=self.out, - type_=self.type, - is_def=True, - ).visit(node.value) - else: - self.visit(node.value) - - self.write(");") - - def visit_Str(self, node): - self.to_str(node.s) - - def visit_Bytes(self, node, skip_prefix=False, skip_suffix=False): - if not skip_prefix: - self.write("new byte[]{") - for i, byte in enumerate(node.s): - if i > 0: - self.write(", ") - # Java bytes are signed :( - if byte > 127: - self.write(str(-(256 - byte))) - else: - self.write(str(byte)) - if not skip_suffix: - self.write("}") - else: - self.write(", ") - - def visit_Name(self, node): - name = node.id - if name == 'frozenset': - self.skip("can't convert frozensets to GroupedData yet") - if name in metajava.java_term_info.JAVA_KEYWORDS or \ - name in metajava.java_term_info.OBJECT_METHODS: - name += '_' - self.write({ - 'True': 'true', - 'False': 'false', - 'None': 'null', - 'nil': 'null', - }.get(name, name)) - - def visit_arg(self, node): - self.write(node.arg) - - def visit_NameConstant(self, node): - if node.value is None: - self.write("null") - elif node.value is True: - self.write("true") - elif node.value is False: - self.write("false") - else: - raise Unhandled( - "Don't know NameConstant with value %s" % node.value) - - def visit_Attribute(self, node, emit_parens=True): - skip_parent = False - if attr_matches("r.ast", node): - # The java driver doesn't have that namespace, so we skip - # the `r.` prefix and create an ast class member in the - # test file. So stuff like `r.ast.rqlTzinfo(...)` converts - # to `ast.rqlTzinfo(...)` - skip_parent = True - - if not skip_parent: - self.visit(node.value) - self.write(".") - self.write(metajava.dromedary(node.attr)) - - def visit_Num(self, node): - self.write(repr(node.n)) - if not isinstance(node.n, float): - if node.n > 9223372036854775807 or node.n < -9223372036854775808: - self.write(".0") - else: - self.write("L") - - def visit_Index(self, node): - self.visit(node.value) - - def skip_if_arity_check(self, node): - '''Throws out tests for arity''' - rgx = re.compile('.*([Ee]xpect(ed|s)|Got) .* argument') - try: - if node.func.id == 'err' and rgx.match(node.args[1].s): - self.skip("arity checks done by java type system") - except (AttributeError, TypeError): - pass - - def convert_if_string_encode(self, node): - '''Finds strings like 'foo'.encode("utf-8") and turns them into the - java version: "foo".getBytes(StandardCharsets.UTF_8)''' - try: - assert node.func.attr == 'encode' - node.func.value.s - encoding = node.args[0].s - except Exception: - return False - java_encoding = { - "ascii": "US_ASCII", - "utf-16": "UTF_16", - "utf-8": "UTF_8", - }[encoding] - self.visit(node.func.value) - self.write(".getBytes(StandardCharsets.") - self.write(java_encoding) - self.write(")") - return True - - def bag_data_hack(self, node): - '''This is a very specific hack that isn't a general conversion method - whatsoever. In the tests we have an expected value like - bag(data * 2) where data is a list. This doesn't work in Java - obviously, but the only way to detect it "correctly" requires - type information in the ast, which we don't have. So the hack - here looks for this very specific case and rejiggers it. PRs - welcome for fixing this in a non-nasty way. In the meantime - I've made this extremely specific so it hopefully only gets - triggered by this specific case in the tests and not on - general conversions. - ''' - try: - assert node.func.id == 'bag' - assert node.args[0].left.id == 'data' - assert type(node.args[0].op) == ast.Mult - assert node.args[0].right.n == 2 - self.write("bag((List)") - self.write("Stream.concat(data.stream(), data.stream())") - self.write(".collect(Collectors.toList())") - self.write(")") - except Exception: - return False - else: - return True - - def visit_Call(self, node): - self.skip_if_arity_check(node) - if self.convert_if_string_encode(node): - return - if self.bag_data_hack(node): - return - if type(node.func) == ast.Attribute and node.func.attr == 'error': - # This weird special case is because sometimes the tests - # use r.error and sometimes they use r.error(). The java - # driver only supports r.error(). Since we're coming in - # from a call here, we have to prevent visit_Attribute - # from emitting the parents on an r.error for us. - self.visit_Attribute(node.func, emit_parens=False) - else: - self.visit(node.func) - self.to_args(node.args, node.keywords) - - def visit_Dict(self, node): - self.write("r.hashMap(") - if len(node.keys) > 0: - self.visit(node.keys[0]) - self.write(", ") - self.visit(node.values[0]) - for k, v in zip(node.keys[1:], node.values[1:]): - self.write(").with(") - self.visit(k) - self.write(", ") - self.visit(v) - self.write(")") - - def visit_List(self, node): - self.write("r.array(") - self.join(", ", node.elts) - self.write(")") - - def visit_Tuple(self, node): - self.visit_List(node) - - def visit_Lambda(self, node): - if len(node.args.args) == 1: - self.visit(node.args.args[0]) - else: - self.to_args(node.args.args) - self.write(" -> ") - self.visit(node.body) - - def visit_Subscript(self, node): - if node.slice is None or type(node.slice.value) != ast.Num: - logger.error("While doing: %s", ast.dump(node)) - raise Unhandled("Only integers subscript can be converted." - " Got %s" % node.slice.value.s) - self.visit(node.value) - self.write(".get(") - self.write(str(node.slice.value.n)) - self.write(")") - - def visit_ListComp(self, node): - gen = node.generators[0] - - if type(gen.iter) == ast.Call and gen.iter.func.id.endswith('range'): - # This is really a special-case hacking of [... for i in - # range(i)] comprehensions that are used in the polyglot - # tests sometimes. It won't handle translating arbitrary - # comprehensions to Java streams. - self.write("LongStream.range(") - if len(gen.iter.args) == 1: - self.write("0, ") - self.visit(gen.iter.args[0]) - elif len(gen.iter.args) == 2: - self.visit(gen.iter.args[0]) - self.write(", ") - self.visit(gen.iter.args[1]) - self.write(").boxed()") - else: - # Somebody came up with a creative new use for - # comprehensions in the test suite... - raise Unhandled("ListComp hack couldn't handle: ", ast.dump(node)) - self.write(".map(") - self.visit(gen.target) - self.write(" -> ") - self.visit(node.elt) - self.write(").collect(Collectors.toList())") - - def visit_UnaryOp(self, node): - opMap = { - ast.USub: "-", - ast.Not: "!", - ast.UAdd: "+", - ast.Invert: "~", - } - self.write(opMap[type(node.op)]) - self.visit(node.operand) - - def visit_BinOp(self, node): - opMap = { - ast.Add: " + ", - ast.Sub: " - ", - ast.Mult: " * ", - ast.Div: " / ", - ast.Mod: " % ", - } - t = type(node.op) - if t in opMap.keys(): - self.visit(node.left) - self.write(opMap[t]) - self.visit(node.right) - elif t == ast.Pow: - if type(node.left) == ast.Num and node.left.n == 2: - self.visit(node.left) - self.write(" << ") - self.visit(node.right) - else: - raise Unhandled("Can't do exponent with non 2 base") - - -class ReQLVisitor(JavaVisitor): - '''Mostly the same as the JavaVisitor, but converts some - reql-specific stuff. This should only be invoked on an expression - if it's already known to return true from is_reql''' - - TOPLEVEL_CONSTANTS = { - 'monday', 'tuesday', 'wednesday', 'thursday', 'friday', - 'saturday', 'sunday', 'january', 'february', 'march', 'april', - 'may', 'june', 'july', 'august', 'september', 'october', - 'november', 'december', 'minval', 'maxval', 'error' - } - - def is_byte_array_add(self, node): - '''Some places we do stuff like b'foo' + b'bar' and byte - arrays don't like that much''' - if (type(node.left) == ast.Bytes and - type(node.right) == ast.Bytes and - type(node.op) == ast.Add): - self.visit_Bytes(node.left, skip_suffix=True) - self.visit_Bytes(node.right, skip_prefix=True) - return True - else: - return False - - def visit_BinOp(self, node): - if self.is_byte_array_add(node): - return - opMap = { - ast.Add: "add", - ast.Sub: "sub", - ast.Mult: "mul", - ast.Div: "div", - ast.Mod: "mod", - ast.BitAnd: "and", - ast.BitOr: "or", - } - func = opMap[type(node.op)] - if self.is_not_reql(node.left): - self.prefix(func, node.left, node.right) - else: - self.infix(func, node.left, node.right) - - def visit_Compare(self, node): - opMap = { - ast.Lt: "lt", - ast.Gt: "gt", - ast.GtE: "ge", - ast.LtE: "le", - ast.Eq: "eq", - ast.NotEq: "ne", - } - if len(node.ops) != 1: - # Python syntax allows chained comparisons (a < b < c) but - # we don't deal with that here - raise Unhandled("Compare hack bailed on: ", ast.dump(node)) - left = node.left - right = node.comparators[0] - func_name = opMap[type(node.ops[0])] - if self.is_not_reql(node.left): - self.prefix(func_name, left, right) - else: - self.infix(func_name, left, right) - - def prefix(self, func_name, left, right): - self.write("r.") - self.write(func_name) - self.write("(") - self.visit(left) - self.write(", ") - self.visit(right) - self.write(")") - - def infix(self, func_name, left, right): - self.visit(left) - self.write(".") - self.write(func_name) - self.write("(") - self.visit(right) - self.write(")") - - def is_not_reql(self, node): - if type(node) in (ast.Name, ast.NameConstant, - ast.Num, ast.Str, ast.Dict, ast.List): - return True - else: - return False - - def visit_Subscript(self, node): - self.visit(node.value) - if type(node.slice) == ast.Index: - # Syntax like a[2] or a["b"] - if self.smart_bracket and type(node.slice.value) == ast.Str: - self.write(".g(") - elif self.smart_bracket and type(node.slice.value) == ast.Num: - self.write(".nth(") - else: - self.write(".bracket(") - self.visit(node.slice.value) - self.write(")") - elif type(node.slice) == ast.Slice: - # Syntax like a[1:2] or a[:2] - self.write(".slice(") - lower, upper, rclosed = self.get_slice_bounds(node.slice) - self.write(str(lower)) - self.write(", ") - self.write(str(upper)) - self.write(")") - if rclosed: - self.write('.optArg("right_bound", "closed")') - else: - raise Unhandled("No translation for ExtSlice") - - def get_slice_bounds(self, slc): - '''Used to extract bounds when using bracket slice - syntax. This is more complicated since Python3 parses -1 as - UnaryOp(op=USub, operand=Num(1)) instead of Num(-1) like - Python2 does''' - if not slc: - return 0, -1, True - - def get_bound(bound, default): - if bound is None: - return default - elif type(bound) == ast.UnaryOp and type(bound.op) == ast.USub: - return -bound.operand.n - elif type(bound) == ast.Num: - return bound.n - else: - raise Unhandled( - "Not handling bound: %s" % ast.dump(bound)) - - right_closed = slc.upper is None - - return get_bound(slc.lower, 0), get_bound(slc.upper, -1), right_closed - - def visit_Attribute(self, node, emit_parens=True): - is_toplevel_constant = False - if attr_matches("r.row", node): - self.skip("Java driver doesn't support r.row", fatal=True) - elif is_name("r", node.value) and node.attr in self.TOPLEVEL_CONSTANTS: - # Python has r.minval, r.saturday etc. We need to emit - # r.minval() and r.saturday() - is_toplevel_constant = True - python_clashes = { - # These are underscored in the python driver to avoid - # keywords, but they aren't java keywords so we convert - # them back. - 'or_': 'or', - 'and_': 'and', - 'not_': 'not', - } - method_aliases = {metajava.dromedary(k): v - for k, v in metajava.java_term_info - .METHOD_ALIASES.items()} - self.visit(node.value) - self.write(".") - initial = python_clashes.get( - node.attr, metajava.dromedary(node.attr)) - initial = method_aliases.get(initial, initial) - self.write(initial) - if initial in metajava.java_term_info.JAVA_KEYWORDS or \ - initial in metajava.java_term_info.OBJECT_METHODS: - self.write('_') - if emit_parens and is_toplevel_constant: - self.write('()') - - def visit_UnaryOp(self, node): - if type(node.op) == ast.Invert: - self.visit(node.operand) - self.write(".not()") - else: - super(ReQLVisitor, self).visit_UnaryOp(node) - - def visit_Call(self, node): - # We call the superclass first, so if it's going to fail - # because of r.row or other things it fails first, rather than - # hitting the checks in this method. Since everything is - # written to a stringIO object not directly to a file, if we - # bail out afterwards it's still ok - super_result = super(ReQLVisitor, self).visit_Call(node) - - # r.for_each(1) etc should be skipped - if (attr_equals(node.func, "attr", "for_each") and - type(node.args[0]) != ast.Lambda): - self.skip("the java driver doesn't allow " - "non-function arguments to forEach") - # map(1) should be skipped - elif attr_equals(node.func, "attr", "map"): - def check(node): - if type(node) == ast.Lambda: - return True - elif hasattr(node, "func") and attr_matches("r.js", node.func): - return True - elif type(node) == ast.Dict: - return True - elif type(node) == ast.Name: - # The assumption is that if you're passing a - # variable to map, it's at least potentially a - # function. This may be misguided - return True - else: - return False - if not check(node.args[-1]): - self.skip("the java driver statically checks that " - "map contains a function argument") - else: - return super_result - - -def attr_equals(node, attr, value): - '''Helper for digging into ast nodes''' - return hasattr(node, attr) and getattr(node, attr) == value - -if __name__ == '__main__': - main() diff --git a/drivers/java/global_info.json b/drivers/java/global_info.json deleted file mode 100644 index 158d0fc6cb8..00000000000 --- a/drivers/java/global_info.json +++ /dev/null @@ -1,74 +0,0 @@ -{ - "optarg_enums": { - "E_FORMAT": ["raw", "native"], - "E_DURABILITY": ["hard", "soft"], - "E_CONFLICT": ["error", "replace", "update"], - "E_READ_MODE": ["single", "majority", "outdated"], - "E_IDENTIFIER_FORMAT": ["name", "uuid"], - "E_BOUND": ["open", "closed"], - "E_STATUS": [ - "ready_for_outdated_reads", - "ready_for_reads", - "ready_for_writes", - "all_replicas_ready" - ], - "E_EMERGENCY_REPAIR": [ - "unsafe_rollback", - "unsafe_rollback_or_erase" - ], - "E_RESULT_FORMAT": [ - "text", - "json", - "jsonp", - "binary", - "auto" - ], - "E_HTTP_METHOD": [ - "GET", "POST", "PUT", "PATCH", "DELETE", "HEAD" - ], - "E_AUTH_TYPE": ["basic", "digest"], - "E_GEO_SYSTEM": ["WGS84", "unit_sphere"], - "E_UNIT": ["m", "km", "mi", "nm", "ft"] - }, - "global_optargs": { - "use_outdated": "T_BOOL", - "time_format": "E_FORMAT", - "profile": "T_BOOL", - "durability": "E_DURABILITY", - "group_format": "E_FORMAT", - "noreply": "T_BOOL", - "db": "T_DB", - "array_limit": "T_NUM", - "binary_format": "E_FORMAT", - "min_batch_rows": "T_NUM", - "max_batch_rows": "T_NUM", - "max_batch_bytes": "T_NUM", - "max_batch_seconds": "T_NUM", - "first_batch_scaledown_factor": "T_NUM" - }, - "exception_hierarchy": { - "reql_error": { - "reql_compile_error": { - "reql_driver_compile_error": {}, - "reql_server_compile_error": {} - }, - "reql_client_error": {}, - "reql_runtime_error": { - "reql_query_logic_error": { - "reql_non_existence_error": {} - }, - "reql_resource_limit_error": {}, - "reql_user_error": {}, - "reql_internal_error": {}, - "reql_availability_error": { - "reql_op_failed_error": {}, - "reql_op_indeterminate_error": {} - }, - "reql_permission_error": {} - }, - "reql_driver_error": { - "reql_auth_error": {} - } - } - } -} diff --git a/drivers/java/metajava.py b/drivers/java/metajava.py deleted file mode 100755 index 14ef486f3a9..00000000000 --- a/drivers/java/metajava.py +++ /dev/null @@ -1,778 +0,0 @@ -#!/usr/bin/env python -from __future__ import print_function -''' -Generates AST terms and serialization code for the Java driver -''' - -import re -import os -import os.path -import json -import codecs -import argparse -import copy -import itertools -import string -import logging - -from collections import OrderedDict, namedtuple -from mako.lookup import TemplateLookup - -try: - basestring -except NameError: - basestring = ("".__class__,) - -logger = logging.getLogger("metajava") - - -jsonf = namedtuple("jsonf", "filename json") - -arity_regex = re.compile(r'ReqlFunction(\d+)') - - -def jsonfile(filename): - return jsonf(filename, - json.load(open(filename), object_pairs_hook=OrderedDict)) - - -def parse_args(): - '''Handle command line arguments etc''' - parser = argparse.ArgumentParser(description=__doc__) - parser.add_argument("command", - choices=[ - 'update-terminfo', - 'generate-java-terminfo', - 'generate-java-classes', - ]) - parser.add_argument("--term-info", type=jsonfile) - parser.add_argument("--proto-json", type=jsonfile) - parser.add_argument("--global-info", type=jsonfile) - parser.add_argument("--java-term-info", type=jsonfile) - parser.add_argument("--template-dir") - parser.add_argument("--package-dir") - parser.add_argument("--output-file") - parser.add_argument( - "--debug", - help="print debug level output", - dest='debug', - action='store_true' - ) - parser.add_argument( - "--info", - help="print info level output", - dest='info', - action='store_true' - ) - parser.set_defaults(debug=False, info=False) - return parser.parse_args() - - -def main(): - logging.basicConfig(format="[%(name)s] %(message)s") - args = parse_args() - if args.debug: - logging.root.setLevel(logging.DEBUG) - elif args.info: - logging.root.setLevel(logging.INFO) - - if args.command == 'update-term-info': - update_term_info(args.proto_json, args.term_info) - elif args.command == 'generate-java-terminfo': - java_term_info(args.term_info.json, args.output_file) - elif args.command == 'generate-java-classes': - JavaRenderer( - global_info=args.global_info, - proto=args.proto_json.json, - java_term_info=args.java_term_info, - template_dir=args.template_dir, - package_dir=args.package_dir, - ).render_all() - - -class update_term_info(object): - '''Updates term_info.json if new terms were discovered in - proto_basic.json''' - def __init__(self, proto, term_meta): - new_json = self.diff_proto_keys(proto.json, term_meta.json) - if new_json != term_meta.json: - self.write_term_metadata(term_meta.filename, new_json) - # term_meta is a tuple, so we re-use the same dict to avoid - # mutation - term_meta.json.clear() - term_meta.json.update(new_json) - else: - os.utime(term_meta.filename, None) - - @staticmethod - def diff_proto_keys(proto, term_meta): - '''Finds any new keys in the protobuf file and adds dummy entries - for them in the term_info.json dictionary''' - set_meta = set(term_meta.keys()) - proto_items = proto['Term']['TermType'] - diff = [x for x in proto_items.keys() - if x not in set_meta] - new = term_meta.copy() - for key in diff: - logger.info("Got new term %s with id %s", key, proto_items[key]) - new[key] = OrderedDict([ - ('include_in', ['T_EXPR']), - ('id', proto_items[key]) - ]) - # Sync up protocol ids (these should never change, but it's best - # that it's automated since they'd otherwise be specified in two - # places that would need to be kept in sync. - for key, val in new.iteritems(): - if val['id'] != proto_items[key]: - logger.warning("Warning: %s changed from %s to %s", - key, val['id'], proto_items[key]) - val['id'] = proto_items[key] - return new - - def write_term_metadata(self, output_filename, new_json): - with open(output_filename, 'w') as outfile: - json.dump(new_json, outfile, indent=2) - - -class java_term_info(object): - '''Modifies and writes out a term info file that has helpful metadata - for rendering java classes''' - - # Java reserved keywords. If we add a term that collides with one - # of theses, the method names will have a trailing _ added - JAVA_KEYWORDS = { - 'abstract', 'continue', 'for', 'new', 'switch', 'assert', - 'default', 'goto', 'package', 'synchronized', 'boolean', 'do', - 'if', 'private', 'this', 'break', 'double', 'implements', - 'protected', 'throw', 'byte', 'else', 'import', 'public', - 'throws', 'case', 'enum', 'instanceof', 'return', 'transient', - 'catch', 'extends', 'int', 'short', 'try', 'char', 'final', - 'interface', 'static', 'void', 'class', 'finally', 'long', - 'strictfp', 'volatile', 'const', 'float', 'native', 'super', - 'while' - } - - # Methods defined on Object that we don't want to inadvertantly override - OBJECT_METHODS = { - 'clone', 'equals', 'finalize', 'hashCode', 'getClass', - 'notify', 'notifyAll', 'wait', 'toString' - } - - # Terms we don't want to create - TERM_BLACKLIST = { - 'IMPLICIT_VAR' # Java 8 lambda syntax is nice, so no need for row - } - - # Special aliases for the java driver only - FORCED_CLASS_RENAMES = { - 'OBJECT': 'ReqlObject', # Avoids Object collision which is annoying - } - - # Renames for methods - METHOD_ALIASES = { - 'GET_FIELD': 'g' # getField is too long for such a common operation - } - - # Aliases that should never be emitted as method namespace - ALIAS_BLACKLIST = { - 'funcall', 'javascript' - } - - # Manual override of superclasses for terms. Default is ReqlExpr - SUPERCLASSES = { - 'DB': 'ReqlAst' - } - - # Translation from T_ style types in term_info to Java classnames - INCLUDE_IN_CLASSNAMES = { - 'T_DB': 'Db', - 'T_TOP_LEVEL': 'TopLevel', - 'T_EXPR': 'ReqlExpr', - 'T_TABLE': 'Table', - } - - # How many times to expand when manually expanding 'T_FUNCX' arguments - FUNCX_EXPAND = 3 - - # How many times to expand manual * arguments - STAR_EXPAND = 4 - - def __init__(self, term_info, output_filename): - self.java_terminfo = copy.deepcopy(term_info) - self.output_filename = output_filename - - self.modify_term_meta() - self.write_output() - - def modify_term_meta(self): - for term, info in list(self.java_terminfo.items()): - self.delete_if_blacklisted(term, info) - self.add_methodname(term, info) - self.add_classname(term, info) - self.add_superclass(term, info) - self.translate_include_in(info) - info['signatures'] = self.reify_signatures(term, - info.get('signatures', [])) - - @classmethod - def reify_signatures(cls, term, signatures): - '''This takes the general signatures from terminfo.json and - turns them into signatures that can actually be created in the - Java.''' - reified_sigs = sorted({ - x for sig in signatures - for x in cls.reify_signature(term, sig) - }) - return [cls.elaborate_signature(sig) for sig in reified_sigs] - - @staticmethod - def elaborate_signature(sig): - '''This expands a list of arguments that have already been - converted to Java classnames by reify_signature. This is - pre-computing a bunch of data that it's convenient to have - for the templates - - Example: - ["Object", "Object", "Object...", "ReqlFunction2"] - becomes: - {"args": [{"type": "Object", "var": "expr"}, - {"type": "Object", "var": "exprA"}, - {"type": "Object...", "var": "exprs"}, - {"type": "ReqlFunction2", "var": "func2"}], - "first_arg": "ReqlExpr" - } - ''' - def num2str(num): - if num == 0: - return '' - if num > 26: - raise RuntimeError("too many variables in this signature") - return string.ascii_uppercase[num - 1] - - args = [] - suffix_counts = {} - first_arg = None - for arg in sig: - if not first_arg: - # If the first argument is Db, we shouldn't output - # that signature for the Table class etc, since the - # first argument is implicitly `this` for all methods - # except the ones defined on TopLevel. - - # The bit about `ReqlExpr` is because we need to - # accept arguments like Booleans and Numbers that will - # later be converted to ReqlExpr, so the signature - # argument type has to be `Object`. But when deciding - # whether to output the methods, we need to match - # against the classname. So if the first argument is - # Object, we want it to be output as a method on the - # `ReqlExpr` class. - first_arg = 'ReqlExpr' if arg.startswith('Object') else arg - if arg == 'Object...': - varname = 'exprs' - else: - suffix = num2str(suffix_counts.setdefault(arg, 0)) - suffix_counts[arg] += 1 - arity_match = arity_regex.match(arg) - if arity_match: - arity = arity_match.groups()[0] - varname = 'func' + arity + suffix - elif arg == 'Object': - varname = 'expr' + suffix - elif arg == 'Javascript': - varname = 'js' + suffix - else: - varname = arg.lower() + suffix - args.append({"type": arg, "var": varname}) - - return { - 'args': args, - 'first_arg': first_arg, - } - - @classmethod - def reify_signature(cls, term, signature): - def translate(arg): - if isinstance(arg, basestring): - return { - 'T_DB': 'Db', - 'T_EXPR': 'Object', - 'T_TABLE': 'Table', - 'T_FUNC0': 'ReqlFunction0', - 'T_FUNC1': 'ReqlFunction1', - 'T_FUNC2': 'ReqlFunction2', - 'T_JS': 'Javascript', - }[arg] - elif isinstance(arg, list): - return [translate(a) for a in arg] - else: - raise RuntimeError( - "Got something unexpected in signature %s", type(arg)) - - def expand_alternation(formal_args, index): - '''This does a manual expansion of '*' args when the type of the - argument before the star is an alternation. So with - signatures like: - - ['A', ['B', 'C'], '*'] - will expand to: - [['A'], - ['A', 'B'], - ['A', 'C'], - ['A', 'B', 'B'], - ['A', 'B', 'C'], - ['A', 'C', 'B'], - ['A', 'C', 'C']] - - Why do this? Well, if we just output Object... as the type - of the argument, then if one of the args needs to be a - function, the user will need to specify the type of the - lambda explicitly, since Java won't be able to infer the - function type (imagine 'C' above being 'ReqlFunction1'). - This doesn't allow truly arbitrary numbers of arguments as - reql does in principle, but it should be ok for practical - purposes and allow convenient type inference. - ''' - before_prev = tuple(formal_args[:-1]) - prev = formal_args[i-1] - result = set() - for reps in range(0, cls.STAR_EXPAND+1): - result.update(before_prev + p - for p in itertools.product(prev, repeat=reps)) - return list(sorted(result)) - - def expand_funcx(formal_args): - '''This manually expands T_FUNCX arguments. - Example: - ['A', 'B', '*', 'T_FUNCX'] - will expand to: - [['A', 'ReqlFunction1'], - ['A', 'B', 'ReqlFunction2'], - ['A', 'B', 'B', 'ReqlFunction3']] - - This is because Java needs a concrete number of arguments - in the lambdas, so we can't make the signature for T_FUNCX - apply(Object...) or anything like that. Like alternation - above, this limits how many arguments can be passed to - `do` and `map`, but in practice you usually don't need an - arbitrary number of arguments, a few suffice. - ''' - prev = formal_args[-1].rstrip('...') - before_prev = tuple(formal_args[:-1]) - base_arity = len(before_prev) - result = set() - for arity in range(base_arity, cls.FUNCX_EXPAND+base_arity+1): - prev_args = before_prev + (prev,) * (arity - base_arity) - result.add(prev_args + ('ReqlFunction' + str(arity),)) - return list(sorted(result)) - - def swap_for_js(arg): - if arg.startswith('ReqlFunction'): - return 'Javascript' - else: - return arg - - formal_args = [] - expanded = False - - # This is a little hack just for r.do. It formally accepts (in - # the wire format) the function first, and the arguments - # last. But all the drivers conventionally accept the function - # as the last argument since that looks the best when it is - # chained. - if term == 'FUNCALL' and 'T_FUNCX' in signature: - signature = signature[1:] + [signature[0]] - - for i, arg in enumerate(signature): - if arg == '*': - prev = formal_args[i-1] - if isinstance(prev, basestring): - # Use normal Java varargs if not alternation - formal_args[i-1] += '...' - elif isinstance(prev, list): - expanded = True - formal_args = expand_alternation(formal_args, i) - else: - raise RuntimeError( - "cant expand signature: {}".format(signature)) - elif arg == 'T_FUNCX': - expanded = True - if i == 0: - raise RuntimeError( - "T_FUNCX can't be the first argument:{}" - .format(signature)) - elif not formal_args[-1].endswith('...'): - raise RuntimeError( - "T_FUNCX must follow a variable argument: {}" - .format(signature)) - elif not i+1 == len(signature): - raise RuntimeError( - "T_FUNCX must be the last argument:{}" - .format(signature)) - else: - expanded = True - formal_args = expand_funcx(formal_args) - else: - formal_args.append(translate(arg)) - - subtotal = [formal_args] if not expanded else formal_args - final_args = [] - for sig in subtotal: - final_args.append(tuple(sig)) - if any(arg.startswith('ReqlFunction') for arg in sig): - # Javascript term can stand in for function arguments - final_args.append(tuple(swap_for_js(a) for a in sig)) - return final_args - - def write_output(self): - with open(self.output_filename, 'w') as outputfile: - json.dump(self.java_terminfo, outputfile, indent=2) - - def delete_if_blacklisted(self, term, info): - if term in self.TERM_BLACKLIST: - del self.java_terminfo[term] - - def add_methodname(self, term, info): - methodnames = self.nice_names(term, info) - - def filter_methodname(methodname): - if methodname in self.JAVA_KEYWORDS: - methodname += '_' - elif methodname in self.OBJECT_METHODS: - methodname += '_' - if methodname in self.ALIAS_BLACKLIST: - return None - else: - return methodname - - info['methodnames'] = [filter_methodname(n) - for n in methodnames - if filter_methodname(n) is not None] - - def add_classname(self, term, info): - info['classname'] = self.FORCED_CLASS_RENAMES.get(term, camel(term)) - - def add_superclass(self, term, info): - '''This is sort of hardcoded. It could be obtained from - ast_type_hierarchy in global_info.json if it became an - issue''' - info['superclass'] = self.SUPERCLASSES.get(term, 'ReqlExpr') - - def translate_include_in(self, info): - info['include_in'] = [self.INCLUDE_IN_CLASSNAMES[t] - for t in info.get('include_in')] - - @staticmethod - def nice_names(term, info): - '''Whether the nice name for a term is in a given set''' - result = [dromedary(term)] - if 'alias' in info: - result.append(dromedary(info['alias'])) - if term in java_term_info.METHOD_ALIASES: - result.append(java_term_info.METHOD_ALIASES[term]) - return result - - -def camel(varname): - 'CamelCase' - if re.match(r'[A-Z][A-Z0-9_]*$|[a-z][a-z0-9_]*$', varname): - # if snake-case (upper or lower) camelize it - suffix = "_" if varname.endswith('_') else "" - return ''.join(x.title() for x in varname.split('_')) + suffix - else: - # if already mixed case, just capitalize the first letter - return varname[0].upper() + varname[1:] - - -def dromedary(varname): - 'dromedaryCase' - if re.match(r'[A-Z][A-Z0-9_]*$|[a-z][a-z0-9_]*$', varname): - chunks = varname.split('_') - suffix = "_" if varname.endswith('_') else "" - return (chunks[0].lower() + - ''.join(x.title() for x in chunks[1:]) + - suffix) - else: - return varname[0].lower() + varname[1:] - - -class JavaRenderer(object): - '''Uses java_term_info.json and global_info.json to render all Java - AST and interface files''' - - def __init__(self, - global_info, - proto, - java_term_info, - template_dir, - package_dir): - self.global_info = global_info - self.proto = proto - self.term_info = java_term_info.json - self.template_dir = template_dir - self.gen_dir = package_dir+'/gen' - self.max_arity = self.get_max_arity() - self.renderer = Renderer( - template_dir, - invoking_filenames=[__file__], - source_files=[java_term_info.filename], - ) - # Facade methods - self.get_template_name = self.renderer.get_template_name - self.render = self.renderer.render - - def render_all(self): - self.render_proto_enums() - self.render_ast_subclasses() - self.render_toplevel() - self.render_function_interfaces() - self.render_exceptions() - - def render_toplevel(self): - '''Specially renders the TopLevel class''' - self.render( - 'TopLevel.java', - output_dir=self.gen_dir+'/model', - all_terms=self.term_info, - ) - - def render_function_interfaces(self): - '''Finds the maximum arity a function will be from - java_term_info.json, then creates an interface for each - arity''' - for arity in range(0, self.max_arity+1): - self.render( - 'ReqlFunction.java', - output_dir=self.gen_dir+'/ast', - output_name='ReqlFunction{}.java'.format(arity), - arity=arity, - ) - - def render_exceptions( - self, hierarchy=None, superclass='runtime_exception'): - '''Renders the exception hierarchy''' - if hierarchy is None: - hierarchy = self.global_info.json['exception_hierarchy'] - for classname, subclasses in hierarchy.items(): - self.render_exception(classname, superclass) - self.render_exceptions(subclasses, superclass=classname) - - def render_exception(self, classname, superclass): - '''Renders a single exception class''' - self.render( - 'Exception.java', - output_dir=self.gen_dir+'/exc', - output_name=camel(classname)+'.java', - classname=classname, - superclass=superclass, - dependencies=[self.global_info.filename], - ) - - def render_ast_subclasses(self): - # Since there is no term associated with it, we specially - # invoke render_ast_subclass to create the ReqlExpr java file - self.render_ast_subclass( - None, { - "superclass": "ReqlAst", - "classname": "ReqlExpr", - } - ) - # This will render an AstSubclass for each term - for term_name, meta in self.term_info.items(): - if not meta.get('deprecated'): - self.render_ast_subclass(term_name, meta) - - def render_ast_subclass(self, term_name, meta): - output_name = meta['classname'] + '.java' - template_name = self.get_template_name( - meta['classname'], directory='ast', default='AstSubclass.java') - self.render( - template_name, - output_dir=self.gen_dir+'/ast', - output_name=output_name, - term_name=term_name, - classname=meta['classname'], - superclass=meta['superclass'], - meta=meta, - all_terms=self.term_info, - max_arity=self.max_arity, - optargs=meta.get('optargs'), - ) - - def render_proto_enums(self): - '''Render protocol enums''' - self.render_proto_enum("Version", self.proto["VersionDummy"]) - self.render_proto_enum("Protocol", self.proto["VersionDummy"]) - self.render_proto_enum("QueryType", self.proto["Query"]) - self.render_proto_enum("ResponseType", self.proto["Response"]) - self.render_proto_enum("ResponseNote", self.proto["Response"]) - self.render_proto_enum("ErrorType", self.proto["Response"]) - self.render_proto_enum("DatumType", self.proto["Datum"]) - self.render_proto_enum("TermType", self.proto["Term"]) - - def render_proto_enum(self, classname, namespace): - mapping = namespace[classname] - template_name = self.get_template_name( - classname, directory='proto', default='Enum.java') - self.render(template_name, - output_dir=self.gen_dir+'/proto', - output_name=classname+'.java', - classname=classname, - package='proto', - items=mapping.items(), - ) - - def get_max_arity(self): - '''Determines the maximum reql lambda arity that shows up in any - signature''' - max_arity = 0 - for info in self.term_info.values(): - for sig in info['signatures']: - for arg in sig['args']: - match = arity_regex.match(arg['type']) - if match: - # Scrape out the arity from the type - # name. This could have been inserted into - # java_term_info.json, but it's a lot of - # clutter for redundant information. - arity = int(match.groups()[0]) - max_arity = max(max_arity, arity) - return max_arity - - -class EmptyTemplate(Exception): - '''Raised inside templates if they have no reason to be rendered - because what they're iterating over is empty''' - pass - - -class Renderer(object): - '''Manages rendering templates''' - - def __init__(self, template_dir, invoking_filenames, source_files=None): - self.template_dir = template_dir - self.invoking_filenames = invoking_filenames - self.source_files = source_files or [] - self.tl = TemplateLookup(directories=[template_dir]) - self.template_context = { - 'camel': camel, # CamelCase function - 'dromedary': dromedary, # dromeDary case function - 'EmptyTemplate': EmptyTemplate, - } - self.mtime_cache = {} - self.dependency_cache = {} - - def mtime(self, filename): - try: - return self.mtime_cache[filename] - except KeyError: - mtime = os.path.getmtime(filename) - self.mtime_cache[filename] = mtime - return mtime - - def render(self, - template_name, - output_dir, - output_name=None, - dependencies=None, - **kwargs): - if output_name is None: - output_name = template_name - - tpl = self.tl.get_template(template_name) - output_path = output_dir + '/' + output_name - - if self.already_rendered(tpl, output_path, dependencies): - logger.debug(" Up to date: %s", output_path) - return - - results = self.template_context.copy() - results.update(kwargs) - try: - rendered = tpl.render(**results) - except EmptyTemplate: - logger.debug(" Empty template: %s", output_path) - return - with codecs.open(output_path, "w", "utf-8") as outfile: - logger.info("Rendering %s", output_path) - outfile.write(self.autogenerated_header( - self.template_dir+'/'+template_name, - output_path, - self.invoking_filenames, - )) - outfile.write(rendered) - - def get_template_name(self, classname, directory, default): - '''Returns the template for this class''' - override_template = '{}/{}.java'.format(directory, classname) - if self.tl.has_template(override_template): - logger.debug( - "Found an override for %s at %s", classname, override_template) - return override_template - else: - return default - - def dependent_templates(self, tpl): - '''Returns filenames for all templates that are inherited from the - given template''' - if tpl.filename in self.dependency_cache: - return self.dependency_cache[tpl.filename] - inherit_files = re.findall(r'inherit file="(.*)"', tpl.source) - op = os.path - dependencies = set() - tpl_dir = op.dirname(tpl.filename) - for parent_relpath in inherit_files: - parent_filename = op.normpath(op.join(tpl_dir, parent_relpath)) - dependencies.add(parent_filename) - dependencies.update( - self.dependent_templates( - self.tl.get_template( - self.tl.filename_to_uri(parent_filename)))) - dependencies.add(tpl.filename) - self.dependency_cache[tpl.filename] = dependencies - return dependencies - - def already_rendered(self, tpl, output_path, dependencies): - '''Check if rendered file is already up to date''' - if not os.path.exists(output_path): - logger.debug(" Rendering since %s doesn't exist", output_path) - return False - - output_mtime = self.mtime(output_path) - - # Check if this file or the invoking file have changed - for filename in self.invoking_filenames + self.source_files: - if self.mtime(filename) > output_mtime: - logger.debug( - " Rendering since %s has changed", filename) - return False - if self.mtime(__file__) > output_mtime: - logger.debug(" Rendering since %s has changed", __file__) - return False - - # Check if any dependent templates have changed - for tpl in self.dependent_templates(tpl): - if self.mtime(tpl) > output_mtime: - logger.debug(" Rendering since %s is newer", tpl) - return False - - # Check if any explicitly defined dependencies have changed - dependencies = dependencies or [] - for dep in dependencies: - if self.mtime(dep) > output_mtime: - logger.debug(" Rendering since %s is newer", dep) - return False - return True - - def autogenerated_header(self, template_path, output_path, filename): - rel_tpl = os.path.relpath(template_path, start=output_path) - filenames = ' and '.join(os.path.basename(f) - for f in self.invoking_filenames) - return ('// Autogenerated by {}.\n' - '// Do not edit this file directly.\n' - '// The template for this file is located at:\n' - '// {}\n').format(filenames, rel_tpl) - - -if __name__ == '__main__': - main() diff --git a/drivers/java/process_polyglot.py b/drivers/java/process_polyglot.py deleted file mode 100644 index 65125151f64..00000000000 --- a/drivers/java/process_polyglot.py +++ /dev/null @@ -1,432 +0,0 @@ -'''Finds and reads polyglot yaml tests (preferring the python tests), -normalizing their quirks into something that can be translated in a -sane way. - -The idea is that this file contains nothing Java specific, so could -potentially be used to convert the tests for use with other drivers. -''' - -import os -import sys -import os.path -import ast -import copy -import logging -from collections import namedtuple - -import metajava - -try: - basestring -except NameError: - basestring = ("".__class__,) - -logger = logging.getLogger("process_polyglot") - - -class Unhandled(Exception): - '''Used when a corner case is hit that probably should be handled - if a test actually hits it''' - pass - - -class Skip(Exception): - '''Used when skipping a test for whatever reason''' - pass - - -class FatalSkip(metajava.EmptyTemplate): - '''Used when a skipped test should prevent the entire test file - from rendering''' - def __init__(self, msg): - logger.info("Skipping rendering because %s", msg) - super(FatalSkip, self).__init__(msg) - - -Term = namedtuple("Term", 'line type ast') -CustomTerm = namedtuple('CustomTerm', 'line') -Query = namedtuple( - 'Query', - ('query', - 'expected', - 'testfile', - 'line_num', - 'runopts') -) -Def = namedtuple('Def', 'varname term run_if_query testfile line_num runopts') -CustomDef = namedtuple('CustomDef', 'line testfile line_num') -Expect = namedtuple('Expect', 'bif term') - - -class AnythingIsFine(object): - def __init__(self): - self.type = object - self.ast = ast.Name("AnythingIsFine", None) - self.line = "AnythingIsFine" - - -class SkippedTest(object): - __slots__ = ('line', 'reason') - - def __init__(self, line, reason): - if reason == "No java, python or generic test": - logger.debug("Skipped test because %s", reason) - else: - logger.info("Skipped test because %s", reason) - logger.info(" - Skipped test was: %s", line) - self.line = line - self.reason = reason - - -def flexiget(obj, keys, default): - '''Like dict.get, but accepts an array of keys, matching the first - that exists in the dict. If none do, it returns the default. If - the object isn't a dict, it also returns the default''' - if not isinstance(obj, dict): - return default - for key in keys: - if key in obj: - return obj[key] - return default - - -def py_str(py): - '''Turns a python value into a string of python code - representing that object''' - def maybe_str(s): - return s if isinstance(s, str) and '(' in s else repr(s) - - if type(py) is dict: - return '{' + ', '.join( - [repr(k) + ': ' + maybe_str(py[k]) for k in py]) + '}' - if not isinstance(py, basestring): - return repr(py) - else: - return py - - -def _try_eval(node, context): - '''For evaluating expressions given a context''' - node_4_eval = copy.deepcopy(node) - if type(node_4_eval) == ast.Expr: - node_4_eval = node_4_eval.value - node_4_eval = ast.Expression(node_4_eval) - ast.fix_missing_locations(node_4_eval) - compiled_value = compile(node_4_eval, '', mode='eval') - r = context['r'] - try: - value = eval(compiled_value, context) - except r.ReqlError: - raise Skip("Java type system prevents static Reql errors") - except AttributeError: - raise Skip("Java type system prevents attribute errors") - except Exception: - logger.error("Failed evaluating %r", ast.dump(node_4_eval)) - raise - else: - return type(value), value - - -def try_eval(node, context): - return _try_eval(node, context)[0] - - -def try_eval_def(parsed_define, context): - '''For evaluating python definitions like x = foo''' - varname = parsed_define.targets[0].id - type_, value = _try_eval(parsed_define.value, context) - context[varname] = value - return varname, type_ - - -def all_yaml_tests(test_dir, exclusions): - '''Generator for the full paths of all non-excluded yaml tests''' - for root, dirs, files in os.walk(test_dir): - for f in files: - path = os.path.relpath(os.path.join(root, f), test_dir) - if valid_filename(exclusions, path): - yield path - - -def valid_filename(exclusions, filepath): - parts = filepath.split('.') - if parts[-1] != 'yaml': - return False - for exclusion in exclusions: - if exclusion in filepath: - logger.info("Skipped %s due to exclusion %r", - filepath, exclusion) - return False - return True - - -def create_context(r, table_var_names): - '''Creates a context for evaluation of test definitions. Needs the - rethinkdb driver module to use, and the variable names of - predefined tables''' - from datetime import datetime, tzinfo, timedelta - - # Both these tzinfo classes were nabbed from - # test/rql_test/driver/driver.py to aid in evaluation - class UTCTimeZone(tzinfo): - '''UTC''' - - def utcoffset(self, dt): - return timedelta(0) - - def tzname(self, dt): - return "UTC" - - def dst(self, dt): - return timedelta(0) - - class PacificTimeZone(tzinfo): - '''Pacific timezone emulator for timestamp: 1375147296.68''' - - def utcoffset(self, dt): - return timedelta(-1, 61200) - - def tzname(self, dt): - return 'PDT' - - def dst(self, dt): - return timedelta(0, 3600) - - def fake_type(name): - def __init__(self, *args, **kwargs): - pass - typ = type(name, (object,), {'__init__': __init__}) - typ.__module__ = '?test?' - return typ - - # We need to keep track of the values of definitions because each - # subsequent definition can depend on previous ones. - context = { - 'r': r, - 'null': None, - 'nil': None, - 'sys': sys, - 'false': False, - 'true': True, - 'datetime': datetime, - 'PacificTimeZone': PacificTimeZone, - 'UTCTimeZone': UTCTimeZone, - # mock test helper functions - 'len': lambda x: 1, - 'arrlen': fake_type("arr_len"), - 'uuid': fake_type("uuid"), - 'fetch': lambda c, limit=None: [], - 'int_cmp': fake_type("int_cmp"), - 'partial': fake_type("partial"), - 'float_cmp': fake_type("float_cmp"), - 'wait': lambda time: None, - 'err': fake_type('err'), - 'err_regex': fake_type('err_regex'), - 'regex': fake_type('regex'), - 'bag': fake_type('bag'), - # py3 compatibility - 'xrange': range, - } - # Definitions can refer to these predefined table variables. Since - # we're only evaluating definitions here to determine what the - # type of the term will be, it doesn't need to include the db or - # anything, it just needs to be a Table ast object. - context.update({tbl: r.table(tbl) for tbl in table_var_names}) - return context - - -class TestContext(object): - '''Holds file, context and test number info before "expected" data - is obtained''' - def __init__(self, context, testfile, runopts): - self.context = context - self.testfile = testfile - self.runopts = runopts - - @staticmethod - def find_python_expected(test): - '''Extract the expected result of the test. We want the python - specific version if it's available, so we have to poke around - a bit''' - if 'ot' in test: - ret = flexiget(test['ot'], ['py', 'cd'], test['ot']) - elif isinstance(test.get('py'), dict) and 'ot' in test['py']: - ret = test['py']['ot'] - else: - # This is distinct from the 'ot' field having the - # value None in it! - return AnythingIsFine() - return ret - - @staticmethod - def find_custom_expected(test, field): - '''Gets the ot field for the language if it exists. If not it returns - None.''' - if 'ot' in test: - ret = flexiget(test['ot'], [field], None) - elif field in test: - ret = flexiget(test[field], ['ot'], None) - else: - ret = None - return ret - - def expected_context(self, test, custom_field): - custom_expected = self.find_custom_expected(test, custom_field) - if custom_expected is not None: - # custom version doesn't need to be evaluated, it's in the - # right language already - term = CustomTerm(custom_expected) - else: - exp = self.find_python_expected(test) - if type(exp) == AnythingIsFine: - return ExpectedContext(self, AnythingIsFine()) - expected = py_str(exp) - expected_ast = ast.parse(expected, mode="eval").body - logger.debug("Evaluating: %s", expected) - expected_type = try_eval(expected_ast, self.context) - term = Term( - ast=expected_ast, - line=expected, - type=expected_type, - ) - return ExpectedContext(self, term) - - def def_from_parsed(self, define_line, parsed_define, run_if_query): - logger.debug("Evaluating: %s", define_line) - varname, result_type = try_eval_def(parsed_define, self.context) - return Def( - varname=varname, - term=Term( - line=define_line, - type=result_type, - ast=parsed_define), - run_if_query=run_if_query, - testfile=self.testfile, - line_num=define_line.linenumber, - runopts=self.runopts, - ) - - def def_from_define(self, define, run_if_query): - define_line = py_str(define) - parsed_define = ast.parse(define_line, mode='single').body[0] - return self.def_from_parsed(define_line, parsed_define, run_if_query) - - def custom_def(self, line): - return CustomDef( - line=line, testfile=self.testfile, line_num=line.linenumber) - - -class ExpectedContext(object): - '''Holds some contextual information needed to yield queries. Used by - the tests_and_defs generator''' - - def __init__(self, test_context, expected_term): - self.testfile = test_context.testfile - self.context = test_context.context - self.runopts = test_context.runopts - self.expected_term = expected_term - - def query_from_term(self, query_term, line_num=None): - if type(query_term) == SkippedTest: - return query_term - else: - return Query( - query=query_term, - expected=self.expected_term, - testfile=self.testfile, - line_num=query_term.line.linenumber, - runopts=self.runopts, - ) - - def query_from_test(self, test): - return self.query_from_term( - self.term_from_test(test), test.linenumber) - - def query_from_subtest(self, test, subline_num): - return self.query_from_term( - self.term_from_test(test), - (test.linenumber, subline_num)) - - def query_from_parsed(self, testline, parsed): - return self.query_from_term( - self.term_from_parsed(testline, parsed)) - - def term_from_test(self, test): - testline = py_str(test) - return self.term_from_testline(testline) - - def term_from_testline(self, testline): - parsed = ast.parse(testline, mode='eval').body - return self.term_from_parsed(testline, parsed) - - def term_from_parsed(self, testline, parsed): - try: - logger.debug("Evaluating: %s", testline) - result_type = try_eval(parsed, self.context) - except Skip as s: - return SkippedTest(line=testline, reason=str(s)) - else: - return Term(ast=parsed, line=testline, type=result_type) - - -def tests_and_defs(testfile, raw_test_data, context, custom_field=None): - '''Generator of parsed python tests and definitions. - `testfile` is the name of the file being converted - `raw_test_data` is the yaml data as python data structures - `context` is the evaluation context for the values. Will be modified - `custom` is the specific type of test to look for. - (falls back to 'py', then 'cd') - ''' - for test in raw_test_data: - runopts = test.get('runopts') - if runopts is not None: - runopts = {key: ast.parse(py_str(val), mode="eval").body - for key, val in runopts.items()} - test_context = TestContext(context, testfile, runopts=runopts) - if 'def' in test and flexiget(test['def'], [custom_field], False): - yield test_context.custom_def(test['def'][custom_field]) - elif 'def' in test: - # We want to yield the definition before the test itself - define = flexiget(test['def'], [custom_field], None) - if define is not None: - yield test_context.custom_def(define) - else: - define = flexiget(test['def'], ['py', 'cd'], test['def']) - # for some reason, sometimes def is just None - if define and type(define) is not dict: - # if define is a dict, it doesn't have anything - # relevant since we already checked. if this - # happens to be a query fragment, the test - # framework should not run it, just store the - # fragment in the variable. - yield test_context.def_from_define( - define, run_if_query=False) - customtest = test.get(custom_field, None) - # as a backup try getting a python or generic test - pytest = flexiget(test, ['py', 'cd'], None) - if customtest is None and pytest is None: - line = flexiget(test, ['rb', 'js'], u'¯\_(ツ)_/¯') - yield SkippedTest( - line=line, - reason='No {}, python or generic test'.format(custom_field)) - continue - - expected_context = test_context.expected_context(test, custom_field) - if customtest is not None: - yield expected_context.query_from_term(customtest) - elif isinstance(pytest, basestring): - parsed = ast.parse(pytest, mode="single").body[0] - if type(parsed) == ast.Expr: - yield expected_context.query_from_parsed(pytest, parsed.value) - elif type(parsed) == ast.Assign: - # Second syntax for defines. Surprise, it wasn't a - # test at all, because it has an equals sign in it. - # if this happens to be a query, it will be run. - yield test_context.def_from_parsed( - pytest, parsed, run_if_query=True) - elif type(pytest) is dict and 'cd' in pytest: - yield expected_context.query_from_test(pytest['cd']) - else: - for i, subtest in enumerate(pytest, start=1): - # unroll subtests - yield expected_context.query_from_subtest(subtest, i) diff --git a/drivers/java/settings.gradle b/drivers/java/settings.gradle deleted file mode 100644 index 6f99a09ddc2..00000000000 --- a/drivers/java/settings.gradle +++ /dev/null @@ -1 +0,0 @@ -rootProject.name = "rethinkdb" \ No newline at end of file diff --git a/drivers/java/src/main/java/com/rethinkdb/ErrorBuilder.java b/drivers/java/src/main/java/com/rethinkdb/ErrorBuilder.java deleted file mode 100644 index 2d206141df2..00000000000 --- a/drivers/java/src/main/java/com/rethinkdb/ErrorBuilder.java +++ /dev/null @@ -1,84 +0,0 @@ -package com.rethinkdb; - -import com.rethinkdb.ast.Query; -import com.rethinkdb.ast.ReqlAst; -import com.rethinkdb.gen.proto.ErrorType; -import com.rethinkdb.gen.proto.ResponseType; -import com.rethinkdb.model.Backtrace; -import com.rethinkdb.gen.exc.*; - -import java.util.Optional; -import java.util.function.Function; - -public class ErrorBuilder { - final String msg; - final ResponseType responseType; - Optional backtrace = Optional.empty(); - Optional errorType = Optional.empty(); - Optional term = Optional.empty(); - - public ErrorBuilder(String msg, ResponseType responseType) { - this.msg = msg; - this.responseType = responseType; - } - - public ErrorBuilder setBacktrace(Optional backtrace) { - this.backtrace = backtrace; - return this; - } - - public ErrorBuilder setErrorType(Optional errorType) { - this.errorType = errorType; - return this; - } - - public ErrorBuilder setTerm(Query query) { - this.term = query.term; - return this; - } - - public ReqlError build() { - assert (msg != null); - assert (responseType != null); - Function con; - switch (responseType) { - case CLIENT_ERROR: - con = ReqlClientError::new; - break; - case COMPILE_ERROR: - con = ReqlServerCompileError::new; - break; - case RUNTIME_ERROR: { - con = errorType.>map(et -> { - switch (et) { - case INTERNAL: - return ReqlInternalError::new; - case RESOURCE_LIMIT: - return ReqlResourceLimitError::new; - case QUERY_LOGIC: - return ReqlQueryLogicError::new; - case NON_EXISTENCE: - return ReqlNonExistenceError::new; - case OP_FAILED: - return ReqlOpFailedError::new; - case OP_INDETERMINATE: - return ReqlOpIndeterminateError::new; - case USER: - return ReqlUserError::new; - case PERMISSION_ERROR: - return ReqlPermissionError::new; - default: - return ReqlRuntimeError::new; - } - }).orElse(ReqlRuntimeError::new); - break; - } - default: - con = ReqlError::new; - } - ReqlError res = con.apply(msg); - backtrace.ifPresent(res::setBacktrace); - term.ifPresent(res::setTerm); - return res; - } -} diff --git a/drivers/java/src/main/java/com/rethinkdb/RethinkDB.java b/drivers/java/src/main/java/com/rethinkdb/RethinkDB.java deleted file mode 100644 index 2a80d315831..00000000000 --- a/drivers/java/src/main/java/com/rethinkdb/RethinkDB.java +++ /dev/null @@ -1,24 +0,0 @@ -package com.rethinkdb; - -import com.fasterxml.jackson.databind.ObjectMapper; -import com.rethinkdb.gen.model.TopLevel; -import com.rethinkdb.net.Connection; - -public class RethinkDB extends TopLevel { - - /** - * The Singleton to use to begin interacting with RethinkDB Driver - */ - public static final RethinkDB r = new RethinkDB(); - private static ObjectMapper mapper = new ObjectMapper(); - public Connection.Builder connection() { - return Connection.build(); - } - - public static void setObjectMapper(ObjectMapper mapper1) { - mapper = mapper1; - } - public static ObjectMapper getObjectMapper() { - return mapper; - } -} diff --git a/drivers/java/src/main/java/com/rethinkdb/RethinkDBConstants.java b/drivers/java/src/main/java/com/rethinkdb/RethinkDBConstants.java deleted file mode 100644 index 63e513679ce..00000000000 --- a/drivers/java/src/main/java/com/rethinkdb/RethinkDBConstants.java +++ /dev/null @@ -1,13 +0,0 @@ -package com.rethinkdb; - -public class RethinkDBConstants { - public static final String DEFAULT_DB_NAME = "test"; - public static final String DEFAULT_HOSTNAME = "localhost"; - public static final String DEFAULT_AUTHKEY = ""; - public static final int DEFAULT_PORT = 28015; - public static final int DEFAULT_TIMEOUT = 20; - - public static class Protocol { - public static final String SUCCESS = "SUCCESS"; - } -} diff --git a/drivers/java/src/main/java/com/rethinkdb/ast/Query.java b/drivers/java/src/main/java/com/rethinkdb/ast/Query.java deleted file mode 100644 index ac281e15a42..00000000000 --- a/drivers/java/src/main/java/com/rethinkdb/ast/Query.java +++ /dev/null @@ -1,73 +0,0 @@ -package com.rethinkdb.ast; - -import com.rethinkdb.gen.proto.QueryType; -import com.rethinkdb.model.OptArgs; -import com.rethinkdb.net.Util; - -import java.nio.ByteBuffer; -import java.nio.charset.Charset; -import java.nio.charset.StandardCharsets; -import java.util.*; - -import org.slf4j.Logger; -import org.slf4j.LoggerFactory; - -import org.json.simple.JSONArray; - -/* An instance for a query that has been sent to the server. Keeps - * track of its token, the args to .run() it was called with, and its - * query type. -*/ - -public class Query { - public final QueryType type; - public final long token; - public final Optional term; - public final OptArgs globalOptions; - - static final Logger logger = LoggerFactory.getLogger(Query.class); - - public Query(QueryType type, long token, ReqlAst term, OptArgs globalOptions) { - this.type = type; - this.token = token; - this.term = Optional.ofNullable(term); - this.globalOptions = globalOptions; - } - - public Query(QueryType type, long token) { - this(type, token, null, new OptArgs()); - } - - public static Query stop(long token) { - return new Query(QueryType.STOP, token, null, new OptArgs()); - } - - public static Query continue_(long token) { - return new Query(QueryType.CONTINUE, token, null, new OptArgs()); - } - - public static Query start(long token, ReqlAst term, OptArgs globalOptions) { - return new Query(QueryType.START, token, term, globalOptions); - } - - public static Query noreplyWait(long token) { - return new Query(QueryType.NOREPLY_WAIT, token, null, new OptArgs()); - } - - public ByteBuffer serialize() { - JSONArray queryArr = new JSONArray(); - queryArr.add(type.value); - term.ifPresent(t -> queryArr.add(t.build())); - if(!globalOptions.isEmpty()) { - queryArr.add(ReqlAst.buildOptarg(globalOptions)); - } - String queryJson = queryArr.toJSONString(); - byte[] queryBytes = queryJson.getBytes(StandardCharsets.UTF_8); - ByteBuffer bb = Util.leByteBuffer(Long.BYTES + Integer.BYTES + queryBytes.length) - .putLong(token) - .putInt(queryBytes.length) - .put(queryBytes); - logger.debug("JSON Send: Token: {} {}", token, queryJson); - return bb; - } -} diff --git a/drivers/java/src/main/java/com/rethinkdb/ast/ReqlAst.java b/drivers/java/src/main/java/com/rethinkdb/ast/ReqlAst.java deleted file mode 100644 index e5324a332c7..00000000000 --- a/drivers/java/src/main/java/com/rethinkdb/ast/ReqlAst.java +++ /dev/null @@ -1,131 +0,0 @@ -package com.rethinkdb.ast; - -import com.rethinkdb.gen.exc.ReqlDriverError; -import com.rethinkdb.gen.proto.TermType; -import com.rethinkdb.model.Arguments; -import com.rethinkdb.model.OptArgs; -import com.rethinkdb.net.Connection; -import org.json.simple.JSONArray; - -import java.util.HashMap; -import java.util.Map; -import java.util.Optional; -import java.util.stream.Collectors; - -/** Base class for all reql queries. - */ -public class ReqlAst { - - protected final TermType termType; - protected final Arguments args; - protected final OptArgs optargs; - - protected ReqlAst(TermType termType, Arguments args, OptArgs optargs) { - if(termType == null){ - throw new ReqlDriverError("termType can't be null!"); - } - this.termType = termType; - this.args = args != null ? args : new Arguments(); - this.optargs = optargs != null ? optargs : new OptArgs(); - } - - protected Object build() { - // Create a JSON object from the Ast - JSONArray list = new JSONArray(); - list.add(termType.value); - if (args.size() > 0) { - list.add(args.stream() - .map(ReqlAst::build) - .collect(Collectors.toCollection(JSONArray::new))); - }else { - list.add(new JSONArray()); - } - if (optargs.size() > 0) { - list.add(buildOptarg(optargs)); - } - return list; - } - - public static Map buildOptarg(OptArgs opts){ - Map result = new HashMap<>( opts.size() ); - opts.forEach( (name, arg) -> result.put( name, arg.build() ) ); - return result; - } - - /** - * Runs this query via connection {@code conn} with default options and returns an atom result - * or a sequence result as a cursor. The atom result either has a primitive type (e.g., {@code Integer}) - * or represents a JSON object as a {@code Map}. The cursor is a {@code com.rethinkdb.net.Cursor} - * which may be iterated to get a sequence of atom results - * @param conn The connection to run this query - * @param The type of result - * @return The result of this query - */ - public T run(Connection conn) { - return conn.run(this, new OptArgs(), Optional.empty()); - } - - /** - * Runs this query via connection {@code conn} with options {@code runOpts} and returns an atom result - * or a sequence result as a cursor. The atom result either has a primitive type (e.g., {@code Integer}) - * or represents a JSON object as a {@code Map}. The cursor is a {@code com.rethinkdb.net.Cursor} - * which may be iterated to get a sequence of atom results - * @param conn The connection to run this query - * @param runOpts The options to run this query with - * @param The type of result - * @return The result of this query - */ - public T run(Connection conn, OptArgs runOpts) { - return conn.run(this, runOpts, Optional.empty()); - } - - /** - * Runs this query via connection {@code conn} with default options and returns an atom result - * or a sequence result as a cursor. The atom result representing a JSON object is converted - * to an object of type {@code Class

} specified with {@code pojoClass}. The cursor - * is a {@code com.rethinkdb.net.Cursor} which may be iterated to get a sequence of atom results - * of type {@code Class

} - * @param conn The connection to run this query - * @param pojoClass The class of POJO to convert to - * @param The type of result - * @param

The type of POJO to convert to - * @return The result of this query (either a {@code P or a Cursor

} - */ - public T run(Connection conn, Class

pojoClass) { - return conn.run(this, new OptArgs(), Optional.of(pojoClass)); - } - - /** - * Runs this query via connection {@code conn} with options {@code runOpts} and returns an atom result - * or a sequence result as a cursor. The atom result representing a JSON object is converted - * to an object of type {@code Class

} specified with {@code pojoClass}. The cursor - * is a {@code com.rethinkdb.net.Cursor} which may be iterated to get a sequence of atom results - * of type {@code Class

} - * @param conn The connection to run this query - * @param runOpts The options to run this query with - * @param pojoClass The class of POJO to convert to - * @param The type of result - * @param

The type of POJO to convert to - * @return The result of this query (either a {@code P or a Cursor

} - */ - public T run(Connection conn, OptArgs runOpts, Class

pojoClass) { - return conn.run(this, runOpts, Optional.of(pojoClass)); - } - - public void runNoReply(Connection conn){ - conn.runNoReply(this, new OptArgs()); - } - - public void runNoReply(Connection conn, OptArgs globalOpts){ - conn.runNoReply(this, globalOpts); - } - - @Override - public String toString() { - return "ReqlAst{" + - "termType=" + termType + - ", args=" + args + - ", optargs=" + optargs + - '}'; - } -} diff --git a/drivers/java/src/main/java/com/rethinkdb/ast/Util.java b/drivers/java/src/main/java/com/rethinkdb/ast/Util.java deleted file mode 100644 index a0198c92960..00000000000 --- a/drivers/java/src/main/java/com/rethinkdb/ast/Util.java +++ /dev/null @@ -1,138 +0,0 @@ -package com.rethinkdb.ast; - -import com.rethinkdb.RethinkDB; -import com.rethinkdb.gen.ast.*; -import com.rethinkdb.gen.exc.ReqlDriverCompileError; -import com.rethinkdb.gen.exc.ReqlDriverError; -import com.rethinkdb.model.Arguments; -import com.rethinkdb.model.MapObject; -import com.rethinkdb.model.ReqlLambda; - -import java.beans.BeanInfo; -import java.beans.IntrospectionException; -import java.beans.Introspector; -import java.beans.PropertyDescriptor; -import java.lang.reflect.*; -import java.time.LocalDateTime; -import java.time.OffsetDateTime; -import java.time.ZoneId; -import java.time.ZonedDateTime; -import java.time.format.DateTimeFormatter; -import java.util.*; -import java.util.Map; - - -public class Util { - private Util(){} - /** - * Coerces objects from their native type to ReqlAst - * - * @param val val - * @return ReqlAst - */ - public static ReqlAst toReqlAst(Object val) { - return toReqlAst(val, 100); - } - - public static ReqlExpr toReqlExpr(Object val){ - ReqlAst converted = toReqlAst(val); - if(converted instanceof ReqlExpr){ - return (ReqlExpr) converted; - }else{ - throw new ReqlDriverError("Cannot convert %s to ReqlExpr", val); - } - } - - private static ReqlAst toReqlAst(Object val, int remainingDepth) { - if (remainingDepth <= 0) { - throw new ReqlDriverCompileError("Recursion limit reached converting to ReqlAst"); - } - if (val instanceof ReqlAst) { - return (ReqlAst) val; - } - - if (val instanceof Object[]){ - Arguments innerValues = new Arguments(); - for (Object innerValue : Arrays.asList((Object[])val)){ - innerValues.add(toReqlAst(innerValue, remainingDepth - 1)); - } - return new MakeArray(innerValues, null); - } - - if (val instanceof List) { - Arguments innerValues = new Arguments(); - for (java.lang.Object innerValue : (List) val) { - innerValues.add(toReqlAst(innerValue, remainingDepth - 1)); - } - return new MakeArray(innerValues, null); - } - - if (val instanceof Map) { - Map obj = new MapObject(); - for (Map.Entry entry : (Set) ((Map) val).entrySet()) { - if (!(entry.getKey() instanceof String)) { - throw new ReqlDriverCompileError("Object keys can only be strings"); - } - - obj.put((String) entry.getKey(), toReqlAst(entry.getValue())); - } - return MakeObj.fromMap(obj); - } - - if (val instanceof ReqlLambda) { - return Func.fromLambda((ReqlLambda) val); - } - - final DateTimeFormatter fmt = DateTimeFormatter.ofPattern("yyyy-MM-dd'T'HH:mm:ss.SSSX"); - - if (val instanceof LocalDateTime) { - ZoneId zid = ZoneId.systemDefault(); - DateTimeFormatter fmt2 = fmt.withZone(zid); - return Iso8601.fromString(((LocalDateTime) val).format(fmt2)); - } - if (val instanceof ZonedDateTime) { - return Iso8601.fromString(((ZonedDateTime) val).format(fmt)); - } - if (val instanceof OffsetDateTime) { - return Iso8601.fromString(((OffsetDateTime) val).format(fmt)); - } - - if (val instanceof Integer) { - return new Datum((Integer) val); - } - - if (val instanceof Number) { - return new Datum((Number) val); - } - - if (val instanceof Boolean) { - return new Datum((Boolean) val); - } - - if (val instanceof String) { - return new Datum((String) val); - } - - if (val == null) { - return new Datum(null); - } - if (val.getClass().isEnum()) { - return new Datum(((Enum)val).toString()); - } - - // val is a non-null POJO, let's use jackson - return toReqlAst(toMap(val)); - } - - /** - * Converts a POJO to a map of its public properties collected using bean introspection.
- * The POJO's class must be public, or a ReqlDriverError would be thrown.
- * Numeric properties should be Long instead of Integer - * @param pojo POJO to be introspected - * @return Map of POJO's public properties - */ - private static Map toMap(Object pojo) { - Map map = RethinkDB.getObjectMapper().convertValue(pojo, Map.class); - return map; - } -} diff --git a/drivers/java/src/main/java/com/rethinkdb/converter/id.java b/drivers/java/src/main/java/com/rethinkdb/converter/id.java deleted file mode 100644 index 7efd4695157..00000000000 --- a/drivers/java/src/main/java/com/rethinkdb/converter/id.java +++ /dev/null @@ -1,24 +0,0 @@ -package com.rethinkdb.converter; - -import com.fasterxml.jackson.annotation.JacksonAnnotationsInside; -import com.fasterxml.jackson.annotation.JsonInclude; - -import java.lang.annotation.ElementType; -import java.lang.annotation.Retention; -import java.lang.annotation.RetentionPolicy; -import java.lang.annotation.Target; - -/** - * Created by thejp on 10/25/2016. - */ -@Target(ElementType.FIELD) -@Retention(RetentionPolicy.RUNTIME) -@JacksonAnnotationsInside -@JsonInclude(JsonInclude.Include.NON_NULL) - -/** - * Use this with the primary key/id of your pojo - */ -public @interface id -{ -} diff --git a/drivers/java/src/main/java/com/rethinkdb/gen/ast/Add.java b/drivers/java/src/main/java/com/rethinkdb/gen/ast/Add.java deleted file mode 100644 index dcb48d476dc..00000000000 --- a/drivers/java/src/main/java/com/rethinkdb/gen/ast/Add.java +++ /dev/null @@ -1,29 +0,0 @@ -// Autogenerated by metajava.py. -// Do not edit this file directly. -// The template for this file is located at: -// ../../../../../../../../templates/AstSubclass.java - -package com.rethinkdb.gen.ast; - -import com.rethinkdb.gen.proto.TermType; -import com.rethinkdb.gen.exc.ReqlDriverError; -import com.rethinkdb.model.Arguments; -import com.rethinkdb.model.OptArgs; -import com.rethinkdb.ast.ReqlAst; - - - -public class Add extends ReqlExpr { - - - public Add(Object arg) { - this(new Arguments(arg), null); - } - public Add(Arguments args){ - this(args, null); - } - public Add(Arguments args, OptArgs optargs) { - super(TermType.ADD, args, optargs); - } - -} diff --git a/drivers/java/src/main/java/com/rethinkdb/gen/ast/And.java b/drivers/java/src/main/java/com/rethinkdb/gen/ast/And.java deleted file mode 100644 index 3c20111a4e7..00000000000 --- a/drivers/java/src/main/java/com/rethinkdb/gen/ast/And.java +++ /dev/null @@ -1,29 +0,0 @@ -// Autogenerated by metajava.py. -// Do not edit this file directly. -// The template for this file is located at: -// ../../../../../../../../templates/AstSubclass.java - -package com.rethinkdb.gen.ast; - -import com.rethinkdb.gen.proto.TermType; -import com.rethinkdb.gen.exc.ReqlDriverError; -import com.rethinkdb.model.Arguments; -import com.rethinkdb.model.OptArgs; -import com.rethinkdb.ast.ReqlAst; - - - -public class And extends ReqlExpr { - - - public And(Object arg) { - this(new Arguments(arg), null); - } - public And(Arguments args){ - this(args, null); - } - public And(Arguments args, OptArgs optargs) { - super(TermType.AND, args, optargs); - } - -} diff --git a/drivers/java/src/main/java/com/rethinkdb/gen/ast/Append.java b/drivers/java/src/main/java/com/rethinkdb/gen/ast/Append.java deleted file mode 100644 index 1537066baf4..00000000000 --- a/drivers/java/src/main/java/com/rethinkdb/gen/ast/Append.java +++ /dev/null @@ -1,29 +0,0 @@ -// Autogenerated by metajava.py. -// Do not edit this file directly. -// The template for this file is located at: -// ../../../../../../../../templates/AstSubclass.java - -package com.rethinkdb.gen.ast; - -import com.rethinkdb.gen.proto.TermType; -import com.rethinkdb.gen.exc.ReqlDriverError; -import com.rethinkdb.model.Arguments; -import com.rethinkdb.model.OptArgs; -import com.rethinkdb.ast.ReqlAst; - - - -public class Append extends ReqlExpr { - - - public Append(Object arg) { - this(new Arguments(arg), null); - } - public Append(Arguments args){ - this(args, null); - } - public Append(Arguments args, OptArgs optargs) { - super(TermType.APPEND, args, optargs); - } - -} diff --git a/drivers/java/src/main/java/com/rethinkdb/gen/ast/April.java b/drivers/java/src/main/java/com/rethinkdb/gen/ast/April.java deleted file mode 100644 index b7f21b4ff90..00000000000 --- a/drivers/java/src/main/java/com/rethinkdb/gen/ast/April.java +++ /dev/null @@ -1,29 +0,0 @@ -// Autogenerated by metajava.py. -// Do not edit this file directly. -// The template for this file is located at: -// ../../../../../../../../templates/AstSubclass.java - -package com.rethinkdb.gen.ast; - -import com.rethinkdb.gen.proto.TermType; -import com.rethinkdb.gen.exc.ReqlDriverError; -import com.rethinkdb.model.Arguments; -import com.rethinkdb.model.OptArgs; -import com.rethinkdb.ast.ReqlAst; - - - -public class April extends ReqlExpr { - - - public April(Object arg) { - this(new Arguments(arg), null); - } - public April(Arguments args){ - this(args, null); - } - public April(Arguments args, OptArgs optargs) { - super(TermType.APRIL, args, optargs); - } - -} diff --git a/drivers/java/src/main/java/com/rethinkdb/gen/ast/Args.java b/drivers/java/src/main/java/com/rethinkdb/gen/ast/Args.java deleted file mode 100644 index 85522f7b94d..00000000000 --- a/drivers/java/src/main/java/com/rethinkdb/gen/ast/Args.java +++ /dev/null @@ -1,29 +0,0 @@ -// Autogenerated by metajava.py. -// Do not edit this file directly. -// The template for this file is located at: -// ../../../../../../../../templates/AstSubclass.java - -package com.rethinkdb.gen.ast; - -import com.rethinkdb.gen.proto.TermType; -import com.rethinkdb.gen.exc.ReqlDriverError; -import com.rethinkdb.model.Arguments; -import com.rethinkdb.model.OptArgs; -import com.rethinkdb.ast.ReqlAst; - - - -public class Args extends ReqlExpr { - - - public Args(Object arg) { - this(new Arguments(arg), null); - } - public Args(Arguments args){ - this(args, null); - } - public Args(Arguments args, OptArgs optargs) { - super(TermType.ARGS, args, optargs); - } - -} diff --git a/drivers/java/src/main/java/com/rethinkdb/gen/ast/Asc.java b/drivers/java/src/main/java/com/rethinkdb/gen/ast/Asc.java deleted file mode 100644 index 8c55a5ee3dd..00000000000 --- a/drivers/java/src/main/java/com/rethinkdb/gen/ast/Asc.java +++ /dev/null @@ -1,29 +0,0 @@ -// Autogenerated by metajava.py. -// Do not edit this file directly. -// The template for this file is located at: -// ../../../../../../../../templates/AstSubclass.java - -package com.rethinkdb.gen.ast; - -import com.rethinkdb.gen.proto.TermType; -import com.rethinkdb.gen.exc.ReqlDriverError; -import com.rethinkdb.model.Arguments; -import com.rethinkdb.model.OptArgs; -import com.rethinkdb.ast.ReqlAst; - - - -public class Asc extends ReqlExpr { - - - public Asc(Object arg) { - this(new Arguments(arg), null); - } - public Asc(Arguments args){ - this(args, null); - } - public Asc(Arguments args, OptArgs optargs) { - super(TermType.ASC, args, optargs); - } - -} diff --git a/drivers/java/src/main/java/com/rethinkdb/gen/ast/August.java b/drivers/java/src/main/java/com/rethinkdb/gen/ast/August.java deleted file mode 100644 index 20cd5e8dae2..00000000000 --- a/drivers/java/src/main/java/com/rethinkdb/gen/ast/August.java +++ /dev/null @@ -1,29 +0,0 @@ -// Autogenerated by metajava.py. -// Do not edit this file directly. -// The template for this file is located at: -// ../../../../../../../../templates/AstSubclass.java - -package com.rethinkdb.gen.ast; - -import com.rethinkdb.gen.proto.TermType; -import com.rethinkdb.gen.exc.ReqlDriverError; -import com.rethinkdb.model.Arguments; -import com.rethinkdb.model.OptArgs; -import com.rethinkdb.ast.ReqlAst; - - - -public class August extends ReqlExpr { - - - public August(Object arg) { - this(new Arguments(arg), null); - } - public August(Arguments args){ - this(args, null); - } - public August(Arguments args, OptArgs optargs) { - super(TermType.AUGUST, args, optargs); - } - -} diff --git a/drivers/java/src/main/java/com/rethinkdb/gen/ast/Avg.java b/drivers/java/src/main/java/com/rethinkdb/gen/ast/Avg.java deleted file mode 100644 index b873d698391..00000000000 --- a/drivers/java/src/main/java/com/rethinkdb/gen/ast/Avg.java +++ /dev/null @@ -1,29 +0,0 @@ -// Autogenerated by metajava.py. -// Do not edit this file directly. -// The template for this file is located at: -// ../../../../../../../../templates/AstSubclass.java - -package com.rethinkdb.gen.ast; - -import com.rethinkdb.gen.proto.TermType; -import com.rethinkdb.gen.exc.ReqlDriverError; -import com.rethinkdb.model.Arguments; -import com.rethinkdb.model.OptArgs; -import com.rethinkdb.ast.ReqlAst; - - - -public class Avg extends ReqlExpr { - - - public Avg(Object arg) { - this(new Arguments(arg), null); - } - public Avg(Arguments args){ - this(args, null); - } - public Avg(Arguments args, OptArgs optargs) { - super(TermType.AVG, args, optargs); - } - -} diff --git a/drivers/java/src/main/java/com/rethinkdb/gen/ast/Between.java b/drivers/java/src/main/java/com/rethinkdb/gen/ast/Between.java deleted file mode 100644 index d2074716fc1..00000000000 --- a/drivers/java/src/main/java/com/rethinkdb/gen/ast/Between.java +++ /dev/null @@ -1,53 +0,0 @@ -// Autogenerated by metajava.py. -// Do not edit this file directly. -// The template for this file is located at: -// ../../../../../../../../templates/AstSubclass.java - -package com.rethinkdb.gen.ast; - -import com.rethinkdb.gen.proto.TermType; -import com.rethinkdb.gen.exc.ReqlDriverError; -import com.rethinkdb.model.Arguments; -import com.rethinkdb.model.OptArgs; -import com.rethinkdb.ast.ReqlAst; - - - -public class Between extends ReqlExpr { - - - public Between(Object arg) { - this(new Arguments(arg), null); - } - public Between(Arguments args){ - this(args, null); - } - public Between(Arguments args, OptArgs optargs) { - super(TermType.BETWEEN, args, optargs); - } - public Between optArg(String optname, Object value) { - OptArgs newOptargs = OptArgs.fromMap(optargs).with(optname, value); - return new Between(args, newOptargs); - } - public Between optArg(String optname, ReqlFunction0 value) { - OptArgs newOptargs = OptArgs.fromMap(optargs).with(optname, value); - return new Between(args, newOptargs); - } - public Between optArg(String optname, ReqlFunction1 value) { - OptArgs newOptargs = OptArgs.fromMap(optargs).with(optname, value); - return new Between(args, newOptargs); - } - public Between optArg(String optname, ReqlFunction2 value) { - OptArgs newOptargs = OptArgs.fromMap(optargs).with(optname, value); - return new Between(args, newOptargs); - } - public Between optArg(String optname, ReqlFunction3 value) { - OptArgs newOptargs = OptArgs.fromMap(optargs).with(optname, value); - return new Between(args, newOptargs); - } - public Between optArg(String optname, ReqlFunction4 value) { - OptArgs newOptargs = OptArgs.fromMap(optargs).with(optname, value); - return new Between(args, newOptargs); - } - -} diff --git a/drivers/java/src/main/java/com/rethinkdb/gen/ast/Binary.java b/drivers/java/src/main/java/com/rethinkdb/gen/ast/Binary.java deleted file mode 100644 index c596a848325..00000000000 --- a/drivers/java/src/main/java/com/rethinkdb/gen/ast/Binary.java +++ /dev/null @@ -1,50 +0,0 @@ -// Autogenerated by metajava.py. -// Do not edit this file directly. -// The template for this file is located at: -// ../../../../../../../../templates/ast/Binary.java - -package com.rethinkdb.gen.ast; - -import com.rethinkdb.gen.proto.TermType; -import com.rethinkdb.gen.exc.ReqlDriverError; -import com.rethinkdb.model.Arguments; -import com.rethinkdb.model.OptArgs; -import com.rethinkdb.ast.ReqlAst; - - -import com.rethinkdb.net.Converter; -import java.util.Optional; - - -public class Binary extends ReqlExpr { - - Optional b64Data = Optional.empty(); - - - public Binary(byte[] bytes){ - this(new Arguments()); - b64Data = Optional.of(bytes); - } - public Binary(Object arg) { - this(new Arguments(arg), null); - } - public Binary(Arguments args){ - this(args, null); - } - public Binary(Arguments args, OptArgs optargs) { - this(TermType.BINARY, args, optargs); - } - protected Binary(TermType termType, Arguments args, OptArgs optargs){ - super(termType, args, optargs); - } - - - @Override - public Object build(){ - if(b64Data.isPresent()){ - return Converter.toBinary(b64Data.get()); - }else{ - return super.build(); - } - } -} diff --git a/drivers/java/src/main/java/com/rethinkdb/gen/ast/Bracket.java b/drivers/java/src/main/java/com/rethinkdb/gen/ast/Bracket.java deleted file mode 100644 index c92444d1ab7..00000000000 --- a/drivers/java/src/main/java/com/rethinkdb/gen/ast/Bracket.java +++ /dev/null @@ -1,29 +0,0 @@ -// Autogenerated by metajava.py. -// Do not edit this file directly. -// The template for this file is located at: -// ../../../../../../../../templates/AstSubclass.java - -package com.rethinkdb.gen.ast; - -import com.rethinkdb.gen.proto.TermType; -import com.rethinkdb.gen.exc.ReqlDriverError; -import com.rethinkdb.model.Arguments; -import com.rethinkdb.model.OptArgs; -import com.rethinkdb.ast.ReqlAst; - - - -public class Bracket extends ReqlExpr { - - - public Bracket(Object arg) { - this(new Arguments(arg), null); - } - public Bracket(Arguments args){ - this(args, null); - } - public Bracket(Arguments args, OptArgs optargs) { - super(TermType.BRACKET, args, optargs); - } - -} diff --git a/drivers/java/src/main/java/com/rethinkdb/gen/ast/Branch.java b/drivers/java/src/main/java/com/rethinkdb/gen/ast/Branch.java deleted file mode 100644 index f33be39f746..00000000000 --- a/drivers/java/src/main/java/com/rethinkdb/gen/ast/Branch.java +++ /dev/null @@ -1,29 +0,0 @@ -// Autogenerated by metajava.py. -// Do not edit this file directly. -// The template for this file is located at: -// ../../../../../../../../templates/AstSubclass.java - -package com.rethinkdb.gen.ast; - -import com.rethinkdb.gen.proto.TermType; -import com.rethinkdb.gen.exc.ReqlDriverError; -import com.rethinkdb.model.Arguments; -import com.rethinkdb.model.OptArgs; -import com.rethinkdb.ast.ReqlAst; - - - -public class Branch extends ReqlExpr { - - - public Branch(Object arg) { - this(new Arguments(arg), null); - } - public Branch(Arguments args){ - this(args, null); - } - public Branch(Arguments args, OptArgs optargs) { - super(TermType.BRANCH, args, optargs); - } - -} diff --git a/drivers/java/src/main/java/com/rethinkdb/gen/ast/Ceil.java b/drivers/java/src/main/java/com/rethinkdb/gen/ast/Ceil.java deleted file mode 100644 index 53afd64a0dc..00000000000 --- a/drivers/java/src/main/java/com/rethinkdb/gen/ast/Ceil.java +++ /dev/null @@ -1,29 +0,0 @@ -// Autogenerated by metajava.py. -// Do not edit this file directly. -// The template for this file is located at: -// ../../../../../../../../templates/AstSubclass.java - -package com.rethinkdb.gen.ast; - -import com.rethinkdb.gen.proto.TermType; -import com.rethinkdb.gen.exc.ReqlDriverError; -import com.rethinkdb.model.Arguments; -import com.rethinkdb.model.OptArgs; -import com.rethinkdb.ast.ReqlAst; - - - -public class Ceil extends ReqlExpr { - - - public Ceil(Object arg) { - this(new Arguments(arg), null); - } - public Ceil(Arguments args){ - this(args, null); - } - public Ceil(Arguments args, OptArgs optargs) { - super(TermType.CEIL, args, optargs); - } - -} diff --git a/drivers/java/src/main/java/com/rethinkdb/gen/ast/ChangeAt.java b/drivers/java/src/main/java/com/rethinkdb/gen/ast/ChangeAt.java deleted file mode 100644 index fe1ed6e5d07..00000000000 --- a/drivers/java/src/main/java/com/rethinkdb/gen/ast/ChangeAt.java +++ /dev/null @@ -1,29 +0,0 @@ -// Autogenerated by metajava.py. -// Do not edit this file directly. -// The template for this file is located at: -// ../../../../../../../../templates/AstSubclass.java - -package com.rethinkdb.gen.ast; - -import com.rethinkdb.gen.proto.TermType; -import com.rethinkdb.gen.exc.ReqlDriverError; -import com.rethinkdb.model.Arguments; -import com.rethinkdb.model.OptArgs; -import com.rethinkdb.ast.ReqlAst; - - - -public class ChangeAt extends ReqlExpr { - - - public ChangeAt(Object arg) { - this(new Arguments(arg), null); - } - public ChangeAt(Arguments args){ - this(args, null); - } - public ChangeAt(Arguments args, OptArgs optargs) { - super(TermType.CHANGE_AT, args, optargs); - } - -} diff --git a/drivers/java/src/main/java/com/rethinkdb/gen/ast/Changes.java b/drivers/java/src/main/java/com/rethinkdb/gen/ast/Changes.java deleted file mode 100644 index c20f94d792f..00000000000 --- a/drivers/java/src/main/java/com/rethinkdb/gen/ast/Changes.java +++ /dev/null @@ -1,53 +0,0 @@ -// Autogenerated by metajava.py. -// Do not edit this file directly. -// The template for this file is located at: -// ../../../../../../../../templates/AstSubclass.java - -package com.rethinkdb.gen.ast; - -import com.rethinkdb.gen.proto.TermType; -import com.rethinkdb.gen.exc.ReqlDriverError; -import com.rethinkdb.model.Arguments; -import com.rethinkdb.model.OptArgs; -import com.rethinkdb.ast.ReqlAst; - - - -public class Changes extends ReqlExpr { - - - public Changes(Object arg) { - this(new Arguments(arg), null); - } - public Changes(Arguments args){ - this(args, null); - } - public Changes(Arguments args, OptArgs optargs) { - super(TermType.CHANGES, args, optargs); - } - public Changes optArg(String optname, Object value) { - OptArgs newOptargs = OptArgs.fromMap(optargs).with(optname, value); - return new Changes(args, newOptargs); - } - public Changes optArg(String optname, ReqlFunction0 value) { - OptArgs newOptargs = OptArgs.fromMap(optargs).with(optname, value); - return new Changes(args, newOptargs); - } - public Changes optArg(String optname, ReqlFunction1 value) { - OptArgs newOptargs = OptArgs.fromMap(optargs).with(optname, value); - return new Changes(args, newOptargs); - } - public Changes optArg(String optname, ReqlFunction2 value) { - OptArgs newOptargs = OptArgs.fromMap(optargs).with(optname, value); - return new Changes(args, newOptargs); - } - public Changes optArg(String optname, ReqlFunction3 value) { - OptArgs newOptargs = OptArgs.fromMap(optargs).with(optname, value); - return new Changes(args, newOptargs); - } - public Changes optArg(String optname, ReqlFunction4 value) { - OptArgs newOptargs = OptArgs.fromMap(optargs).with(optname, value); - return new Changes(args, newOptargs); - } - -} diff --git a/drivers/java/src/main/java/com/rethinkdb/gen/ast/Circle.java b/drivers/java/src/main/java/com/rethinkdb/gen/ast/Circle.java deleted file mode 100644 index 2bfd72c915e..00000000000 --- a/drivers/java/src/main/java/com/rethinkdb/gen/ast/Circle.java +++ /dev/null @@ -1,53 +0,0 @@ -// Autogenerated by metajava.py. -// Do not edit this file directly. -// The template for this file is located at: -// ../../../../../../../../templates/AstSubclass.java - -package com.rethinkdb.gen.ast; - -import com.rethinkdb.gen.proto.TermType; -import com.rethinkdb.gen.exc.ReqlDriverError; -import com.rethinkdb.model.Arguments; -import com.rethinkdb.model.OptArgs; -import com.rethinkdb.ast.ReqlAst; - - - -public class Circle extends ReqlExpr { - - - public Circle(Object arg) { - this(new Arguments(arg), null); - } - public Circle(Arguments args){ - this(args, null); - } - public Circle(Arguments args, OptArgs optargs) { - super(TermType.CIRCLE, args, optargs); - } - public Circle optArg(String optname, Object value) { - OptArgs newOptargs = OptArgs.fromMap(optargs).with(optname, value); - return new Circle(args, newOptargs); - } - public Circle optArg(String optname, ReqlFunction0 value) { - OptArgs newOptargs = OptArgs.fromMap(optargs).with(optname, value); - return new Circle(args, newOptargs); - } - public Circle optArg(String optname, ReqlFunction1 value) { - OptArgs newOptargs = OptArgs.fromMap(optargs).with(optname, value); - return new Circle(args, newOptargs); - } - public Circle optArg(String optname, ReqlFunction2 value) { - OptArgs newOptargs = OptArgs.fromMap(optargs).with(optname, value); - return new Circle(args, newOptargs); - } - public Circle optArg(String optname, ReqlFunction3 value) { - OptArgs newOptargs = OptArgs.fromMap(optargs).with(optname, value); - return new Circle(args, newOptargs); - } - public Circle optArg(String optname, ReqlFunction4 value) { - OptArgs newOptargs = OptArgs.fromMap(optargs).with(optname, value); - return new Circle(args, newOptargs); - } - -} diff --git a/drivers/java/src/main/java/com/rethinkdb/gen/ast/CoerceTo.java b/drivers/java/src/main/java/com/rethinkdb/gen/ast/CoerceTo.java deleted file mode 100644 index 66debf3aff1..00000000000 --- a/drivers/java/src/main/java/com/rethinkdb/gen/ast/CoerceTo.java +++ /dev/null @@ -1,29 +0,0 @@ -// Autogenerated by metajava.py. -// Do not edit this file directly. -// The template for this file is located at: -// ../../../../../../../../templates/AstSubclass.java - -package com.rethinkdb.gen.ast; - -import com.rethinkdb.gen.proto.TermType; -import com.rethinkdb.gen.exc.ReqlDriverError; -import com.rethinkdb.model.Arguments; -import com.rethinkdb.model.OptArgs; -import com.rethinkdb.ast.ReqlAst; - - - -public class CoerceTo extends ReqlExpr { - - - public CoerceTo(Object arg) { - this(new Arguments(arg), null); - } - public CoerceTo(Arguments args){ - this(args, null); - } - public CoerceTo(Arguments args, OptArgs optargs) { - super(TermType.COERCE_TO, args, optargs); - } - -} diff --git a/drivers/java/src/main/java/com/rethinkdb/gen/ast/ConcatMap.java b/drivers/java/src/main/java/com/rethinkdb/gen/ast/ConcatMap.java deleted file mode 100644 index 16eb5b23f9f..00000000000 --- a/drivers/java/src/main/java/com/rethinkdb/gen/ast/ConcatMap.java +++ /dev/null @@ -1,29 +0,0 @@ -// Autogenerated by metajava.py. -// Do not edit this file directly. -// The template for this file is located at: -// ../../../../../../../../templates/AstSubclass.java - -package com.rethinkdb.gen.ast; - -import com.rethinkdb.gen.proto.TermType; -import com.rethinkdb.gen.exc.ReqlDriverError; -import com.rethinkdb.model.Arguments; -import com.rethinkdb.model.OptArgs; -import com.rethinkdb.ast.ReqlAst; - - - -public class ConcatMap extends ReqlExpr { - - - public ConcatMap(Object arg) { - this(new Arguments(arg), null); - } - public ConcatMap(Arguments args){ - this(args, null); - } - public ConcatMap(Arguments args, OptArgs optargs) { - super(TermType.CONCAT_MAP, args, optargs); - } - -} diff --git a/drivers/java/src/main/java/com/rethinkdb/gen/ast/Config.java b/drivers/java/src/main/java/com/rethinkdb/gen/ast/Config.java deleted file mode 100644 index 3a993dcf846..00000000000 --- a/drivers/java/src/main/java/com/rethinkdb/gen/ast/Config.java +++ /dev/null @@ -1,29 +0,0 @@ -// Autogenerated by metajava.py. -// Do not edit this file directly. -// The template for this file is located at: -// ../../../../../../../../templates/AstSubclass.java - -package com.rethinkdb.gen.ast; - -import com.rethinkdb.gen.proto.TermType; -import com.rethinkdb.gen.exc.ReqlDriverError; -import com.rethinkdb.model.Arguments; -import com.rethinkdb.model.OptArgs; -import com.rethinkdb.ast.ReqlAst; - - - -public class Config extends ReqlExpr { - - - public Config(Object arg) { - this(new Arguments(arg), null); - } - public Config(Arguments args){ - this(args, null); - } - public Config(Arguments args, OptArgs optargs) { - super(TermType.CONFIG, args, optargs); - } - -} diff --git a/drivers/java/src/main/java/com/rethinkdb/gen/ast/Contains.java b/drivers/java/src/main/java/com/rethinkdb/gen/ast/Contains.java deleted file mode 100644 index 0fb635aae5d..00000000000 --- a/drivers/java/src/main/java/com/rethinkdb/gen/ast/Contains.java +++ /dev/null @@ -1,29 +0,0 @@ -// Autogenerated by metajava.py. -// Do not edit this file directly. -// The template for this file is located at: -// ../../../../../../../../templates/AstSubclass.java - -package com.rethinkdb.gen.ast; - -import com.rethinkdb.gen.proto.TermType; -import com.rethinkdb.gen.exc.ReqlDriverError; -import com.rethinkdb.model.Arguments; -import com.rethinkdb.model.OptArgs; -import com.rethinkdb.ast.ReqlAst; - - - -public class Contains extends ReqlExpr { - - - public Contains(Object arg) { - this(new Arguments(arg), null); - } - public Contains(Arguments args){ - this(args, null); - } - public Contains(Arguments args, OptArgs optargs) { - super(TermType.CONTAINS, args, optargs); - } - -} diff --git a/drivers/java/src/main/java/com/rethinkdb/gen/ast/Count.java b/drivers/java/src/main/java/com/rethinkdb/gen/ast/Count.java deleted file mode 100644 index 81d4edd3e0c..00000000000 --- a/drivers/java/src/main/java/com/rethinkdb/gen/ast/Count.java +++ /dev/null @@ -1,29 +0,0 @@ -// Autogenerated by metajava.py. -// Do not edit this file directly. -// The template for this file is located at: -// ../../../../../../../../templates/AstSubclass.java - -package com.rethinkdb.gen.ast; - -import com.rethinkdb.gen.proto.TermType; -import com.rethinkdb.gen.exc.ReqlDriverError; -import com.rethinkdb.model.Arguments; -import com.rethinkdb.model.OptArgs; -import com.rethinkdb.ast.ReqlAst; - - - -public class Count extends ReqlExpr { - - - public Count(Object arg) { - this(new Arguments(arg), null); - } - public Count(Arguments args){ - this(args, null); - } - public Count(Arguments args, OptArgs optargs) { - super(TermType.COUNT, args, optargs); - } - -} diff --git a/drivers/java/src/main/java/com/rethinkdb/gen/ast/Date.java b/drivers/java/src/main/java/com/rethinkdb/gen/ast/Date.java deleted file mode 100644 index 798a9c3630e..00000000000 --- a/drivers/java/src/main/java/com/rethinkdb/gen/ast/Date.java +++ /dev/null @@ -1,29 +0,0 @@ -// Autogenerated by metajava.py. -// Do not edit this file directly. -// The template for this file is located at: -// ../../../../../../../../templates/AstSubclass.java - -package com.rethinkdb.gen.ast; - -import com.rethinkdb.gen.proto.TermType; -import com.rethinkdb.gen.exc.ReqlDriverError; -import com.rethinkdb.model.Arguments; -import com.rethinkdb.model.OptArgs; -import com.rethinkdb.ast.ReqlAst; - - - -public class Date extends ReqlExpr { - - - public Date(Object arg) { - this(new Arguments(arg), null); - } - public Date(Arguments args){ - this(args, null); - } - public Date(Arguments args, OptArgs optargs) { - super(TermType.DATE, args, optargs); - } - -} diff --git a/drivers/java/src/main/java/com/rethinkdb/gen/ast/Datum.java b/drivers/java/src/main/java/com/rethinkdb/gen/ast/Datum.java deleted file mode 100644 index 4d78dae62c0..00000000000 --- a/drivers/java/src/main/java/com/rethinkdb/gen/ast/Datum.java +++ /dev/null @@ -1,32 +0,0 @@ -// Autogenerated by metajava.py. -// Do not edit this file directly. -// The template for this file is located at: -// ../../../../../../../../templates/ast/Datum.java - -package com.rethinkdb.gen.ast; - -import com.rethinkdb.gen.proto.TermType; -import com.rethinkdb.gen.exc.ReqlDriverError; -import com.rethinkdb.model.Arguments; -import com.rethinkdb.model.OptArgs; -import com.rethinkdb.ast.ReqlAst; - - - -public class Datum extends ReqlExpr { - - public final java.lang.Object datum; - - public Datum(java.lang.Object arg) { - super(TermType.DATUM, null, null); - datum = arg; - } - - - @Override - protected Object build() { - // Overridden because Datums are leaf-nodes and therefore - // don't contain lower ReqlAst objects. - return datum; - } -} diff --git a/drivers/java/src/main/java/com/rethinkdb/gen/ast/Day.java b/drivers/java/src/main/java/com/rethinkdb/gen/ast/Day.java deleted file mode 100644 index 5ed2d829bed..00000000000 --- a/drivers/java/src/main/java/com/rethinkdb/gen/ast/Day.java +++ /dev/null @@ -1,29 +0,0 @@ -// Autogenerated by metajava.py. -// Do not edit this file directly. -// The template for this file is located at: -// ../../../../../../../../templates/AstSubclass.java - -package com.rethinkdb.gen.ast; - -import com.rethinkdb.gen.proto.TermType; -import com.rethinkdb.gen.exc.ReqlDriverError; -import com.rethinkdb.model.Arguments; -import com.rethinkdb.model.OptArgs; -import com.rethinkdb.ast.ReqlAst; - - - -public class Day extends ReqlExpr { - - - public Day(Object arg) { - this(new Arguments(arg), null); - } - public Day(Arguments args){ - this(args, null); - } - public Day(Arguments args, OptArgs optargs) { - super(TermType.DAY, args, optargs); - } - -} diff --git a/drivers/java/src/main/java/com/rethinkdb/gen/ast/DayOfWeek.java b/drivers/java/src/main/java/com/rethinkdb/gen/ast/DayOfWeek.java deleted file mode 100644 index 0f0e241bd52..00000000000 --- a/drivers/java/src/main/java/com/rethinkdb/gen/ast/DayOfWeek.java +++ /dev/null @@ -1,29 +0,0 @@ -// Autogenerated by metajava.py. -// Do not edit this file directly. -// The template for this file is located at: -// ../../../../../../../../templates/AstSubclass.java - -package com.rethinkdb.gen.ast; - -import com.rethinkdb.gen.proto.TermType; -import com.rethinkdb.gen.exc.ReqlDriverError; -import com.rethinkdb.model.Arguments; -import com.rethinkdb.model.OptArgs; -import com.rethinkdb.ast.ReqlAst; - - - -public class DayOfWeek extends ReqlExpr { - - - public DayOfWeek(Object arg) { - this(new Arguments(arg), null); - } - public DayOfWeek(Arguments args){ - this(args, null); - } - public DayOfWeek(Arguments args, OptArgs optargs) { - super(TermType.DAY_OF_WEEK, args, optargs); - } - -} diff --git a/drivers/java/src/main/java/com/rethinkdb/gen/ast/DayOfYear.java b/drivers/java/src/main/java/com/rethinkdb/gen/ast/DayOfYear.java deleted file mode 100644 index beaa99d1116..00000000000 --- a/drivers/java/src/main/java/com/rethinkdb/gen/ast/DayOfYear.java +++ /dev/null @@ -1,29 +0,0 @@ -// Autogenerated by metajava.py. -// Do not edit this file directly. -// The template for this file is located at: -// ../../../../../../../../templates/AstSubclass.java - -package com.rethinkdb.gen.ast; - -import com.rethinkdb.gen.proto.TermType; -import com.rethinkdb.gen.exc.ReqlDriverError; -import com.rethinkdb.model.Arguments; -import com.rethinkdb.model.OptArgs; -import com.rethinkdb.ast.ReqlAst; - - - -public class DayOfYear extends ReqlExpr { - - - public DayOfYear(Object arg) { - this(new Arguments(arg), null); - } - public DayOfYear(Arguments args){ - this(args, null); - } - public DayOfYear(Arguments args, OptArgs optargs) { - super(TermType.DAY_OF_YEAR, args, optargs); - } - -} diff --git a/drivers/java/src/main/java/com/rethinkdb/gen/ast/Db.java b/drivers/java/src/main/java/com/rethinkdb/gen/ast/Db.java deleted file mode 100644 index d87db78d7fe..00000000000 --- a/drivers/java/src/main/java/com/rethinkdb/gen/ast/Db.java +++ /dev/null @@ -1,74 +0,0 @@ -// Autogenerated by metajava.py. -// Do not edit this file directly. -// The template for this file is located at: -// ../../../../../../../../templates/AstSubclass.java - -package com.rethinkdb.gen.ast; - -import com.rethinkdb.gen.proto.TermType; -import com.rethinkdb.gen.exc.ReqlDriverError; -import com.rethinkdb.model.Arguments; -import com.rethinkdb.model.OptArgs; -import com.rethinkdb.ast.ReqlAst; - - - -public class Db extends ReqlAst { - - - public Db(Object arg) { - this(new Arguments(arg), null); - } - public Db(Arguments args){ - this(args, null); - } - public Db(Arguments args, OptArgs optargs) { - super(TermType.DB, args, optargs); - } - - public Table table(Object expr) { - Arguments arguments = new Arguments(this); - arguments.coerceAndAdd(expr); - return new Table(arguments); - } - public TableCreate tableCreate(Object expr) { - Arguments arguments = new Arguments(this); - arguments.coerceAndAdd(expr); - return new TableCreate(arguments); - } - public TableDrop tableDrop(Object expr) { - Arguments arguments = new Arguments(this); - arguments.coerceAndAdd(expr); - return new TableDrop(arguments); - } - public TableList tableList() { - Arguments arguments = new Arguments(this); - return new TableList(arguments); - } - public Config config() { - Arguments arguments = new Arguments(this); - return new Config(arguments); - } - public Wait wait_() { - Arguments arguments = new Arguments(this); - return new Wait(arguments); - } - public Reconfigure reconfigure() { - Arguments arguments = new Arguments(this); - return new Reconfigure(arguments); - } - public Rebalance rebalance() { - Arguments arguments = new Arguments(this); - return new Rebalance(arguments); - } - public Grant grant(Object expr, Object exprA) { - Arguments arguments = new Arguments(this); - arguments.coerceAndAdd(expr); - arguments.coerceAndAdd(exprA); - return new Grant(arguments); - } - public Info info() { - Arguments arguments = new Arguments(this); - return new Info(arguments); - } -} diff --git a/drivers/java/src/main/java/com/rethinkdb/gen/ast/DbCreate.java b/drivers/java/src/main/java/com/rethinkdb/gen/ast/DbCreate.java deleted file mode 100644 index 03d9df239ea..00000000000 --- a/drivers/java/src/main/java/com/rethinkdb/gen/ast/DbCreate.java +++ /dev/null @@ -1,29 +0,0 @@ -// Autogenerated by metajava.py. -// Do not edit this file directly. -// The template for this file is located at: -// ../../../../../../../../templates/AstSubclass.java - -package com.rethinkdb.gen.ast; - -import com.rethinkdb.gen.proto.TermType; -import com.rethinkdb.gen.exc.ReqlDriverError; -import com.rethinkdb.model.Arguments; -import com.rethinkdb.model.OptArgs; -import com.rethinkdb.ast.ReqlAst; - - - -public class DbCreate extends ReqlExpr { - - - public DbCreate(Object arg) { - this(new Arguments(arg), null); - } - public DbCreate(Arguments args){ - this(args, null); - } - public DbCreate(Arguments args, OptArgs optargs) { - super(TermType.DB_CREATE, args, optargs); - } - -} diff --git a/drivers/java/src/main/java/com/rethinkdb/gen/ast/DbDrop.java b/drivers/java/src/main/java/com/rethinkdb/gen/ast/DbDrop.java deleted file mode 100644 index 7db64286d4a..00000000000 --- a/drivers/java/src/main/java/com/rethinkdb/gen/ast/DbDrop.java +++ /dev/null @@ -1,29 +0,0 @@ -// Autogenerated by metajava.py. -// Do not edit this file directly. -// The template for this file is located at: -// ../../../../../../../../templates/AstSubclass.java - -package com.rethinkdb.gen.ast; - -import com.rethinkdb.gen.proto.TermType; -import com.rethinkdb.gen.exc.ReqlDriverError; -import com.rethinkdb.model.Arguments; -import com.rethinkdb.model.OptArgs; -import com.rethinkdb.ast.ReqlAst; - - - -public class DbDrop extends ReqlExpr { - - - public DbDrop(Object arg) { - this(new Arguments(arg), null); - } - public DbDrop(Arguments args){ - this(args, null); - } - public DbDrop(Arguments args, OptArgs optargs) { - super(TermType.DB_DROP, args, optargs); - } - -} diff --git a/drivers/java/src/main/java/com/rethinkdb/gen/ast/DbList.java b/drivers/java/src/main/java/com/rethinkdb/gen/ast/DbList.java deleted file mode 100644 index ac53e39505d..00000000000 --- a/drivers/java/src/main/java/com/rethinkdb/gen/ast/DbList.java +++ /dev/null @@ -1,29 +0,0 @@ -// Autogenerated by metajava.py. -// Do not edit this file directly. -// The template for this file is located at: -// ../../../../../../../../templates/AstSubclass.java - -package com.rethinkdb.gen.ast; - -import com.rethinkdb.gen.proto.TermType; -import com.rethinkdb.gen.exc.ReqlDriverError; -import com.rethinkdb.model.Arguments; -import com.rethinkdb.model.OptArgs; -import com.rethinkdb.ast.ReqlAst; - - - -public class DbList extends ReqlExpr { - - - public DbList(Object arg) { - this(new Arguments(arg), null); - } - public DbList(Arguments args){ - this(args, null); - } - public DbList(Arguments args, OptArgs optargs) { - super(TermType.DB_LIST, args, optargs); - } - -} diff --git a/drivers/java/src/main/java/com/rethinkdb/gen/ast/December.java b/drivers/java/src/main/java/com/rethinkdb/gen/ast/December.java deleted file mode 100644 index bae791dc60d..00000000000 --- a/drivers/java/src/main/java/com/rethinkdb/gen/ast/December.java +++ /dev/null @@ -1,29 +0,0 @@ -// Autogenerated by metajava.py. -// Do not edit this file directly. -// The template for this file is located at: -// ../../../../../../../../templates/AstSubclass.java - -package com.rethinkdb.gen.ast; - -import com.rethinkdb.gen.proto.TermType; -import com.rethinkdb.gen.exc.ReqlDriverError; -import com.rethinkdb.model.Arguments; -import com.rethinkdb.model.OptArgs; -import com.rethinkdb.ast.ReqlAst; - - - -public class December extends ReqlExpr { - - - public December(Object arg) { - this(new Arguments(arg), null); - } - public December(Arguments args){ - this(args, null); - } - public December(Arguments args, OptArgs optargs) { - super(TermType.DECEMBER, args, optargs); - } - -} diff --git a/drivers/java/src/main/java/com/rethinkdb/gen/ast/Default.java b/drivers/java/src/main/java/com/rethinkdb/gen/ast/Default.java deleted file mode 100644 index f648bd44711..00000000000 --- a/drivers/java/src/main/java/com/rethinkdb/gen/ast/Default.java +++ /dev/null @@ -1,29 +0,0 @@ -// Autogenerated by metajava.py. -// Do not edit this file directly. -// The template for this file is located at: -// ../../../../../../../../templates/AstSubclass.java - -package com.rethinkdb.gen.ast; - -import com.rethinkdb.gen.proto.TermType; -import com.rethinkdb.gen.exc.ReqlDriverError; -import com.rethinkdb.model.Arguments; -import com.rethinkdb.model.OptArgs; -import com.rethinkdb.ast.ReqlAst; - - - -public class Default extends ReqlExpr { - - - public Default(Object arg) { - this(new Arguments(arg), null); - } - public Default(Arguments args){ - this(args, null); - } - public Default(Arguments args, OptArgs optargs) { - super(TermType.DEFAULT, args, optargs); - } - -} diff --git a/drivers/java/src/main/java/com/rethinkdb/gen/ast/Delete.java b/drivers/java/src/main/java/com/rethinkdb/gen/ast/Delete.java deleted file mode 100644 index fb8d73cd608..00000000000 --- a/drivers/java/src/main/java/com/rethinkdb/gen/ast/Delete.java +++ /dev/null @@ -1,53 +0,0 @@ -// Autogenerated by metajava.py. -// Do not edit this file directly. -// The template for this file is located at: -// ../../../../../../../../templates/AstSubclass.java - -package com.rethinkdb.gen.ast; - -import com.rethinkdb.gen.proto.TermType; -import com.rethinkdb.gen.exc.ReqlDriverError; -import com.rethinkdb.model.Arguments; -import com.rethinkdb.model.OptArgs; -import com.rethinkdb.ast.ReqlAst; - - - -public class Delete extends ReqlExpr { - - - public Delete(Object arg) { - this(new Arguments(arg), null); - } - public Delete(Arguments args){ - this(args, null); - } - public Delete(Arguments args, OptArgs optargs) { - super(TermType.DELETE, args, optargs); - } - public Delete optArg(String optname, Object value) { - OptArgs newOptargs = OptArgs.fromMap(optargs).with(optname, value); - return new Delete(args, newOptargs); - } - public Delete optArg(String optname, ReqlFunction0 value) { - OptArgs newOptargs = OptArgs.fromMap(optargs).with(optname, value); - return new Delete(args, newOptargs); - } - public Delete optArg(String optname, ReqlFunction1 value) { - OptArgs newOptargs = OptArgs.fromMap(optargs).with(optname, value); - return new Delete(args, newOptargs); - } - public Delete optArg(String optname, ReqlFunction2 value) { - OptArgs newOptargs = OptArgs.fromMap(optargs).with(optname, value); - return new Delete(args, newOptargs); - } - public Delete optArg(String optname, ReqlFunction3 value) { - OptArgs newOptargs = OptArgs.fromMap(optargs).with(optname, value); - return new Delete(args, newOptargs); - } - public Delete optArg(String optname, ReqlFunction4 value) { - OptArgs newOptargs = OptArgs.fromMap(optargs).with(optname, value); - return new Delete(args, newOptargs); - } - -} diff --git a/drivers/java/src/main/java/com/rethinkdb/gen/ast/DeleteAt.java b/drivers/java/src/main/java/com/rethinkdb/gen/ast/DeleteAt.java deleted file mode 100644 index bf16d07465d..00000000000 --- a/drivers/java/src/main/java/com/rethinkdb/gen/ast/DeleteAt.java +++ /dev/null @@ -1,29 +0,0 @@ -// Autogenerated by metajava.py. -// Do not edit this file directly. -// The template for this file is located at: -// ../../../../../../../../templates/AstSubclass.java - -package com.rethinkdb.gen.ast; - -import com.rethinkdb.gen.proto.TermType; -import com.rethinkdb.gen.exc.ReqlDriverError; -import com.rethinkdb.model.Arguments; -import com.rethinkdb.model.OptArgs; -import com.rethinkdb.ast.ReqlAst; - - - -public class DeleteAt extends ReqlExpr { - - - public DeleteAt(Object arg) { - this(new Arguments(arg), null); - } - public DeleteAt(Arguments args){ - this(args, null); - } - public DeleteAt(Arguments args, OptArgs optargs) { - super(TermType.DELETE_AT, args, optargs); - } - -} diff --git a/drivers/java/src/main/java/com/rethinkdb/gen/ast/Desc.java b/drivers/java/src/main/java/com/rethinkdb/gen/ast/Desc.java deleted file mode 100644 index b70de5db0a5..00000000000 --- a/drivers/java/src/main/java/com/rethinkdb/gen/ast/Desc.java +++ /dev/null @@ -1,29 +0,0 @@ -// Autogenerated by metajava.py. -// Do not edit this file directly. -// The template for this file is located at: -// ../../../../../../../../templates/AstSubclass.java - -package com.rethinkdb.gen.ast; - -import com.rethinkdb.gen.proto.TermType; -import com.rethinkdb.gen.exc.ReqlDriverError; -import com.rethinkdb.model.Arguments; -import com.rethinkdb.model.OptArgs; -import com.rethinkdb.ast.ReqlAst; - - - -public class Desc extends ReqlExpr { - - - public Desc(Object arg) { - this(new Arguments(arg), null); - } - public Desc(Arguments args){ - this(args, null); - } - public Desc(Arguments args, OptArgs optargs) { - super(TermType.DESC, args, optargs); - } - -} diff --git a/drivers/java/src/main/java/com/rethinkdb/gen/ast/Difference.java b/drivers/java/src/main/java/com/rethinkdb/gen/ast/Difference.java deleted file mode 100644 index 7fbfeb9cbbc..00000000000 --- a/drivers/java/src/main/java/com/rethinkdb/gen/ast/Difference.java +++ /dev/null @@ -1,29 +0,0 @@ -// Autogenerated by metajava.py. -// Do not edit this file directly. -// The template for this file is located at: -// ../../../../../../../../templates/AstSubclass.java - -package com.rethinkdb.gen.ast; - -import com.rethinkdb.gen.proto.TermType; -import com.rethinkdb.gen.exc.ReqlDriverError; -import com.rethinkdb.model.Arguments; -import com.rethinkdb.model.OptArgs; -import com.rethinkdb.ast.ReqlAst; - - - -public class Difference extends ReqlExpr { - - - public Difference(Object arg) { - this(new Arguments(arg), null); - } - public Difference(Arguments args){ - this(args, null); - } - public Difference(Arguments args, OptArgs optargs) { - super(TermType.DIFFERENCE, args, optargs); - } - -} diff --git a/drivers/java/src/main/java/com/rethinkdb/gen/ast/Distance.java b/drivers/java/src/main/java/com/rethinkdb/gen/ast/Distance.java deleted file mode 100644 index 3f0a88a393c..00000000000 --- a/drivers/java/src/main/java/com/rethinkdb/gen/ast/Distance.java +++ /dev/null @@ -1,53 +0,0 @@ -// Autogenerated by metajava.py. -// Do not edit this file directly. -// The template for this file is located at: -// ../../../../../../../../templates/AstSubclass.java - -package com.rethinkdb.gen.ast; - -import com.rethinkdb.gen.proto.TermType; -import com.rethinkdb.gen.exc.ReqlDriverError; -import com.rethinkdb.model.Arguments; -import com.rethinkdb.model.OptArgs; -import com.rethinkdb.ast.ReqlAst; - - - -public class Distance extends ReqlExpr { - - - public Distance(Object arg) { - this(new Arguments(arg), null); - } - public Distance(Arguments args){ - this(args, null); - } - public Distance(Arguments args, OptArgs optargs) { - super(TermType.DISTANCE, args, optargs); - } - public Distance optArg(String optname, Object value) { - OptArgs newOptargs = OptArgs.fromMap(optargs).with(optname, value); - return new Distance(args, newOptargs); - } - public Distance optArg(String optname, ReqlFunction0 value) { - OptArgs newOptargs = OptArgs.fromMap(optargs).with(optname, value); - return new Distance(args, newOptargs); - } - public Distance optArg(String optname, ReqlFunction1 value) { - OptArgs newOptargs = OptArgs.fromMap(optargs).with(optname, value); - return new Distance(args, newOptargs); - } - public Distance optArg(String optname, ReqlFunction2 value) { - OptArgs newOptargs = OptArgs.fromMap(optargs).with(optname, value); - return new Distance(args, newOptargs); - } - public Distance optArg(String optname, ReqlFunction3 value) { - OptArgs newOptargs = OptArgs.fromMap(optargs).with(optname, value); - return new Distance(args, newOptargs); - } - public Distance optArg(String optname, ReqlFunction4 value) { - OptArgs newOptargs = OptArgs.fromMap(optargs).with(optname, value); - return new Distance(args, newOptargs); - } - -} diff --git a/drivers/java/src/main/java/com/rethinkdb/gen/ast/Distinct.java b/drivers/java/src/main/java/com/rethinkdb/gen/ast/Distinct.java deleted file mode 100644 index 5679ae138fa..00000000000 --- a/drivers/java/src/main/java/com/rethinkdb/gen/ast/Distinct.java +++ /dev/null @@ -1,53 +0,0 @@ -// Autogenerated by metajava.py. -// Do not edit this file directly. -// The template for this file is located at: -// ../../../../../../../../templates/AstSubclass.java - -package com.rethinkdb.gen.ast; - -import com.rethinkdb.gen.proto.TermType; -import com.rethinkdb.gen.exc.ReqlDriverError; -import com.rethinkdb.model.Arguments; -import com.rethinkdb.model.OptArgs; -import com.rethinkdb.ast.ReqlAst; - - - -public class Distinct extends ReqlExpr { - - - public Distinct(Object arg) { - this(new Arguments(arg), null); - } - public Distinct(Arguments args){ - this(args, null); - } - public Distinct(Arguments args, OptArgs optargs) { - super(TermType.DISTINCT, args, optargs); - } - public Distinct optArg(String optname, Object value) { - OptArgs newOptargs = OptArgs.fromMap(optargs).with(optname, value); - return new Distinct(args, newOptargs); - } - public Distinct optArg(String optname, ReqlFunction0 value) { - OptArgs newOptargs = OptArgs.fromMap(optargs).with(optname, value); - return new Distinct(args, newOptargs); - } - public Distinct optArg(String optname, ReqlFunction1 value) { - OptArgs newOptargs = OptArgs.fromMap(optargs).with(optname, value); - return new Distinct(args, newOptargs); - } - public Distinct optArg(String optname, ReqlFunction2 value) { - OptArgs newOptargs = OptArgs.fromMap(optargs).with(optname, value); - return new Distinct(args, newOptargs); - } - public Distinct optArg(String optname, ReqlFunction3 value) { - OptArgs newOptargs = OptArgs.fromMap(optargs).with(optname, value); - return new Distinct(args, newOptargs); - } - public Distinct optArg(String optname, ReqlFunction4 value) { - OptArgs newOptargs = OptArgs.fromMap(optargs).with(optname, value); - return new Distinct(args, newOptargs); - } - -} diff --git a/drivers/java/src/main/java/com/rethinkdb/gen/ast/Div.java b/drivers/java/src/main/java/com/rethinkdb/gen/ast/Div.java deleted file mode 100644 index 936a8ed7b0d..00000000000 --- a/drivers/java/src/main/java/com/rethinkdb/gen/ast/Div.java +++ /dev/null @@ -1,29 +0,0 @@ -// Autogenerated by metajava.py. -// Do not edit this file directly. -// The template for this file is located at: -// ../../../../../../../../templates/AstSubclass.java - -package com.rethinkdb.gen.ast; - -import com.rethinkdb.gen.proto.TermType; -import com.rethinkdb.gen.exc.ReqlDriverError; -import com.rethinkdb.model.Arguments; -import com.rethinkdb.model.OptArgs; -import com.rethinkdb.ast.ReqlAst; - - - -public class Div extends ReqlExpr { - - - public Div(Object arg) { - this(new Arguments(arg), null); - } - public Div(Arguments args){ - this(args, null); - } - public Div(Arguments args, OptArgs optargs) { - super(TermType.DIV, args, optargs); - } - -} diff --git a/drivers/java/src/main/java/com/rethinkdb/gen/ast/Downcase.java b/drivers/java/src/main/java/com/rethinkdb/gen/ast/Downcase.java deleted file mode 100644 index 85e573c3111..00000000000 --- a/drivers/java/src/main/java/com/rethinkdb/gen/ast/Downcase.java +++ /dev/null @@ -1,29 +0,0 @@ -// Autogenerated by metajava.py. -// Do not edit this file directly. -// The template for this file is located at: -// ../../../../../../../../templates/AstSubclass.java - -package com.rethinkdb.gen.ast; - -import com.rethinkdb.gen.proto.TermType; -import com.rethinkdb.gen.exc.ReqlDriverError; -import com.rethinkdb.model.Arguments; -import com.rethinkdb.model.OptArgs; -import com.rethinkdb.ast.ReqlAst; - - - -public class Downcase extends ReqlExpr { - - - public Downcase(Object arg) { - this(new Arguments(arg), null); - } - public Downcase(Arguments args){ - this(args, null); - } - public Downcase(Arguments args, OptArgs optargs) { - super(TermType.DOWNCASE, args, optargs); - } - -} diff --git a/drivers/java/src/main/java/com/rethinkdb/gen/ast/During.java b/drivers/java/src/main/java/com/rethinkdb/gen/ast/During.java deleted file mode 100644 index 39c210b7f4b..00000000000 --- a/drivers/java/src/main/java/com/rethinkdb/gen/ast/During.java +++ /dev/null @@ -1,53 +0,0 @@ -// Autogenerated by metajava.py. -// Do not edit this file directly. -// The template for this file is located at: -// ../../../../../../../../templates/AstSubclass.java - -package com.rethinkdb.gen.ast; - -import com.rethinkdb.gen.proto.TermType; -import com.rethinkdb.gen.exc.ReqlDriverError; -import com.rethinkdb.model.Arguments; -import com.rethinkdb.model.OptArgs; -import com.rethinkdb.ast.ReqlAst; - - - -public class During extends ReqlExpr { - - - public During(Object arg) { - this(new Arguments(arg), null); - } - public During(Arguments args){ - this(args, null); - } - public During(Arguments args, OptArgs optargs) { - super(TermType.DURING, args, optargs); - } - public During optArg(String optname, Object value) { - OptArgs newOptargs = OptArgs.fromMap(optargs).with(optname, value); - return new During(args, newOptargs); - } - public During optArg(String optname, ReqlFunction0 value) { - OptArgs newOptargs = OptArgs.fromMap(optargs).with(optname, value); - return new During(args, newOptargs); - } - public During optArg(String optname, ReqlFunction1 value) { - OptArgs newOptargs = OptArgs.fromMap(optargs).with(optname, value); - return new During(args, newOptargs); - } - public During optArg(String optname, ReqlFunction2 value) { - OptArgs newOptargs = OptArgs.fromMap(optargs).with(optname, value); - return new During(args, newOptargs); - } - public During optArg(String optname, ReqlFunction3 value) { - OptArgs newOptargs = OptArgs.fromMap(optargs).with(optname, value); - return new During(args, newOptargs); - } - public During optArg(String optname, ReqlFunction4 value) { - OptArgs newOptargs = OptArgs.fromMap(optargs).with(optname, value); - return new During(args, newOptargs); - } - -} diff --git a/drivers/java/src/main/java/com/rethinkdb/gen/ast/EpochTime.java b/drivers/java/src/main/java/com/rethinkdb/gen/ast/EpochTime.java deleted file mode 100644 index e46eecb43b7..00000000000 --- a/drivers/java/src/main/java/com/rethinkdb/gen/ast/EpochTime.java +++ /dev/null @@ -1,29 +0,0 @@ -// Autogenerated by metajava.py. -// Do not edit this file directly. -// The template for this file is located at: -// ../../../../../../../../templates/AstSubclass.java - -package com.rethinkdb.gen.ast; - -import com.rethinkdb.gen.proto.TermType; -import com.rethinkdb.gen.exc.ReqlDriverError; -import com.rethinkdb.model.Arguments; -import com.rethinkdb.model.OptArgs; -import com.rethinkdb.ast.ReqlAst; - - - -public class EpochTime extends ReqlExpr { - - - public EpochTime(Object arg) { - this(new Arguments(arg), null); - } - public EpochTime(Arguments args){ - this(args, null); - } - public EpochTime(Arguments args, OptArgs optargs) { - super(TermType.EPOCH_TIME, args, optargs); - } - -} diff --git a/drivers/java/src/main/java/com/rethinkdb/gen/ast/Eq.java b/drivers/java/src/main/java/com/rethinkdb/gen/ast/Eq.java deleted file mode 100644 index 509db30d077..00000000000 --- a/drivers/java/src/main/java/com/rethinkdb/gen/ast/Eq.java +++ /dev/null @@ -1,29 +0,0 @@ -// Autogenerated by metajava.py. -// Do not edit this file directly. -// The template for this file is located at: -// ../../../../../../../../templates/AstSubclass.java - -package com.rethinkdb.gen.ast; - -import com.rethinkdb.gen.proto.TermType; -import com.rethinkdb.gen.exc.ReqlDriverError; -import com.rethinkdb.model.Arguments; -import com.rethinkdb.model.OptArgs; -import com.rethinkdb.ast.ReqlAst; - - - -public class Eq extends ReqlExpr { - - - public Eq(Object arg) { - this(new Arguments(arg), null); - } - public Eq(Arguments args){ - this(args, null); - } - public Eq(Arguments args, OptArgs optargs) { - super(TermType.EQ, args, optargs); - } - -} diff --git a/drivers/java/src/main/java/com/rethinkdb/gen/ast/EqJoin.java b/drivers/java/src/main/java/com/rethinkdb/gen/ast/EqJoin.java deleted file mode 100644 index c90dc207b85..00000000000 --- a/drivers/java/src/main/java/com/rethinkdb/gen/ast/EqJoin.java +++ /dev/null @@ -1,53 +0,0 @@ -// Autogenerated by metajava.py. -// Do not edit this file directly. -// The template for this file is located at: -// ../../../../../../../../templates/AstSubclass.java - -package com.rethinkdb.gen.ast; - -import com.rethinkdb.gen.proto.TermType; -import com.rethinkdb.gen.exc.ReqlDriverError; -import com.rethinkdb.model.Arguments; -import com.rethinkdb.model.OptArgs; -import com.rethinkdb.ast.ReqlAst; - - - -public class EqJoin extends ReqlExpr { - - - public EqJoin(Object arg) { - this(new Arguments(arg), null); - } - public EqJoin(Arguments args){ - this(args, null); - } - public EqJoin(Arguments args, OptArgs optargs) { - super(TermType.EQ_JOIN, args, optargs); - } - public EqJoin optArg(String optname, Object value) { - OptArgs newOptargs = OptArgs.fromMap(optargs).with(optname, value); - return new EqJoin(args, newOptargs); - } - public EqJoin optArg(String optname, ReqlFunction0 value) { - OptArgs newOptargs = OptArgs.fromMap(optargs).with(optname, value); - return new EqJoin(args, newOptargs); - } - public EqJoin optArg(String optname, ReqlFunction1 value) { - OptArgs newOptargs = OptArgs.fromMap(optargs).with(optname, value); - return new EqJoin(args, newOptargs); - } - public EqJoin optArg(String optname, ReqlFunction2 value) { - OptArgs newOptargs = OptArgs.fromMap(optargs).with(optname, value); - return new EqJoin(args, newOptargs); - } - public EqJoin optArg(String optname, ReqlFunction3 value) { - OptArgs newOptargs = OptArgs.fromMap(optargs).with(optname, value); - return new EqJoin(args, newOptargs); - } - public EqJoin optArg(String optname, ReqlFunction4 value) { - OptArgs newOptargs = OptArgs.fromMap(optargs).with(optname, value); - return new EqJoin(args, newOptargs); - } - -} diff --git a/drivers/java/src/main/java/com/rethinkdb/gen/ast/Error.java b/drivers/java/src/main/java/com/rethinkdb/gen/ast/Error.java deleted file mode 100644 index 1df0cf024f5..00000000000 --- a/drivers/java/src/main/java/com/rethinkdb/gen/ast/Error.java +++ /dev/null @@ -1,29 +0,0 @@ -// Autogenerated by metajava.py. -// Do not edit this file directly. -// The template for this file is located at: -// ../../../../../../../../templates/AstSubclass.java - -package com.rethinkdb.gen.ast; - -import com.rethinkdb.gen.proto.TermType; -import com.rethinkdb.gen.exc.ReqlDriverError; -import com.rethinkdb.model.Arguments; -import com.rethinkdb.model.OptArgs; -import com.rethinkdb.ast.ReqlAst; - - - -public class Error extends ReqlExpr { - - - public Error(Object arg) { - this(new Arguments(arg), null); - } - public Error(Arguments args){ - this(args, null); - } - public Error(Arguments args, OptArgs optargs) { - super(TermType.ERROR, args, optargs); - } - -} diff --git a/drivers/java/src/main/java/com/rethinkdb/gen/ast/February.java b/drivers/java/src/main/java/com/rethinkdb/gen/ast/February.java deleted file mode 100644 index e2aeb8f7fe8..00000000000 --- a/drivers/java/src/main/java/com/rethinkdb/gen/ast/February.java +++ /dev/null @@ -1,29 +0,0 @@ -// Autogenerated by metajava.py. -// Do not edit this file directly. -// The template for this file is located at: -// ../../../../../../../../templates/AstSubclass.java - -package com.rethinkdb.gen.ast; - -import com.rethinkdb.gen.proto.TermType; -import com.rethinkdb.gen.exc.ReqlDriverError; -import com.rethinkdb.model.Arguments; -import com.rethinkdb.model.OptArgs; -import com.rethinkdb.ast.ReqlAst; - - - -public class February extends ReqlExpr { - - - public February(Object arg) { - this(new Arguments(arg), null); - } - public February(Arguments args){ - this(args, null); - } - public February(Arguments args, OptArgs optargs) { - super(TermType.FEBRUARY, args, optargs); - } - -} diff --git a/drivers/java/src/main/java/com/rethinkdb/gen/ast/Fill.java b/drivers/java/src/main/java/com/rethinkdb/gen/ast/Fill.java deleted file mode 100644 index 7a5e6393e53..00000000000 --- a/drivers/java/src/main/java/com/rethinkdb/gen/ast/Fill.java +++ /dev/null @@ -1,29 +0,0 @@ -// Autogenerated by metajava.py. -// Do not edit this file directly. -// The template for this file is located at: -// ../../../../../../../../templates/AstSubclass.java - -package com.rethinkdb.gen.ast; - -import com.rethinkdb.gen.proto.TermType; -import com.rethinkdb.gen.exc.ReqlDriverError; -import com.rethinkdb.model.Arguments; -import com.rethinkdb.model.OptArgs; -import com.rethinkdb.ast.ReqlAst; - - - -public class Fill extends ReqlExpr { - - - public Fill(Object arg) { - this(new Arguments(arg), null); - } - public Fill(Arguments args){ - this(args, null); - } - public Fill(Arguments args, OptArgs optargs) { - super(TermType.FILL, args, optargs); - } - -} diff --git a/drivers/java/src/main/java/com/rethinkdb/gen/ast/Filter.java b/drivers/java/src/main/java/com/rethinkdb/gen/ast/Filter.java deleted file mode 100644 index 9b8e4c68549..00000000000 --- a/drivers/java/src/main/java/com/rethinkdb/gen/ast/Filter.java +++ /dev/null @@ -1,53 +0,0 @@ -// Autogenerated by metajava.py. -// Do not edit this file directly. -// The template for this file is located at: -// ../../../../../../../../templates/AstSubclass.java - -package com.rethinkdb.gen.ast; - -import com.rethinkdb.gen.proto.TermType; -import com.rethinkdb.gen.exc.ReqlDriverError; -import com.rethinkdb.model.Arguments; -import com.rethinkdb.model.OptArgs; -import com.rethinkdb.ast.ReqlAst; - - - -public class Filter extends ReqlExpr { - - - public Filter(Object arg) { - this(new Arguments(arg), null); - } - public Filter(Arguments args){ - this(args, null); - } - public Filter(Arguments args, OptArgs optargs) { - super(TermType.FILTER, args, optargs); - } - public Filter optArg(String optname, Object value) { - OptArgs newOptargs = OptArgs.fromMap(optargs).with(optname, value); - return new Filter(args, newOptargs); - } - public Filter optArg(String optname, ReqlFunction0 value) { - OptArgs newOptargs = OptArgs.fromMap(optargs).with(optname, value); - return new Filter(args, newOptargs); - } - public Filter optArg(String optname, ReqlFunction1 value) { - OptArgs newOptargs = OptArgs.fromMap(optargs).with(optname, value); - return new Filter(args, newOptargs); - } - public Filter optArg(String optname, ReqlFunction2 value) { - OptArgs newOptargs = OptArgs.fromMap(optargs).with(optname, value); - return new Filter(args, newOptargs); - } - public Filter optArg(String optname, ReqlFunction3 value) { - OptArgs newOptargs = OptArgs.fromMap(optargs).with(optname, value); - return new Filter(args, newOptargs); - } - public Filter optArg(String optname, ReqlFunction4 value) { - OptArgs newOptargs = OptArgs.fromMap(optargs).with(optname, value); - return new Filter(args, newOptargs); - } - -} diff --git a/drivers/java/src/main/java/com/rethinkdb/gen/ast/Floor.java b/drivers/java/src/main/java/com/rethinkdb/gen/ast/Floor.java deleted file mode 100644 index cec47bd988f..00000000000 --- a/drivers/java/src/main/java/com/rethinkdb/gen/ast/Floor.java +++ /dev/null @@ -1,29 +0,0 @@ -// Autogenerated by metajava.py. -// Do not edit this file directly. -// The template for this file is located at: -// ../../../../../../../../templates/AstSubclass.java - -package com.rethinkdb.gen.ast; - -import com.rethinkdb.gen.proto.TermType; -import com.rethinkdb.gen.exc.ReqlDriverError; -import com.rethinkdb.model.Arguments; -import com.rethinkdb.model.OptArgs; -import com.rethinkdb.ast.ReqlAst; - - - -public class Floor extends ReqlExpr { - - - public Floor(Object arg) { - this(new Arguments(arg), null); - } - public Floor(Arguments args){ - this(args, null); - } - public Floor(Arguments args, OptArgs optargs) { - super(TermType.FLOOR, args, optargs); - } - -} diff --git a/drivers/java/src/main/java/com/rethinkdb/gen/ast/Fold.java b/drivers/java/src/main/java/com/rethinkdb/gen/ast/Fold.java deleted file mode 100644 index fe231af62f0..00000000000 --- a/drivers/java/src/main/java/com/rethinkdb/gen/ast/Fold.java +++ /dev/null @@ -1,53 +0,0 @@ -// Autogenerated by metajava.py. -// Do not edit this file directly. -// The template for this file is located at: -// ../../../../../../../../templates/AstSubclass.java - -package com.rethinkdb.gen.ast; - -import com.rethinkdb.gen.proto.TermType; -import com.rethinkdb.gen.exc.ReqlDriverError; -import com.rethinkdb.model.Arguments; -import com.rethinkdb.model.OptArgs; -import com.rethinkdb.ast.ReqlAst; - - - -public class Fold extends ReqlExpr { - - - public Fold(Object arg) { - this(new Arguments(arg), null); - } - public Fold(Arguments args){ - this(args, null); - } - public Fold(Arguments args, OptArgs optargs) { - super(TermType.FOLD, args, optargs); - } - public Fold optArg(String optname, Object value) { - OptArgs newOptargs = OptArgs.fromMap(optargs).with(optname, value); - return new Fold(args, newOptargs); - } - public Fold optArg(String optname, ReqlFunction0 value) { - OptArgs newOptargs = OptArgs.fromMap(optargs).with(optname, value); - return new Fold(args, newOptargs); - } - public Fold optArg(String optname, ReqlFunction1 value) { - OptArgs newOptargs = OptArgs.fromMap(optargs).with(optname, value); - return new Fold(args, newOptargs); - } - public Fold optArg(String optname, ReqlFunction2 value) { - OptArgs newOptargs = OptArgs.fromMap(optargs).with(optname, value); - return new Fold(args, newOptargs); - } - public Fold optArg(String optname, ReqlFunction3 value) { - OptArgs newOptargs = OptArgs.fromMap(optargs).with(optname, value); - return new Fold(args, newOptargs); - } - public Fold optArg(String optname, ReqlFunction4 value) { - OptArgs newOptargs = OptArgs.fromMap(optargs).with(optname, value); - return new Fold(args, newOptargs); - } - -} diff --git a/drivers/java/src/main/java/com/rethinkdb/gen/ast/ForEach.java b/drivers/java/src/main/java/com/rethinkdb/gen/ast/ForEach.java deleted file mode 100644 index 7aca1ec3c67..00000000000 --- a/drivers/java/src/main/java/com/rethinkdb/gen/ast/ForEach.java +++ /dev/null @@ -1,29 +0,0 @@ -// Autogenerated by metajava.py. -// Do not edit this file directly. -// The template for this file is located at: -// ../../../../../../../../templates/AstSubclass.java - -package com.rethinkdb.gen.ast; - -import com.rethinkdb.gen.proto.TermType; -import com.rethinkdb.gen.exc.ReqlDriverError; -import com.rethinkdb.model.Arguments; -import com.rethinkdb.model.OptArgs; -import com.rethinkdb.ast.ReqlAst; - - - -public class ForEach extends ReqlExpr { - - - public ForEach(Object arg) { - this(new Arguments(arg), null); - } - public ForEach(Arguments args){ - this(args, null); - } - public ForEach(Arguments args, OptArgs optargs) { - super(TermType.FOR_EACH, args, optargs); - } - -} diff --git a/drivers/java/src/main/java/com/rethinkdb/gen/ast/Friday.java b/drivers/java/src/main/java/com/rethinkdb/gen/ast/Friday.java deleted file mode 100644 index fa553cdd227..00000000000 --- a/drivers/java/src/main/java/com/rethinkdb/gen/ast/Friday.java +++ /dev/null @@ -1,29 +0,0 @@ -// Autogenerated by metajava.py. -// Do not edit this file directly. -// The template for this file is located at: -// ../../../../../../../../templates/AstSubclass.java - -package com.rethinkdb.gen.ast; - -import com.rethinkdb.gen.proto.TermType; -import com.rethinkdb.gen.exc.ReqlDriverError; -import com.rethinkdb.model.Arguments; -import com.rethinkdb.model.OptArgs; -import com.rethinkdb.ast.ReqlAst; - - - -public class Friday extends ReqlExpr { - - - public Friday(Object arg) { - this(new Arguments(arg), null); - } - public Friday(Arguments args){ - this(args, null); - } - public Friday(Arguments args, OptArgs optargs) { - super(TermType.FRIDAY, args, optargs); - } - -} diff --git a/drivers/java/src/main/java/com/rethinkdb/gen/ast/Func.java b/drivers/java/src/main/java/com/rethinkdb/gen/ast/Func.java deleted file mode 100644 index 7b88df248f5..00000000000 --- a/drivers/java/src/main/java/com/rethinkdb/gen/ast/Func.java +++ /dev/null @@ -1,96 +0,0 @@ -// Autogenerated by metajava.py. -// Do not edit this file directly. -// The template for this file is located at: -// ../../../../../../../../templates/ast/Func.java - -package com.rethinkdb.gen.ast; - -import com.rethinkdb.gen.proto.TermType; -import com.rethinkdb.gen.exc.ReqlDriverError; -import com.rethinkdb.model.Arguments; -import com.rethinkdb.model.OptArgs; -import com.rethinkdb.ast.ReqlAst; - - -import com.rethinkdb.model.ReqlLambda; -import com.rethinkdb.ast.Util; -import java.util.concurrent.atomic.AtomicInteger; -import java.util.Arrays; -import java.util.List; - - -public class Func extends ReqlExpr { - - private static AtomicInteger varId = new AtomicInteger(); - - protected Func(Arguments args){ - super(TermType.FUNC, args, null); - } - public static Func fromLambda(ReqlLambda function) { - if(function instanceof ReqlFunction0) { - return new Func(Arguments.make(new MakeArray(Arrays.asList()), - Util.toReqlAst(((ReqlFunction0) function).apply()))); - } - else if(function instanceof ReqlFunction1){ - ReqlFunction1 func1 = (ReqlFunction1) function; - int var1 = nextVarId(); - List varIds = Arrays.asList( - var1); - Object appliedFunction = func1.apply( - new Var(var1) - ); - return new Func(Arguments.make( - new MakeArray(varIds), - Util.toReqlAst(appliedFunction))); - } - else if(function instanceof ReqlFunction2){ - ReqlFunction2 func2 = (ReqlFunction2) function; - int var1 = nextVarId(); - int var2 = nextVarId(); - List varIds = Arrays.asList( - var1, var2); - Object appliedFunction = func2.apply( - new Var(var1), new Var(var2) - ); - return new Func(Arguments.make( - new MakeArray(varIds), - Util.toReqlAst(appliedFunction))); - } - else if(function instanceof ReqlFunction3){ - ReqlFunction3 func3 = (ReqlFunction3) function; - int var1 = nextVarId(); - int var2 = nextVarId(); - int var3 = nextVarId(); - List varIds = Arrays.asList( - var1, var2, var3); - Object appliedFunction = func3.apply( - new Var(var1), new Var(var2), new Var(var3) - ); - return new Func(Arguments.make( - new MakeArray(varIds), - Util.toReqlAst(appliedFunction))); - } - else if(function instanceof ReqlFunction4){ - ReqlFunction4 func4 = (ReqlFunction4) function; - int var1 = nextVarId(); - int var2 = nextVarId(); - int var3 = nextVarId(); - int var4 = nextVarId(); - List varIds = Arrays.asList( - var1, var2, var3, var4); - Object appliedFunction = func4.apply( - new Var(var1), new Var(var2), new Var(var3), new Var(var4) - ); - return new Func(Arguments.make( - new MakeArray(varIds), - Util.toReqlAst(appliedFunction))); - } - else { - throw new ReqlDriverError("Arity of ReqlLambda not recognized!"); - } - } - - private static int nextVarId(){ - return varId.incrementAndGet(); - } -} diff --git a/drivers/java/src/main/java/com/rethinkdb/gen/ast/Funcall.java b/drivers/java/src/main/java/com/rethinkdb/gen/ast/Funcall.java deleted file mode 100644 index b12b4e73f8c..00000000000 --- a/drivers/java/src/main/java/com/rethinkdb/gen/ast/Funcall.java +++ /dev/null @@ -1,44 +0,0 @@ -// Autogenerated by metajava.py. -// Do not edit this file directly. -// The template for this file is located at: -// ../../../../../../../../templates/ast/Funcall.java - -package com.rethinkdb.gen.ast; - -import com.rethinkdb.gen.proto.TermType; -import com.rethinkdb.gen.exc.ReqlDriverError; -import com.rethinkdb.model.Arguments; -import com.rethinkdb.model.OptArgs; -import com.rethinkdb.ast.ReqlAst; - - - -public class Funcall extends ReqlExpr { - - - public Funcall(Object arg) { - this(new Arguments(arg), null); - } - public Funcall(Arguments args){ - this(args, null); - } - public Funcall(Arguments args, OptArgs optargs) { - super(TermType.FUNCALL, args, optargs); - } - - - @Override - protected Object build() - { - /* - This object should be constructed with arguments first, and the - function itself as the last parameter. This makes it easier for - the places where this object is constructed. The actual wire - format is function first, arguments last, so we flip them around - when building the AST. - */ - ReqlAst func = args.remove(args.size()-1); - args.add(0, func); - return super.build(); - } -} diff --git a/drivers/java/src/main/java/com/rethinkdb/gen/ast/Ge.java b/drivers/java/src/main/java/com/rethinkdb/gen/ast/Ge.java deleted file mode 100644 index 58171a30f45..00000000000 --- a/drivers/java/src/main/java/com/rethinkdb/gen/ast/Ge.java +++ /dev/null @@ -1,29 +0,0 @@ -// Autogenerated by metajava.py. -// Do not edit this file directly. -// The template for this file is located at: -// ../../../../../../../../templates/AstSubclass.java - -package com.rethinkdb.gen.ast; - -import com.rethinkdb.gen.proto.TermType; -import com.rethinkdb.gen.exc.ReqlDriverError; -import com.rethinkdb.model.Arguments; -import com.rethinkdb.model.OptArgs; -import com.rethinkdb.ast.ReqlAst; - - - -public class Ge extends ReqlExpr { - - - public Ge(Object arg) { - this(new Arguments(arg), null); - } - public Ge(Arguments args){ - this(args, null); - } - public Ge(Arguments args, OptArgs optargs) { - super(TermType.GE, args, optargs); - } - -} diff --git a/drivers/java/src/main/java/com/rethinkdb/gen/ast/Geojson.java b/drivers/java/src/main/java/com/rethinkdb/gen/ast/Geojson.java deleted file mode 100644 index 5f87e3a503e..00000000000 --- a/drivers/java/src/main/java/com/rethinkdb/gen/ast/Geojson.java +++ /dev/null @@ -1,29 +0,0 @@ -// Autogenerated by metajava.py. -// Do not edit this file directly. -// The template for this file is located at: -// ../../../../../../../../templates/AstSubclass.java - -package com.rethinkdb.gen.ast; - -import com.rethinkdb.gen.proto.TermType; -import com.rethinkdb.gen.exc.ReqlDriverError; -import com.rethinkdb.model.Arguments; -import com.rethinkdb.model.OptArgs; -import com.rethinkdb.ast.ReqlAst; - - - -public class Geojson extends ReqlExpr { - - - public Geojson(Object arg) { - this(new Arguments(arg), null); - } - public Geojson(Arguments args){ - this(args, null); - } - public Geojson(Arguments args, OptArgs optargs) { - super(TermType.GEOJSON, args, optargs); - } - -} diff --git a/drivers/java/src/main/java/com/rethinkdb/gen/ast/Get.java b/drivers/java/src/main/java/com/rethinkdb/gen/ast/Get.java deleted file mode 100644 index 8deca3f19b4..00000000000 --- a/drivers/java/src/main/java/com/rethinkdb/gen/ast/Get.java +++ /dev/null @@ -1,29 +0,0 @@ -// Autogenerated by metajava.py. -// Do not edit this file directly. -// The template for this file is located at: -// ../../../../../../../../templates/AstSubclass.java - -package com.rethinkdb.gen.ast; - -import com.rethinkdb.gen.proto.TermType; -import com.rethinkdb.gen.exc.ReqlDriverError; -import com.rethinkdb.model.Arguments; -import com.rethinkdb.model.OptArgs; -import com.rethinkdb.ast.ReqlAst; - - - -public class Get extends ReqlExpr { - - - public Get(Object arg) { - this(new Arguments(arg), null); - } - public Get(Arguments args){ - this(args, null); - } - public Get(Arguments args, OptArgs optargs) { - super(TermType.GET, args, optargs); - } - -} diff --git a/drivers/java/src/main/java/com/rethinkdb/gen/ast/GetAll.java b/drivers/java/src/main/java/com/rethinkdb/gen/ast/GetAll.java deleted file mode 100644 index 38ea02ac7e7..00000000000 --- a/drivers/java/src/main/java/com/rethinkdb/gen/ast/GetAll.java +++ /dev/null @@ -1,53 +0,0 @@ -// Autogenerated by metajava.py. -// Do not edit this file directly. -// The template for this file is located at: -// ../../../../../../../../templates/AstSubclass.java - -package com.rethinkdb.gen.ast; - -import com.rethinkdb.gen.proto.TermType; -import com.rethinkdb.gen.exc.ReqlDriverError; -import com.rethinkdb.model.Arguments; -import com.rethinkdb.model.OptArgs; -import com.rethinkdb.ast.ReqlAst; - - - -public class GetAll extends ReqlExpr { - - - public GetAll(Object arg) { - this(new Arguments(arg), null); - } - public GetAll(Arguments args){ - this(args, null); - } - public GetAll(Arguments args, OptArgs optargs) { - super(TermType.GET_ALL, args, optargs); - } - public GetAll optArg(String optname, Object value) { - OptArgs newOptargs = OptArgs.fromMap(optargs).with(optname, value); - return new GetAll(args, newOptargs); - } - public GetAll optArg(String optname, ReqlFunction0 value) { - OptArgs newOptargs = OptArgs.fromMap(optargs).with(optname, value); - return new GetAll(args, newOptargs); - } - public GetAll optArg(String optname, ReqlFunction1 value) { - OptArgs newOptargs = OptArgs.fromMap(optargs).with(optname, value); - return new GetAll(args, newOptargs); - } - public GetAll optArg(String optname, ReqlFunction2 value) { - OptArgs newOptargs = OptArgs.fromMap(optargs).with(optname, value); - return new GetAll(args, newOptargs); - } - public GetAll optArg(String optname, ReqlFunction3 value) { - OptArgs newOptargs = OptArgs.fromMap(optargs).with(optname, value); - return new GetAll(args, newOptargs); - } - public GetAll optArg(String optname, ReqlFunction4 value) { - OptArgs newOptargs = OptArgs.fromMap(optargs).with(optname, value); - return new GetAll(args, newOptargs); - } - -} diff --git a/drivers/java/src/main/java/com/rethinkdb/gen/ast/GetField.java b/drivers/java/src/main/java/com/rethinkdb/gen/ast/GetField.java deleted file mode 100644 index a8490cf4f47..00000000000 --- a/drivers/java/src/main/java/com/rethinkdb/gen/ast/GetField.java +++ /dev/null @@ -1,29 +0,0 @@ -// Autogenerated by metajava.py. -// Do not edit this file directly. -// The template for this file is located at: -// ../../../../../../../../templates/AstSubclass.java - -package com.rethinkdb.gen.ast; - -import com.rethinkdb.gen.proto.TermType; -import com.rethinkdb.gen.exc.ReqlDriverError; -import com.rethinkdb.model.Arguments; -import com.rethinkdb.model.OptArgs; -import com.rethinkdb.ast.ReqlAst; - - - -public class GetField extends ReqlExpr { - - - public GetField(Object arg) { - this(new Arguments(arg), null); - } - public GetField(Arguments args){ - this(args, null); - } - public GetField(Arguments args, OptArgs optargs) { - super(TermType.GET_FIELD, args, optargs); - } - -} diff --git a/drivers/java/src/main/java/com/rethinkdb/gen/ast/GetIntersecting.java b/drivers/java/src/main/java/com/rethinkdb/gen/ast/GetIntersecting.java deleted file mode 100644 index 7909772e9b6..00000000000 --- a/drivers/java/src/main/java/com/rethinkdb/gen/ast/GetIntersecting.java +++ /dev/null @@ -1,53 +0,0 @@ -// Autogenerated by metajava.py. -// Do not edit this file directly. -// The template for this file is located at: -// ../../../../../../../../templates/AstSubclass.java - -package com.rethinkdb.gen.ast; - -import com.rethinkdb.gen.proto.TermType; -import com.rethinkdb.gen.exc.ReqlDriverError; -import com.rethinkdb.model.Arguments; -import com.rethinkdb.model.OptArgs; -import com.rethinkdb.ast.ReqlAst; - - - -public class GetIntersecting extends ReqlExpr { - - - public GetIntersecting(Object arg) { - this(new Arguments(arg), null); - } - public GetIntersecting(Arguments args){ - this(args, null); - } - public GetIntersecting(Arguments args, OptArgs optargs) { - super(TermType.GET_INTERSECTING, args, optargs); - } - public GetIntersecting optArg(String optname, Object value) { - OptArgs newOptargs = OptArgs.fromMap(optargs).with(optname, value); - return new GetIntersecting(args, newOptargs); - } - public GetIntersecting optArg(String optname, ReqlFunction0 value) { - OptArgs newOptargs = OptArgs.fromMap(optargs).with(optname, value); - return new GetIntersecting(args, newOptargs); - } - public GetIntersecting optArg(String optname, ReqlFunction1 value) { - OptArgs newOptargs = OptArgs.fromMap(optargs).with(optname, value); - return new GetIntersecting(args, newOptargs); - } - public GetIntersecting optArg(String optname, ReqlFunction2 value) { - OptArgs newOptargs = OptArgs.fromMap(optargs).with(optname, value); - return new GetIntersecting(args, newOptargs); - } - public GetIntersecting optArg(String optname, ReqlFunction3 value) { - OptArgs newOptargs = OptArgs.fromMap(optargs).with(optname, value); - return new GetIntersecting(args, newOptargs); - } - public GetIntersecting optArg(String optname, ReqlFunction4 value) { - OptArgs newOptargs = OptArgs.fromMap(optargs).with(optname, value); - return new GetIntersecting(args, newOptargs); - } - -} diff --git a/drivers/java/src/main/java/com/rethinkdb/gen/ast/GetNearest.java b/drivers/java/src/main/java/com/rethinkdb/gen/ast/GetNearest.java deleted file mode 100644 index 3a79897d48c..00000000000 --- a/drivers/java/src/main/java/com/rethinkdb/gen/ast/GetNearest.java +++ /dev/null @@ -1,53 +0,0 @@ -// Autogenerated by metajava.py. -// Do not edit this file directly. -// The template for this file is located at: -// ../../../../../../../../templates/AstSubclass.java - -package com.rethinkdb.gen.ast; - -import com.rethinkdb.gen.proto.TermType; -import com.rethinkdb.gen.exc.ReqlDriverError; -import com.rethinkdb.model.Arguments; -import com.rethinkdb.model.OptArgs; -import com.rethinkdb.ast.ReqlAst; - - - -public class GetNearest extends ReqlExpr { - - - public GetNearest(Object arg) { - this(new Arguments(arg), null); - } - public GetNearest(Arguments args){ - this(args, null); - } - public GetNearest(Arguments args, OptArgs optargs) { - super(TermType.GET_NEAREST, args, optargs); - } - public GetNearest optArg(String optname, Object value) { - OptArgs newOptargs = OptArgs.fromMap(optargs).with(optname, value); - return new GetNearest(args, newOptargs); - } - public GetNearest optArg(String optname, ReqlFunction0 value) { - OptArgs newOptargs = OptArgs.fromMap(optargs).with(optname, value); - return new GetNearest(args, newOptargs); - } - public GetNearest optArg(String optname, ReqlFunction1 value) { - OptArgs newOptargs = OptArgs.fromMap(optargs).with(optname, value); - return new GetNearest(args, newOptargs); - } - public GetNearest optArg(String optname, ReqlFunction2 value) { - OptArgs newOptargs = OptArgs.fromMap(optargs).with(optname, value); - return new GetNearest(args, newOptargs); - } - public GetNearest optArg(String optname, ReqlFunction3 value) { - OptArgs newOptargs = OptArgs.fromMap(optargs).with(optname, value); - return new GetNearest(args, newOptargs); - } - public GetNearest optArg(String optname, ReqlFunction4 value) { - OptArgs newOptargs = OptArgs.fromMap(optargs).with(optname, value); - return new GetNearest(args, newOptargs); - } - -} diff --git a/drivers/java/src/main/java/com/rethinkdb/gen/ast/Grant.java b/drivers/java/src/main/java/com/rethinkdb/gen/ast/Grant.java deleted file mode 100644 index d3640e6c7ea..00000000000 --- a/drivers/java/src/main/java/com/rethinkdb/gen/ast/Grant.java +++ /dev/null @@ -1,29 +0,0 @@ -// Autogenerated by metajava.py. -// Do not edit this file directly. -// The template for this file is located at: -// ../../../../../../../../templates/AstSubclass.java - -package com.rethinkdb.gen.ast; - -import com.rethinkdb.gen.proto.TermType; -import com.rethinkdb.gen.exc.ReqlDriverError; -import com.rethinkdb.model.Arguments; -import com.rethinkdb.model.OptArgs; -import com.rethinkdb.ast.ReqlAst; - - - -public class Grant extends ReqlExpr { - - - public Grant(Object arg) { - this(new Arguments(arg), null); - } - public Grant(Arguments args){ - this(args, null); - } - public Grant(Arguments args, OptArgs optargs) { - super(TermType.GRANT, args, optargs); - } - -} diff --git a/drivers/java/src/main/java/com/rethinkdb/gen/ast/Group.java b/drivers/java/src/main/java/com/rethinkdb/gen/ast/Group.java deleted file mode 100644 index 267164dc359..00000000000 --- a/drivers/java/src/main/java/com/rethinkdb/gen/ast/Group.java +++ /dev/null @@ -1,53 +0,0 @@ -// Autogenerated by metajava.py. -// Do not edit this file directly. -// The template for this file is located at: -// ../../../../../../../../templates/AstSubclass.java - -package com.rethinkdb.gen.ast; - -import com.rethinkdb.gen.proto.TermType; -import com.rethinkdb.gen.exc.ReqlDriverError; -import com.rethinkdb.model.Arguments; -import com.rethinkdb.model.OptArgs; -import com.rethinkdb.ast.ReqlAst; - - - -public class Group extends ReqlExpr { - - - public Group(Object arg) { - this(new Arguments(arg), null); - } - public Group(Arguments args){ - this(args, null); - } - public Group(Arguments args, OptArgs optargs) { - super(TermType.GROUP, args, optargs); - } - public Group optArg(String optname, Object value) { - OptArgs newOptargs = OptArgs.fromMap(optargs).with(optname, value); - return new Group(args, newOptargs); - } - public Group optArg(String optname, ReqlFunction0 value) { - OptArgs newOptargs = OptArgs.fromMap(optargs).with(optname, value); - return new Group(args, newOptargs); - } - public Group optArg(String optname, ReqlFunction1 value) { - OptArgs newOptargs = OptArgs.fromMap(optargs).with(optname, value); - return new Group(args, newOptargs); - } - public Group optArg(String optname, ReqlFunction2 value) { - OptArgs newOptargs = OptArgs.fromMap(optargs).with(optname, value); - return new Group(args, newOptargs); - } - public Group optArg(String optname, ReqlFunction3 value) { - OptArgs newOptargs = OptArgs.fromMap(optargs).with(optname, value); - return new Group(args, newOptargs); - } - public Group optArg(String optname, ReqlFunction4 value) { - OptArgs newOptargs = OptArgs.fromMap(optargs).with(optname, value); - return new Group(args, newOptargs); - } - -} diff --git a/drivers/java/src/main/java/com/rethinkdb/gen/ast/Gt.java b/drivers/java/src/main/java/com/rethinkdb/gen/ast/Gt.java deleted file mode 100644 index 9dd32c7f9c9..00000000000 --- a/drivers/java/src/main/java/com/rethinkdb/gen/ast/Gt.java +++ /dev/null @@ -1,29 +0,0 @@ -// Autogenerated by metajava.py. -// Do not edit this file directly. -// The template for this file is located at: -// ../../../../../../../../templates/AstSubclass.java - -package com.rethinkdb.gen.ast; - -import com.rethinkdb.gen.proto.TermType; -import com.rethinkdb.gen.exc.ReqlDriverError; -import com.rethinkdb.model.Arguments; -import com.rethinkdb.model.OptArgs; -import com.rethinkdb.ast.ReqlAst; - - - -public class Gt extends ReqlExpr { - - - public Gt(Object arg) { - this(new Arguments(arg), null); - } - public Gt(Arguments args){ - this(args, null); - } - public Gt(Arguments args, OptArgs optargs) { - super(TermType.GT, args, optargs); - } - -} diff --git a/drivers/java/src/main/java/com/rethinkdb/gen/ast/HasFields.java b/drivers/java/src/main/java/com/rethinkdb/gen/ast/HasFields.java deleted file mode 100644 index 462133d2cb4..00000000000 --- a/drivers/java/src/main/java/com/rethinkdb/gen/ast/HasFields.java +++ /dev/null @@ -1,29 +0,0 @@ -// Autogenerated by metajava.py. -// Do not edit this file directly. -// The template for this file is located at: -// ../../../../../../../../templates/AstSubclass.java - -package com.rethinkdb.gen.ast; - -import com.rethinkdb.gen.proto.TermType; -import com.rethinkdb.gen.exc.ReqlDriverError; -import com.rethinkdb.model.Arguments; -import com.rethinkdb.model.OptArgs; -import com.rethinkdb.ast.ReqlAst; - - - -public class HasFields extends ReqlExpr { - - - public HasFields(Object arg) { - this(new Arguments(arg), null); - } - public HasFields(Arguments args){ - this(args, null); - } - public HasFields(Arguments args, OptArgs optargs) { - super(TermType.HAS_FIELDS, args, optargs); - } - -} diff --git a/drivers/java/src/main/java/com/rethinkdb/gen/ast/Hours.java b/drivers/java/src/main/java/com/rethinkdb/gen/ast/Hours.java deleted file mode 100644 index e836db1c78a..00000000000 --- a/drivers/java/src/main/java/com/rethinkdb/gen/ast/Hours.java +++ /dev/null @@ -1,29 +0,0 @@ -// Autogenerated by metajava.py. -// Do not edit this file directly. -// The template for this file is located at: -// ../../../../../../../../templates/AstSubclass.java - -package com.rethinkdb.gen.ast; - -import com.rethinkdb.gen.proto.TermType; -import com.rethinkdb.gen.exc.ReqlDriverError; -import com.rethinkdb.model.Arguments; -import com.rethinkdb.model.OptArgs; -import com.rethinkdb.ast.ReqlAst; - - - -public class Hours extends ReqlExpr { - - - public Hours(Object arg) { - this(new Arguments(arg), null); - } - public Hours(Arguments args){ - this(args, null); - } - public Hours(Arguments args, OptArgs optargs) { - super(TermType.HOURS, args, optargs); - } - -} diff --git a/drivers/java/src/main/java/com/rethinkdb/gen/ast/Http.java b/drivers/java/src/main/java/com/rethinkdb/gen/ast/Http.java deleted file mode 100644 index cb29bbd9ab4..00000000000 --- a/drivers/java/src/main/java/com/rethinkdb/gen/ast/Http.java +++ /dev/null @@ -1,53 +0,0 @@ -// Autogenerated by metajava.py. -// Do not edit this file directly. -// The template for this file is located at: -// ../../../../../../../../templates/AstSubclass.java - -package com.rethinkdb.gen.ast; - -import com.rethinkdb.gen.proto.TermType; -import com.rethinkdb.gen.exc.ReqlDriverError; -import com.rethinkdb.model.Arguments; -import com.rethinkdb.model.OptArgs; -import com.rethinkdb.ast.ReqlAst; - - - -public class Http extends ReqlExpr { - - - public Http(Object arg) { - this(new Arguments(arg), null); - } - public Http(Arguments args){ - this(args, null); - } - public Http(Arguments args, OptArgs optargs) { - super(TermType.HTTP, args, optargs); - } - public Http optArg(String optname, Object value) { - OptArgs newOptargs = OptArgs.fromMap(optargs).with(optname, value); - return new Http(args, newOptargs); - } - public Http optArg(String optname, ReqlFunction0 value) { - OptArgs newOptargs = OptArgs.fromMap(optargs).with(optname, value); - return new Http(args, newOptargs); - } - public Http optArg(String optname, ReqlFunction1 value) { - OptArgs newOptargs = OptArgs.fromMap(optargs).with(optname, value); - return new Http(args, newOptargs); - } - public Http optArg(String optname, ReqlFunction2 value) { - OptArgs newOptargs = OptArgs.fromMap(optargs).with(optname, value); - return new Http(args, newOptargs); - } - public Http optArg(String optname, ReqlFunction3 value) { - OptArgs newOptargs = OptArgs.fromMap(optargs).with(optname, value); - return new Http(args, newOptargs); - } - public Http optArg(String optname, ReqlFunction4 value) { - OptArgs newOptargs = OptArgs.fromMap(optargs).with(optname, value); - return new Http(args, newOptargs); - } - -} diff --git a/drivers/java/src/main/java/com/rethinkdb/gen/ast/InTimezone.java b/drivers/java/src/main/java/com/rethinkdb/gen/ast/InTimezone.java deleted file mode 100644 index 0d18a88de91..00000000000 --- a/drivers/java/src/main/java/com/rethinkdb/gen/ast/InTimezone.java +++ /dev/null @@ -1,29 +0,0 @@ -// Autogenerated by metajava.py. -// Do not edit this file directly. -// The template for this file is located at: -// ../../../../../../../../templates/AstSubclass.java - -package com.rethinkdb.gen.ast; - -import com.rethinkdb.gen.proto.TermType; -import com.rethinkdb.gen.exc.ReqlDriverError; -import com.rethinkdb.model.Arguments; -import com.rethinkdb.model.OptArgs; -import com.rethinkdb.ast.ReqlAst; - - - -public class InTimezone extends ReqlExpr { - - - public InTimezone(Object arg) { - this(new Arguments(arg), null); - } - public InTimezone(Arguments args){ - this(args, null); - } - public InTimezone(Arguments args, OptArgs optargs) { - super(TermType.IN_TIMEZONE, args, optargs); - } - -} diff --git a/drivers/java/src/main/java/com/rethinkdb/gen/ast/Includes.java b/drivers/java/src/main/java/com/rethinkdb/gen/ast/Includes.java deleted file mode 100644 index b4b9d836aff..00000000000 --- a/drivers/java/src/main/java/com/rethinkdb/gen/ast/Includes.java +++ /dev/null @@ -1,29 +0,0 @@ -// Autogenerated by metajava.py. -// Do not edit this file directly. -// The template for this file is located at: -// ../../../../../../../../templates/AstSubclass.java - -package com.rethinkdb.gen.ast; - -import com.rethinkdb.gen.proto.TermType; -import com.rethinkdb.gen.exc.ReqlDriverError; -import com.rethinkdb.model.Arguments; -import com.rethinkdb.model.OptArgs; -import com.rethinkdb.ast.ReqlAst; - - - -public class Includes extends ReqlExpr { - - - public Includes(Object arg) { - this(new Arguments(arg), null); - } - public Includes(Arguments args){ - this(args, null); - } - public Includes(Arguments args, OptArgs optargs) { - super(TermType.INCLUDES, args, optargs); - } - -} diff --git a/drivers/java/src/main/java/com/rethinkdb/gen/ast/IndexCreate.java b/drivers/java/src/main/java/com/rethinkdb/gen/ast/IndexCreate.java deleted file mode 100644 index ab65c9b19e0..00000000000 --- a/drivers/java/src/main/java/com/rethinkdb/gen/ast/IndexCreate.java +++ /dev/null @@ -1,53 +0,0 @@ -// Autogenerated by metajava.py. -// Do not edit this file directly. -// The template for this file is located at: -// ../../../../../../../../templates/AstSubclass.java - -package com.rethinkdb.gen.ast; - -import com.rethinkdb.gen.proto.TermType; -import com.rethinkdb.gen.exc.ReqlDriverError; -import com.rethinkdb.model.Arguments; -import com.rethinkdb.model.OptArgs; -import com.rethinkdb.ast.ReqlAst; - - - -public class IndexCreate extends ReqlExpr { - - - public IndexCreate(Object arg) { - this(new Arguments(arg), null); - } - public IndexCreate(Arguments args){ - this(args, null); - } - public IndexCreate(Arguments args, OptArgs optargs) { - super(TermType.INDEX_CREATE, args, optargs); - } - public IndexCreate optArg(String optname, Object value) { - OptArgs newOptargs = OptArgs.fromMap(optargs).with(optname, value); - return new IndexCreate(args, newOptargs); - } - public IndexCreate optArg(String optname, ReqlFunction0 value) { - OptArgs newOptargs = OptArgs.fromMap(optargs).with(optname, value); - return new IndexCreate(args, newOptargs); - } - public IndexCreate optArg(String optname, ReqlFunction1 value) { - OptArgs newOptargs = OptArgs.fromMap(optargs).with(optname, value); - return new IndexCreate(args, newOptargs); - } - public IndexCreate optArg(String optname, ReqlFunction2 value) { - OptArgs newOptargs = OptArgs.fromMap(optargs).with(optname, value); - return new IndexCreate(args, newOptargs); - } - public IndexCreate optArg(String optname, ReqlFunction3 value) { - OptArgs newOptargs = OptArgs.fromMap(optargs).with(optname, value); - return new IndexCreate(args, newOptargs); - } - public IndexCreate optArg(String optname, ReqlFunction4 value) { - OptArgs newOptargs = OptArgs.fromMap(optargs).with(optname, value); - return new IndexCreate(args, newOptargs); - } - -} diff --git a/drivers/java/src/main/java/com/rethinkdb/gen/ast/IndexDrop.java b/drivers/java/src/main/java/com/rethinkdb/gen/ast/IndexDrop.java deleted file mode 100644 index e7f9e3e292f..00000000000 --- a/drivers/java/src/main/java/com/rethinkdb/gen/ast/IndexDrop.java +++ /dev/null @@ -1,29 +0,0 @@ -// Autogenerated by metajava.py. -// Do not edit this file directly. -// The template for this file is located at: -// ../../../../../../../../templates/AstSubclass.java - -package com.rethinkdb.gen.ast; - -import com.rethinkdb.gen.proto.TermType; -import com.rethinkdb.gen.exc.ReqlDriverError; -import com.rethinkdb.model.Arguments; -import com.rethinkdb.model.OptArgs; -import com.rethinkdb.ast.ReqlAst; - - - -public class IndexDrop extends ReqlExpr { - - - public IndexDrop(Object arg) { - this(new Arguments(arg), null); - } - public IndexDrop(Arguments args){ - this(args, null); - } - public IndexDrop(Arguments args, OptArgs optargs) { - super(TermType.INDEX_DROP, args, optargs); - } - -} diff --git a/drivers/java/src/main/java/com/rethinkdb/gen/ast/IndexList.java b/drivers/java/src/main/java/com/rethinkdb/gen/ast/IndexList.java deleted file mode 100644 index 7c2cc93c47d..00000000000 --- a/drivers/java/src/main/java/com/rethinkdb/gen/ast/IndexList.java +++ /dev/null @@ -1,29 +0,0 @@ -// Autogenerated by metajava.py. -// Do not edit this file directly. -// The template for this file is located at: -// ../../../../../../../../templates/AstSubclass.java - -package com.rethinkdb.gen.ast; - -import com.rethinkdb.gen.proto.TermType; -import com.rethinkdb.gen.exc.ReqlDriverError; -import com.rethinkdb.model.Arguments; -import com.rethinkdb.model.OptArgs; -import com.rethinkdb.ast.ReqlAst; - - - -public class IndexList extends ReqlExpr { - - - public IndexList(Object arg) { - this(new Arguments(arg), null); - } - public IndexList(Arguments args){ - this(args, null); - } - public IndexList(Arguments args, OptArgs optargs) { - super(TermType.INDEX_LIST, args, optargs); - } - -} diff --git a/drivers/java/src/main/java/com/rethinkdb/gen/ast/IndexRename.java b/drivers/java/src/main/java/com/rethinkdb/gen/ast/IndexRename.java deleted file mode 100644 index c74cd4c39b4..00000000000 --- a/drivers/java/src/main/java/com/rethinkdb/gen/ast/IndexRename.java +++ /dev/null @@ -1,53 +0,0 @@ -// Autogenerated by metajava.py. -// Do not edit this file directly. -// The template for this file is located at: -// ../../../../../../../../templates/AstSubclass.java - -package com.rethinkdb.gen.ast; - -import com.rethinkdb.gen.proto.TermType; -import com.rethinkdb.gen.exc.ReqlDriverError; -import com.rethinkdb.model.Arguments; -import com.rethinkdb.model.OptArgs; -import com.rethinkdb.ast.ReqlAst; - - - -public class IndexRename extends ReqlExpr { - - - public IndexRename(Object arg) { - this(new Arguments(arg), null); - } - public IndexRename(Arguments args){ - this(args, null); - } - public IndexRename(Arguments args, OptArgs optargs) { - super(TermType.INDEX_RENAME, args, optargs); - } - public IndexRename optArg(String optname, Object value) { - OptArgs newOptargs = OptArgs.fromMap(optargs).with(optname, value); - return new IndexRename(args, newOptargs); - } - public IndexRename optArg(String optname, ReqlFunction0 value) { - OptArgs newOptargs = OptArgs.fromMap(optargs).with(optname, value); - return new IndexRename(args, newOptargs); - } - public IndexRename optArg(String optname, ReqlFunction1 value) { - OptArgs newOptargs = OptArgs.fromMap(optargs).with(optname, value); - return new IndexRename(args, newOptargs); - } - public IndexRename optArg(String optname, ReqlFunction2 value) { - OptArgs newOptargs = OptArgs.fromMap(optargs).with(optname, value); - return new IndexRename(args, newOptargs); - } - public IndexRename optArg(String optname, ReqlFunction3 value) { - OptArgs newOptargs = OptArgs.fromMap(optargs).with(optname, value); - return new IndexRename(args, newOptargs); - } - public IndexRename optArg(String optname, ReqlFunction4 value) { - OptArgs newOptargs = OptArgs.fromMap(optargs).with(optname, value); - return new IndexRename(args, newOptargs); - } - -} diff --git a/drivers/java/src/main/java/com/rethinkdb/gen/ast/IndexStatus.java b/drivers/java/src/main/java/com/rethinkdb/gen/ast/IndexStatus.java deleted file mode 100644 index fbcb6be47b4..00000000000 --- a/drivers/java/src/main/java/com/rethinkdb/gen/ast/IndexStatus.java +++ /dev/null @@ -1,29 +0,0 @@ -// Autogenerated by metajava.py. -// Do not edit this file directly. -// The template for this file is located at: -// ../../../../../../../../templates/AstSubclass.java - -package com.rethinkdb.gen.ast; - -import com.rethinkdb.gen.proto.TermType; -import com.rethinkdb.gen.exc.ReqlDriverError; -import com.rethinkdb.model.Arguments; -import com.rethinkdb.model.OptArgs; -import com.rethinkdb.ast.ReqlAst; - - - -public class IndexStatus extends ReqlExpr { - - - public IndexStatus(Object arg) { - this(new Arguments(arg), null); - } - public IndexStatus(Arguments args){ - this(args, null); - } - public IndexStatus(Arguments args, OptArgs optargs) { - super(TermType.INDEX_STATUS, args, optargs); - } - -} diff --git a/drivers/java/src/main/java/com/rethinkdb/gen/ast/IndexWait.java b/drivers/java/src/main/java/com/rethinkdb/gen/ast/IndexWait.java deleted file mode 100644 index f4d612099f8..00000000000 --- a/drivers/java/src/main/java/com/rethinkdb/gen/ast/IndexWait.java +++ /dev/null @@ -1,29 +0,0 @@ -// Autogenerated by metajava.py. -// Do not edit this file directly. -// The template for this file is located at: -// ../../../../../../../../templates/AstSubclass.java - -package com.rethinkdb.gen.ast; - -import com.rethinkdb.gen.proto.TermType; -import com.rethinkdb.gen.exc.ReqlDriverError; -import com.rethinkdb.model.Arguments; -import com.rethinkdb.model.OptArgs; -import com.rethinkdb.ast.ReqlAst; - - - -public class IndexWait extends ReqlExpr { - - - public IndexWait(Object arg) { - this(new Arguments(arg), null); - } - public IndexWait(Arguments args){ - this(args, null); - } - public IndexWait(Arguments args, OptArgs optargs) { - super(TermType.INDEX_WAIT, args, optargs); - } - -} diff --git a/drivers/java/src/main/java/com/rethinkdb/gen/ast/Info.java b/drivers/java/src/main/java/com/rethinkdb/gen/ast/Info.java deleted file mode 100644 index 44ff9fea841..00000000000 --- a/drivers/java/src/main/java/com/rethinkdb/gen/ast/Info.java +++ /dev/null @@ -1,29 +0,0 @@ -// Autogenerated by metajava.py. -// Do not edit this file directly. -// The template for this file is located at: -// ../../../../../../../../templates/AstSubclass.java - -package com.rethinkdb.gen.ast; - -import com.rethinkdb.gen.proto.TermType; -import com.rethinkdb.gen.exc.ReqlDriverError; -import com.rethinkdb.model.Arguments; -import com.rethinkdb.model.OptArgs; -import com.rethinkdb.ast.ReqlAst; - - - -public class Info extends ReqlExpr { - - - public Info(Object arg) { - this(new Arguments(arg), null); - } - public Info(Arguments args){ - this(args, null); - } - public Info(Arguments args, OptArgs optargs) { - super(TermType.INFO, args, optargs); - } - -} diff --git a/drivers/java/src/main/java/com/rethinkdb/gen/ast/InnerJoin.java b/drivers/java/src/main/java/com/rethinkdb/gen/ast/InnerJoin.java deleted file mode 100644 index 9888db64210..00000000000 --- a/drivers/java/src/main/java/com/rethinkdb/gen/ast/InnerJoin.java +++ /dev/null @@ -1,29 +0,0 @@ -// Autogenerated by metajava.py. -// Do not edit this file directly. -// The template for this file is located at: -// ../../../../../../../../templates/AstSubclass.java - -package com.rethinkdb.gen.ast; - -import com.rethinkdb.gen.proto.TermType; -import com.rethinkdb.gen.exc.ReqlDriverError; -import com.rethinkdb.model.Arguments; -import com.rethinkdb.model.OptArgs; -import com.rethinkdb.ast.ReqlAst; - - - -public class InnerJoin extends ReqlExpr { - - - public InnerJoin(Object arg) { - this(new Arguments(arg), null); - } - public InnerJoin(Arguments args){ - this(args, null); - } - public InnerJoin(Arguments args, OptArgs optargs) { - super(TermType.INNER_JOIN, args, optargs); - } - -} diff --git a/drivers/java/src/main/java/com/rethinkdb/gen/ast/Insert.java b/drivers/java/src/main/java/com/rethinkdb/gen/ast/Insert.java deleted file mode 100644 index 8ac68560753..00000000000 --- a/drivers/java/src/main/java/com/rethinkdb/gen/ast/Insert.java +++ /dev/null @@ -1,53 +0,0 @@ -// Autogenerated by metajava.py. -// Do not edit this file directly. -// The template for this file is located at: -// ../../../../../../../../templates/AstSubclass.java - -package com.rethinkdb.gen.ast; - -import com.rethinkdb.gen.proto.TermType; -import com.rethinkdb.gen.exc.ReqlDriverError; -import com.rethinkdb.model.Arguments; -import com.rethinkdb.model.OptArgs; -import com.rethinkdb.ast.ReqlAst; - - - -public class Insert extends ReqlExpr { - - - public Insert(Object arg) { - this(new Arguments(arg), null); - } - public Insert(Arguments args){ - this(args, null); - } - public Insert(Arguments args, OptArgs optargs) { - super(TermType.INSERT, args, optargs); - } - public Insert optArg(String optname, Object value) { - OptArgs newOptargs = OptArgs.fromMap(optargs).with(optname, value); - return new Insert(args, newOptargs); - } - public Insert optArg(String optname, ReqlFunction0 value) { - OptArgs newOptargs = OptArgs.fromMap(optargs).with(optname, value); - return new Insert(args, newOptargs); - } - public Insert optArg(String optname, ReqlFunction1 value) { - OptArgs newOptargs = OptArgs.fromMap(optargs).with(optname, value); - return new Insert(args, newOptargs); - } - public Insert optArg(String optname, ReqlFunction2 value) { - OptArgs newOptargs = OptArgs.fromMap(optargs).with(optname, value); - return new Insert(args, newOptargs); - } - public Insert optArg(String optname, ReqlFunction3 value) { - OptArgs newOptargs = OptArgs.fromMap(optargs).with(optname, value); - return new Insert(args, newOptargs); - } - public Insert optArg(String optname, ReqlFunction4 value) { - OptArgs newOptargs = OptArgs.fromMap(optargs).with(optname, value); - return new Insert(args, newOptargs); - } - -} diff --git a/drivers/java/src/main/java/com/rethinkdb/gen/ast/InsertAt.java b/drivers/java/src/main/java/com/rethinkdb/gen/ast/InsertAt.java deleted file mode 100644 index b7dad380630..00000000000 --- a/drivers/java/src/main/java/com/rethinkdb/gen/ast/InsertAt.java +++ /dev/null @@ -1,29 +0,0 @@ -// Autogenerated by metajava.py. -// Do not edit this file directly. -// The template for this file is located at: -// ../../../../../../../../templates/AstSubclass.java - -package com.rethinkdb.gen.ast; - -import com.rethinkdb.gen.proto.TermType; -import com.rethinkdb.gen.exc.ReqlDriverError; -import com.rethinkdb.model.Arguments; -import com.rethinkdb.model.OptArgs; -import com.rethinkdb.ast.ReqlAst; - - - -public class InsertAt extends ReqlExpr { - - - public InsertAt(Object arg) { - this(new Arguments(arg), null); - } - public InsertAt(Arguments args){ - this(args, null); - } - public InsertAt(Arguments args, OptArgs optargs) { - super(TermType.INSERT_AT, args, optargs); - } - -} diff --git a/drivers/java/src/main/java/com/rethinkdb/gen/ast/Intersects.java b/drivers/java/src/main/java/com/rethinkdb/gen/ast/Intersects.java deleted file mode 100644 index ffc4db57d39..00000000000 --- a/drivers/java/src/main/java/com/rethinkdb/gen/ast/Intersects.java +++ /dev/null @@ -1,29 +0,0 @@ -// Autogenerated by metajava.py. -// Do not edit this file directly. -// The template for this file is located at: -// ../../../../../../../../templates/AstSubclass.java - -package com.rethinkdb.gen.ast; - -import com.rethinkdb.gen.proto.TermType; -import com.rethinkdb.gen.exc.ReqlDriverError; -import com.rethinkdb.model.Arguments; -import com.rethinkdb.model.OptArgs; -import com.rethinkdb.ast.ReqlAst; - - - -public class Intersects extends ReqlExpr { - - - public Intersects(Object arg) { - this(new Arguments(arg), null); - } - public Intersects(Arguments args){ - this(args, null); - } - public Intersects(Arguments args, OptArgs optargs) { - super(TermType.INTERSECTS, args, optargs); - } - -} diff --git a/drivers/java/src/main/java/com/rethinkdb/gen/ast/IsEmpty.java b/drivers/java/src/main/java/com/rethinkdb/gen/ast/IsEmpty.java deleted file mode 100644 index fb848345055..00000000000 --- a/drivers/java/src/main/java/com/rethinkdb/gen/ast/IsEmpty.java +++ /dev/null @@ -1,29 +0,0 @@ -// Autogenerated by metajava.py. -// Do not edit this file directly. -// The template for this file is located at: -// ../../../../../../../../templates/AstSubclass.java - -package com.rethinkdb.gen.ast; - -import com.rethinkdb.gen.proto.TermType; -import com.rethinkdb.gen.exc.ReqlDriverError; -import com.rethinkdb.model.Arguments; -import com.rethinkdb.model.OptArgs; -import com.rethinkdb.ast.ReqlAst; - - - -public class IsEmpty extends ReqlExpr { - - - public IsEmpty(Object arg) { - this(new Arguments(arg), null); - } - public IsEmpty(Arguments args){ - this(args, null); - } - public IsEmpty(Arguments args, OptArgs optargs) { - super(TermType.IS_EMPTY, args, optargs); - } - -} diff --git a/drivers/java/src/main/java/com/rethinkdb/gen/ast/Iso8601.java b/drivers/java/src/main/java/com/rethinkdb/gen/ast/Iso8601.java deleted file mode 100644 index 4e13e2bf1cc..00000000000 --- a/drivers/java/src/main/java/com/rethinkdb/gen/ast/Iso8601.java +++ /dev/null @@ -1,57 +0,0 @@ -// Autogenerated by metajava.py. -// Do not edit this file directly. -// The template for this file is located at: -// ../../../../../../../../templates/ast/Iso8601.java - -package com.rethinkdb.gen.ast; - -import com.rethinkdb.gen.proto.TermType; -import com.rethinkdb.gen.exc.ReqlDriverError; -import com.rethinkdb.model.Arguments; -import com.rethinkdb.model.OptArgs; -import com.rethinkdb.ast.ReqlAst; - - - -public class Iso8601 extends ReqlExpr { - - - public Iso8601(Object arg) { - this(new Arguments(arg), null); - } - public Iso8601(Arguments args){ - this(args, null); - } - public Iso8601(Arguments args, OptArgs optargs) { - super(TermType.ISO8601, args, optargs); - } - public Iso8601 optArg(String optname, Object value) { - OptArgs newOptargs = OptArgs.fromMap(optargs).with(optname, value); - return new Iso8601(args, newOptargs); - } - public Iso8601 optArg(String optname, ReqlFunction0 value) { - OptArgs newOptargs = OptArgs.fromMap(optargs).with(optname, value); - return new Iso8601(args, newOptargs); - } - public Iso8601 optArg(String optname, ReqlFunction1 value) { - OptArgs newOptargs = OptArgs.fromMap(optargs).with(optname, value); - return new Iso8601(args, newOptargs); - } - public Iso8601 optArg(String optname, ReqlFunction2 value) { - OptArgs newOptargs = OptArgs.fromMap(optargs).with(optname, value); - return new Iso8601(args, newOptargs); - } - public Iso8601 optArg(String optname, ReqlFunction3 value) { - OptArgs newOptargs = OptArgs.fromMap(optargs).with(optname, value); - return new Iso8601(args, newOptargs); - } - public Iso8601 optArg(String optname, ReqlFunction4 value) { - OptArgs newOptargs = OptArgs.fromMap(optargs).with(optname, value); - return new Iso8601(args, newOptargs); - } - - - public static Iso8601 fromString(String iso) { - return new Iso8601(new Arguments(iso), null); - } -} diff --git a/drivers/java/src/main/java/com/rethinkdb/gen/ast/January.java b/drivers/java/src/main/java/com/rethinkdb/gen/ast/January.java deleted file mode 100644 index 2c56a902f92..00000000000 --- a/drivers/java/src/main/java/com/rethinkdb/gen/ast/January.java +++ /dev/null @@ -1,29 +0,0 @@ -// Autogenerated by metajava.py. -// Do not edit this file directly. -// The template for this file is located at: -// ../../../../../../../../templates/AstSubclass.java - -package com.rethinkdb.gen.ast; - -import com.rethinkdb.gen.proto.TermType; -import com.rethinkdb.gen.exc.ReqlDriverError; -import com.rethinkdb.model.Arguments; -import com.rethinkdb.model.OptArgs; -import com.rethinkdb.ast.ReqlAst; - - - -public class January extends ReqlExpr { - - - public January(Object arg) { - this(new Arguments(arg), null); - } - public January(Arguments args){ - this(args, null); - } - public January(Arguments args, OptArgs optargs) { - super(TermType.JANUARY, args, optargs); - } - -} diff --git a/drivers/java/src/main/java/com/rethinkdb/gen/ast/Javascript.java b/drivers/java/src/main/java/com/rethinkdb/gen/ast/Javascript.java deleted file mode 100644 index 0da3eb0bab6..00000000000 --- a/drivers/java/src/main/java/com/rethinkdb/gen/ast/Javascript.java +++ /dev/null @@ -1,53 +0,0 @@ -// Autogenerated by metajava.py. -// Do not edit this file directly. -// The template for this file is located at: -// ../../../../../../../../templates/AstSubclass.java - -package com.rethinkdb.gen.ast; - -import com.rethinkdb.gen.proto.TermType; -import com.rethinkdb.gen.exc.ReqlDriverError; -import com.rethinkdb.model.Arguments; -import com.rethinkdb.model.OptArgs; -import com.rethinkdb.ast.ReqlAst; - - - -public class Javascript extends ReqlExpr { - - - public Javascript(Object arg) { - this(new Arguments(arg), null); - } - public Javascript(Arguments args){ - this(args, null); - } - public Javascript(Arguments args, OptArgs optargs) { - super(TermType.JAVASCRIPT, args, optargs); - } - public Javascript optArg(String optname, Object value) { - OptArgs newOptargs = OptArgs.fromMap(optargs).with(optname, value); - return new Javascript(args, newOptargs); - } - public Javascript optArg(String optname, ReqlFunction0 value) { - OptArgs newOptargs = OptArgs.fromMap(optargs).with(optname, value); - return new Javascript(args, newOptargs); - } - public Javascript optArg(String optname, ReqlFunction1 value) { - OptArgs newOptargs = OptArgs.fromMap(optargs).with(optname, value); - return new Javascript(args, newOptargs); - } - public Javascript optArg(String optname, ReqlFunction2 value) { - OptArgs newOptargs = OptArgs.fromMap(optargs).with(optname, value); - return new Javascript(args, newOptargs); - } - public Javascript optArg(String optname, ReqlFunction3 value) { - OptArgs newOptargs = OptArgs.fromMap(optargs).with(optname, value); - return new Javascript(args, newOptargs); - } - public Javascript optArg(String optname, ReqlFunction4 value) { - OptArgs newOptargs = OptArgs.fromMap(optargs).with(optname, value); - return new Javascript(args, newOptargs); - } - -} diff --git a/drivers/java/src/main/java/com/rethinkdb/gen/ast/Json.java b/drivers/java/src/main/java/com/rethinkdb/gen/ast/Json.java deleted file mode 100644 index 407dce27706..00000000000 --- a/drivers/java/src/main/java/com/rethinkdb/gen/ast/Json.java +++ /dev/null @@ -1,29 +0,0 @@ -// Autogenerated by metajava.py. -// Do not edit this file directly. -// The template for this file is located at: -// ../../../../../../../../templates/AstSubclass.java - -package com.rethinkdb.gen.ast; - -import com.rethinkdb.gen.proto.TermType; -import com.rethinkdb.gen.exc.ReqlDriverError; -import com.rethinkdb.model.Arguments; -import com.rethinkdb.model.OptArgs; -import com.rethinkdb.ast.ReqlAst; - - - -public class Json extends ReqlExpr { - - - public Json(Object arg) { - this(new Arguments(arg), null); - } - public Json(Arguments args){ - this(args, null); - } - public Json(Arguments args, OptArgs optargs) { - super(TermType.JSON, args, optargs); - } - -} diff --git a/drivers/java/src/main/java/com/rethinkdb/gen/ast/July.java b/drivers/java/src/main/java/com/rethinkdb/gen/ast/July.java deleted file mode 100644 index 8c529121032..00000000000 --- a/drivers/java/src/main/java/com/rethinkdb/gen/ast/July.java +++ /dev/null @@ -1,29 +0,0 @@ -// Autogenerated by metajava.py. -// Do not edit this file directly. -// The template for this file is located at: -// ../../../../../../../../templates/AstSubclass.java - -package com.rethinkdb.gen.ast; - -import com.rethinkdb.gen.proto.TermType; -import com.rethinkdb.gen.exc.ReqlDriverError; -import com.rethinkdb.model.Arguments; -import com.rethinkdb.model.OptArgs; -import com.rethinkdb.ast.ReqlAst; - - - -public class July extends ReqlExpr { - - - public July(Object arg) { - this(new Arguments(arg), null); - } - public July(Arguments args){ - this(args, null); - } - public July(Arguments args, OptArgs optargs) { - super(TermType.JULY, args, optargs); - } - -} diff --git a/drivers/java/src/main/java/com/rethinkdb/gen/ast/June.java b/drivers/java/src/main/java/com/rethinkdb/gen/ast/June.java deleted file mode 100644 index 849a1170046..00000000000 --- a/drivers/java/src/main/java/com/rethinkdb/gen/ast/June.java +++ /dev/null @@ -1,29 +0,0 @@ -// Autogenerated by metajava.py. -// Do not edit this file directly. -// The template for this file is located at: -// ../../../../../../../../templates/AstSubclass.java - -package com.rethinkdb.gen.ast; - -import com.rethinkdb.gen.proto.TermType; -import com.rethinkdb.gen.exc.ReqlDriverError; -import com.rethinkdb.model.Arguments; -import com.rethinkdb.model.OptArgs; -import com.rethinkdb.ast.ReqlAst; - - - -public class June extends ReqlExpr { - - - public June(Object arg) { - this(new Arguments(arg), null); - } - public June(Arguments args){ - this(args, null); - } - public June(Arguments args, OptArgs optargs) { - super(TermType.JUNE, args, optargs); - } - -} diff --git a/drivers/java/src/main/java/com/rethinkdb/gen/ast/Keys.java b/drivers/java/src/main/java/com/rethinkdb/gen/ast/Keys.java deleted file mode 100644 index 1cffb7b5ad5..00000000000 --- a/drivers/java/src/main/java/com/rethinkdb/gen/ast/Keys.java +++ /dev/null @@ -1,29 +0,0 @@ -// Autogenerated by metajava.py. -// Do not edit this file directly. -// The template for this file is located at: -// ../../../../../../../../templates/AstSubclass.java - -package com.rethinkdb.gen.ast; - -import com.rethinkdb.gen.proto.TermType; -import com.rethinkdb.gen.exc.ReqlDriverError; -import com.rethinkdb.model.Arguments; -import com.rethinkdb.model.OptArgs; -import com.rethinkdb.ast.ReqlAst; - - - -public class Keys extends ReqlExpr { - - - public Keys(Object arg) { - this(new Arguments(arg), null); - } - public Keys(Arguments args){ - this(args, null); - } - public Keys(Arguments args, OptArgs optargs) { - super(TermType.KEYS, args, optargs); - } - -} diff --git a/drivers/java/src/main/java/com/rethinkdb/gen/ast/Le.java b/drivers/java/src/main/java/com/rethinkdb/gen/ast/Le.java deleted file mode 100644 index be2a67cbaa8..00000000000 --- a/drivers/java/src/main/java/com/rethinkdb/gen/ast/Le.java +++ /dev/null @@ -1,29 +0,0 @@ -// Autogenerated by metajava.py. -// Do not edit this file directly. -// The template for this file is located at: -// ../../../../../../../../templates/AstSubclass.java - -package com.rethinkdb.gen.ast; - -import com.rethinkdb.gen.proto.TermType; -import com.rethinkdb.gen.exc.ReqlDriverError; -import com.rethinkdb.model.Arguments; -import com.rethinkdb.model.OptArgs; -import com.rethinkdb.ast.ReqlAst; - - - -public class Le extends ReqlExpr { - - - public Le(Object arg) { - this(new Arguments(arg), null); - } - public Le(Arguments args){ - this(args, null); - } - public Le(Arguments args, OptArgs optargs) { - super(TermType.LE, args, optargs); - } - -} diff --git a/drivers/java/src/main/java/com/rethinkdb/gen/ast/Limit.java b/drivers/java/src/main/java/com/rethinkdb/gen/ast/Limit.java deleted file mode 100644 index 36ec544b8e5..00000000000 --- a/drivers/java/src/main/java/com/rethinkdb/gen/ast/Limit.java +++ /dev/null @@ -1,29 +0,0 @@ -// Autogenerated by metajava.py. -// Do not edit this file directly. -// The template for this file is located at: -// ../../../../../../../../templates/AstSubclass.java - -package com.rethinkdb.gen.ast; - -import com.rethinkdb.gen.proto.TermType; -import com.rethinkdb.gen.exc.ReqlDriverError; -import com.rethinkdb.model.Arguments; -import com.rethinkdb.model.OptArgs; -import com.rethinkdb.ast.ReqlAst; - - - -public class Limit extends ReqlExpr { - - - public Limit(Object arg) { - this(new Arguments(arg), null); - } - public Limit(Arguments args){ - this(args, null); - } - public Limit(Arguments args, OptArgs optargs) { - super(TermType.LIMIT, args, optargs); - } - -} diff --git a/drivers/java/src/main/java/com/rethinkdb/gen/ast/Line.java b/drivers/java/src/main/java/com/rethinkdb/gen/ast/Line.java deleted file mode 100644 index d6c2a16402f..00000000000 --- a/drivers/java/src/main/java/com/rethinkdb/gen/ast/Line.java +++ /dev/null @@ -1,29 +0,0 @@ -// Autogenerated by metajava.py. -// Do not edit this file directly. -// The template for this file is located at: -// ../../../../../../../../templates/AstSubclass.java - -package com.rethinkdb.gen.ast; - -import com.rethinkdb.gen.proto.TermType; -import com.rethinkdb.gen.exc.ReqlDriverError; -import com.rethinkdb.model.Arguments; -import com.rethinkdb.model.OptArgs; -import com.rethinkdb.ast.ReqlAst; - - - -public class Line extends ReqlExpr { - - - public Line(Object arg) { - this(new Arguments(arg), null); - } - public Line(Arguments args){ - this(args, null); - } - public Line(Arguments args, OptArgs optargs) { - super(TermType.LINE, args, optargs); - } - -} diff --git a/drivers/java/src/main/java/com/rethinkdb/gen/ast/Literal.java b/drivers/java/src/main/java/com/rethinkdb/gen/ast/Literal.java deleted file mode 100644 index f4a4c1aa804..00000000000 --- a/drivers/java/src/main/java/com/rethinkdb/gen/ast/Literal.java +++ /dev/null @@ -1,29 +0,0 @@ -// Autogenerated by metajava.py. -// Do not edit this file directly. -// The template for this file is located at: -// ../../../../../../../../templates/AstSubclass.java - -package com.rethinkdb.gen.ast; - -import com.rethinkdb.gen.proto.TermType; -import com.rethinkdb.gen.exc.ReqlDriverError; -import com.rethinkdb.model.Arguments; -import com.rethinkdb.model.OptArgs; -import com.rethinkdb.ast.ReqlAst; - - - -public class Literal extends ReqlExpr { - - - public Literal(Object arg) { - this(new Arguments(arg), null); - } - public Literal(Arguments args){ - this(args, null); - } - public Literal(Arguments args, OptArgs optargs) { - super(TermType.LITERAL, args, optargs); - } - -} diff --git a/drivers/java/src/main/java/com/rethinkdb/gen/ast/Lt.java b/drivers/java/src/main/java/com/rethinkdb/gen/ast/Lt.java deleted file mode 100644 index 0d56bb2c366..00000000000 --- a/drivers/java/src/main/java/com/rethinkdb/gen/ast/Lt.java +++ /dev/null @@ -1,29 +0,0 @@ -// Autogenerated by metajava.py. -// Do not edit this file directly. -// The template for this file is located at: -// ../../../../../../../../templates/AstSubclass.java - -package com.rethinkdb.gen.ast; - -import com.rethinkdb.gen.proto.TermType; -import com.rethinkdb.gen.exc.ReqlDriverError; -import com.rethinkdb.model.Arguments; -import com.rethinkdb.model.OptArgs; -import com.rethinkdb.ast.ReqlAst; - - - -public class Lt extends ReqlExpr { - - - public Lt(Object arg) { - this(new Arguments(arg), null); - } - public Lt(Arguments args){ - this(args, null); - } - public Lt(Arguments args, OptArgs optargs) { - super(TermType.LT, args, optargs); - } - -} diff --git a/drivers/java/src/main/java/com/rethinkdb/gen/ast/MakeArray.java b/drivers/java/src/main/java/com/rethinkdb/gen/ast/MakeArray.java deleted file mode 100644 index 54233b31b90..00000000000 --- a/drivers/java/src/main/java/com/rethinkdb/gen/ast/MakeArray.java +++ /dev/null @@ -1,29 +0,0 @@ -// Autogenerated by metajava.py. -// Do not edit this file directly. -// The template for this file is located at: -// ../../../../../../../../templates/AstSubclass.java - -package com.rethinkdb.gen.ast; - -import com.rethinkdb.gen.proto.TermType; -import com.rethinkdb.gen.exc.ReqlDriverError; -import com.rethinkdb.model.Arguments; -import com.rethinkdb.model.OptArgs; -import com.rethinkdb.ast.ReqlAst; - - - -public class MakeArray extends ReqlExpr { - - - public MakeArray(Object arg) { - this(new Arguments(arg), null); - } - public MakeArray(Arguments args){ - this(args, null); - } - public MakeArray(Arguments args, OptArgs optargs) { - super(TermType.MAKE_ARRAY, args, optargs); - } - -} diff --git a/drivers/java/src/main/java/com/rethinkdb/gen/ast/MakeObj.java b/drivers/java/src/main/java/com/rethinkdb/gen/ast/MakeObj.java deleted file mode 100644 index 320813fb872..00000000000 --- a/drivers/java/src/main/java/com/rethinkdb/gen/ast/MakeObj.java +++ /dev/null @@ -1,37 +0,0 @@ -// Autogenerated by metajava.py. -// Do not edit this file directly. -// The template for this file is located at: -// ../../../../../../../../templates/ast/MakeObj.java - -package com.rethinkdb.gen.ast; - -import com.rethinkdb.gen.proto.TermType; -import com.rethinkdb.gen.exc.ReqlDriverError; -import com.rethinkdb.model.Arguments; -import com.rethinkdb.model.OptArgs; -import com.rethinkdb.ast.ReqlAst; - - - -public class MakeObj extends ReqlExpr { - - public MakeObj(Object arg) { - this(new Arguments(arg), null); - } - public MakeObj(OptArgs opts){ - this(new Arguments(), opts); - } - public MakeObj(Arguments args){ - this(args, null); - } - public MakeObj(Arguments args, OptArgs optargs) { - this(TermType.MAKE_OBJ, args, optargs); - } - protected MakeObj(TermType termType, Arguments args, OptArgs optargs){ - super(termType, args, optargs); - } - - public static MakeObj fromMap(java.util.Map map){ - return new MakeObj(OptArgs.fromMap(map)); - } -} diff --git a/drivers/java/src/main/java/com/rethinkdb/gen/ast/Map.java b/drivers/java/src/main/java/com/rethinkdb/gen/ast/Map.java deleted file mode 100644 index 1966f17658a..00000000000 --- a/drivers/java/src/main/java/com/rethinkdb/gen/ast/Map.java +++ /dev/null @@ -1,29 +0,0 @@ -// Autogenerated by metajava.py. -// Do not edit this file directly. -// The template for this file is located at: -// ../../../../../../../../templates/AstSubclass.java - -package com.rethinkdb.gen.ast; - -import com.rethinkdb.gen.proto.TermType; -import com.rethinkdb.gen.exc.ReqlDriverError; -import com.rethinkdb.model.Arguments; -import com.rethinkdb.model.OptArgs; -import com.rethinkdb.ast.ReqlAst; - - - -public class Map extends ReqlExpr { - - - public Map(Object arg) { - this(new Arguments(arg), null); - } - public Map(Arguments args){ - this(args, null); - } - public Map(Arguments args, OptArgs optargs) { - super(TermType.MAP, args, optargs); - } - -} diff --git a/drivers/java/src/main/java/com/rethinkdb/gen/ast/March.java b/drivers/java/src/main/java/com/rethinkdb/gen/ast/March.java deleted file mode 100644 index 7e9aa83a61b..00000000000 --- a/drivers/java/src/main/java/com/rethinkdb/gen/ast/March.java +++ /dev/null @@ -1,29 +0,0 @@ -// Autogenerated by metajava.py. -// Do not edit this file directly. -// The template for this file is located at: -// ../../../../../../../../templates/AstSubclass.java - -package com.rethinkdb.gen.ast; - -import com.rethinkdb.gen.proto.TermType; -import com.rethinkdb.gen.exc.ReqlDriverError; -import com.rethinkdb.model.Arguments; -import com.rethinkdb.model.OptArgs; -import com.rethinkdb.ast.ReqlAst; - - - -public class March extends ReqlExpr { - - - public March(Object arg) { - this(new Arguments(arg), null); - } - public March(Arguments args){ - this(args, null); - } - public March(Arguments args, OptArgs optargs) { - super(TermType.MARCH, args, optargs); - } - -} diff --git a/drivers/java/src/main/java/com/rethinkdb/gen/ast/Match.java b/drivers/java/src/main/java/com/rethinkdb/gen/ast/Match.java deleted file mode 100644 index aaa98bc4ed9..00000000000 --- a/drivers/java/src/main/java/com/rethinkdb/gen/ast/Match.java +++ /dev/null @@ -1,29 +0,0 @@ -// Autogenerated by metajava.py. -// Do not edit this file directly. -// The template for this file is located at: -// ../../../../../../../../templates/AstSubclass.java - -package com.rethinkdb.gen.ast; - -import com.rethinkdb.gen.proto.TermType; -import com.rethinkdb.gen.exc.ReqlDriverError; -import com.rethinkdb.model.Arguments; -import com.rethinkdb.model.OptArgs; -import com.rethinkdb.ast.ReqlAst; - - - -public class Match extends ReqlExpr { - - - public Match(Object arg) { - this(new Arguments(arg), null); - } - public Match(Arguments args){ - this(args, null); - } - public Match(Arguments args, OptArgs optargs) { - super(TermType.MATCH, args, optargs); - } - -} diff --git a/drivers/java/src/main/java/com/rethinkdb/gen/ast/Max.java b/drivers/java/src/main/java/com/rethinkdb/gen/ast/Max.java deleted file mode 100644 index 4646b3f877e..00000000000 --- a/drivers/java/src/main/java/com/rethinkdb/gen/ast/Max.java +++ /dev/null @@ -1,53 +0,0 @@ -// Autogenerated by metajava.py. -// Do not edit this file directly. -// The template for this file is located at: -// ../../../../../../../../templates/AstSubclass.java - -package com.rethinkdb.gen.ast; - -import com.rethinkdb.gen.proto.TermType; -import com.rethinkdb.gen.exc.ReqlDriverError; -import com.rethinkdb.model.Arguments; -import com.rethinkdb.model.OptArgs; -import com.rethinkdb.ast.ReqlAst; - - - -public class Max extends ReqlExpr { - - - public Max(Object arg) { - this(new Arguments(arg), null); - } - public Max(Arguments args){ - this(args, null); - } - public Max(Arguments args, OptArgs optargs) { - super(TermType.MAX, args, optargs); - } - public Max optArg(String optname, Object value) { - OptArgs newOptargs = OptArgs.fromMap(optargs).with(optname, value); - return new Max(args, newOptargs); - } - public Max optArg(String optname, ReqlFunction0 value) { - OptArgs newOptargs = OptArgs.fromMap(optargs).with(optname, value); - return new Max(args, newOptargs); - } - public Max optArg(String optname, ReqlFunction1 value) { - OptArgs newOptargs = OptArgs.fromMap(optargs).with(optname, value); - return new Max(args, newOptargs); - } - public Max optArg(String optname, ReqlFunction2 value) { - OptArgs newOptargs = OptArgs.fromMap(optargs).with(optname, value); - return new Max(args, newOptargs); - } - public Max optArg(String optname, ReqlFunction3 value) { - OptArgs newOptargs = OptArgs.fromMap(optargs).with(optname, value); - return new Max(args, newOptargs); - } - public Max optArg(String optname, ReqlFunction4 value) { - OptArgs newOptargs = OptArgs.fromMap(optargs).with(optname, value); - return new Max(args, newOptargs); - } - -} diff --git a/drivers/java/src/main/java/com/rethinkdb/gen/ast/Maxval.java b/drivers/java/src/main/java/com/rethinkdb/gen/ast/Maxval.java deleted file mode 100644 index c8a8bf58be1..00000000000 --- a/drivers/java/src/main/java/com/rethinkdb/gen/ast/Maxval.java +++ /dev/null @@ -1,29 +0,0 @@ -// Autogenerated by metajava.py. -// Do not edit this file directly. -// The template for this file is located at: -// ../../../../../../../../templates/AstSubclass.java - -package com.rethinkdb.gen.ast; - -import com.rethinkdb.gen.proto.TermType; -import com.rethinkdb.gen.exc.ReqlDriverError; -import com.rethinkdb.model.Arguments; -import com.rethinkdb.model.OptArgs; -import com.rethinkdb.ast.ReqlAst; - - - -public class Maxval extends ReqlExpr { - - - public Maxval(Object arg) { - this(new Arguments(arg), null); - } - public Maxval(Arguments args){ - this(args, null); - } - public Maxval(Arguments args, OptArgs optargs) { - super(TermType.MAXVAL, args, optargs); - } - -} diff --git a/drivers/java/src/main/java/com/rethinkdb/gen/ast/May.java b/drivers/java/src/main/java/com/rethinkdb/gen/ast/May.java deleted file mode 100644 index 4839d3915f5..00000000000 --- a/drivers/java/src/main/java/com/rethinkdb/gen/ast/May.java +++ /dev/null @@ -1,29 +0,0 @@ -// Autogenerated by metajava.py. -// Do not edit this file directly. -// The template for this file is located at: -// ../../../../../../../../templates/AstSubclass.java - -package com.rethinkdb.gen.ast; - -import com.rethinkdb.gen.proto.TermType; -import com.rethinkdb.gen.exc.ReqlDriverError; -import com.rethinkdb.model.Arguments; -import com.rethinkdb.model.OptArgs; -import com.rethinkdb.ast.ReqlAst; - - - -public class May extends ReqlExpr { - - - public May(Object arg) { - this(new Arguments(arg), null); - } - public May(Arguments args){ - this(args, null); - } - public May(Arguments args, OptArgs optargs) { - super(TermType.MAY, args, optargs); - } - -} diff --git a/drivers/java/src/main/java/com/rethinkdb/gen/ast/Merge.java b/drivers/java/src/main/java/com/rethinkdb/gen/ast/Merge.java deleted file mode 100644 index 60cb3bb40f5..00000000000 --- a/drivers/java/src/main/java/com/rethinkdb/gen/ast/Merge.java +++ /dev/null @@ -1,29 +0,0 @@ -// Autogenerated by metajava.py. -// Do not edit this file directly. -// The template for this file is located at: -// ../../../../../../../../templates/AstSubclass.java - -package com.rethinkdb.gen.ast; - -import com.rethinkdb.gen.proto.TermType; -import com.rethinkdb.gen.exc.ReqlDriverError; -import com.rethinkdb.model.Arguments; -import com.rethinkdb.model.OptArgs; -import com.rethinkdb.ast.ReqlAst; - - - -public class Merge extends ReqlExpr { - - - public Merge(Object arg) { - this(new Arguments(arg), null); - } - public Merge(Arguments args){ - this(args, null); - } - public Merge(Arguments args, OptArgs optargs) { - super(TermType.MERGE, args, optargs); - } - -} diff --git a/drivers/java/src/main/java/com/rethinkdb/gen/ast/Min.java b/drivers/java/src/main/java/com/rethinkdb/gen/ast/Min.java deleted file mode 100644 index 7c79a48f342..00000000000 --- a/drivers/java/src/main/java/com/rethinkdb/gen/ast/Min.java +++ /dev/null @@ -1,53 +0,0 @@ -// Autogenerated by metajava.py. -// Do not edit this file directly. -// The template for this file is located at: -// ../../../../../../../../templates/AstSubclass.java - -package com.rethinkdb.gen.ast; - -import com.rethinkdb.gen.proto.TermType; -import com.rethinkdb.gen.exc.ReqlDriverError; -import com.rethinkdb.model.Arguments; -import com.rethinkdb.model.OptArgs; -import com.rethinkdb.ast.ReqlAst; - - - -public class Min extends ReqlExpr { - - - public Min(Object arg) { - this(new Arguments(arg), null); - } - public Min(Arguments args){ - this(args, null); - } - public Min(Arguments args, OptArgs optargs) { - super(TermType.MIN, args, optargs); - } - public Min optArg(String optname, Object value) { - OptArgs newOptargs = OptArgs.fromMap(optargs).with(optname, value); - return new Min(args, newOptargs); - } - public Min optArg(String optname, ReqlFunction0 value) { - OptArgs newOptargs = OptArgs.fromMap(optargs).with(optname, value); - return new Min(args, newOptargs); - } - public Min optArg(String optname, ReqlFunction1 value) { - OptArgs newOptargs = OptArgs.fromMap(optargs).with(optname, value); - return new Min(args, newOptargs); - } - public Min optArg(String optname, ReqlFunction2 value) { - OptArgs newOptargs = OptArgs.fromMap(optargs).with(optname, value); - return new Min(args, newOptargs); - } - public Min optArg(String optname, ReqlFunction3 value) { - OptArgs newOptargs = OptArgs.fromMap(optargs).with(optname, value); - return new Min(args, newOptargs); - } - public Min optArg(String optname, ReqlFunction4 value) { - OptArgs newOptargs = OptArgs.fromMap(optargs).with(optname, value); - return new Min(args, newOptargs); - } - -} diff --git a/drivers/java/src/main/java/com/rethinkdb/gen/ast/Minutes.java b/drivers/java/src/main/java/com/rethinkdb/gen/ast/Minutes.java deleted file mode 100644 index 6f562bac528..00000000000 --- a/drivers/java/src/main/java/com/rethinkdb/gen/ast/Minutes.java +++ /dev/null @@ -1,29 +0,0 @@ -// Autogenerated by metajava.py. -// Do not edit this file directly. -// The template for this file is located at: -// ../../../../../../../../templates/AstSubclass.java - -package com.rethinkdb.gen.ast; - -import com.rethinkdb.gen.proto.TermType; -import com.rethinkdb.gen.exc.ReqlDriverError; -import com.rethinkdb.model.Arguments; -import com.rethinkdb.model.OptArgs; -import com.rethinkdb.ast.ReqlAst; - - - -public class Minutes extends ReqlExpr { - - - public Minutes(Object arg) { - this(new Arguments(arg), null); - } - public Minutes(Arguments args){ - this(args, null); - } - public Minutes(Arguments args, OptArgs optargs) { - super(TermType.MINUTES, args, optargs); - } - -} diff --git a/drivers/java/src/main/java/com/rethinkdb/gen/ast/Minval.java b/drivers/java/src/main/java/com/rethinkdb/gen/ast/Minval.java deleted file mode 100644 index e912063808f..00000000000 --- a/drivers/java/src/main/java/com/rethinkdb/gen/ast/Minval.java +++ /dev/null @@ -1,29 +0,0 @@ -// Autogenerated by metajava.py. -// Do not edit this file directly. -// The template for this file is located at: -// ../../../../../../../../templates/AstSubclass.java - -package com.rethinkdb.gen.ast; - -import com.rethinkdb.gen.proto.TermType; -import com.rethinkdb.gen.exc.ReqlDriverError; -import com.rethinkdb.model.Arguments; -import com.rethinkdb.model.OptArgs; -import com.rethinkdb.ast.ReqlAst; - - - -public class Minval extends ReqlExpr { - - - public Minval(Object arg) { - this(new Arguments(arg), null); - } - public Minval(Arguments args){ - this(args, null); - } - public Minval(Arguments args, OptArgs optargs) { - super(TermType.MINVAL, args, optargs); - } - -} diff --git a/drivers/java/src/main/java/com/rethinkdb/gen/ast/Mod.java b/drivers/java/src/main/java/com/rethinkdb/gen/ast/Mod.java deleted file mode 100644 index 866a214e10b..00000000000 --- a/drivers/java/src/main/java/com/rethinkdb/gen/ast/Mod.java +++ /dev/null @@ -1,29 +0,0 @@ -// Autogenerated by metajava.py. -// Do not edit this file directly. -// The template for this file is located at: -// ../../../../../../../../templates/AstSubclass.java - -package com.rethinkdb.gen.ast; - -import com.rethinkdb.gen.proto.TermType; -import com.rethinkdb.gen.exc.ReqlDriverError; -import com.rethinkdb.model.Arguments; -import com.rethinkdb.model.OptArgs; -import com.rethinkdb.ast.ReqlAst; - - - -public class Mod extends ReqlExpr { - - - public Mod(Object arg) { - this(new Arguments(arg), null); - } - public Mod(Arguments args){ - this(args, null); - } - public Mod(Arguments args, OptArgs optargs) { - super(TermType.MOD, args, optargs); - } - -} diff --git a/drivers/java/src/main/java/com/rethinkdb/gen/ast/Monday.java b/drivers/java/src/main/java/com/rethinkdb/gen/ast/Monday.java deleted file mode 100644 index e677232eedc..00000000000 --- a/drivers/java/src/main/java/com/rethinkdb/gen/ast/Monday.java +++ /dev/null @@ -1,29 +0,0 @@ -// Autogenerated by metajava.py. -// Do not edit this file directly. -// The template for this file is located at: -// ../../../../../../../../templates/AstSubclass.java - -package com.rethinkdb.gen.ast; - -import com.rethinkdb.gen.proto.TermType; -import com.rethinkdb.gen.exc.ReqlDriverError; -import com.rethinkdb.model.Arguments; -import com.rethinkdb.model.OptArgs; -import com.rethinkdb.ast.ReqlAst; - - - -public class Monday extends ReqlExpr { - - - public Monday(Object arg) { - this(new Arguments(arg), null); - } - public Monday(Arguments args){ - this(args, null); - } - public Monday(Arguments args, OptArgs optargs) { - super(TermType.MONDAY, args, optargs); - } - -} diff --git a/drivers/java/src/main/java/com/rethinkdb/gen/ast/Month.java b/drivers/java/src/main/java/com/rethinkdb/gen/ast/Month.java deleted file mode 100644 index b0086882dad..00000000000 --- a/drivers/java/src/main/java/com/rethinkdb/gen/ast/Month.java +++ /dev/null @@ -1,29 +0,0 @@ -// Autogenerated by metajava.py. -// Do not edit this file directly. -// The template for this file is located at: -// ../../../../../../../../templates/AstSubclass.java - -package com.rethinkdb.gen.ast; - -import com.rethinkdb.gen.proto.TermType; -import com.rethinkdb.gen.exc.ReqlDriverError; -import com.rethinkdb.model.Arguments; -import com.rethinkdb.model.OptArgs; -import com.rethinkdb.ast.ReqlAst; - - - -public class Month extends ReqlExpr { - - - public Month(Object arg) { - this(new Arguments(arg), null); - } - public Month(Arguments args){ - this(args, null); - } - public Month(Arguments args, OptArgs optargs) { - super(TermType.MONTH, args, optargs); - } - -} diff --git a/drivers/java/src/main/java/com/rethinkdb/gen/ast/Mul.java b/drivers/java/src/main/java/com/rethinkdb/gen/ast/Mul.java deleted file mode 100644 index a2e584c79dd..00000000000 --- a/drivers/java/src/main/java/com/rethinkdb/gen/ast/Mul.java +++ /dev/null @@ -1,29 +0,0 @@ -// Autogenerated by metajava.py. -// Do not edit this file directly. -// The template for this file is located at: -// ../../../../../../../../templates/AstSubclass.java - -package com.rethinkdb.gen.ast; - -import com.rethinkdb.gen.proto.TermType; -import com.rethinkdb.gen.exc.ReqlDriverError; -import com.rethinkdb.model.Arguments; -import com.rethinkdb.model.OptArgs; -import com.rethinkdb.ast.ReqlAst; - - - -public class Mul extends ReqlExpr { - - - public Mul(Object arg) { - this(new Arguments(arg), null); - } - public Mul(Arguments args){ - this(args, null); - } - public Mul(Arguments args, OptArgs optargs) { - super(TermType.MUL, args, optargs); - } - -} diff --git a/drivers/java/src/main/java/com/rethinkdb/gen/ast/Ne.java b/drivers/java/src/main/java/com/rethinkdb/gen/ast/Ne.java deleted file mode 100644 index 24103b77975..00000000000 --- a/drivers/java/src/main/java/com/rethinkdb/gen/ast/Ne.java +++ /dev/null @@ -1,29 +0,0 @@ -// Autogenerated by metajava.py. -// Do not edit this file directly. -// The template for this file is located at: -// ../../../../../../../../templates/AstSubclass.java - -package com.rethinkdb.gen.ast; - -import com.rethinkdb.gen.proto.TermType; -import com.rethinkdb.gen.exc.ReqlDriverError; -import com.rethinkdb.model.Arguments; -import com.rethinkdb.model.OptArgs; -import com.rethinkdb.ast.ReqlAst; - - - -public class Ne extends ReqlExpr { - - - public Ne(Object arg) { - this(new Arguments(arg), null); - } - public Ne(Arguments args){ - this(args, null); - } - public Ne(Arguments args, OptArgs optargs) { - super(TermType.NE, args, optargs); - } - -} diff --git a/drivers/java/src/main/java/com/rethinkdb/gen/ast/Not.java b/drivers/java/src/main/java/com/rethinkdb/gen/ast/Not.java deleted file mode 100644 index ad0261e54a4..00000000000 --- a/drivers/java/src/main/java/com/rethinkdb/gen/ast/Not.java +++ /dev/null @@ -1,29 +0,0 @@ -// Autogenerated by metajava.py. -// Do not edit this file directly. -// The template for this file is located at: -// ../../../../../../../../templates/AstSubclass.java - -package com.rethinkdb.gen.ast; - -import com.rethinkdb.gen.proto.TermType; -import com.rethinkdb.gen.exc.ReqlDriverError; -import com.rethinkdb.model.Arguments; -import com.rethinkdb.model.OptArgs; -import com.rethinkdb.ast.ReqlAst; - - - -public class Not extends ReqlExpr { - - - public Not(Object arg) { - this(new Arguments(arg), null); - } - public Not(Arguments args){ - this(args, null); - } - public Not(Arguments args, OptArgs optargs) { - super(TermType.NOT, args, optargs); - } - -} diff --git a/drivers/java/src/main/java/com/rethinkdb/gen/ast/November.java b/drivers/java/src/main/java/com/rethinkdb/gen/ast/November.java deleted file mode 100644 index 6f361da2a04..00000000000 --- a/drivers/java/src/main/java/com/rethinkdb/gen/ast/November.java +++ /dev/null @@ -1,29 +0,0 @@ -// Autogenerated by metajava.py. -// Do not edit this file directly. -// The template for this file is located at: -// ../../../../../../../../templates/AstSubclass.java - -package com.rethinkdb.gen.ast; - -import com.rethinkdb.gen.proto.TermType; -import com.rethinkdb.gen.exc.ReqlDriverError; -import com.rethinkdb.model.Arguments; -import com.rethinkdb.model.OptArgs; -import com.rethinkdb.ast.ReqlAst; - - - -public class November extends ReqlExpr { - - - public November(Object arg) { - this(new Arguments(arg), null); - } - public November(Arguments args){ - this(args, null); - } - public November(Arguments args, OptArgs optargs) { - super(TermType.NOVEMBER, args, optargs); - } - -} diff --git a/drivers/java/src/main/java/com/rethinkdb/gen/ast/Now.java b/drivers/java/src/main/java/com/rethinkdb/gen/ast/Now.java deleted file mode 100644 index ffbbc7c740c..00000000000 --- a/drivers/java/src/main/java/com/rethinkdb/gen/ast/Now.java +++ /dev/null @@ -1,29 +0,0 @@ -// Autogenerated by metajava.py. -// Do not edit this file directly. -// The template for this file is located at: -// ../../../../../../../../templates/AstSubclass.java - -package com.rethinkdb.gen.ast; - -import com.rethinkdb.gen.proto.TermType; -import com.rethinkdb.gen.exc.ReqlDriverError; -import com.rethinkdb.model.Arguments; -import com.rethinkdb.model.OptArgs; -import com.rethinkdb.ast.ReqlAst; - - - -public class Now extends ReqlExpr { - - - public Now(Object arg) { - this(new Arguments(arg), null); - } - public Now(Arguments args){ - this(args, null); - } - public Now(Arguments args, OptArgs optargs) { - super(TermType.NOW, args, optargs); - } - -} diff --git a/drivers/java/src/main/java/com/rethinkdb/gen/ast/Nth.java b/drivers/java/src/main/java/com/rethinkdb/gen/ast/Nth.java deleted file mode 100644 index c128e72449a..00000000000 --- a/drivers/java/src/main/java/com/rethinkdb/gen/ast/Nth.java +++ /dev/null @@ -1,29 +0,0 @@ -// Autogenerated by metajava.py. -// Do not edit this file directly. -// The template for this file is located at: -// ../../../../../../../../templates/AstSubclass.java - -package com.rethinkdb.gen.ast; - -import com.rethinkdb.gen.proto.TermType; -import com.rethinkdb.gen.exc.ReqlDriverError; -import com.rethinkdb.model.Arguments; -import com.rethinkdb.model.OptArgs; -import com.rethinkdb.ast.ReqlAst; - - - -public class Nth extends ReqlExpr { - - - public Nth(Object arg) { - this(new Arguments(arg), null); - } - public Nth(Arguments args){ - this(args, null); - } - public Nth(Arguments args, OptArgs optargs) { - super(TermType.NTH, args, optargs); - } - -} diff --git a/drivers/java/src/main/java/com/rethinkdb/gen/ast/October.java b/drivers/java/src/main/java/com/rethinkdb/gen/ast/October.java deleted file mode 100644 index 8969506a013..00000000000 --- a/drivers/java/src/main/java/com/rethinkdb/gen/ast/October.java +++ /dev/null @@ -1,29 +0,0 @@ -// Autogenerated by metajava.py. -// Do not edit this file directly. -// The template for this file is located at: -// ../../../../../../../../templates/AstSubclass.java - -package com.rethinkdb.gen.ast; - -import com.rethinkdb.gen.proto.TermType; -import com.rethinkdb.gen.exc.ReqlDriverError; -import com.rethinkdb.model.Arguments; -import com.rethinkdb.model.OptArgs; -import com.rethinkdb.ast.ReqlAst; - - - -public class October extends ReqlExpr { - - - public October(Object arg) { - this(new Arguments(arg), null); - } - public October(Arguments args){ - this(args, null); - } - public October(Arguments args, OptArgs optargs) { - super(TermType.OCTOBER, args, optargs); - } - -} diff --git a/drivers/java/src/main/java/com/rethinkdb/gen/ast/OffsetsOf.java b/drivers/java/src/main/java/com/rethinkdb/gen/ast/OffsetsOf.java deleted file mode 100644 index 4bd476f8f2e..00000000000 --- a/drivers/java/src/main/java/com/rethinkdb/gen/ast/OffsetsOf.java +++ /dev/null @@ -1,29 +0,0 @@ -// Autogenerated by metajava.py. -// Do not edit this file directly. -// The template for this file is located at: -// ../../../../../../../../templates/AstSubclass.java - -package com.rethinkdb.gen.ast; - -import com.rethinkdb.gen.proto.TermType; -import com.rethinkdb.gen.exc.ReqlDriverError; -import com.rethinkdb.model.Arguments; -import com.rethinkdb.model.OptArgs; -import com.rethinkdb.ast.ReqlAst; - - - -public class OffsetsOf extends ReqlExpr { - - - public OffsetsOf(Object arg) { - this(new Arguments(arg), null); - } - public OffsetsOf(Arguments args){ - this(args, null); - } - public OffsetsOf(Arguments args, OptArgs optargs) { - super(TermType.OFFSETS_OF, args, optargs); - } - -} diff --git a/drivers/java/src/main/java/com/rethinkdb/gen/ast/Or.java b/drivers/java/src/main/java/com/rethinkdb/gen/ast/Or.java deleted file mode 100644 index 1c4ade8e8db..00000000000 --- a/drivers/java/src/main/java/com/rethinkdb/gen/ast/Or.java +++ /dev/null @@ -1,29 +0,0 @@ -// Autogenerated by metajava.py. -// Do not edit this file directly. -// The template for this file is located at: -// ../../../../../../../../templates/AstSubclass.java - -package com.rethinkdb.gen.ast; - -import com.rethinkdb.gen.proto.TermType; -import com.rethinkdb.gen.exc.ReqlDriverError; -import com.rethinkdb.model.Arguments; -import com.rethinkdb.model.OptArgs; -import com.rethinkdb.ast.ReqlAst; - - - -public class Or extends ReqlExpr { - - - public Or(Object arg) { - this(new Arguments(arg), null); - } - public Or(Arguments args){ - this(args, null); - } - public Or(Arguments args, OptArgs optargs) { - super(TermType.OR, args, optargs); - } - -} diff --git a/drivers/java/src/main/java/com/rethinkdb/gen/ast/OrderBy.java b/drivers/java/src/main/java/com/rethinkdb/gen/ast/OrderBy.java deleted file mode 100644 index f14e7e4c5fe..00000000000 --- a/drivers/java/src/main/java/com/rethinkdb/gen/ast/OrderBy.java +++ /dev/null @@ -1,53 +0,0 @@ -// Autogenerated by metajava.py. -// Do not edit this file directly. -// The template for this file is located at: -// ../../../../../../../../templates/AstSubclass.java - -package com.rethinkdb.gen.ast; - -import com.rethinkdb.gen.proto.TermType; -import com.rethinkdb.gen.exc.ReqlDriverError; -import com.rethinkdb.model.Arguments; -import com.rethinkdb.model.OptArgs; -import com.rethinkdb.ast.ReqlAst; - - - -public class OrderBy extends ReqlExpr { - - - public OrderBy(Object arg) { - this(new Arguments(arg), null); - } - public OrderBy(Arguments args){ - this(args, null); - } - public OrderBy(Arguments args, OptArgs optargs) { - super(TermType.ORDER_BY, args, optargs); - } - public OrderBy optArg(String optname, Object value) { - OptArgs newOptargs = OptArgs.fromMap(optargs).with(optname, value); - return new OrderBy(args, newOptargs); - } - public OrderBy optArg(String optname, ReqlFunction0 value) { - OptArgs newOptargs = OptArgs.fromMap(optargs).with(optname, value); - return new OrderBy(args, newOptargs); - } - public OrderBy optArg(String optname, ReqlFunction1 value) { - OptArgs newOptargs = OptArgs.fromMap(optargs).with(optname, value); - return new OrderBy(args, newOptargs); - } - public OrderBy optArg(String optname, ReqlFunction2 value) { - OptArgs newOptargs = OptArgs.fromMap(optargs).with(optname, value); - return new OrderBy(args, newOptargs); - } - public OrderBy optArg(String optname, ReqlFunction3 value) { - OptArgs newOptargs = OptArgs.fromMap(optargs).with(optname, value); - return new OrderBy(args, newOptargs); - } - public OrderBy optArg(String optname, ReqlFunction4 value) { - OptArgs newOptargs = OptArgs.fromMap(optargs).with(optname, value); - return new OrderBy(args, newOptargs); - } - -} diff --git a/drivers/java/src/main/java/com/rethinkdb/gen/ast/OuterJoin.java b/drivers/java/src/main/java/com/rethinkdb/gen/ast/OuterJoin.java deleted file mode 100644 index 4988de17163..00000000000 --- a/drivers/java/src/main/java/com/rethinkdb/gen/ast/OuterJoin.java +++ /dev/null @@ -1,29 +0,0 @@ -// Autogenerated by metajava.py. -// Do not edit this file directly. -// The template for this file is located at: -// ../../../../../../../../templates/AstSubclass.java - -package com.rethinkdb.gen.ast; - -import com.rethinkdb.gen.proto.TermType; -import com.rethinkdb.gen.exc.ReqlDriverError; -import com.rethinkdb.model.Arguments; -import com.rethinkdb.model.OptArgs; -import com.rethinkdb.ast.ReqlAst; - - - -public class OuterJoin extends ReqlExpr { - - - public OuterJoin(Object arg) { - this(new Arguments(arg), null); - } - public OuterJoin(Arguments args){ - this(args, null); - } - public OuterJoin(Arguments args, OptArgs optargs) { - super(TermType.OUTER_JOIN, args, optargs); - } - -} diff --git a/drivers/java/src/main/java/com/rethinkdb/gen/ast/Pluck.java b/drivers/java/src/main/java/com/rethinkdb/gen/ast/Pluck.java deleted file mode 100644 index 7e9b8b1afb5..00000000000 --- a/drivers/java/src/main/java/com/rethinkdb/gen/ast/Pluck.java +++ /dev/null @@ -1,29 +0,0 @@ -// Autogenerated by metajava.py. -// Do not edit this file directly. -// The template for this file is located at: -// ../../../../../../../../templates/AstSubclass.java - -package com.rethinkdb.gen.ast; - -import com.rethinkdb.gen.proto.TermType; -import com.rethinkdb.gen.exc.ReqlDriverError; -import com.rethinkdb.model.Arguments; -import com.rethinkdb.model.OptArgs; -import com.rethinkdb.ast.ReqlAst; - - - -public class Pluck extends ReqlExpr { - - - public Pluck(Object arg) { - this(new Arguments(arg), null); - } - public Pluck(Arguments args){ - this(args, null); - } - public Pluck(Arguments args, OptArgs optargs) { - super(TermType.PLUCK, args, optargs); - } - -} diff --git a/drivers/java/src/main/java/com/rethinkdb/gen/ast/Point.java b/drivers/java/src/main/java/com/rethinkdb/gen/ast/Point.java deleted file mode 100644 index 0f766c1a674..00000000000 --- a/drivers/java/src/main/java/com/rethinkdb/gen/ast/Point.java +++ /dev/null @@ -1,29 +0,0 @@ -// Autogenerated by metajava.py. -// Do not edit this file directly. -// The template for this file is located at: -// ../../../../../../../../templates/AstSubclass.java - -package com.rethinkdb.gen.ast; - -import com.rethinkdb.gen.proto.TermType; -import com.rethinkdb.gen.exc.ReqlDriverError; -import com.rethinkdb.model.Arguments; -import com.rethinkdb.model.OptArgs; -import com.rethinkdb.ast.ReqlAst; - - - -public class Point extends ReqlExpr { - - - public Point(Object arg) { - this(new Arguments(arg), null); - } - public Point(Arguments args){ - this(args, null); - } - public Point(Arguments args, OptArgs optargs) { - super(TermType.POINT, args, optargs); - } - -} diff --git a/drivers/java/src/main/java/com/rethinkdb/gen/ast/Polygon.java b/drivers/java/src/main/java/com/rethinkdb/gen/ast/Polygon.java deleted file mode 100644 index 3775d6357e5..00000000000 --- a/drivers/java/src/main/java/com/rethinkdb/gen/ast/Polygon.java +++ /dev/null @@ -1,29 +0,0 @@ -// Autogenerated by metajava.py. -// Do not edit this file directly. -// The template for this file is located at: -// ../../../../../../../../templates/AstSubclass.java - -package com.rethinkdb.gen.ast; - -import com.rethinkdb.gen.proto.TermType; -import com.rethinkdb.gen.exc.ReqlDriverError; -import com.rethinkdb.model.Arguments; -import com.rethinkdb.model.OptArgs; -import com.rethinkdb.ast.ReqlAst; - - - -public class Polygon extends ReqlExpr { - - - public Polygon(Object arg) { - this(new Arguments(arg), null); - } - public Polygon(Arguments args){ - this(args, null); - } - public Polygon(Arguments args, OptArgs optargs) { - super(TermType.POLYGON, args, optargs); - } - -} diff --git a/drivers/java/src/main/java/com/rethinkdb/gen/ast/PolygonSub.java b/drivers/java/src/main/java/com/rethinkdb/gen/ast/PolygonSub.java deleted file mode 100644 index d285981545d..00000000000 --- a/drivers/java/src/main/java/com/rethinkdb/gen/ast/PolygonSub.java +++ /dev/null @@ -1,29 +0,0 @@ -// Autogenerated by metajava.py. -// Do not edit this file directly. -// The template for this file is located at: -// ../../../../../../../../templates/AstSubclass.java - -package com.rethinkdb.gen.ast; - -import com.rethinkdb.gen.proto.TermType; -import com.rethinkdb.gen.exc.ReqlDriverError; -import com.rethinkdb.model.Arguments; -import com.rethinkdb.model.OptArgs; -import com.rethinkdb.ast.ReqlAst; - - - -public class PolygonSub extends ReqlExpr { - - - public PolygonSub(Object arg) { - this(new Arguments(arg), null); - } - public PolygonSub(Arguments args){ - this(args, null); - } - public PolygonSub(Arguments args, OptArgs optargs) { - super(TermType.POLYGON_SUB, args, optargs); - } - -} diff --git a/drivers/java/src/main/java/com/rethinkdb/gen/ast/Prepend.java b/drivers/java/src/main/java/com/rethinkdb/gen/ast/Prepend.java deleted file mode 100644 index 3c04ce24dce..00000000000 --- a/drivers/java/src/main/java/com/rethinkdb/gen/ast/Prepend.java +++ /dev/null @@ -1,29 +0,0 @@ -// Autogenerated by metajava.py. -// Do not edit this file directly. -// The template for this file is located at: -// ../../../../../../../../templates/AstSubclass.java - -package com.rethinkdb.gen.ast; - -import com.rethinkdb.gen.proto.TermType; -import com.rethinkdb.gen.exc.ReqlDriverError; -import com.rethinkdb.model.Arguments; -import com.rethinkdb.model.OptArgs; -import com.rethinkdb.ast.ReqlAst; - - - -public class Prepend extends ReqlExpr { - - - public Prepend(Object arg) { - this(new Arguments(arg), null); - } - public Prepend(Arguments args){ - this(args, null); - } - public Prepend(Arguments args, OptArgs optargs) { - super(TermType.PREPEND, args, optargs); - } - -} diff --git a/drivers/java/src/main/java/com/rethinkdb/gen/ast/Random.java b/drivers/java/src/main/java/com/rethinkdb/gen/ast/Random.java deleted file mode 100644 index 73948b6d446..00000000000 --- a/drivers/java/src/main/java/com/rethinkdb/gen/ast/Random.java +++ /dev/null @@ -1,53 +0,0 @@ -// Autogenerated by metajava.py. -// Do not edit this file directly. -// The template for this file is located at: -// ../../../../../../../../templates/AstSubclass.java - -package com.rethinkdb.gen.ast; - -import com.rethinkdb.gen.proto.TermType; -import com.rethinkdb.gen.exc.ReqlDriverError; -import com.rethinkdb.model.Arguments; -import com.rethinkdb.model.OptArgs; -import com.rethinkdb.ast.ReqlAst; - - - -public class Random extends ReqlExpr { - - - public Random(Object arg) { - this(new Arguments(arg), null); - } - public Random(Arguments args){ - this(args, null); - } - public Random(Arguments args, OptArgs optargs) { - super(TermType.RANDOM, args, optargs); - } - public Random optArg(String optname, Object value) { - OptArgs newOptargs = OptArgs.fromMap(optargs).with(optname, value); - return new Random(args, newOptargs); - } - public Random optArg(String optname, ReqlFunction0 value) { - OptArgs newOptargs = OptArgs.fromMap(optargs).with(optname, value); - return new Random(args, newOptargs); - } - public Random optArg(String optname, ReqlFunction1 value) { - OptArgs newOptargs = OptArgs.fromMap(optargs).with(optname, value); - return new Random(args, newOptargs); - } - public Random optArg(String optname, ReqlFunction2 value) { - OptArgs newOptargs = OptArgs.fromMap(optargs).with(optname, value); - return new Random(args, newOptargs); - } - public Random optArg(String optname, ReqlFunction3 value) { - OptArgs newOptargs = OptArgs.fromMap(optargs).with(optname, value); - return new Random(args, newOptargs); - } - public Random optArg(String optname, ReqlFunction4 value) { - OptArgs newOptargs = OptArgs.fromMap(optargs).with(optname, value); - return new Random(args, newOptargs); - } - -} diff --git a/drivers/java/src/main/java/com/rethinkdb/gen/ast/Range.java b/drivers/java/src/main/java/com/rethinkdb/gen/ast/Range.java deleted file mode 100644 index 8176e271504..00000000000 --- a/drivers/java/src/main/java/com/rethinkdb/gen/ast/Range.java +++ /dev/null @@ -1,29 +0,0 @@ -// Autogenerated by metajava.py. -// Do not edit this file directly. -// The template for this file is located at: -// ../../../../../../../../templates/AstSubclass.java - -package com.rethinkdb.gen.ast; - -import com.rethinkdb.gen.proto.TermType; -import com.rethinkdb.gen.exc.ReqlDriverError; -import com.rethinkdb.model.Arguments; -import com.rethinkdb.model.OptArgs; -import com.rethinkdb.ast.ReqlAst; - - - -public class Range extends ReqlExpr { - - - public Range(Object arg) { - this(new Arguments(arg), null); - } - public Range(Arguments args){ - this(args, null); - } - public Range(Arguments args, OptArgs optargs) { - super(TermType.RANGE, args, optargs); - } - -} diff --git a/drivers/java/src/main/java/com/rethinkdb/gen/ast/Rebalance.java b/drivers/java/src/main/java/com/rethinkdb/gen/ast/Rebalance.java deleted file mode 100644 index 78d5d182345..00000000000 --- a/drivers/java/src/main/java/com/rethinkdb/gen/ast/Rebalance.java +++ /dev/null @@ -1,29 +0,0 @@ -// Autogenerated by metajava.py. -// Do not edit this file directly. -// The template for this file is located at: -// ../../../../../../../../templates/AstSubclass.java - -package com.rethinkdb.gen.ast; - -import com.rethinkdb.gen.proto.TermType; -import com.rethinkdb.gen.exc.ReqlDriverError; -import com.rethinkdb.model.Arguments; -import com.rethinkdb.model.OptArgs; -import com.rethinkdb.ast.ReqlAst; - - - -public class Rebalance extends ReqlExpr { - - - public Rebalance(Object arg) { - this(new Arguments(arg), null); - } - public Rebalance(Arguments args){ - this(args, null); - } - public Rebalance(Arguments args, OptArgs optargs) { - super(TermType.REBALANCE, args, optargs); - } - -} diff --git a/drivers/java/src/main/java/com/rethinkdb/gen/ast/Reconfigure.java b/drivers/java/src/main/java/com/rethinkdb/gen/ast/Reconfigure.java deleted file mode 100644 index 48dd5b7b8a8..00000000000 --- a/drivers/java/src/main/java/com/rethinkdb/gen/ast/Reconfigure.java +++ /dev/null @@ -1,53 +0,0 @@ -// Autogenerated by metajava.py. -// Do not edit this file directly. -// The template for this file is located at: -// ../../../../../../../../templates/AstSubclass.java - -package com.rethinkdb.gen.ast; - -import com.rethinkdb.gen.proto.TermType; -import com.rethinkdb.gen.exc.ReqlDriverError; -import com.rethinkdb.model.Arguments; -import com.rethinkdb.model.OptArgs; -import com.rethinkdb.ast.ReqlAst; - - - -public class Reconfigure extends ReqlExpr { - - - public Reconfigure(Object arg) { - this(new Arguments(arg), null); - } - public Reconfigure(Arguments args){ - this(args, null); - } - public Reconfigure(Arguments args, OptArgs optargs) { - super(TermType.RECONFIGURE, args, optargs); - } - public Reconfigure optArg(String optname, Object value) { - OptArgs newOptargs = OptArgs.fromMap(optargs).with(optname, value); - return new Reconfigure(args, newOptargs); - } - public Reconfigure optArg(String optname, ReqlFunction0 value) { - OptArgs newOptargs = OptArgs.fromMap(optargs).with(optname, value); - return new Reconfigure(args, newOptargs); - } - public Reconfigure optArg(String optname, ReqlFunction1 value) { - OptArgs newOptargs = OptArgs.fromMap(optargs).with(optname, value); - return new Reconfigure(args, newOptargs); - } - public Reconfigure optArg(String optname, ReqlFunction2 value) { - OptArgs newOptargs = OptArgs.fromMap(optargs).with(optname, value); - return new Reconfigure(args, newOptargs); - } - public Reconfigure optArg(String optname, ReqlFunction3 value) { - OptArgs newOptargs = OptArgs.fromMap(optargs).with(optname, value); - return new Reconfigure(args, newOptargs); - } - public Reconfigure optArg(String optname, ReqlFunction4 value) { - OptArgs newOptargs = OptArgs.fromMap(optargs).with(optname, value); - return new Reconfigure(args, newOptargs); - } - -} diff --git a/drivers/java/src/main/java/com/rethinkdb/gen/ast/Reduce.java b/drivers/java/src/main/java/com/rethinkdb/gen/ast/Reduce.java deleted file mode 100644 index 322e1745595..00000000000 --- a/drivers/java/src/main/java/com/rethinkdb/gen/ast/Reduce.java +++ /dev/null @@ -1,29 +0,0 @@ -// Autogenerated by metajava.py. -// Do not edit this file directly. -// The template for this file is located at: -// ../../../../../../../../templates/AstSubclass.java - -package com.rethinkdb.gen.ast; - -import com.rethinkdb.gen.proto.TermType; -import com.rethinkdb.gen.exc.ReqlDriverError; -import com.rethinkdb.model.Arguments; -import com.rethinkdb.model.OptArgs; -import com.rethinkdb.ast.ReqlAst; - - - -public class Reduce extends ReqlExpr { - - - public Reduce(Object arg) { - this(new Arguments(arg), null); - } - public Reduce(Arguments args){ - this(args, null); - } - public Reduce(Arguments args, OptArgs optargs) { - super(TermType.REDUCE, args, optargs); - } - -} diff --git a/drivers/java/src/main/java/com/rethinkdb/gen/ast/Replace.java b/drivers/java/src/main/java/com/rethinkdb/gen/ast/Replace.java deleted file mode 100644 index 04469572ccb..00000000000 --- a/drivers/java/src/main/java/com/rethinkdb/gen/ast/Replace.java +++ /dev/null @@ -1,53 +0,0 @@ -// Autogenerated by metajava.py. -// Do not edit this file directly. -// The template for this file is located at: -// ../../../../../../../../templates/AstSubclass.java - -package com.rethinkdb.gen.ast; - -import com.rethinkdb.gen.proto.TermType; -import com.rethinkdb.gen.exc.ReqlDriverError; -import com.rethinkdb.model.Arguments; -import com.rethinkdb.model.OptArgs; -import com.rethinkdb.ast.ReqlAst; - - - -public class Replace extends ReqlExpr { - - - public Replace(Object arg) { - this(new Arguments(arg), null); - } - public Replace(Arguments args){ - this(args, null); - } - public Replace(Arguments args, OptArgs optargs) { - super(TermType.REPLACE, args, optargs); - } - public Replace optArg(String optname, Object value) { - OptArgs newOptargs = OptArgs.fromMap(optargs).with(optname, value); - return new Replace(args, newOptargs); - } - public Replace optArg(String optname, ReqlFunction0 value) { - OptArgs newOptargs = OptArgs.fromMap(optargs).with(optname, value); - return new Replace(args, newOptargs); - } - public Replace optArg(String optname, ReqlFunction1 value) { - OptArgs newOptargs = OptArgs.fromMap(optargs).with(optname, value); - return new Replace(args, newOptargs); - } - public Replace optArg(String optname, ReqlFunction2 value) { - OptArgs newOptargs = OptArgs.fromMap(optargs).with(optname, value); - return new Replace(args, newOptargs); - } - public Replace optArg(String optname, ReqlFunction3 value) { - OptArgs newOptargs = OptArgs.fromMap(optargs).with(optname, value); - return new Replace(args, newOptargs); - } - public Replace optArg(String optname, ReqlFunction4 value) { - OptArgs newOptargs = OptArgs.fromMap(optargs).with(optname, value); - return new Replace(args, newOptargs); - } - -} diff --git a/drivers/java/src/main/java/com/rethinkdb/gen/ast/ReqlExpr.java b/drivers/java/src/main/java/com/rethinkdb/gen/ast/ReqlExpr.java deleted file mode 100644 index 94f65121bb8..00000000000 --- a/drivers/java/src/main/java/com/rethinkdb/gen/ast/ReqlExpr.java +++ /dev/null @@ -1,2436 +0,0 @@ -// Autogenerated by metajava.py. -// Do not edit this file directly. -// The template for this file is located at: -// ../../../../../../../../templates/AstSubclass.java - -package com.rethinkdb.gen.ast; - -import com.rethinkdb.gen.proto.TermType; -import com.rethinkdb.gen.exc.ReqlDriverError; -import com.rethinkdb.model.Arguments; -import com.rethinkdb.model.OptArgs; -import com.rethinkdb.ast.ReqlAst; - - - -public class ReqlExpr extends ReqlAst { - - - protected ReqlExpr(TermType termType, Arguments args, OptArgs optargs){ - super(termType, args, optargs); - } - - public Eq eq(Object exprA, Object... exprs) { - Arguments arguments = new Arguments(this); - arguments.coerceAndAdd(exprA); - arguments.coerceAndAddAll(exprs); - return new Eq(arguments); - } - public Ne ne(Object exprA, Object... exprs) { - Arguments arguments = new Arguments(this); - arguments.coerceAndAdd(exprA); - arguments.coerceAndAddAll(exprs); - return new Ne(arguments); - } - public Lt lt(Object exprA, Object... exprs) { - Arguments arguments = new Arguments(this); - arguments.coerceAndAdd(exprA); - arguments.coerceAndAddAll(exprs); - return new Lt(arguments); - } - public Le le(Object exprA, Object... exprs) { - Arguments arguments = new Arguments(this); - arguments.coerceAndAdd(exprA); - arguments.coerceAndAddAll(exprs); - return new Le(arguments); - } - public Gt gt(Object exprA, Object... exprs) { - Arguments arguments = new Arguments(this); - arguments.coerceAndAdd(exprA); - arguments.coerceAndAddAll(exprs); - return new Gt(arguments); - } - public Ge ge(Object exprA, Object... exprs) { - Arguments arguments = new Arguments(this); - arguments.coerceAndAdd(exprA); - arguments.coerceAndAddAll(exprs); - return new Ge(arguments); - } - public Not not() { - Arguments arguments = new Arguments(this); - return new Not(arguments); - } - public Add add(Object... exprs) { - Arguments arguments = new Arguments(this); - arguments.coerceAndAddAll(exprs); - return new Add(arguments); - } - public Sub sub(Object... exprs) { - Arguments arguments = new Arguments(this); - arguments.coerceAndAddAll(exprs); - return new Sub(arguments); - } - public Mul mul(Object... exprs) { - Arguments arguments = new Arguments(this); - arguments.coerceAndAddAll(exprs); - return new Mul(arguments); - } - public Div div(Object... exprs) { - Arguments arguments = new Arguments(this); - arguments.coerceAndAddAll(exprs); - return new Div(arguments); - } - public Mod mod(Object exprA) { - Arguments arguments = new Arguments(this); - arguments.coerceAndAdd(exprA); - return new Mod(arguments); - } - public Floor floor() { - Arguments arguments = new Arguments(this); - return new Floor(arguments); - } - public Ceil ceil() { - Arguments arguments = new Arguments(this); - return new Ceil(arguments); - } - public Round round() { - Arguments arguments = new Arguments(this); - return new Round(arguments); - } - public Append append(Object exprA) { - Arguments arguments = new Arguments(this); - arguments.coerceAndAdd(exprA); - return new Append(arguments); - } - public Prepend prepend(Object exprA) { - Arguments arguments = new Arguments(this); - arguments.coerceAndAdd(exprA); - return new Prepend(arguments); - } - public Difference difference(Object exprA) { - Arguments arguments = new Arguments(this); - arguments.coerceAndAdd(exprA); - return new Difference(arguments); - } - public SetInsert setInsert(Object exprA) { - Arguments arguments = new Arguments(this); - arguments.coerceAndAdd(exprA); - return new SetInsert(arguments); - } - public SetIntersection setIntersection(Object exprA) { - Arguments arguments = new Arguments(this); - arguments.coerceAndAdd(exprA); - return new SetIntersection(arguments); - } - public SetUnion setUnion(Object exprA) { - Arguments arguments = new Arguments(this); - arguments.coerceAndAdd(exprA); - return new SetUnion(arguments); - } - public SetDifference setDifference(Object exprA) { - Arguments arguments = new Arguments(this); - arguments.coerceAndAdd(exprA); - return new SetDifference(arguments); - } - public Slice slice(Object exprA) { - Arguments arguments = new Arguments(this); - arguments.coerceAndAdd(exprA); - return new Slice(arguments); - } - public Slice slice(Object exprA, Object exprB) { - Arguments arguments = new Arguments(this); - arguments.coerceAndAdd(exprA); - arguments.coerceAndAdd(exprB); - return new Slice(arguments); - } - public Skip skip(Object exprA) { - Arguments arguments = new Arguments(this); - arguments.coerceAndAdd(exprA); - return new Skip(arguments); - } - public Limit limit(Object exprA) { - Arguments arguments = new Arguments(this); - arguments.coerceAndAdd(exprA); - return new Limit(arguments); - } - public OffsetsOf offsetsOf(Javascript js) { - Arguments arguments = new Arguments(this); - arguments.coerceAndAdd(js); - return new OffsetsOf(arguments); - } - public OffsetsOf offsetsOf(Object exprA) { - Arguments arguments = new Arguments(this); - arguments.coerceAndAdd(exprA); - return new OffsetsOf(arguments); - } - public OffsetsOf offsetsOf(ReqlFunction1 func1) { - Arguments arguments = new Arguments(this); - arguments.coerceAndAdd(func1); - return new OffsetsOf(arguments); - } - public Contains contains() { - Arguments arguments = new Arguments(this); - return new Contains(arguments); - } - public Contains contains(Javascript js) { - Arguments arguments = new Arguments(this); - arguments.coerceAndAdd(js); - return new Contains(arguments); - } - public Contains contains(Javascript js, Javascript jsA) { - Arguments arguments = new Arguments(this); - arguments.coerceAndAdd(js); - arguments.coerceAndAdd(jsA); - return new Contains(arguments); - } - public Contains contains(Javascript js, Javascript jsA, Javascript jsB) { - Arguments arguments = new Arguments(this); - arguments.coerceAndAdd(js); - arguments.coerceAndAdd(jsA); - arguments.coerceAndAdd(jsB); - return new Contains(arguments); - } - public Contains contains(Javascript js, Javascript jsA, Javascript jsB, Javascript jsC) { - Arguments arguments = new Arguments(this); - arguments.coerceAndAdd(js); - arguments.coerceAndAdd(jsA); - arguments.coerceAndAdd(jsB); - arguments.coerceAndAdd(jsC); - return new Contains(arguments); - } - public Contains contains(Javascript js, Javascript jsA, Javascript jsB, Object exprA) { - Arguments arguments = new Arguments(this); - arguments.coerceAndAdd(js); - arguments.coerceAndAdd(jsA); - arguments.coerceAndAdd(jsB); - arguments.coerceAndAdd(exprA); - return new Contains(arguments); - } - public Contains contains(Javascript js, Javascript jsA, Object exprA) { - Arguments arguments = new Arguments(this); - arguments.coerceAndAdd(js); - arguments.coerceAndAdd(jsA); - arguments.coerceAndAdd(exprA); - return new Contains(arguments); - } - public Contains contains(Javascript js, Javascript jsA, Object exprA, Javascript jsB) { - Arguments arguments = new Arguments(this); - arguments.coerceAndAdd(js); - arguments.coerceAndAdd(jsA); - arguments.coerceAndAdd(exprA); - arguments.coerceAndAdd(jsB); - return new Contains(arguments); - } - public Contains contains(Javascript js, Javascript jsA, Object exprA, Object exprB) { - Arguments arguments = new Arguments(this); - arguments.coerceAndAdd(js); - arguments.coerceAndAdd(jsA); - arguments.coerceAndAdd(exprA); - arguments.coerceAndAdd(exprB); - return new Contains(arguments); - } - public Contains contains(Javascript js, Object exprA) { - Arguments arguments = new Arguments(this); - arguments.coerceAndAdd(js); - arguments.coerceAndAdd(exprA); - return new Contains(arguments); - } - public Contains contains(Javascript js, Object exprA, Javascript jsA) { - Arguments arguments = new Arguments(this); - arguments.coerceAndAdd(js); - arguments.coerceAndAdd(exprA); - arguments.coerceAndAdd(jsA); - return new Contains(arguments); - } - public Contains contains(Javascript js, Object exprA, Javascript jsA, Javascript jsB) { - Arguments arguments = new Arguments(this); - arguments.coerceAndAdd(js); - arguments.coerceAndAdd(exprA); - arguments.coerceAndAdd(jsA); - arguments.coerceAndAdd(jsB); - return new Contains(arguments); - } - public Contains contains(Javascript js, Object exprA, Javascript jsA, Object exprB) { - Arguments arguments = new Arguments(this); - arguments.coerceAndAdd(js); - arguments.coerceAndAdd(exprA); - arguments.coerceAndAdd(jsA); - arguments.coerceAndAdd(exprB); - return new Contains(arguments); - } - public Contains contains(Javascript js, Object exprA, Object exprB) { - Arguments arguments = new Arguments(this); - arguments.coerceAndAdd(js); - arguments.coerceAndAdd(exprA); - arguments.coerceAndAdd(exprB); - return new Contains(arguments); - } - public Contains contains(Javascript js, Object exprA, Object exprB, Javascript jsA) { - Arguments arguments = new Arguments(this); - arguments.coerceAndAdd(js); - arguments.coerceAndAdd(exprA); - arguments.coerceAndAdd(exprB); - arguments.coerceAndAdd(jsA); - return new Contains(arguments); - } - public Contains contains(Javascript js, Object exprA, Object exprB, Object exprC) { - Arguments arguments = new Arguments(this); - arguments.coerceAndAdd(js); - arguments.coerceAndAdd(exprA); - arguments.coerceAndAdd(exprB); - arguments.coerceAndAdd(exprC); - return new Contains(arguments); - } - public Contains contains(Object exprA) { - Arguments arguments = new Arguments(this); - arguments.coerceAndAdd(exprA); - return new Contains(arguments); - } - public Contains contains(Object exprA, Javascript js) { - Arguments arguments = new Arguments(this); - arguments.coerceAndAdd(exprA); - arguments.coerceAndAdd(js); - return new Contains(arguments); - } - public Contains contains(Object exprA, Javascript js, Javascript jsA) { - Arguments arguments = new Arguments(this); - arguments.coerceAndAdd(exprA); - arguments.coerceAndAdd(js); - arguments.coerceAndAdd(jsA); - return new Contains(arguments); - } - public Contains contains(Object exprA, Javascript js, Javascript jsA, Javascript jsB) { - Arguments arguments = new Arguments(this); - arguments.coerceAndAdd(exprA); - arguments.coerceAndAdd(js); - arguments.coerceAndAdd(jsA); - arguments.coerceAndAdd(jsB); - return new Contains(arguments); - } - public Contains contains(Object exprA, Javascript js, Javascript jsA, Object exprB) { - Arguments arguments = new Arguments(this); - arguments.coerceAndAdd(exprA); - arguments.coerceAndAdd(js); - arguments.coerceAndAdd(jsA); - arguments.coerceAndAdd(exprB); - return new Contains(arguments); - } - public Contains contains(Object exprA, Javascript js, Object exprB) { - Arguments arguments = new Arguments(this); - arguments.coerceAndAdd(exprA); - arguments.coerceAndAdd(js); - arguments.coerceAndAdd(exprB); - return new Contains(arguments); - } - public Contains contains(Object exprA, Javascript js, Object exprB, Javascript jsA) { - Arguments arguments = new Arguments(this); - arguments.coerceAndAdd(exprA); - arguments.coerceAndAdd(js); - arguments.coerceAndAdd(exprB); - arguments.coerceAndAdd(jsA); - return new Contains(arguments); - } - public Contains contains(Object exprA, Javascript js, Object exprB, Object exprC) { - Arguments arguments = new Arguments(this); - arguments.coerceAndAdd(exprA); - arguments.coerceAndAdd(js); - arguments.coerceAndAdd(exprB); - arguments.coerceAndAdd(exprC); - return new Contains(arguments); - } - public Contains contains(Object exprA, Object exprB) { - Arguments arguments = new Arguments(this); - arguments.coerceAndAdd(exprA); - arguments.coerceAndAdd(exprB); - return new Contains(arguments); - } - public Contains contains(Object exprA, Object exprB, Javascript js) { - Arguments arguments = new Arguments(this); - arguments.coerceAndAdd(exprA); - arguments.coerceAndAdd(exprB); - arguments.coerceAndAdd(js); - return new Contains(arguments); - } - public Contains contains(Object exprA, Object exprB, Javascript js, Javascript jsA) { - Arguments arguments = new Arguments(this); - arguments.coerceAndAdd(exprA); - arguments.coerceAndAdd(exprB); - arguments.coerceAndAdd(js); - arguments.coerceAndAdd(jsA); - return new Contains(arguments); - } - public Contains contains(Object exprA, Object exprB, Javascript js, Object exprC) { - Arguments arguments = new Arguments(this); - arguments.coerceAndAdd(exprA); - arguments.coerceAndAdd(exprB); - arguments.coerceAndAdd(js); - arguments.coerceAndAdd(exprC); - return new Contains(arguments); - } - public Contains contains(Object exprA, Object exprB, Object exprC) { - Arguments arguments = new Arguments(this); - arguments.coerceAndAdd(exprA); - arguments.coerceAndAdd(exprB); - arguments.coerceAndAdd(exprC); - return new Contains(arguments); - } - public Contains contains(Object exprA, Object exprB, Object exprC, Javascript js) { - Arguments arguments = new Arguments(this); - arguments.coerceAndAdd(exprA); - arguments.coerceAndAdd(exprB); - arguments.coerceAndAdd(exprC); - arguments.coerceAndAdd(js); - return new Contains(arguments); - } - public Contains contains(Object exprA, Object exprB, Object exprC, Object exprD) { - Arguments arguments = new Arguments(this); - arguments.coerceAndAdd(exprA); - arguments.coerceAndAdd(exprB); - arguments.coerceAndAdd(exprC); - arguments.coerceAndAdd(exprD); - return new Contains(arguments); - } - public Contains contains(Object exprA, Object exprB, Object exprC, ReqlFunction1 func1) { - Arguments arguments = new Arguments(this); - arguments.coerceAndAdd(exprA); - arguments.coerceAndAdd(exprB); - arguments.coerceAndAdd(exprC); - arguments.coerceAndAdd(func1); - return new Contains(arguments); - } - public Contains contains(Object exprA, Object exprB, ReqlFunction1 func1) { - Arguments arguments = new Arguments(this); - arguments.coerceAndAdd(exprA); - arguments.coerceAndAdd(exprB); - arguments.coerceAndAdd(func1); - return new Contains(arguments); - } - public Contains contains(Object exprA, Object exprB, ReqlFunction1 func1, Object exprC) { - Arguments arguments = new Arguments(this); - arguments.coerceAndAdd(exprA); - arguments.coerceAndAdd(exprB); - arguments.coerceAndAdd(func1); - arguments.coerceAndAdd(exprC); - return new Contains(arguments); - } - public Contains contains(Object exprA, Object exprB, ReqlFunction1 func1, ReqlFunction1 func1A) { - Arguments arguments = new Arguments(this); - arguments.coerceAndAdd(exprA); - arguments.coerceAndAdd(exprB); - arguments.coerceAndAdd(func1); - arguments.coerceAndAdd(func1A); - return new Contains(arguments); - } - public Contains contains(Object exprA, ReqlFunction1 func1) { - Arguments arguments = new Arguments(this); - arguments.coerceAndAdd(exprA); - arguments.coerceAndAdd(func1); - return new Contains(arguments); - } - public Contains contains(Object exprA, ReqlFunction1 func1, Object exprB) { - Arguments arguments = new Arguments(this); - arguments.coerceAndAdd(exprA); - arguments.coerceAndAdd(func1); - arguments.coerceAndAdd(exprB); - return new Contains(arguments); - } - public Contains contains(Object exprA, ReqlFunction1 func1, Object exprB, Object exprC) { - Arguments arguments = new Arguments(this); - arguments.coerceAndAdd(exprA); - arguments.coerceAndAdd(func1); - arguments.coerceAndAdd(exprB); - arguments.coerceAndAdd(exprC); - return new Contains(arguments); - } - public Contains contains(Object exprA, ReqlFunction1 func1, Object exprB, ReqlFunction1 func1A) { - Arguments arguments = new Arguments(this); - arguments.coerceAndAdd(exprA); - arguments.coerceAndAdd(func1); - arguments.coerceAndAdd(exprB); - arguments.coerceAndAdd(func1A); - return new Contains(arguments); - } - public Contains contains(Object exprA, ReqlFunction1 func1, ReqlFunction1 func1A) { - Arguments arguments = new Arguments(this); - arguments.coerceAndAdd(exprA); - arguments.coerceAndAdd(func1); - arguments.coerceAndAdd(func1A); - return new Contains(arguments); - } - public Contains contains(Object exprA, ReqlFunction1 func1, ReqlFunction1 func1A, Object exprB) { - Arguments arguments = new Arguments(this); - arguments.coerceAndAdd(exprA); - arguments.coerceAndAdd(func1); - arguments.coerceAndAdd(func1A); - arguments.coerceAndAdd(exprB); - return new Contains(arguments); - } - public Contains contains(Object exprA, ReqlFunction1 func1, ReqlFunction1 func1A, ReqlFunction1 func1B) { - Arguments arguments = new Arguments(this); - arguments.coerceAndAdd(exprA); - arguments.coerceAndAdd(func1); - arguments.coerceAndAdd(func1A); - arguments.coerceAndAdd(func1B); - return new Contains(arguments); - } - public Contains contains(ReqlFunction1 func1) { - Arguments arguments = new Arguments(this); - arguments.coerceAndAdd(func1); - return new Contains(arguments); - } - public Contains contains(ReqlFunction1 func1, Object exprA) { - Arguments arguments = new Arguments(this); - arguments.coerceAndAdd(func1); - arguments.coerceAndAdd(exprA); - return new Contains(arguments); - } - public Contains contains(ReqlFunction1 func1, Object exprA, Object exprB) { - Arguments arguments = new Arguments(this); - arguments.coerceAndAdd(func1); - arguments.coerceAndAdd(exprA); - arguments.coerceAndAdd(exprB); - return new Contains(arguments); - } - public Contains contains(ReqlFunction1 func1, Object exprA, Object exprB, Object exprC) { - Arguments arguments = new Arguments(this); - arguments.coerceAndAdd(func1); - arguments.coerceAndAdd(exprA); - arguments.coerceAndAdd(exprB); - arguments.coerceAndAdd(exprC); - return new Contains(arguments); - } - public Contains contains(ReqlFunction1 func1, Object exprA, Object exprB, ReqlFunction1 func1A) { - Arguments arguments = new Arguments(this); - arguments.coerceAndAdd(func1); - arguments.coerceAndAdd(exprA); - arguments.coerceAndAdd(exprB); - arguments.coerceAndAdd(func1A); - return new Contains(arguments); - } - public Contains contains(ReqlFunction1 func1, Object exprA, ReqlFunction1 func1A) { - Arguments arguments = new Arguments(this); - arguments.coerceAndAdd(func1); - arguments.coerceAndAdd(exprA); - arguments.coerceAndAdd(func1A); - return new Contains(arguments); - } - public Contains contains(ReqlFunction1 func1, Object exprA, ReqlFunction1 func1A, Object exprB) { - Arguments arguments = new Arguments(this); - arguments.coerceAndAdd(func1); - arguments.coerceAndAdd(exprA); - arguments.coerceAndAdd(func1A); - arguments.coerceAndAdd(exprB); - return new Contains(arguments); - } - public Contains contains(ReqlFunction1 func1, Object exprA, ReqlFunction1 func1A, ReqlFunction1 func1B) { - Arguments arguments = new Arguments(this); - arguments.coerceAndAdd(func1); - arguments.coerceAndAdd(exprA); - arguments.coerceAndAdd(func1A); - arguments.coerceAndAdd(func1B); - return new Contains(arguments); - } - public Contains contains(ReqlFunction1 func1, ReqlFunction1 func1A) { - Arguments arguments = new Arguments(this); - arguments.coerceAndAdd(func1); - arguments.coerceAndAdd(func1A); - return new Contains(arguments); - } - public Contains contains(ReqlFunction1 func1, ReqlFunction1 func1A, Object exprA) { - Arguments arguments = new Arguments(this); - arguments.coerceAndAdd(func1); - arguments.coerceAndAdd(func1A); - arguments.coerceAndAdd(exprA); - return new Contains(arguments); - } - public Contains contains(ReqlFunction1 func1, ReqlFunction1 func1A, Object exprA, Object exprB) { - Arguments arguments = new Arguments(this); - arguments.coerceAndAdd(func1); - arguments.coerceAndAdd(func1A); - arguments.coerceAndAdd(exprA); - arguments.coerceAndAdd(exprB); - return new Contains(arguments); - } - public Contains contains(ReqlFunction1 func1, ReqlFunction1 func1A, Object exprA, ReqlFunction1 func1B) { - Arguments arguments = new Arguments(this); - arguments.coerceAndAdd(func1); - arguments.coerceAndAdd(func1A); - arguments.coerceAndAdd(exprA); - arguments.coerceAndAdd(func1B); - return new Contains(arguments); - } - public Contains contains(ReqlFunction1 func1, ReqlFunction1 func1A, ReqlFunction1 func1B) { - Arguments arguments = new Arguments(this); - arguments.coerceAndAdd(func1); - arguments.coerceAndAdd(func1A); - arguments.coerceAndAdd(func1B); - return new Contains(arguments); - } - public Contains contains(ReqlFunction1 func1, ReqlFunction1 func1A, ReqlFunction1 func1B, Object exprA) { - Arguments arguments = new Arguments(this); - arguments.coerceAndAdd(func1); - arguments.coerceAndAdd(func1A); - arguments.coerceAndAdd(func1B); - arguments.coerceAndAdd(exprA); - return new Contains(arguments); - } - public Contains contains(ReqlFunction1 func1, ReqlFunction1 func1A, ReqlFunction1 func1B, ReqlFunction1 func1C) { - Arguments arguments = new Arguments(this); - arguments.coerceAndAdd(func1); - arguments.coerceAndAdd(func1A); - arguments.coerceAndAdd(func1B); - arguments.coerceAndAdd(func1C); - return new Contains(arguments); - } - public GetField getField(Object exprA) { - Arguments arguments = new Arguments(this); - arguments.coerceAndAdd(exprA); - return new GetField(arguments); - } - public GetField g(Object exprA) { - Arguments arguments = new Arguments(this); - arguments.coerceAndAdd(exprA); - return new GetField(arguments); - } - public Keys keys() { - Arguments arguments = new Arguments(this); - return new Keys(arguments); - } - public HasFields hasFields(Object... exprs) { - Arguments arguments = new Arguments(this); - arguments.coerceAndAddAll(exprs); - return new HasFields(arguments); - } - public WithFields withFields(Object... exprs) { - Arguments arguments = new Arguments(this); - arguments.coerceAndAddAll(exprs); - return new WithFields(arguments); - } - public Pluck pluck(Object... exprs) { - Arguments arguments = new Arguments(this); - arguments.coerceAndAddAll(exprs); - return new Pluck(arguments); - } - public Without without(Object... exprs) { - Arguments arguments = new Arguments(this); - arguments.coerceAndAddAll(exprs); - return new Without(arguments); - } - public Merge merge() { - Arguments arguments = new Arguments(this); - return new Merge(arguments); - } - public Merge merge(Javascript js) { - Arguments arguments = new Arguments(this); - arguments.coerceAndAdd(js); - return new Merge(arguments); - } - public Merge merge(Javascript js, Javascript jsA) { - Arguments arguments = new Arguments(this); - arguments.coerceAndAdd(js); - arguments.coerceAndAdd(jsA); - return new Merge(arguments); - } - public Merge merge(Javascript js, Javascript jsA, Javascript jsB) { - Arguments arguments = new Arguments(this); - arguments.coerceAndAdd(js); - arguments.coerceAndAdd(jsA); - arguments.coerceAndAdd(jsB); - return new Merge(arguments); - } - public Merge merge(Javascript js, Javascript jsA, Javascript jsB, Javascript jsC) { - Arguments arguments = new Arguments(this); - arguments.coerceAndAdd(js); - arguments.coerceAndAdd(jsA); - arguments.coerceAndAdd(jsB); - arguments.coerceAndAdd(jsC); - return new Merge(arguments); - } - public Merge merge(Javascript js, Javascript jsA, Javascript jsB, Object exprA) { - Arguments arguments = new Arguments(this); - arguments.coerceAndAdd(js); - arguments.coerceAndAdd(jsA); - arguments.coerceAndAdd(jsB); - arguments.coerceAndAdd(exprA); - return new Merge(arguments); - } - public Merge merge(Javascript js, Javascript jsA, Object exprA) { - Arguments arguments = new Arguments(this); - arguments.coerceAndAdd(js); - arguments.coerceAndAdd(jsA); - arguments.coerceAndAdd(exprA); - return new Merge(arguments); - } - public Merge merge(Javascript js, Javascript jsA, Object exprA, Javascript jsB) { - Arguments arguments = new Arguments(this); - arguments.coerceAndAdd(js); - arguments.coerceAndAdd(jsA); - arguments.coerceAndAdd(exprA); - arguments.coerceAndAdd(jsB); - return new Merge(arguments); - } - public Merge merge(Javascript js, Javascript jsA, Object exprA, Object exprB) { - Arguments arguments = new Arguments(this); - arguments.coerceAndAdd(js); - arguments.coerceAndAdd(jsA); - arguments.coerceAndAdd(exprA); - arguments.coerceAndAdd(exprB); - return new Merge(arguments); - } - public Merge merge(Javascript js, Object exprA) { - Arguments arguments = new Arguments(this); - arguments.coerceAndAdd(js); - arguments.coerceAndAdd(exprA); - return new Merge(arguments); - } - public Merge merge(Javascript js, Object exprA, Javascript jsA) { - Arguments arguments = new Arguments(this); - arguments.coerceAndAdd(js); - arguments.coerceAndAdd(exprA); - arguments.coerceAndAdd(jsA); - return new Merge(arguments); - } - public Merge merge(Javascript js, Object exprA, Javascript jsA, Javascript jsB) { - Arguments arguments = new Arguments(this); - arguments.coerceAndAdd(js); - arguments.coerceAndAdd(exprA); - arguments.coerceAndAdd(jsA); - arguments.coerceAndAdd(jsB); - return new Merge(arguments); - } - public Merge merge(Javascript js, Object exprA, Javascript jsA, Object exprB) { - Arguments arguments = new Arguments(this); - arguments.coerceAndAdd(js); - arguments.coerceAndAdd(exprA); - arguments.coerceAndAdd(jsA); - arguments.coerceAndAdd(exprB); - return new Merge(arguments); - } - public Merge merge(Javascript js, Object exprA, Object exprB) { - Arguments arguments = new Arguments(this); - arguments.coerceAndAdd(js); - arguments.coerceAndAdd(exprA); - arguments.coerceAndAdd(exprB); - return new Merge(arguments); - } - public Merge merge(Javascript js, Object exprA, Object exprB, Javascript jsA) { - Arguments arguments = new Arguments(this); - arguments.coerceAndAdd(js); - arguments.coerceAndAdd(exprA); - arguments.coerceAndAdd(exprB); - arguments.coerceAndAdd(jsA); - return new Merge(arguments); - } - public Merge merge(Javascript js, Object exprA, Object exprB, Object exprC) { - Arguments arguments = new Arguments(this); - arguments.coerceAndAdd(js); - arguments.coerceAndAdd(exprA); - arguments.coerceAndAdd(exprB); - arguments.coerceAndAdd(exprC); - return new Merge(arguments); - } - public Merge merge(Object exprA) { - Arguments arguments = new Arguments(this); - arguments.coerceAndAdd(exprA); - return new Merge(arguments); - } - public Merge merge(Object exprA, Javascript js) { - Arguments arguments = new Arguments(this); - arguments.coerceAndAdd(exprA); - arguments.coerceAndAdd(js); - return new Merge(arguments); - } - public Merge merge(Object exprA, Javascript js, Javascript jsA) { - Arguments arguments = new Arguments(this); - arguments.coerceAndAdd(exprA); - arguments.coerceAndAdd(js); - arguments.coerceAndAdd(jsA); - return new Merge(arguments); - } - public Merge merge(Object exprA, Javascript js, Javascript jsA, Javascript jsB) { - Arguments arguments = new Arguments(this); - arguments.coerceAndAdd(exprA); - arguments.coerceAndAdd(js); - arguments.coerceAndAdd(jsA); - arguments.coerceAndAdd(jsB); - return new Merge(arguments); - } - public Merge merge(Object exprA, Javascript js, Javascript jsA, Object exprB) { - Arguments arguments = new Arguments(this); - arguments.coerceAndAdd(exprA); - arguments.coerceAndAdd(js); - arguments.coerceAndAdd(jsA); - arguments.coerceAndAdd(exprB); - return new Merge(arguments); - } - public Merge merge(Object exprA, Javascript js, Object exprB) { - Arguments arguments = new Arguments(this); - arguments.coerceAndAdd(exprA); - arguments.coerceAndAdd(js); - arguments.coerceAndAdd(exprB); - return new Merge(arguments); - } - public Merge merge(Object exprA, Javascript js, Object exprB, Javascript jsA) { - Arguments arguments = new Arguments(this); - arguments.coerceAndAdd(exprA); - arguments.coerceAndAdd(js); - arguments.coerceAndAdd(exprB); - arguments.coerceAndAdd(jsA); - return new Merge(arguments); - } - public Merge merge(Object exprA, Javascript js, Object exprB, Object exprC) { - Arguments arguments = new Arguments(this); - arguments.coerceAndAdd(exprA); - arguments.coerceAndAdd(js); - arguments.coerceAndAdd(exprB); - arguments.coerceAndAdd(exprC); - return new Merge(arguments); - } - public Merge merge(Object exprA, Object exprB) { - Arguments arguments = new Arguments(this); - arguments.coerceAndAdd(exprA); - arguments.coerceAndAdd(exprB); - return new Merge(arguments); - } - public Merge merge(Object exprA, Object exprB, Javascript js) { - Arguments arguments = new Arguments(this); - arguments.coerceAndAdd(exprA); - arguments.coerceAndAdd(exprB); - arguments.coerceAndAdd(js); - return new Merge(arguments); - } - public Merge merge(Object exprA, Object exprB, Javascript js, Javascript jsA) { - Arguments arguments = new Arguments(this); - arguments.coerceAndAdd(exprA); - arguments.coerceAndAdd(exprB); - arguments.coerceAndAdd(js); - arguments.coerceAndAdd(jsA); - return new Merge(arguments); - } - public Merge merge(Object exprA, Object exprB, Javascript js, Object exprC) { - Arguments arguments = new Arguments(this); - arguments.coerceAndAdd(exprA); - arguments.coerceAndAdd(exprB); - arguments.coerceAndAdd(js); - arguments.coerceAndAdd(exprC); - return new Merge(arguments); - } - public Merge merge(Object exprA, Object exprB, Object exprC) { - Arguments arguments = new Arguments(this); - arguments.coerceAndAdd(exprA); - arguments.coerceAndAdd(exprB); - arguments.coerceAndAdd(exprC); - return new Merge(arguments); - } - public Merge merge(Object exprA, Object exprB, Object exprC, Javascript js) { - Arguments arguments = new Arguments(this); - arguments.coerceAndAdd(exprA); - arguments.coerceAndAdd(exprB); - arguments.coerceAndAdd(exprC); - arguments.coerceAndAdd(js); - return new Merge(arguments); - } - public Merge merge(Object exprA, Object exprB, Object exprC, Object exprD) { - Arguments arguments = new Arguments(this); - arguments.coerceAndAdd(exprA); - arguments.coerceAndAdd(exprB); - arguments.coerceAndAdd(exprC); - arguments.coerceAndAdd(exprD); - return new Merge(arguments); - } - public Merge merge(Object exprA, Object exprB, Object exprC, ReqlFunction1 func1) { - Arguments arguments = new Arguments(this); - arguments.coerceAndAdd(exprA); - arguments.coerceAndAdd(exprB); - arguments.coerceAndAdd(exprC); - arguments.coerceAndAdd(func1); - return new Merge(arguments); - } - public Merge merge(Object exprA, Object exprB, ReqlFunction1 func1) { - Arguments arguments = new Arguments(this); - arguments.coerceAndAdd(exprA); - arguments.coerceAndAdd(exprB); - arguments.coerceAndAdd(func1); - return new Merge(arguments); - } - public Merge merge(Object exprA, Object exprB, ReqlFunction1 func1, Object exprC) { - Arguments arguments = new Arguments(this); - arguments.coerceAndAdd(exprA); - arguments.coerceAndAdd(exprB); - arguments.coerceAndAdd(func1); - arguments.coerceAndAdd(exprC); - return new Merge(arguments); - } - public Merge merge(Object exprA, Object exprB, ReqlFunction1 func1, ReqlFunction1 func1A) { - Arguments arguments = new Arguments(this); - arguments.coerceAndAdd(exprA); - arguments.coerceAndAdd(exprB); - arguments.coerceAndAdd(func1); - arguments.coerceAndAdd(func1A); - return new Merge(arguments); - } - public Merge merge(Object exprA, ReqlFunction1 func1) { - Arguments arguments = new Arguments(this); - arguments.coerceAndAdd(exprA); - arguments.coerceAndAdd(func1); - return new Merge(arguments); - } - public Merge merge(Object exprA, ReqlFunction1 func1, Object exprB) { - Arguments arguments = new Arguments(this); - arguments.coerceAndAdd(exprA); - arguments.coerceAndAdd(func1); - arguments.coerceAndAdd(exprB); - return new Merge(arguments); - } - public Merge merge(Object exprA, ReqlFunction1 func1, Object exprB, Object exprC) { - Arguments arguments = new Arguments(this); - arguments.coerceAndAdd(exprA); - arguments.coerceAndAdd(func1); - arguments.coerceAndAdd(exprB); - arguments.coerceAndAdd(exprC); - return new Merge(arguments); - } - public Merge merge(Object exprA, ReqlFunction1 func1, Object exprB, ReqlFunction1 func1A) { - Arguments arguments = new Arguments(this); - arguments.coerceAndAdd(exprA); - arguments.coerceAndAdd(func1); - arguments.coerceAndAdd(exprB); - arguments.coerceAndAdd(func1A); - return new Merge(arguments); - } - public Merge merge(Object exprA, ReqlFunction1 func1, ReqlFunction1 func1A) { - Arguments arguments = new Arguments(this); - arguments.coerceAndAdd(exprA); - arguments.coerceAndAdd(func1); - arguments.coerceAndAdd(func1A); - return new Merge(arguments); - } - public Merge merge(Object exprA, ReqlFunction1 func1, ReqlFunction1 func1A, Object exprB) { - Arguments arguments = new Arguments(this); - arguments.coerceAndAdd(exprA); - arguments.coerceAndAdd(func1); - arguments.coerceAndAdd(func1A); - arguments.coerceAndAdd(exprB); - return new Merge(arguments); - } - public Merge merge(Object exprA, ReqlFunction1 func1, ReqlFunction1 func1A, ReqlFunction1 func1B) { - Arguments arguments = new Arguments(this); - arguments.coerceAndAdd(exprA); - arguments.coerceAndAdd(func1); - arguments.coerceAndAdd(func1A); - arguments.coerceAndAdd(func1B); - return new Merge(arguments); - } - public Merge merge(ReqlFunction1 func1) { - Arguments arguments = new Arguments(this); - arguments.coerceAndAdd(func1); - return new Merge(arguments); - } - public Merge merge(ReqlFunction1 func1, Object exprA) { - Arguments arguments = new Arguments(this); - arguments.coerceAndAdd(func1); - arguments.coerceAndAdd(exprA); - return new Merge(arguments); - } - public Merge merge(ReqlFunction1 func1, Object exprA, Object exprB) { - Arguments arguments = new Arguments(this); - arguments.coerceAndAdd(func1); - arguments.coerceAndAdd(exprA); - arguments.coerceAndAdd(exprB); - return new Merge(arguments); - } - public Merge merge(ReqlFunction1 func1, Object exprA, Object exprB, Object exprC) { - Arguments arguments = new Arguments(this); - arguments.coerceAndAdd(func1); - arguments.coerceAndAdd(exprA); - arguments.coerceAndAdd(exprB); - arguments.coerceAndAdd(exprC); - return new Merge(arguments); - } - public Merge merge(ReqlFunction1 func1, Object exprA, Object exprB, ReqlFunction1 func1A) { - Arguments arguments = new Arguments(this); - arguments.coerceAndAdd(func1); - arguments.coerceAndAdd(exprA); - arguments.coerceAndAdd(exprB); - arguments.coerceAndAdd(func1A); - return new Merge(arguments); - } - public Merge merge(ReqlFunction1 func1, Object exprA, ReqlFunction1 func1A) { - Arguments arguments = new Arguments(this); - arguments.coerceAndAdd(func1); - arguments.coerceAndAdd(exprA); - arguments.coerceAndAdd(func1A); - return new Merge(arguments); - } - public Merge merge(ReqlFunction1 func1, Object exprA, ReqlFunction1 func1A, Object exprB) { - Arguments arguments = new Arguments(this); - arguments.coerceAndAdd(func1); - arguments.coerceAndAdd(exprA); - arguments.coerceAndAdd(func1A); - arguments.coerceAndAdd(exprB); - return new Merge(arguments); - } - public Merge merge(ReqlFunction1 func1, Object exprA, ReqlFunction1 func1A, ReqlFunction1 func1B) { - Arguments arguments = new Arguments(this); - arguments.coerceAndAdd(func1); - arguments.coerceAndAdd(exprA); - arguments.coerceAndAdd(func1A); - arguments.coerceAndAdd(func1B); - return new Merge(arguments); - } - public Merge merge(ReqlFunction1 func1, ReqlFunction1 func1A) { - Arguments arguments = new Arguments(this); - arguments.coerceAndAdd(func1); - arguments.coerceAndAdd(func1A); - return new Merge(arguments); - } - public Merge merge(ReqlFunction1 func1, ReqlFunction1 func1A, Object exprA) { - Arguments arguments = new Arguments(this); - arguments.coerceAndAdd(func1); - arguments.coerceAndAdd(func1A); - arguments.coerceAndAdd(exprA); - return new Merge(arguments); - } - public Merge merge(ReqlFunction1 func1, ReqlFunction1 func1A, Object exprA, Object exprB) { - Arguments arguments = new Arguments(this); - arguments.coerceAndAdd(func1); - arguments.coerceAndAdd(func1A); - arguments.coerceAndAdd(exprA); - arguments.coerceAndAdd(exprB); - return new Merge(arguments); - } - public Merge merge(ReqlFunction1 func1, ReqlFunction1 func1A, Object exprA, ReqlFunction1 func1B) { - Arguments arguments = new Arguments(this); - arguments.coerceAndAdd(func1); - arguments.coerceAndAdd(func1A); - arguments.coerceAndAdd(exprA); - arguments.coerceAndAdd(func1B); - return new Merge(arguments); - } - public Merge merge(ReqlFunction1 func1, ReqlFunction1 func1A, ReqlFunction1 func1B) { - Arguments arguments = new Arguments(this); - arguments.coerceAndAdd(func1); - arguments.coerceAndAdd(func1A); - arguments.coerceAndAdd(func1B); - return new Merge(arguments); - } - public Merge merge(ReqlFunction1 func1, ReqlFunction1 func1A, ReqlFunction1 func1B, Object exprA) { - Arguments arguments = new Arguments(this); - arguments.coerceAndAdd(func1); - arguments.coerceAndAdd(func1A); - arguments.coerceAndAdd(func1B); - arguments.coerceAndAdd(exprA); - return new Merge(arguments); - } - public Merge merge(ReqlFunction1 func1, ReqlFunction1 func1A, ReqlFunction1 func1B, ReqlFunction1 func1C) { - Arguments arguments = new Arguments(this); - arguments.coerceAndAdd(func1); - arguments.coerceAndAdd(func1A); - arguments.coerceAndAdd(func1B); - arguments.coerceAndAdd(func1C); - return new Merge(arguments); - } - public Between between(Object exprA, Object exprB) { - Arguments arguments = new Arguments(this); - arguments.coerceAndAdd(exprA); - arguments.coerceAndAdd(exprB); - return new Between(arguments); - } - public Reduce reduce(Javascript js) { - Arguments arguments = new Arguments(this); - arguments.coerceAndAdd(js); - return new Reduce(arguments); - } - public Reduce reduce(ReqlFunction2 func2) { - Arguments arguments = new Arguments(this); - arguments.coerceAndAdd(func2); - return new Reduce(arguments); - } - public Fold fold(Object exprA, Javascript js) { - Arguments arguments = new Arguments(this); - arguments.coerceAndAdd(exprA); - arguments.coerceAndAdd(js); - return new Fold(arguments); - } - public Fold fold(Object exprA, ReqlFunction2 func2) { - Arguments arguments = new Arguments(this); - arguments.coerceAndAdd(exprA); - arguments.coerceAndAdd(func2); - return new Fold(arguments); - } - public Map map(Javascript js) { - Arguments arguments = new Arguments(this); - arguments.coerceAndAdd(js); - return new Map(arguments); - } - public Map map(Object exprA, Javascript js) { - Arguments arguments = new Arguments(this); - arguments.coerceAndAdd(exprA); - arguments.coerceAndAdd(js); - return new Map(arguments); - } - public Map map(Object exprA, Object exprB, Javascript js) { - Arguments arguments = new Arguments(this); - arguments.coerceAndAdd(exprA); - arguments.coerceAndAdd(exprB); - arguments.coerceAndAdd(js); - return new Map(arguments); - } - public Map map(Object exprA, Object exprB, Object exprC, Javascript js) { - Arguments arguments = new Arguments(this); - arguments.coerceAndAdd(exprA); - arguments.coerceAndAdd(exprB); - arguments.coerceAndAdd(exprC); - arguments.coerceAndAdd(js); - return new Map(arguments); - } - public Map map(Object exprA, Object exprB, Object exprC, ReqlFunction4 func4) { - Arguments arguments = new Arguments(this); - arguments.coerceAndAdd(exprA); - arguments.coerceAndAdd(exprB); - arguments.coerceAndAdd(exprC); - arguments.coerceAndAdd(func4); - return new Map(arguments); - } - public Map map(Object exprA, Object exprB, ReqlFunction3 func3) { - Arguments arguments = new Arguments(this); - arguments.coerceAndAdd(exprA); - arguments.coerceAndAdd(exprB); - arguments.coerceAndAdd(func3); - return new Map(arguments); - } - public Map map(Object exprA, ReqlFunction2 func2) { - Arguments arguments = new Arguments(this); - arguments.coerceAndAdd(exprA); - arguments.coerceAndAdd(func2); - return new Map(arguments); - } - public Map map(ReqlFunction0 func0) { - Arguments arguments = new Arguments(this); - arguments.coerceAndAdd(func0); - return new Map(arguments); - } - public Map map(ReqlFunction1 func1) { - Arguments arguments = new Arguments(this); - arguments.coerceAndAdd(func1); - return new Map(arguments); - } - public Filter filter(Javascript js) { - Arguments arguments = new Arguments(this); - arguments.coerceAndAdd(js); - return new Filter(arguments); - } - public Filter filter(Object exprA) { - Arguments arguments = new Arguments(this); - arguments.coerceAndAdd(exprA); - return new Filter(arguments); - } - public Filter filter(ReqlFunction1 func1) { - Arguments arguments = new Arguments(this); - arguments.coerceAndAdd(func1); - return new Filter(arguments); - } - public ConcatMap concatMap(Javascript js) { - Arguments arguments = new Arguments(this); - arguments.coerceAndAdd(js); - return new ConcatMap(arguments); - } - public ConcatMap concatMap(ReqlFunction1 func1) { - Arguments arguments = new Arguments(this); - arguments.coerceAndAdd(func1); - return new ConcatMap(arguments); - } - public OrderBy orderBy() { - Arguments arguments = new Arguments(this); - return new OrderBy(arguments); - } - public OrderBy orderBy(Javascript js) { - Arguments arguments = new Arguments(this); - arguments.coerceAndAdd(js); - return new OrderBy(arguments); - } - public OrderBy orderBy(Javascript js, Javascript jsA) { - Arguments arguments = new Arguments(this); - arguments.coerceAndAdd(js); - arguments.coerceAndAdd(jsA); - return new OrderBy(arguments); - } - public OrderBy orderBy(Javascript js, Javascript jsA, Javascript jsB) { - Arguments arguments = new Arguments(this); - arguments.coerceAndAdd(js); - arguments.coerceAndAdd(jsA); - arguments.coerceAndAdd(jsB); - return new OrderBy(arguments); - } - public OrderBy orderBy(Javascript js, Javascript jsA, Javascript jsB, Javascript jsC) { - Arguments arguments = new Arguments(this); - arguments.coerceAndAdd(js); - arguments.coerceAndAdd(jsA); - arguments.coerceAndAdd(jsB); - arguments.coerceAndAdd(jsC); - return new OrderBy(arguments); - } - public OrderBy orderBy(Javascript js, Javascript jsA, Javascript jsB, Object exprA) { - Arguments arguments = new Arguments(this); - arguments.coerceAndAdd(js); - arguments.coerceAndAdd(jsA); - arguments.coerceAndAdd(jsB); - arguments.coerceAndAdd(exprA); - return new OrderBy(arguments); - } - public OrderBy orderBy(Javascript js, Javascript jsA, Object exprA) { - Arguments arguments = new Arguments(this); - arguments.coerceAndAdd(js); - arguments.coerceAndAdd(jsA); - arguments.coerceAndAdd(exprA); - return new OrderBy(arguments); - } - public OrderBy orderBy(Javascript js, Javascript jsA, Object exprA, Javascript jsB) { - Arguments arguments = new Arguments(this); - arguments.coerceAndAdd(js); - arguments.coerceAndAdd(jsA); - arguments.coerceAndAdd(exprA); - arguments.coerceAndAdd(jsB); - return new OrderBy(arguments); - } - public OrderBy orderBy(Javascript js, Javascript jsA, Object exprA, Object exprB) { - Arguments arguments = new Arguments(this); - arguments.coerceAndAdd(js); - arguments.coerceAndAdd(jsA); - arguments.coerceAndAdd(exprA); - arguments.coerceAndAdd(exprB); - return new OrderBy(arguments); - } - public OrderBy orderBy(Javascript js, Object exprA) { - Arguments arguments = new Arguments(this); - arguments.coerceAndAdd(js); - arguments.coerceAndAdd(exprA); - return new OrderBy(arguments); - } - public OrderBy orderBy(Javascript js, Object exprA, Javascript jsA) { - Arguments arguments = new Arguments(this); - arguments.coerceAndAdd(js); - arguments.coerceAndAdd(exprA); - arguments.coerceAndAdd(jsA); - return new OrderBy(arguments); - } - public OrderBy orderBy(Javascript js, Object exprA, Javascript jsA, Javascript jsB) { - Arguments arguments = new Arguments(this); - arguments.coerceAndAdd(js); - arguments.coerceAndAdd(exprA); - arguments.coerceAndAdd(jsA); - arguments.coerceAndAdd(jsB); - return new OrderBy(arguments); - } - public OrderBy orderBy(Javascript js, Object exprA, Javascript jsA, Object exprB) { - Arguments arguments = new Arguments(this); - arguments.coerceAndAdd(js); - arguments.coerceAndAdd(exprA); - arguments.coerceAndAdd(jsA); - arguments.coerceAndAdd(exprB); - return new OrderBy(arguments); - } - public OrderBy orderBy(Javascript js, Object exprA, Object exprB) { - Arguments arguments = new Arguments(this); - arguments.coerceAndAdd(js); - arguments.coerceAndAdd(exprA); - arguments.coerceAndAdd(exprB); - return new OrderBy(arguments); - } - public OrderBy orderBy(Javascript js, Object exprA, Object exprB, Javascript jsA) { - Arguments arguments = new Arguments(this); - arguments.coerceAndAdd(js); - arguments.coerceAndAdd(exprA); - arguments.coerceAndAdd(exprB); - arguments.coerceAndAdd(jsA); - return new OrderBy(arguments); - } - public OrderBy orderBy(Javascript js, Object exprA, Object exprB, Object exprC) { - Arguments arguments = new Arguments(this); - arguments.coerceAndAdd(js); - arguments.coerceAndAdd(exprA); - arguments.coerceAndAdd(exprB); - arguments.coerceAndAdd(exprC); - return new OrderBy(arguments); - } - public OrderBy orderBy(Object exprA) { - Arguments arguments = new Arguments(this); - arguments.coerceAndAdd(exprA); - return new OrderBy(arguments); - } - public OrderBy orderBy(Object exprA, Javascript js) { - Arguments arguments = new Arguments(this); - arguments.coerceAndAdd(exprA); - arguments.coerceAndAdd(js); - return new OrderBy(arguments); - } - public OrderBy orderBy(Object exprA, Javascript js, Javascript jsA) { - Arguments arguments = new Arguments(this); - arguments.coerceAndAdd(exprA); - arguments.coerceAndAdd(js); - arguments.coerceAndAdd(jsA); - return new OrderBy(arguments); - } - public OrderBy orderBy(Object exprA, Javascript js, Javascript jsA, Javascript jsB) { - Arguments arguments = new Arguments(this); - arguments.coerceAndAdd(exprA); - arguments.coerceAndAdd(js); - arguments.coerceAndAdd(jsA); - arguments.coerceAndAdd(jsB); - return new OrderBy(arguments); - } - public OrderBy orderBy(Object exprA, Javascript js, Javascript jsA, Object exprB) { - Arguments arguments = new Arguments(this); - arguments.coerceAndAdd(exprA); - arguments.coerceAndAdd(js); - arguments.coerceAndAdd(jsA); - arguments.coerceAndAdd(exprB); - return new OrderBy(arguments); - } - public OrderBy orderBy(Object exprA, Javascript js, Object exprB) { - Arguments arguments = new Arguments(this); - arguments.coerceAndAdd(exprA); - arguments.coerceAndAdd(js); - arguments.coerceAndAdd(exprB); - return new OrderBy(arguments); - } - public OrderBy orderBy(Object exprA, Javascript js, Object exprB, Javascript jsA) { - Arguments arguments = new Arguments(this); - arguments.coerceAndAdd(exprA); - arguments.coerceAndAdd(js); - arguments.coerceAndAdd(exprB); - arguments.coerceAndAdd(jsA); - return new OrderBy(arguments); - } - public OrderBy orderBy(Object exprA, Javascript js, Object exprB, Object exprC) { - Arguments arguments = new Arguments(this); - arguments.coerceAndAdd(exprA); - arguments.coerceAndAdd(js); - arguments.coerceAndAdd(exprB); - arguments.coerceAndAdd(exprC); - return new OrderBy(arguments); - } - public OrderBy orderBy(Object exprA, Object exprB) { - Arguments arguments = new Arguments(this); - arguments.coerceAndAdd(exprA); - arguments.coerceAndAdd(exprB); - return new OrderBy(arguments); - } - public OrderBy orderBy(Object exprA, Object exprB, Javascript js) { - Arguments arguments = new Arguments(this); - arguments.coerceAndAdd(exprA); - arguments.coerceAndAdd(exprB); - arguments.coerceAndAdd(js); - return new OrderBy(arguments); - } - public OrderBy orderBy(Object exprA, Object exprB, Javascript js, Javascript jsA) { - Arguments arguments = new Arguments(this); - arguments.coerceAndAdd(exprA); - arguments.coerceAndAdd(exprB); - arguments.coerceAndAdd(js); - arguments.coerceAndAdd(jsA); - return new OrderBy(arguments); - } - public OrderBy orderBy(Object exprA, Object exprB, Javascript js, Object exprC) { - Arguments arguments = new Arguments(this); - arguments.coerceAndAdd(exprA); - arguments.coerceAndAdd(exprB); - arguments.coerceAndAdd(js); - arguments.coerceAndAdd(exprC); - return new OrderBy(arguments); - } - public OrderBy orderBy(Object exprA, Object exprB, Object exprC) { - Arguments arguments = new Arguments(this); - arguments.coerceAndAdd(exprA); - arguments.coerceAndAdd(exprB); - arguments.coerceAndAdd(exprC); - return new OrderBy(arguments); - } - public OrderBy orderBy(Object exprA, Object exprB, Object exprC, Javascript js) { - Arguments arguments = new Arguments(this); - arguments.coerceAndAdd(exprA); - arguments.coerceAndAdd(exprB); - arguments.coerceAndAdd(exprC); - arguments.coerceAndAdd(js); - return new OrderBy(arguments); - } - public OrderBy orderBy(Object exprA, Object exprB, Object exprC, Object exprD) { - Arguments arguments = new Arguments(this); - arguments.coerceAndAdd(exprA); - arguments.coerceAndAdd(exprB); - arguments.coerceAndAdd(exprC); - arguments.coerceAndAdd(exprD); - return new OrderBy(arguments); - } - public OrderBy orderBy(Object exprA, Object exprB, Object exprC, ReqlFunction1 func1) { - Arguments arguments = new Arguments(this); - arguments.coerceAndAdd(exprA); - arguments.coerceAndAdd(exprB); - arguments.coerceAndAdd(exprC); - arguments.coerceAndAdd(func1); - return new OrderBy(arguments); - } - public OrderBy orderBy(Object exprA, Object exprB, ReqlFunction1 func1) { - Arguments arguments = new Arguments(this); - arguments.coerceAndAdd(exprA); - arguments.coerceAndAdd(exprB); - arguments.coerceAndAdd(func1); - return new OrderBy(arguments); - } - public OrderBy orderBy(Object exprA, Object exprB, ReqlFunction1 func1, Object exprC) { - Arguments arguments = new Arguments(this); - arguments.coerceAndAdd(exprA); - arguments.coerceAndAdd(exprB); - arguments.coerceAndAdd(func1); - arguments.coerceAndAdd(exprC); - return new OrderBy(arguments); - } - public OrderBy orderBy(Object exprA, Object exprB, ReqlFunction1 func1, ReqlFunction1 func1A) { - Arguments arguments = new Arguments(this); - arguments.coerceAndAdd(exprA); - arguments.coerceAndAdd(exprB); - arguments.coerceAndAdd(func1); - arguments.coerceAndAdd(func1A); - return new OrderBy(arguments); - } - public OrderBy orderBy(Object exprA, ReqlFunction1 func1) { - Arguments arguments = new Arguments(this); - arguments.coerceAndAdd(exprA); - arguments.coerceAndAdd(func1); - return new OrderBy(arguments); - } - public OrderBy orderBy(Object exprA, ReqlFunction1 func1, Object exprB) { - Arguments arguments = new Arguments(this); - arguments.coerceAndAdd(exprA); - arguments.coerceAndAdd(func1); - arguments.coerceAndAdd(exprB); - return new OrderBy(arguments); - } - public OrderBy orderBy(Object exprA, ReqlFunction1 func1, Object exprB, Object exprC) { - Arguments arguments = new Arguments(this); - arguments.coerceAndAdd(exprA); - arguments.coerceAndAdd(func1); - arguments.coerceAndAdd(exprB); - arguments.coerceAndAdd(exprC); - return new OrderBy(arguments); - } - public OrderBy orderBy(Object exprA, ReqlFunction1 func1, Object exprB, ReqlFunction1 func1A) { - Arguments arguments = new Arguments(this); - arguments.coerceAndAdd(exprA); - arguments.coerceAndAdd(func1); - arguments.coerceAndAdd(exprB); - arguments.coerceAndAdd(func1A); - return new OrderBy(arguments); - } - public OrderBy orderBy(Object exprA, ReqlFunction1 func1, ReqlFunction1 func1A) { - Arguments arguments = new Arguments(this); - arguments.coerceAndAdd(exprA); - arguments.coerceAndAdd(func1); - arguments.coerceAndAdd(func1A); - return new OrderBy(arguments); - } - public OrderBy orderBy(Object exprA, ReqlFunction1 func1, ReqlFunction1 func1A, Object exprB) { - Arguments arguments = new Arguments(this); - arguments.coerceAndAdd(exprA); - arguments.coerceAndAdd(func1); - arguments.coerceAndAdd(func1A); - arguments.coerceAndAdd(exprB); - return new OrderBy(arguments); - } - public OrderBy orderBy(Object exprA, ReqlFunction1 func1, ReqlFunction1 func1A, ReqlFunction1 func1B) { - Arguments arguments = new Arguments(this); - arguments.coerceAndAdd(exprA); - arguments.coerceAndAdd(func1); - arguments.coerceAndAdd(func1A); - arguments.coerceAndAdd(func1B); - return new OrderBy(arguments); - } - public OrderBy orderBy(ReqlFunction1 func1) { - Arguments arguments = new Arguments(this); - arguments.coerceAndAdd(func1); - return new OrderBy(arguments); - } - public OrderBy orderBy(ReqlFunction1 func1, Object exprA) { - Arguments arguments = new Arguments(this); - arguments.coerceAndAdd(func1); - arguments.coerceAndAdd(exprA); - return new OrderBy(arguments); - } - public OrderBy orderBy(ReqlFunction1 func1, Object exprA, Object exprB) { - Arguments arguments = new Arguments(this); - arguments.coerceAndAdd(func1); - arguments.coerceAndAdd(exprA); - arguments.coerceAndAdd(exprB); - return new OrderBy(arguments); - } - public OrderBy orderBy(ReqlFunction1 func1, Object exprA, Object exprB, Object exprC) { - Arguments arguments = new Arguments(this); - arguments.coerceAndAdd(func1); - arguments.coerceAndAdd(exprA); - arguments.coerceAndAdd(exprB); - arguments.coerceAndAdd(exprC); - return new OrderBy(arguments); - } - public OrderBy orderBy(ReqlFunction1 func1, Object exprA, Object exprB, ReqlFunction1 func1A) { - Arguments arguments = new Arguments(this); - arguments.coerceAndAdd(func1); - arguments.coerceAndAdd(exprA); - arguments.coerceAndAdd(exprB); - arguments.coerceAndAdd(func1A); - return new OrderBy(arguments); - } - public OrderBy orderBy(ReqlFunction1 func1, Object exprA, ReqlFunction1 func1A) { - Arguments arguments = new Arguments(this); - arguments.coerceAndAdd(func1); - arguments.coerceAndAdd(exprA); - arguments.coerceAndAdd(func1A); - return new OrderBy(arguments); - } - public OrderBy orderBy(ReqlFunction1 func1, Object exprA, ReqlFunction1 func1A, Object exprB) { - Arguments arguments = new Arguments(this); - arguments.coerceAndAdd(func1); - arguments.coerceAndAdd(exprA); - arguments.coerceAndAdd(func1A); - arguments.coerceAndAdd(exprB); - return new OrderBy(arguments); - } - public OrderBy orderBy(ReqlFunction1 func1, Object exprA, ReqlFunction1 func1A, ReqlFunction1 func1B) { - Arguments arguments = new Arguments(this); - arguments.coerceAndAdd(func1); - arguments.coerceAndAdd(exprA); - arguments.coerceAndAdd(func1A); - arguments.coerceAndAdd(func1B); - return new OrderBy(arguments); - } - public OrderBy orderBy(ReqlFunction1 func1, ReqlFunction1 func1A) { - Arguments arguments = new Arguments(this); - arguments.coerceAndAdd(func1); - arguments.coerceAndAdd(func1A); - return new OrderBy(arguments); - } - public OrderBy orderBy(ReqlFunction1 func1, ReqlFunction1 func1A, Object exprA) { - Arguments arguments = new Arguments(this); - arguments.coerceAndAdd(func1); - arguments.coerceAndAdd(func1A); - arguments.coerceAndAdd(exprA); - return new OrderBy(arguments); - } - public OrderBy orderBy(ReqlFunction1 func1, ReqlFunction1 func1A, Object exprA, Object exprB) { - Arguments arguments = new Arguments(this); - arguments.coerceAndAdd(func1); - arguments.coerceAndAdd(func1A); - arguments.coerceAndAdd(exprA); - arguments.coerceAndAdd(exprB); - return new OrderBy(arguments); - } - public OrderBy orderBy(ReqlFunction1 func1, ReqlFunction1 func1A, Object exprA, ReqlFunction1 func1B) { - Arguments arguments = new Arguments(this); - arguments.coerceAndAdd(func1); - arguments.coerceAndAdd(func1A); - arguments.coerceAndAdd(exprA); - arguments.coerceAndAdd(func1B); - return new OrderBy(arguments); - } - public OrderBy orderBy(ReqlFunction1 func1, ReqlFunction1 func1A, ReqlFunction1 func1B) { - Arguments arguments = new Arguments(this); - arguments.coerceAndAdd(func1); - arguments.coerceAndAdd(func1A); - arguments.coerceAndAdd(func1B); - return new OrderBy(arguments); - } - public OrderBy orderBy(ReqlFunction1 func1, ReqlFunction1 func1A, ReqlFunction1 func1B, Object exprA) { - Arguments arguments = new Arguments(this); - arguments.coerceAndAdd(func1); - arguments.coerceAndAdd(func1A); - arguments.coerceAndAdd(func1B); - arguments.coerceAndAdd(exprA); - return new OrderBy(arguments); - } - public OrderBy orderBy(ReqlFunction1 func1, ReqlFunction1 func1A, ReqlFunction1 func1B, ReqlFunction1 func1C) { - Arguments arguments = new Arguments(this); - arguments.coerceAndAdd(func1); - arguments.coerceAndAdd(func1A); - arguments.coerceAndAdd(func1B); - arguments.coerceAndAdd(func1C); - return new OrderBy(arguments); - } - public Distinct distinct() { - Arguments arguments = new Arguments(this); - return new Distinct(arguments); - } - public Count count() { - Arguments arguments = new Arguments(this); - return new Count(arguments); - } - public Count count(Javascript js) { - Arguments arguments = new Arguments(this); - arguments.coerceAndAdd(js); - return new Count(arguments); - } - public Count count(Object exprA) { - Arguments arguments = new Arguments(this); - arguments.coerceAndAdd(exprA); - return new Count(arguments); - } - public Count count(ReqlFunction1 func1) { - Arguments arguments = new Arguments(this); - arguments.coerceAndAdd(func1); - return new Count(arguments); - } - public IsEmpty isEmpty() { - Arguments arguments = new Arguments(this); - return new IsEmpty(arguments); - } - public Union union(Object... exprs) { - Arguments arguments = new Arguments(this); - arguments.coerceAndAddAll(exprs); - return new Union(arguments); - } - public Nth nth(Object exprA) { - Arguments arguments = new Arguments(this); - arguments.coerceAndAdd(exprA); - return new Nth(arguments); - } - public Bracket bracket(Object exprA) { - Arguments arguments = new Arguments(this); - arguments.coerceAndAdd(exprA); - return new Bracket(arguments); - } - public InnerJoin innerJoin(Object exprA, Javascript js) { - Arguments arguments = new Arguments(this); - arguments.coerceAndAdd(exprA); - arguments.coerceAndAdd(js); - return new InnerJoin(arguments); - } - public InnerJoin innerJoin(Object exprA, ReqlFunction2 func2) { - Arguments arguments = new Arguments(this); - arguments.coerceAndAdd(exprA); - arguments.coerceAndAdd(func2); - return new InnerJoin(arguments); - } - public OuterJoin outerJoin(Object exprA, Javascript js) { - Arguments arguments = new Arguments(this); - arguments.coerceAndAdd(exprA); - arguments.coerceAndAdd(js); - return new OuterJoin(arguments); - } - public OuterJoin outerJoin(Object exprA, ReqlFunction2 func2) { - Arguments arguments = new Arguments(this); - arguments.coerceAndAdd(exprA); - arguments.coerceAndAdd(func2); - return new OuterJoin(arguments); - } - public EqJoin eqJoin(Javascript js, Object exprA) { - Arguments arguments = new Arguments(this); - arguments.coerceAndAdd(js); - arguments.coerceAndAdd(exprA); - return new EqJoin(arguments); - } - public EqJoin eqJoin(Object exprA, Object exprB) { - Arguments arguments = new Arguments(this); - arguments.coerceAndAdd(exprA); - arguments.coerceAndAdd(exprB); - return new EqJoin(arguments); - } - public EqJoin eqJoin(ReqlFunction1 func1, Object exprA) { - Arguments arguments = new Arguments(this); - arguments.coerceAndAdd(func1); - arguments.coerceAndAdd(exprA); - return new EqJoin(arguments); - } - public Zip zip() { - Arguments arguments = new Arguments(this); - return new Zip(arguments); - } - public InsertAt insertAt(Object exprA, Object exprB) { - Arguments arguments = new Arguments(this); - arguments.coerceAndAdd(exprA); - arguments.coerceAndAdd(exprB); - return new InsertAt(arguments); - } - public DeleteAt deleteAt(Object exprA) { - Arguments arguments = new Arguments(this); - arguments.coerceAndAdd(exprA); - return new DeleteAt(arguments); - } - public DeleteAt deleteAt(Object exprA, Object exprB) { - Arguments arguments = new Arguments(this); - arguments.coerceAndAdd(exprA); - arguments.coerceAndAdd(exprB); - return new DeleteAt(arguments); - } - public ChangeAt changeAt(Object exprA, Object exprB) { - Arguments arguments = new Arguments(this); - arguments.coerceAndAdd(exprA); - arguments.coerceAndAdd(exprB); - return new ChangeAt(arguments); - } - public SpliceAt spliceAt(Object exprA, Object exprB) { - Arguments arguments = new Arguments(this); - arguments.coerceAndAdd(exprA); - arguments.coerceAndAdd(exprB); - return new SpliceAt(arguments); - } - public CoerceTo coerceTo(Object exprA) { - Arguments arguments = new Arguments(this); - arguments.coerceAndAdd(exprA); - return new CoerceTo(arguments); - } - public TypeOf typeOf() { - Arguments arguments = new Arguments(this); - return new TypeOf(arguments); - } - public Update update(Javascript js) { - Arguments arguments = new Arguments(this); - arguments.coerceAndAdd(js); - return new Update(arguments); - } - public Update update(Object exprA) { - Arguments arguments = new Arguments(this); - arguments.coerceAndAdd(exprA); - return new Update(arguments); - } - public Update update(ReqlFunction1 func1) { - Arguments arguments = new Arguments(this); - arguments.coerceAndAdd(func1); - return new Update(arguments); - } - public Delete delete() { - Arguments arguments = new Arguments(this); - return new Delete(arguments); - } - public Replace replace(Javascript js) { - Arguments arguments = new Arguments(this); - arguments.coerceAndAdd(js); - return new Replace(arguments); - } - public Replace replace(Object exprA) { - Arguments arguments = new Arguments(this); - arguments.coerceAndAdd(exprA); - return new Replace(arguments); - } - public Replace replace(ReqlFunction1 func1) { - Arguments arguments = new Arguments(this); - arguments.coerceAndAdd(func1); - return new Replace(arguments); - } - public Funcall do_(Javascript js) { - Arguments arguments = new Arguments(this); - arguments.coerceAndAdd(js); - return new Funcall(arguments); - } - public Funcall do_(Object exprA, Javascript js) { - Arguments arguments = new Arguments(this); - arguments.coerceAndAdd(exprA); - arguments.coerceAndAdd(js); - return new Funcall(arguments); - } - public Funcall do_(Object exprA, Object exprB, Javascript js) { - Arguments arguments = new Arguments(this); - arguments.coerceAndAdd(exprA); - arguments.coerceAndAdd(exprB); - arguments.coerceAndAdd(js); - return new Funcall(arguments); - } - public Funcall do_(Object exprA, Object exprB, ReqlFunction3 func3) { - Arguments arguments = new Arguments(this); - arguments.coerceAndAdd(exprA); - arguments.coerceAndAdd(exprB); - arguments.coerceAndAdd(func3); - return new Funcall(arguments); - } - public Funcall do_(Object exprA, ReqlFunction2 func2) { - Arguments arguments = new Arguments(this); - arguments.coerceAndAdd(exprA); - arguments.coerceAndAdd(func2); - return new Funcall(arguments); - } - public Funcall do_(Object... exprs) { - Arguments arguments = new Arguments(this); - arguments.coerceAndAddAll(exprs); - return new Funcall(arguments); - } - public Funcall do_(ReqlFunction1 func1) { - Arguments arguments = new Arguments(this); - arguments.coerceAndAdd(func1); - return new Funcall(arguments); - } - public Or or(Object... exprs) { - Arguments arguments = new Arguments(this); - arguments.coerceAndAddAll(exprs); - return new Or(arguments); - } - public And and(Object... exprs) { - Arguments arguments = new Arguments(this); - arguments.coerceAndAddAll(exprs); - return new And(arguments); - } - public ForEach forEach(Javascript js) { - Arguments arguments = new Arguments(this); - arguments.coerceAndAdd(js); - return new ForEach(arguments); - } - public ForEach forEach(ReqlFunction0 func0) { - Arguments arguments = new Arguments(this); - arguments.coerceAndAdd(func0); - return new ForEach(arguments); - } - public ForEach forEach(ReqlFunction1 func1) { - Arguments arguments = new Arguments(this); - arguments.coerceAndAdd(func1); - return new ForEach(arguments); - } - public Info info() { - Arguments arguments = new Arguments(this); - return new Info(arguments); - } - public Match match(Object exprA) { - Arguments arguments = new Arguments(this); - arguments.coerceAndAdd(exprA); - return new Match(arguments); - } - public Upcase upcase() { - Arguments arguments = new Arguments(this); - return new Upcase(arguments); - } - public Downcase downcase() { - Arguments arguments = new Arguments(this); - return new Downcase(arguments); - } - public Sample sample(Object exprA) { - Arguments arguments = new Arguments(this); - arguments.coerceAndAdd(exprA); - return new Sample(arguments); - } - public Default default_(Javascript js) { - Arguments arguments = new Arguments(this); - arguments.coerceAndAdd(js); - return new Default(arguments); - } - public Default default_(Object exprA) { - Arguments arguments = new Arguments(this); - arguments.coerceAndAdd(exprA); - return new Default(arguments); - } - public Default default_(ReqlFunction1 func1) { - Arguments arguments = new Arguments(this); - arguments.coerceAndAdd(func1); - return new Default(arguments); - } - public ToJsonString toJsonString() { - Arguments arguments = new Arguments(this); - return new ToJsonString(arguments); - } - public ToJsonString toJson() { - Arguments arguments = new Arguments(this); - return new ToJsonString(arguments); - } - public ToIso8601 toIso8601() { - Arguments arguments = new Arguments(this); - return new ToIso8601(arguments); - } - public ToEpochTime toEpochTime() { - Arguments arguments = new Arguments(this); - return new ToEpochTime(arguments); - } - public InTimezone inTimezone(Object exprA) { - Arguments arguments = new Arguments(this); - arguments.coerceAndAdd(exprA); - return new InTimezone(arguments); - } - public During during(Object exprA, Object exprB) { - Arguments arguments = new Arguments(this); - arguments.coerceAndAdd(exprA); - arguments.coerceAndAdd(exprB); - return new During(arguments); - } - public Date date() { - Arguments arguments = new Arguments(this); - return new Date(arguments); - } - public TimeOfDay timeOfDay() { - Arguments arguments = new Arguments(this); - return new TimeOfDay(arguments); - } - public Timezone timezone() { - Arguments arguments = new Arguments(this); - return new Timezone(arguments); - } - public Year year() { - Arguments arguments = new Arguments(this); - return new Year(arguments); - } - public Month month() { - Arguments arguments = new Arguments(this); - return new Month(arguments); - } - public Day day() { - Arguments arguments = new Arguments(this); - return new Day(arguments); - } - public DayOfWeek dayOfWeek() { - Arguments arguments = new Arguments(this); - return new DayOfWeek(arguments); - } - public DayOfYear dayOfYear() { - Arguments arguments = new Arguments(this); - return new DayOfYear(arguments); - } - public Hours hours() { - Arguments arguments = new Arguments(this); - return new Hours(arguments); - } - public Minutes minutes() { - Arguments arguments = new Arguments(this); - return new Minutes(arguments); - } - public Seconds seconds() { - Arguments arguments = new Arguments(this); - return new Seconds(arguments); - } - public Group group() { - Arguments arguments = new Arguments(this); - return new Group(arguments); - } - public Group group(Javascript js) { - Arguments arguments = new Arguments(this); - arguments.coerceAndAdd(js); - return new Group(arguments); - } - public Group group(Javascript js, Javascript jsA) { - Arguments arguments = new Arguments(this); - arguments.coerceAndAdd(js); - arguments.coerceAndAdd(jsA); - return new Group(arguments); - } - public Group group(Javascript js, Javascript jsA, Javascript jsB) { - Arguments arguments = new Arguments(this); - arguments.coerceAndAdd(js); - arguments.coerceAndAdd(jsA); - arguments.coerceAndAdd(jsB); - return new Group(arguments); - } - public Group group(Javascript js, Javascript jsA, Javascript jsB, Javascript jsC) { - Arguments arguments = new Arguments(this); - arguments.coerceAndAdd(js); - arguments.coerceAndAdd(jsA); - arguments.coerceAndAdd(jsB); - arguments.coerceAndAdd(jsC); - return new Group(arguments); - } - public Group group(Javascript js, Javascript jsA, Javascript jsB, Object exprA) { - Arguments arguments = new Arguments(this); - arguments.coerceAndAdd(js); - arguments.coerceAndAdd(jsA); - arguments.coerceAndAdd(jsB); - arguments.coerceAndAdd(exprA); - return new Group(arguments); - } - public Group group(Javascript js, Javascript jsA, Object exprA) { - Arguments arguments = new Arguments(this); - arguments.coerceAndAdd(js); - arguments.coerceAndAdd(jsA); - arguments.coerceAndAdd(exprA); - return new Group(arguments); - } - public Group group(Javascript js, Javascript jsA, Object exprA, Javascript jsB) { - Arguments arguments = new Arguments(this); - arguments.coerceAndAdd(js); - arguments.coerceAndAdd(jsA); - arguments.coerceAndAdd(exprA); - arguments.coerceAndAdd(jsB); - return new Group(arguments); - } - public Group group(Javascript js, Javascript jsA, Object exprA, Object exprB) { - Arguments arguments = new Arguments(this); - arguments.coerceAndAdd(js); - arguments.coerceAndAdd(jsA); - arguments.coerceAndAdd(exprA); - arguments.coerceAndAdd(exprB); - return new Group(arguments); - } - public Group group(Javascript js, Object exprA) { - Arguments arguments = new Arguments(this); - arguments.coerceAndAdd(js); - arguments.coerceAndAdd(exprA); - return new Group(arguments); - } - public Group group(Javascript js, Object exprA, Javascript jsA) { - Arguments arguments = new Arguments(this); - arguments.coerceAndAdd(js); - arguments.coerceAndAdd(exprA); - arguments.coerceAndAdd(jsA); - return new Group(arguments); - } - public Group group(Javascript js, Object exprA, Javascript jsA, Javascript jsB) { - Arguments arguments = new Arguments(this); - arguments.coerceAndAdd(js); - arguments.coerceAndAdd(exprA); - arguments.coerceAndAdd(jsA); - arguments.coerceAndAdd(jsB); - return new Group(arguments); - } - public Group group(Javascript js, Object exprA, Javascript jsA, Object exprB) { - Arguments arguments = new Arguments(this); - arguments.coerceAndAdd(js); - arguments.coerceAndAdd(exprA); - arguments.coerceAndAdd(jsA); - arguments.coerceAndAdd(exprB); - return new Group(arguments); - } - public Group group(Javascript js, Object exprA, Object exprB) { - Arguments arguments = new Arguments(this); - arguments.coerceAndAdd(js); - arguments.coerceAndAdd(exprA); - arguments.coerceAndAdd(exprB); - return new Group(arguments); - } - public Group group(Javascript js, Object exprA, Object exprB, Javascript jsA) { - Arguments arguments = new Arguments(this); - arguments.coerceAndAdd(js); - arguments.coerceAndAdd(exprA); - arguments.coerceAndAdd(exprB); - arguments.coerceAndAdd(jsA); - return new Group(arguments); - } - public Group group(Javascript js, Object exprA, Object exprB, Object exprC) { - Arguments arguments = new Arguments(this); - arguments.coerceAndAdd(js); - arguments.coerceAndAdd(exprA); - arguments.coerceAndAdd(exprB); - arguments.coerceAndAdd(exprC); - return new Group(arguments); - } - public Group group(Object exprA) { - Arguments arguments = new Arguments(this); - arguments.coerceAndAdd(exprA); - return new Group(arguments); - } - public Group group(Object exprA, Javascript js) { - Arguments arguments = new Arguments(this); - arguments.coerceAndAdd(exprA); - arguments.coerceAndAdd(js); - return new Group(arguments); - } - public Group group(Object exprA, Javascript js, Javascript jsA) { - Arguments arguments = new Arguments(this); - arguments.coerceAndAdd(exprA); - arguments.coerceAndAdd(js); - arguments.coerceAndAdd(jsA); - return new Group(arguments); - } - public Group group(Object exprA, Javascript js, Javascript jsA, Javascript jsB) { - Arguments arguments = new Arguments(this); - arguments.coerceAndAdd(exprA); - arguments.coerceAndAdd(js); - arguments.coerceAndAdd(jsA); - arguments.coerceAndAdd(jsB); - return new Group(arguments); - } - public Group group(Object exprA, Javascript js, Javascript jsA, Object exprB) { - Arguments arguments = new Arguments(this); - arguments.coerceAndAdd(exprA); - arguments.coerceAndAdd(js); - arguments.coerceAndAdd(jsA); - arguments.coerceAndAdd(exprB); - return new Group(arguments); - } - public Group group(Object exprA, Javascript js, Object exprB) { - Arguments arguments = new Arguments(this); - arguments.coerceAndAdd(exprA); - arguments.coerceAndAdd(js); - arguments.coerceAndAdd(exprB); - return new Group(arguments); - } - public Group group(Object exprA, Javascript js, Object exprB, Javascript jsA) { - Arguments arguments = new Arguments(this); - arguments.coerceAndAdd(exprA); - arguments.coerceAndAdd(js); - arguments.coerceAndAdd(exprB); - arguments.coerceAndAdd(jsA); - return new Group(arguments); - } - public Group group(Object exprA, Javascript js, Object exprB, Object exprC) { - Arguments arguments = new Arguments(this); - arguments.coerceAndAdd(exprA); - arguments.coerceAndAdd(js); - arguments.coerceAndAdd(exprB); - arguments.coerceAndAdd(exprC); - return new Group(arguments); - } - public Group group(Object exprA, Object exprB) { - Arguments arguments = new Arguments(this); - arguments.coerceAndAdd(exprA); - arguments.coerceAndAdd(exprB); - return new Group(arguments); - } - public Group group(Object exprA, Object exprB, Javascript js) { - Arguments arguments = new Arguments(this); - arguments.coerceAndAdd(exprA); - arguments.coerceAndAdd(exprB); - arguments.coerceAndAdd(js); - return new Group(arguments); - } - public Group group(Object exprA, Object exprB, Javascript js, Javascript jsA) { - Arguments arguments = new Arguments(this); - arguments.coerceAndAdd(exprA); - arguments.coerceAndAdd(exprB); - arguments.coerceAndAdd(js); - arguments.coerceAndAdd(jsA); - return new Group(arguments); - } - public Group group(Object exprA, Object exprB, Javascript js, Object exprC) { - Arguments arguments = new Arguments(this); - arguments.coerceAndAdd(exprA); - arguments.coerceAndAdd(exprB); - arguments.coerceAndAdd(js); - arguments.coerceAndAdd(exprC); - return new Group(arguments); - } - public Group group(Object exprA, Object exprB, Object exprC) { - Arguments arguments = new Arguments(this); - arguments.coerceAndAdd(exprA); - arguments.coerceAndAdd(exprB); - arguments.coerceAndAdd(exprC); - return new Group(arguments); - } - public Group group(Object exprA, Object exprB, Object exprC, Javascript js) { - Arguments arguments = new Arguments(this); - arguments.coerceAndAdd(exprA); - arguments.coerceAndAdd(exprB); - arguments.coerceAndAdd(exprC); - arguments.coerceAndAdd(js); - return new Group(arguments); - } - public Group group(Object exprA, Object exprB, Object exprC, Object exprD) { - Arguments arguments = new Arguments(this); - arguments.coerceAndAdd(exprA); - arguments.coerceAndAdd(exprB); - arguments.coerceAndAdd(exprC); - arguments.coerceAndAdd(exprD); - return new Group(arguments); - } - public Group group(Object exprA, Object exprB, Object exprC, ReqlFunction1 func1) { - Arguments arguments = new Arguments(this); - arguments.coerceAndAdd(exprA); - arguments.coerceAndAdd(exprB); - arguments.coerceAndAdd(exprC); - arguments.coerceAndAdd(func1); - return new Group(arguments); - } - public Group group(Object exprA, Object exprB, ReqlFunction1 func1) { - Arguments arguments = new Arguments(this); - arguments.coerceAndAdd(exprA); - arguments.coerceAndAdd(exprB); - arguments.coerceAndAdd(func1); - return new Group(arguments); - } - public Group group(Object exprA, Object exprB, ReqlFunction1 func1, Object exprC) { - Arguments arguments = new Arguments(this); - arguments.coerceAndAdd(exprA); - arguments.coerceAndAdd(exprB); - arguments.coerceAndAdd(func1); - arguments.coerceAndAdd(exprC); - return new Group(arguments); - } - public Group group(Object exprA, Object exprB, ReqlFunction1 func1, ReqlFunction1 func1A) { - Arguments arguments = new Arguments(this); - arguments.coerceAndAdd(exprA); - arguments.coerceAndAdd(exprB); - arguments.coerceAndAdd(func1); - arguments.coerceAndAdd(func1A); - return new Group(arguments); - } - public Group group(Object exprA, ReqlFunction1 func1) { - Arguments arguments = new Arguments(this); - arguments.coerceAndAdd(exprA); - arguments.coerceAndAdd(func1); - return new Group(arguments); - } - public Group group(Object exprA, ReqlFunction1 func1, Object exprB) { - Arguments arguments = new Arguments(this); - arguments.coerceAndAdd(exprA); - arguments.coerceAndAdd(func1); - arguments.coerceAndAdd(exprB); - return new Group(arguments); - } - public Group group(Object exprA, ReqlFunction1 func1, Object exprB, Object exprC) { - Arguments arguments = new Arguments(this); - arguments.coerceAndAdd(exprA); - arguments.coerceAndAdd(func1); - arguments.coerceAndAdd(exprB); - arguments.coerceAndAdd(exprC); - return new Group(arguments); - } - public Group group(Object exprA, ReqlFunction1 func1, Object exprB, ReqlFunction1 func1A) { - Arguments arguments = new Arguments(this); - arguments.coerceAndAdd(exprA); - arguments.coerceAndAdd(func1); - arguments.coerceAndAdd(exprB); - arguments.coerceAndAdd(func1A); - return new Group(arguments); - } - public Group group(Object exprA, ReqlFunction1 func1, ReqlFunction1 func1A) { - Arguments arguments = new Arguments(this); - arguments.coerceAndAdd(exprA); - arguments.coerceAndAdd(func1); - arguments.coerceAndAdd(func1A); - return new Group(arguments); - } - public Group group(Object exprA, ReqlFunction1 func1, ReqlFunction1 func1A, Object exprB) { - Arguments arguments = new Arguments(this); - arguments.coerceAndAdd(exprA); - arguments.coerceAndAdd(func1); - arguments.coerceAndAdd(func1A); - arguments.coerceAndAdd(exprB); - return new Group(arguments); - } - public Group group(Object exprA, ReqlFunction1 func1, ReqlFunction1 func1A, ReqlFunction1 func1B) { - Arguments arguments = new Arguments(this); - arguments.coerceAndAdd(exprA); - arguments.coerceAndAdd(func1); - arguments.coerceAndAdd(func1A); - arguments.coerceAndAdd(func1B); - return new Group(arguments); - } - public Group group(ReqlFunction1 func1) { - Arguments arguments = new Arguments(this); - arguments.coerceAndAdd(func1); - return new Group(arguments); - } - public Group group(ReqlFunction1 func1, Object exprA) { - Arguments arguments = new Arguments(this); - arguments.coerceAndAdd(func1); - arguments.coerceAndAdd(exprA); - return new Group(arguments); - } - public Group group(ReqlFunction1 func1, Object exprA, Object exprB) { - Arguments arguments = new Arguments(this); - arguments.coerceAndAdd(func1); - arguments.coerceAndAdd(exprA); - arguments.coerceAndAdd(exprB); - return new Group(arguments); - } - public Group group(ReqlFunction1 func1, Object exprA, Object exprB, Object exprC) { - Arguments arguments = new Arguments(this); - arguments.coerceAndAdd(func1); - arguments.coerceAndAdd(exprA); - arguments.coerceAndAdd(exprB); - arguments.coerceAndAdd(exprC); - return new Group(arguments); - } - public Group group(ReqlFunction1 func1, Object exprA, Object exprB, ReqlFunction1 func1A) { - Arguments arguments = new Arguments(this); - arguments.coerceAndAdd(func1); - arguments.coerceAndAdd(exprA); - arguments.coerceAndAdd(exprB); - arguments.coerceAndAdd(func1A); - return new Group(arguments); - } - public Group group(ReqlFunction1 func1, Object exprA, ReqlFunction1 func1A) { - Arguments arguments = new Arguments(this); - arguments.coerceAndAdd(func1); - arguments.coerceAndAdd(exprA); - arguments.coerceAndAdd(func1A); - return new Group(arguments); - } - public Group group(ReqlFunction1 func1, Object exprA, ReqlFunction1 func1A, Object exprB) { - Arguments arguments = new Arguments(this); - arguments.coerceAndAdd(func1); - arguments.coerceAndAdd(exprA); - arguments.coerceAndAdd(func1A); - arguments.coerceAndAdd(exprB); - return new Group(arguments); - } - public Group group(ReqlFunction1 func1, Object exprA, ReqlFunction1 func1A, ReqlFunction1 func1B) { - Arguments arguments = new Arguments(this); - arguments.coerceAndAdd(func1); - arguments.coerceAndAdd(exprA); - arguments.coerceAndAdd(func1A); - arguments.coerceAndAdd(func1B); - return new Group(arguments); - } - public Group group(ReqlFunction1 func1, ReqlFunction1 func1A) { - Arguments arguments = new Arguments(this); - arguments.coerceAndAdd(func1); - arguments.coerceAndAdd(func1A); - return new Group(arguments); - } - public Group group(ReqlFunction1 func1, ReqlFunction1 func1A, Object exprA) { - Arguments arguments = new Arguments(this); - arguments.coerceAndAdd(func1); - arguments.coerceAndAdd(func1A); - arguments.coerceAndAdd(exprA); - return new Group(arguments); - } - public Group group(ReqlFunction1 func1, ReqlFunction1 func1A, Object exprA, Object exprB) { - Arguments arguments = new Arguments(this); - arguments.coerceAndAdd(func1); - arguments.coerceAndAdd(func1A); - arguments.coerceAndAdd(exprA); - arguments.coerceAndAdd(exprB); - return new Group(arguments); - } - public Group group(ReqlFunction1 func1, ReqlFunction1 func1A, Object exprA, ReqlFunction1 func1B) { - Arguments arguments = new Arguments(this); - arguments.coerceAndAdd(func1); - arguments.coerceAndAdd(func1A); - arguments.coerceAndAdd(exprA); - arguments.coerceAndAdd(func1B); - return new Group(arguments); - } - public Group group(ReqlFunction1 func1, ReqlFunction1 func1A, ReqlFunction1 func1B) { - Arguments arguments = new Arguments(this); - arguments.coerceAndAdd(func1); - arguments.coerceAndAdd(func1A); - arguments.coerceAndAdd(func1B); - return new Group(arguments); - } - public Group group(ReqlFunction1 func1, ReqlFunction1 func1A, ReqlFunction1 func1B, Object exprA) { - Arguments arguments = new Arguments(this); - arguments.coerceAndAdd(func1); - arguments.coerceAndAdd(func1A); - arguments.coerceAndAdd(func1B); - arguments.coerceAndAdd(exprA); - return new Group(arguments); - } - public Group group(ReqlFunction1 func1, ReqlFunction1 func1A, ReqlFunction1 func1B, ReqlFunction1 func1C) { - Arguments arguments = new Arguments(this); - arguments.coerceAndAdd(func1); - arguments.coerceAndAdd(func1A); - arguments.coerceAndAdd(func1B); - arguments.coerceAndAdd(func1C); - return new Group(arguments); - } - public Sum sum() { - Arguments arguments = new Arguments(this); - return new Sum(arguments); - } - public Sum sum(Javascript js) { - Arguments arguments = new Arguments(this); - arguments.coerceAndAdd(js); - return new Sum(arguments); - } - public Sum sum(Object exprA) { - Arguments arguments = new Arguments(this); - arguments.coerceAndAdd(exprA); - return new Sum(arguments); - } - public Sum sum(ReqlFunction1 func1) { - Arguments arguments = new Arguments(this); - arguments.coerceAndAdd(func1); - return new Sum(arguments); - } - public Avg avg() { - Arguments arguments = new Arguments(this); - return new Avg(arguments); - } - public Avg avg(Javascript js) { - Arguments arguments = new Arguments(this); - arguments.coerceAndAdd(js); - return new Avg(arguments); - } - public Avg avg(Object exprA) { - Arguments arguments = new Arguments(this); - arguments.coerceAndAdd(exprA); - return new Avg(arguments); - } - public Avg avg(ReqlFunction1 func1) { - Arguments arguments = new Arguments(this); - arguments.coerceAndAdd(func1); - return new Avg(arguments); - } - public Min min() { - Arguments arguments = new Arguments(this); - return new Min(arguments); - } - public Min min(Javascript js) { - Arguments arguments = new Arguments(this); - arguments.coerceAndAdd(js); - return new Min(arguments); - } - public Min min(Object exprA) { - Arguments arguments = new Arguments(this); - arguments.coerceAndAdd(exprA); - return new Min(arguments); - } - public Min min(ReqlFunction1 func1) { - Arguments arguments = new Arguments(this); - arguments.coerceAndAdd(func1); - return new Min(arguments); - } - public Max max() { - Arguments arguments = new Arguments(this); - return new Max(arguments); - } - public Max max(Javascript js) { - Arguments arguments = new Arguments(this); - arguments.coerceAndAdd(js); - return new Max(arguments); - } - public Max max(Object exprA) { - Arguments arguments = new Arguments(this); - arguments.coerceAndAdd(exprA); - return new Max(arguments); - } - public Max max(ReqlFunction1 func1) { - Arguments arguments = new Arguments(this); - arguments.coerceAndAdd(func1); - return new Max(arguments); - } - public Split split() { - Arguments arguments = new Arguments(this); - return new Split(arguments); - } - public Split split(Object exprA) { - Arguments arguments = new Arguments(this); - arguments.coerceAndAdd(exprA); - return new Split(arguments); - } - public Split split(Object exprA, Object exprB) { - Arguments arguments = new Arguments(this); - arguments.coerceAndAdd(exprA); - arguments.coerceAndAdd(exprB); - return new Split(arguments); - } - public Ungroup ungroup() { - Arguments arguments = new Arguments(this); - return new Ungroup(arguments); - } - public Changes changes() { - Arguments arguments = new Arguments(this); - return new Changes(arguments); - } - public ToGeojson toGeojson() { - Arguments arguments = new Arguments(this); - return new ToGeojson(arguments); - } - public Distance distance(Object exprA) { - Arguments arguments = new Arguments(this); - arguments.coerceAndAdd(exprA); - return new Distance(arguments); - } - public Intersects intersects(Object exprA) { - Arguments arguments = new Arguments(this); - arguments.coerceAndAdd(exprA); - return new Intersects(arguments); - } - public Includes includes(Object exprA) { - Arguments arguments = new Arguments(this); - arguments.coerceAndAdd(exprA); - return new Includes(arguments); - } - public Fill fill() { - Arguments arguments = new Arguments(this); - return new Fill(arguments); - } - public PolygonSub polygonSub(Object exprA) { - Arguments arguments = new Arguments(this); - arguments.coerceAndAdd(exprA); - return new PolygonSub(arguments); - } - public Values values() { - Arguments arguments = new Arguments(this); - return new Values(arguments); - } -} diff --git a/drivers/java/src/main/java/com/rethinkdb/gen/ast/ReqlFunction0.java b/drivers/java/src/main/java/com/rethinkdb/gen/ast/ReqlFunction0.java deleted file mode 100644 index ef608f955e4..00000000000 --- a/drivers/java/src/main/java/com/rethinkdb/gen/ast/ReqlFunction0.java +++ /dev/null @@ -1,12 +0,0 @@ -// Autogenerated by metajava.py. -// Do not edit this file directly. -// The template for this file is located at: -// ../../../../../../../../templates/ReqlFunction.java -package com.rethinkdb.gen.ast; - -import com.rethinkdb.model.ReqlLambda; -import com.rethinkdb.ast.ReqlAst; - -public interface ReqlFunction0 extends ReqlLambda { - Object apply(); -} diff --git a/drivers/java/src/main/java/com/rethinkdb/gen/ast/ReqlFunction1.java b/drivers/java/src/main/java/com/rethinkdb/gen/ast/ReqlFunction1.java deleted file mode 100644 index e20b12be55e..00000000000 --- a/drivers/java/src/main/java/com/rethinkdb/gen/ast/ReqlFunction1.java +++ /dev/null @@ -1,12 +0,0 @@ -// Autogenerated by metajava.py. -// Do not edit this file directly. -// The template for this file is located at: -// ../../../../../../../../templates/ReqlFunction.java -package com.rethinkdb.gen.ast; - -import com.rethinkdb.model.ReqlLambda; -import com.rethinkdb.ast.ReqlAst; - -public interface ReqlFunction1 extends ReqlLambda { - Object apply(ReqlExpr arg1); -} diff --git a/drivers/java/src/main/java/com/rethinkdb/gen/ast/ReqlFunction2.java b/drivers/java/src/main/java/com/rethinkdb/gen/ast/ReqlFunction2.java deleted file mode 100644 index c0ec7ba372e..00000000000 --- a/drivers/java/src/main/java/com/rethinkdb/gen/ast/ReqlFunction2.java +++ /dev/null @@ -1,12 +0,0 @@ -// Autogenerated by metajava.py. -// Do not edit this file directly. -// The template for this file is located at: -// ../../../../../../../../templates/ReqlFunction.java -package com.rethinkdb.gen.ast; - -import com.rethinkdb.model.ReqlLambda; -import com.rethinkdb.ast.ReqlAst; - -public interface ReqlFunction2 extends ReqlLambda { - Object apply(ReqlExpr arg1, ReqlExpr arg2); -} diff --git a/drivers/java/src/main/java/com/rethinkdb/gen/ast/ReqlFunction3.java b/drivers/java/src/main/java/com/rethinkdb/gen/ast/ReqlFunction3.java deleted file mode 100644 index e062fe792f0..00000000000 --- a/drivers/java/src/main/java/com/rethinkdb/gen/ast/ReqlFunction3.java +++ /dev/null @@ -1,12 +0,0 @@ -// Autogenerated by metajava.py. -// Do not edit this file directly. -// The template for this file is located at: -// ../../../../../../../../templates/ReqlFunction.java -package com.rethinkdb.gen.ast; - -import com.rethinkdb.model.ReqlLambda; -import com.rethinkdb.ast.ReqlAst; - -public interface ReqlFunction3 extends ReqlLambda { - Object apply(ReqlExpr arg1, ReqlExpr arg2, ReqlExpr arg3); -} diff --git a/drivers/java/src/main/java/com/rethinkdb/gen/ast/ReqlFunction4.java b/drivers/java/src/main/java/com/rethinkdb/gen/ast/ReqlFunction4.java deleted file mode 100644 index 53891e93bac..00000000000 --- a/drivers/java/src/main/java/com/rethinkdb/gen/ast/ReqlFunction4.java +++ /dev/null @@ -1,12 +0,0 @@ -// Autogenerated by metajava.py. -// Do not edit this file directly. -// The template for this file is located at: -// ../../../../../../../../templates/ReqlFunction.java -package com.rethinkdb.gen.ast; - -import com.rethinkdb.model.ReqlLambda; -import com.rethinkdb.ast.ReqlAst; - -public interface ReqlFunction4 extends ReqlLambda { - Object apply(ReqlExpr arg1, ReqlExpr arg2, ReqlExpr arg3, ReqlExpr arg4); -} diff --git a/drivers/java/src/main/java/com/rethinkdb/gen/ast/ReqlObject.java b/drivers/java/src/main/java/com/rethinkdb/gen/ast/ReqlObject.java deleted file mode 100644 index 3f13e55d64d..00000000000 --- a/drivers/java/src/main/java/com/rethinkdb/gen/ast/ReqlObject.java +++ /dev/null @@ -1,29 +0,0 @@ -// Autogenerated by metajava.py. -// Do not edit this file directly. -// The template for this file is located at: -// ../../../../../../../../templates/AstSubclass.java - -package com.rethinkdb.gen.ast; - -import com.rethinkdb.gen.proto.TermType; -import com.rethinkdb.gen.exc.ReqlDriverError; -import com.rethinkdb.model.Arguments; -import com.rethinkdb.model.OptArgs; -import com.rethinkdb.ast.ReqlAst; - - - -public class ReqlObject extends ReqlExpr { - - - public ReqlObject(Object arg) { - this(new Arguments(arg), null); - } - public ReqlObject(Arguments args){ - this(args, null); - } - public ReqlObject(Arguments args, OptArgs optargs) { - super(TermType.OBJECT, args, optargs); - } - -} diff --git a/drivers/java/src/main/java/com/rethinkdb/gen/ast/Round.java b/drivers/java/src/main/java/com/rethinkdb/gen/ast/Round.java deleted file mode 100644 index d8cf996e2fd..00000000000 --- a/drivers/java/src/main/java/com/rethinkdb/gen/ast/Round.java +++ /dev/null @@ -1,29 +0,0 @@ -// Autogenerated by metajava.py. -// Do not edit this file directly. -// The template for this file is located at: -// ../../../../../../../../templates/AstSubclass.java - -package com.rethinkdb.gen.ast; - -import com.rethinkdb.gen.proto.TermType; -import com.rethinkdb.gen.exc.ReqlDriverError; -import com.rethinkdb.model.Arguments; -import com.rethinkdb.model.OptArgs; -import com.rethinkdb.ast.ReqlAst; - - - -public class Round extends ReqlExpr { - - - public Round(Object arg) { - this(new Arguments(arg), null); - } - public Round(Arguments args){ - this(args, null); - } - public Round(Arguments args, OptArgs optargs) { - super(TermType.ROUND, args, optargs); - } - -} diff --git a/drivers/java/src/main/java/com/rethinkdb/gen/ast/Sample.java b/drivers/java/src/main/java/com/rethinkdb/gen/ast/Sample.java deleted file mode 100644 index 1b6d9fc2ed5..00000000000 --- a/drivers/java/src/main/java/com/rethinkdb/gen/ast/Sample.java +++ /dev/null @@ -1,29 +0,0 @@ -// Autogenerated by metajava.py. -// Do not edit this file directly. -// The template for this file is located at: -// ../../../../../../../../templates/AstSubclass.java - -package com.rethinkdb.gen.ast; - -import com.rethinkdb.gen.proto.TermType; -import com.rethinkdb.gen.exc.ReqlDriverError; -import com.rethinkdb.model.Arguments; -import com.rethinkdb.model.OptArgs; -import com.rethinkdb.ast.ReqlAst; - - - -public class Sample extends ReqlExpr { - - - public Sample(Object arg) { - this(new Arguments(arg), null); - } - public Sample(Arguments args){ - this(args, null); - } - public Sample(Arguments args, OptArgs optargs) { - super(TermType.SAMPLE, args, optargs); - } - -} diff --git a/drivers/java/src/main/java/com/rethinkdb/gen/ast/Saturday.java b/drivers/java/src/main/java/com/rethinkdb/gen/ast/Saturday.java deleted file mode 100644 index 24bba158c76..00000000000 --- a/drivers/java/src/main/java/com/rethinkdb/gen/ast/Saturday.java +++ /dev/null @@ -1,29 +0,0 @@ -// Autogenerated by metajava.py. -// Do not edit this file directly. -// The template for this file is located at: -// ../../../../../../../../templates/AstSubclass.java - -package com.rethinkdb.gen.ast; - -import com.rethinkdb.gen.proto.TermType; -import com.rethinkdb.gen.exc.ReqlDriverError; -import com.rethinkdb.model.Arguments; -import com.rethinkdb.model.OptArgs; -import com.rethinkdb.ast.ReqlAst; - - - -public class Saturday extends ReqlExpr { - - - public Saturday(Object arg) { - this(new Arguments(arg), null); - } - public Saturday(Arguments args){ - this(args, null); - } - public Saturday(Arguments args, OptArgs optargs) { - super(TermType.SATURDAY, args, optargs); - } - -} diff --git a/drivers/java/src/main/java/com/rethinkdb/gen/ast/Seconds.java b/drivers/java/src/main/java/com/rethinkdb/gen/ast/Seconds.java deleted file mode 100644 index 93a70a27224..00000000000 --- a/drivers/java/src/main/java/com/rethinkdb/gen/ast/Seconds.java +++ /dev/null @@ -1,29 +0,0 @@ -// Autogenerated by metajava.py. -// Do not edit this file directly. -// The template for this file is located at: -// ../../../../../../../../templates/AstSubclass.java - -package com.rethinkdb.gen.ast; - -import com.rethinkdb.gen.proto.TermType; -import com.rethinkdb.gen.exc.ReqlDriverError; -import com.rethinkdb.model.Arguments; -import com.rethinkdb.model.OptArgs; -import com.rethinkdb.ast.ReqlAst; - - - -public class Seconds extends ReqlExpr { - - - public Seconds(Object arg) { - this(new Arguments(arg), null); - } - public Seconds(Arguments args){ - this(args, null); - } - public Seconds(Arguments args, OptArgs optargs) { - super(TermType.SECONDS, args, optargs); - } - -} diff --git a/drivers/java/src/main/java/com/rethinkdb/gen/ast/September.java b/drivers/java/src/main/java/com/rethinkdb/gen/ast/September.java deleted file mode 100644 index fa00a736486..00000000000 --- a/drivers/java/src/main/java/com/rethinkdb/gen/ast/September.java +++ /dev/null @@ -1,29 +0,0 @@ -// Autogenerated by metajava.py. -// Do not edit this file directly. -// The template for this file is located at: -// ../../../../../../../../templates/AstSubclass.java - -package com.rethinkdb.gen.ast; - -import com.rethinkdb.gen.proto.TermType; -import com.rethinkdb.gen.exc.ReqlDriverError; -import com.rethinkdb.model.Arguments; -import com.rethinkdb.model.OptArgs; -import com.rethinkdb.ast.ReqlAst; - - - -public class September extends ReqlExpr { - - - public September(Object arg) { - this(new Arguments(arg), null); - } - public September(Arguments args){ - this(args, null); - } - public September(Arguments args, OptArgs optargs) { - super(TermType.SEPTEMBER, args, optargs); - } - -} diff --git a/drivers/java/src/main/java/com/rethinkdb/gen/ast/SetDifference.java b/drivers/java/src/main/java/com/rethinkdb/gen/ast/SetDifference.java deleted file mode 100644 index b109d796e7a..00000000000 --- a/drivers/java/src/main/java/com/rethinkdb/gen/ast/SetDifference.java +++ /dev/null @@ -1,29 +0,0 @@ -// Autogenerated by metajava.py. -// Do not edit this file directly. -// The template for this file is located at: -// ../../../../../../../../templates/AstSubclass.java - -package com.rethinkdb.gen.ast; - -import com.rethinkdb.gen.proto.TermType; -import com.rethinkdb.gen.exc.ReqlDriverError; -import com.rethinkdb.model.Arguments; -import com.rethinkdb.model.OptArgs; -import com.rethinkdb.ast.ReqlAst; - - - -public class SetDifference extends ReqlExpr { - - - public SetDifference(Object arg) { - this(new Arguments(arg), null); - } - public SetDifference(Arguments args){ - this(args, null); - } - public SetDifference(Arguments args, OptArgs optargs) { - super(TermType.SET_DIFFERENCE, args, optargs); - } - -} diff --git a/drivers/java/src/main/java/com/rethinkdb/gen/ast/SetInsert.java b/drivers/java/src/main/java/com/rethinkdb/gen/ast/SetInsert.java deleted file mode 100644 index 1b590afc694..00000000000 --- a/drivers/java/src/main/java/com/rethinkdb/gen/ast/SetInsert.java +++ /dev/null @@ -1,29 +0,0 @@ -// Autogenerated by metajava.py. -// Do not edit this file directly. -// The template for this file is located at: -// ../../../../../../../../templates/AstSubclass.java - -package com.rethinkdb.gen.ast; - -import com.rethinkdb.gen.proto.TermType; -import com.rethinkdb.gen.exc.ReqlDriverError; -import com.rethinkdb.model.Arguments; -import com.rethinkdb.model.OptArgs; -import com.rethinkdb.ast.ReqlAst; - - - -public class SetInsert extends ReqlExpr { - - - public SetInsert(Object arg) { - this(new Arguments(arg), null); - } - public SetInsert(Arguments args){ - this(args, null); - } - public SetInsert(Arguments args, OptArgs optargs) { - super(TermType.SET_INSERT, args, optargs); - } - -} diff --git a/drivers/java/src/main/java/com/rethinkdb/gen/ast/SetIntersection.java b/drivers/java/src/main/java/com/rethinkdb/gen/ast/SetIntersection.java deleted file mode 100644 index 4a0e0914a6e..00000000000 --- a/drivers/java/src/main/java/com/rethinkdb/gen/ast/SetIntersection.java +++ /dev/null @@ -1,29 +0,0 @@ -// Autogenerated by metajava.py. -// Do not edit this file directly. -// The template for this file is located at: -// ../../../../../../../../templates/AstSubclass.java - -package com.rethinkdb.gen.ast; - -import com.rethinkdb.gen.proto.TermType; -import com.rethinkdb.gen.exc.ReqlDriverError; -import com.rethinkdb.model.Arguments; -import com.rethinkdb.model.OptArgs; -import com.rethinkdb.ast.ReqlAst; - - - -public class SetIntersection extends ReqlExpr { - - - public SetIntersection(Object arg) { - this(new Arguments(arg), null); - } - public SetIntersection(Arguments args){ - this(args, null); - } - public SetIntersection(Arguments args, OptArgs optargs) { - super(TermType.SET_INTERSECTION, args, optargs); - } - -} diff --git a/drivers/java/src/main/java/com/rethinkdb/gen/ast/SetUnion.java b/drivers/java/src/main/java/com/rethinkdb/gen/ast/SetUnion.java deleted file mode 100644 index 0fdaab57631..00000000000 --- a/drivers/java/src/main/java/com/rethinkdb/gen/ast/SetUnion.java +++ /dev/null @@ -1,29 +0,0 @@ -// Autogenerated by metajava.py. -// Do not edit this file directly. -// The template for this file is located at: -// ../../../../../../../../templates/AstSubclass.java - -package com.rethinkdb.gen.ast; - -import com.rethinkdb.gen.proto.TermType; -import com.rethinkdb.gen.exc.ReqlDriverError; -import com.rethinkdb.model.Arguments; -import com.rethinkdb.model.OptArgs; -import com.rethinkdb.ast.ReqlAst; - - - -public class SetUnion extends ReqlExpr { - - - public SetUnion(Object arg) { - this(new Arguments(arg), null); - } - public SetUnion(Arguments args){ - this(args, null); - } - public SetUnion(Arguments args, OptArgs optargs) { - super(TermType.SET_UNION, args, optargs); - } - -} diff --git a/drivers/java/src/main/java/com/rethinkdb/gen/ast/Skip.java b/drivers/java/src/main/java/com/rethinkdb/gen/ast/Skip.java deleted file mode 100644 index 16d4d400843..00000000000 --- a/drivers/java/src/main/java/com/rethinkdb/gen/ast/Skip.java +++ /dev/null @@ -1,29 +0,0 @@ -// Autogenerated by metajava.py. -// Do not edit this file directly. -// The template for this file is located at: -// ../../../../../../../../templates/AstSubclass.java - -package com.rethinkdb.gen.ast; - -import com.rethinkdb.gen.proto.TermType; -import com.rethinkdb.gen.exc.ReqlDriverError; -import com.rethinkdb.model.Arguments; -import com.rethinkdb.model.OptArgs; -import com.rethinkdb.ast.ReqlAst; - - - -public class Skip extends ReqlExpr { - - - public Skip(Object arg) { - this(new Arguments(arg), null); - } - public Skip(Arguments args){ - this(args, null); - } - public Skip(Arguments args, OptArgs optargs) { - super(TermType.SKIP, args, optargs); - } - -} diff --git a/drivers/java/src/main/java/com/rethinkdb/gen/ast/Slice.java b/drivers/java/src/main/java/com/rethinkdb/gen/ast/Slice.java deleted file mode 100644 index 11529460bae..00000000000 --- a/drivers/java/src/main/java/com/rethinkdb/gen/ast/Slice.java +++ /dev/null @@ -1,53 +0,0 @@ -// Autogenerated by metajava.py. -// Do not edit this file directly. -// The template for this file is located at: -// ../../../../../../../../templates/AstSubclass.java - -package com.rethinkdb.gen.ast; - -import com.rethinkdb.gen.proto.TermType; -import com.rethinkdb.gen.exc.ReqlDriverError; -import com.rethinkdb.model.Arguments; -import com.rethinkdb.model.OptArgs; -import com.rethinkdb.ast.ReqlAst; - - - -public class Slice extends ReqlExpr { - - - public Slice(Object arg) { - this(new Arguments(arg), null); - } - public Slice(Arguments args){ - this(args, null); - } - public Slice(Arguments args, OptArgs optargs) { - super(TermType.SLICE, args, optargs); - } - public Slice optArg(String optname, Object value) { - OptArgs newOptargs = OptArgs.fromMap(optargs).with(optname, value); - return new Slice(args, newOptargs); - } - public Slice optArg(String optname, ReqlFunction0 value) { - OptArgs newOptargs = OptArgs.fromMap(optargs).with(optname, value); - return new Slice(args, newOptargs); - } - public Slice optArg(String optname, ReqlFunction1 value) { - OptArgs newOptargs = OptArgs.fromMap(optargs).with(optname, value); - return new Slice(args, newOptargs); - } - public Slice optArg(String optname, ReqlFunction2 value) { - OptArgs newOptargs = OptArgs.fromMap(optargs).with(optname, value); - return new Slice(args, newOptargs); - } - public Slice optArg(String optname, ReqlFunction3 value) { - OptArgs newOptargs = OptArgs.fromMap(optargs).with(optname, value); - return new Slice(args, newOptargs); - } - public Slice optArg(String optname, ReqlFunction4 value) { - OptArgs newOptargs = OptArgs.fromMap(optargs).with(optname, value); - return new Slice(args, newOptargs); - } - -} diff --git a/drivers/java/src/main/java/com/rethinkdb/gen/ast/SpliceAt.java b/drivers/java/src/main/java/com/rethinkdb/gen/ast/SpliceAt.java deleted file mode 100644 index fc0a1e612e7..00000000000 --- a/drivers/java/src/main/java/com/rethinkdb/gen/ast/SpliceAt.java +++ /dev/null @@ -1,29 +0,0 @@ -// Autogenerated by metajava.py. -// Do not edit this file directly. -// The template for this file is located at: -// ../../../../../../../../templates/AstSubclass.java - -package com.rethinkdb.gen.ast; - -import com.rethinkdb.gen.proto.TermType; -import com.rethinkdb.gen.exc.ReqlDriverError; -import com.rethinkdb.model.Arguments; -import com.rethinkdb.model.OptArgs; -import com.rethinkdb.ast.ReqlAst; - - - -public class SpliceAt extends ReqlExpr { - - - public SpliceAt(Object arg) { - this(new Arguments(arg), null); - } - public SpliceAt(Arguments args){ - this(args, null); - } - public SpliceAt(Arguments args, OptArgs optargs) { - super(TermType.SPLICE_AT, args, optargs); - } - -} diff --git a/drivers/java/src/main/java/com/rethinkdb/gen/ast/Split.java b/drivers/java/src/main/java/com/rethinkdb/gen/ast/Split.java deleted file mode 100644 index fb9d5119c11..00000000000 --- a/drivers/java/src/main/java/com/rethinkdb/gen/ast/Split.java +++ /dev/null @@ -1,29 +0,0 @@ -// Autogenerated by metajava.py. -// Do not edit this file directly. -// The template for this file is located at: -// ../../../../../../../../templates/AstSubclass.java - -package com.rethinkdb.gen.ast; - -import com.rethinkdb.gen.proto.TermType; -import com.rethinkdb.gen.exc.ReqlDriverError; -import com.rethinkdb.model.Arguments; -import com.rethinkdb.model.OptArgs; -import com.rethinkdb.ast.ReqlAst; - - - -public class Split extends ReqlExpr { - - - public Split(Object arg) { - this(new Arguments(arg), null); - } - public Split(Arguments args){ - this(args, null); - } - public Split(Arguments args, OptArgs optargs) { - super(TermType.SPLIT, args, optargs); - } - -} diff --git a/drivers/java/src/main/java/com/rethinkdb/gen/ast/Status.java b/drivers/java/src/main/java/com/rethinkdb/gen/ast/Status.java deleted file mode 100644 index 3fa89a3531b..00000000000 --- a/drivers/java/src/main/java/com/rethinkdb/gen/ast/Status.java +++ /dev/null @@ -1,29 +0,0 @@ -// Autogenerated by metajava.py. -// Do not edit this file directly. -// The template for this file is located at: -// ../../../../../../../../templates/AstSubclass.java - -package com.rethinkdb.gen.ast; - -import com.rethinkdb.gen.proto.TermType; -import com.rethinkdb.gen.exc.ReqlDriverError; -import com.rethinkdb.model.Arguments; -import com.rethinkdb.model.OptArgs; -import com.rethinkdb.ast.ReqlAst; - - - -public class Status extends ReqlExpr { - - - public Status(Object arg) { - this(new Arguments(arg), null); - } - public Status(Arguments args){ - this(args, null); - } - public Status(Arguments args, OptArgs optargs) { - super(TermType.STATUS, args, optargs); - } - -} diff --git a/drivers/java/src/main/java/com/rethinkdb/gen/ast/Sub.java b/drivers/java/src/main/java/com/rethinkdb/gen/ast/Sub.java deleted file mode 100644 index 7db7d7877fc..00000000000 --- a/drivers/java/src/main/java/com/rethinkdb/gen/ast/Sub.java +++ /dev/null @@ -1,29 +0,0 @@ -// Autogenerated by metajava.py. -// Do not edit this file directly. -// The template for this file is located at: -// ../../../../../../../../templates/AstSubclass.java - -package com.rethinkdb.gen.ast; - -import com.rethinkdb.gen.proto.TermType; -import com.rethinkdb.gen.exc.ReqlDriverError; -import com.rethinkdb.model.Arguments; -import com.rethinkdb.model.OptArgs; -import com.rethinkdb.ast.ReqlAst; - - - -public class Sub extends ReqlExpr { - - - public Sub(Object arg) { - this(new Arguments(arg), null); - } - public Sub(Arguments args){ - this(args, null); - } - public Sub(Arguments args, OptArgs optargs) { - super(TermType.SUB, args, optargs); - } - -} diff --git a/drivers/java/src/main/java/com/rethinkdb/gen/ast/Sum.java b/drivers/java/src/main/java/com/rethinkdb/gen/ast/Sum.java deleted file mode 100644 index 7483ac15df5..00000000000 --- a/drivers/java/src/main/java/com/rethinkdb/gen/ast/Sum.java +++ /dev/null @@ -1,29 +0,0 @@ -// Autogenerated by metajava.py. -// Do not edit this file directly. -// The template for this file is located at: -// ../../../../../../../../templates/AstSubclass.java - -package com.rethinkdb.gen.ast; - -import com.rethinkdb.gen.proto.TermType; -import com.rethinkdb.gen.exc.ReqlDriverError; -import com.rethinkdb.model.Arguments; -import com.rethinkdb.model.OptArgs; -import com.rethinkdb.ast.ReqlAst; - - - -public class Sum extends ReqlExpr { - - - public Sum(Object arg) { - this(new Arguments(arg), null); - } - public Sum(Arguments args){ - this(args, null); - } - public Sum(Arguments args, OptArgs optargs) { - super(TermType.SUM, args, optargs); - } - -} diff --git a/drivers/java/src/main/java/com/rethinkdb/gen/ast/Sunday.java b/drivers/java/src/main/java/com/rethinkdb/gen/ast/Sunday.java deleted file mode 100644 index e0b0746bf0f..00000000000 --- a/drivers/java/src/main/java/com/rethinkdb/gen/ast/Sunday.java +++ /dev/null @@ -1,29 +0,0 @@ -// Autogenerated by metajava.py. -// Do not edit this file directly. -// The template for this file is located at: -// ../../../../../../../../templates/AstSubclass.java - -package com.rethinkdb.gen.ast; - -import com.rethinkdb.gen.proto.TermType; -import com.rethinkdb.gen.exc.ReqlDriverError; -import com.rethinkdb.model.Arguments; -import com.rethinkdb.model.OptArgs; -import com.rethinkdb.ast.ReqlAst; - - - -public class Sunday extends ReqlExpr { - - - public Sunday(Object arg) { - this(new Arguments(arg), null); - } - public Sunday(Arguments args){ - this(args, null); - } - public Sunday(Arguments args, OptArgs optargs) { - super(TermType.SUNDAY, args, optargs); - } - -} diff --git a/drivers/java/src/main/java/com/rethinkdb/gen/ast/Sync.java b/drivers/java/src/main/java/com/rethinkdb/gen/ast/Sync.java deleted file mode 100644 index 45a0e144f65..00000000000 --- a/drivers/java/src/main/java/com/rethinkdb/gen/ast/Sync.java +++ /dev/null @@ -1,29 +0,0 @@ -// Autogenerated by metajava.py. -// Do not edit this file directly. -// The template for this file is located at: -// ../../../../../../../../templates/AstSubclass.java - -package com.rethinkdb.gen.ast; - -import com.rethinkdb.gen.proto.TermType; -import com.rethinkdb.gen.exc.ReqlDriverError; -import com.rethinkdb.model.Arguments; -import com.rethinkdb.model.OptArgs; -import com.rethinkdb.ast.ReqlAst; - - - -public class Sync extends ReqlExpr { - - - public Sync(Object arg) { - this(new Arguments(arg), null); - } - public Sync(Arguments args){ - this(args, null); - } - public Sync(Arguments args, OptArgs optargs) { - super(TermType.SYNC, args, optargs); - } - -} diff --git a/drivers/java/src/main/java/com/rethinkdb/gen/ast/Table.java b/drivers/java/src/main/java/com/rethinkdb/gen/ast/Table.java deleted file mode 100644 index f34d1a0aea5..00000000000 --- a/drivers/java/src/main/java/com/rethinkdb/gen/ast/Table.java +++ /dev/null @@ -1,162 +0,0 @@ -// Autogenerated by metajava.py. -// Do not edit this file directly. -// The template for this file is located at: -// ../../../../../../../../templates/AstSubclass.java - -package com.rethinkdb.gen.ast; - -import com.rethinkdb.gen.proto.TermType; -import com.rethinkdb.gen.exc.ReqlDriverError; -import com.rethinkdb.model.Arguments; -import com.rethinkdb.model.OptArgs; -import com.rethinkdb.ast.ReqlAst; - - - -public class Table extends ReqlExpr { - - - public Table(Object arg) { - this(new Arguments(arg), null); - } - public Table(Arguments args){ - this(args, null); - } - public Table(Arguments args, OptArgs optargs) { - super(TermType.TABLE, args, optargs); - } - public Table optArg(String optname, Object value) { - OptArgs newOptargs = OptArgs.fromMap(optargs).with(optname, value); - return new Table(args, newOptargs); - } - public Table optArg(String optname, ReqlFunction0 value) { - OptArgs newOptargs = OptArgs.fromMap(optargs).with(optname, value); - return new Table(args, newOptargs); - } - public Table optArg(String optname, ReqlFunction1 value) { - OptArgs newOptargs = OptArgs.fromMap(optargs).with(optname, value); - return new Table(args, newOptargs); - } - public Table optArg(String optname, ReqlFunction2 value) { - OptArgs newOptargs = OptArgs.fromMap(optargs).with(optname, value); - return new Table(args, newOptargs); - } - public Table optArg(String optname, ReqlFunction3 value) { - OptArgs newOptargs = OptArgs.fromMap(optargs).with(optname, value); - return new Table(args, newOptargs); - } - public Table optArg(String optname, ReqlFunction4 value) { - OptArgs newOptargs = OptArgs.fromMap(optargs).with(optname, value); - return new Table(args, newOptargs); - } - - public Get get(Object expr) { - Arguments arguments = new Arguments(this); - arguments.coerceAndAdd(expr); - return new Get(arguments); - } - public GetAll getAll(Object... exprs) { - Arguments arguments = new Arguments(this); - arguments.coerceAndAddAll(exprs); - return new GetAll(arguments); - } - public Insert insert(Object expr) { - Arguments arguments = new Arguments(this); - arguments.coerceAndAdd(expr); - return new Insert(arguments); - } - public Config config() { - Arguments arguments = new Arguments(this); - return new Config(arguments); - } - public Status status() { - Arguments arguments = new Arguments(this); - return new Status(arguments); - } - public Wait wait_() { - Arguments arguments = new Arguments(this); - return new Wait(arguments); - } - public Reconfigure reconfigure() { - Arguments arguments = new Arguments(this); - return new Reconfigure(arguments); - } - public Rebalance rebalance() { - Arguments arguments = new Arguments(this); - return new Rebalance(arguments); - } - public Sync sync() { - Arguments arguments = new Arguments(this); - return new Sync(arguments); - } - public Grant grant(Object expr, Object exprA) { - Arguments arguments = new Arguments(this); - arguments.coerceAndAdd(expr); - arguments.coerceAndAdd(exprA); - return new Grant(arguments); - } - public IndexCreate indexCreate(Object expr) { - Arguments arguments = new Arguments(this); - arguments.coerceAndAdd(expr); - return new IndexCreate(arguments); - } - public IndexCreate indexCreate(Object expr, Javascript js) { - Arguments arguments = new Arguments(this); - arguments.coerceAndAdd(expr); - arguments.coerceAndAdd(js); - return new IndexCreate(arguments); - } - public IndexCreate indexCreate(Object expr, Object exprA) { - Arguments arguments = new Arguments(this); - arguments.coerceAndAdd(expr); - arguments.coerceAndAdd(exprA); - return new IndexCreate(arguments); - } - public IndexCreate indexCreate(Object expr, ReqlFunction0 func0) { - Arguments arguments = new Arguments(this); - arguments.coerceAndAdd(expr); - arguments.coerceAndAdd(func0); - return new IndexCreate(arguments); - } - public IndexCreate indexCreate(Object expr, ReqlFunction1 func1) { - Arguments arguments = new Arguments(this); - arguments.coerceAndAdd(expr); - arguments.coerceAndAdd(func1); - return new IndexCreate(arguments); - } - public IndexDrop indexDrop(Object expr) { - Arguments arguments = new Arguments(this); - arguments.coerceAndAdd(expr); - return new IndexDrop(arguments); - } - public IndexList indexList() { - Arguments arguments = new Arguments(this); - return new IndexList(arguments); - } - public IndexStatus indexStatus(Object... exprs) { - Arguments arguments = new Arguments(this); - arguments.coerceAndAddAll(exprs); - return new IndexStatus(arguments); - } - public IndexWait indexWait(Object... exprs) { - Arguments arguments = new Arguments(this); - arguments.coerceAndAddAll(exprs); - return new IndexWait(arguments); - } - public IndexRename indexRename(Object expr, Object exprA) { - Arguments arguments = new Arguments(this); - arguments.coerceAndAdd(expr); - arguments.coerceAndAdd(exprA); - return new IndexRename(arguments); - } - public GetIntersecting getIntersecting(Object expr) { - Arguments arguments = new Arguments(this); - arguments.coerceAndAdd(expr); - return new GetIntersecting(arguments); - } - public GetNearest getNearest(Object expr) { - Arguments arguments = new Arguments(this); - arguments.coerceAndAdd(expr); - return new GetNearest(arguments); - } -} diff --git a/drivers/java/src/main/java/com/rethinkdb/gen/ast/TableCreate.java b/drivers/java/src/main/java/com/rethinkdb/gen/ast/TableCreate.java deleted file mode 100644 index 3f100e23966..00000000000 --- a/drivers/java/src/main/java/com/rethinkdb/gen/ast/TableCreate.java +++ /dev/null @@ -1,53 +0,0 @@ -// Autogenerated by metajava.py. -// Do not edit this file directly. -// The template for this file is located at: -// ../../../../../../../../templates/AstSubclass.java - -package com.rethinkdb.gen.ast; - -import com.rethinkdb.gen.proto.TermType; -import com.rethinkdb.gen.exc.ReqlDriverError; -import com.rethinkdb.model.Arguments; -import com.rethinkdb.model.OptArgs; -import com.rethinkdb.ast.ReqlAst; - - - -public class TableCreate extends ReqlExpr { - - - public TableCreate(Object arg) { - this(new Arguments(arg), null); - } - public TableCreate(Arguments args){ - this(args, null); - } - public TableCreate(Arguments args, OptArgs optargs) { - super(TermType.TABLE_CREATE, args, optargs); - } - public TableCreate optArg(String optname, Object value) { - OptArgs newOptargs = OptArgs.fromMap(optargs).with(optname, value); - return new TableCreate(args, newOptargs); - } - public TableCreate optArg(String optname, ReqlFunction0 value) { - OptArgs newOptargs = OptArgs.fromMap(optargs).with(optname, value); - return new TableCreate(args, newOptargs); - } - public TableCreate optArg(String optname, ReqlFunction1 value) { - OptArgs newOptargs = OptArgs.fromMap(optargs).with(optname, value); - return new TableCreate(args, newOptargs); - } - public TableCreate optArg(String optname, ReqlFunction2 value) { - OptArgs newOptargs = OptArgs.fromMap(optargs).with(optname, value); - return new TableCreate(args, newOptargs); - } - public TableCreate optArg(String optname, ReqlFunction3 value) { - OptArgs newOptargs = OptArgs.fromMap(optargs).with(optname, value); - return new TableCreate(args, newOptargs); - } - public TableCreate optArg(String optname, ReqlFunction4 value) { - OptArgs newOptargs = OptArgs.fromMap(optargs).with(optname, value); - return new TableCreate(args, newOptargs); - } - -} diff --git a/drivers/java/src/main/java/com/rethinkdb/gen/ast/TableDrop.java b/drivers/java/src/main/java/com/rethinkdb/gen/ast/TableDrop.java deleted file mode 100644 index 6d592be2c68..00000000000 --- a/drivers/java/src/main/java/com/rethinkdb/gen/ast/TableDrop.java +++ /dev/null @@ -1,29 +0,0 @@ -// Autogenerated by metajava.py. -// Do not edit this file directly. -// The template for this file is located at: -// ../../../../../../../../templates/AstSubclass.java - -package com.rethinkdb.gen.ast; - -import com.rethinkdb.gen.proto.TermType; -import com.rethinkdb.gen.exc.ReqlDriverError; -import com.rethinkdb.model.Arguments; -import com.rethinkdb.model.OptArgs; -import com.rethinkdb.ast.ReqlAst; - - - -public class TableDrop extends ReqlExpr { - - - public TableDrop(Object arg) { - this(new Arguments(arg), null); - } - public TableDrop(Arguments args){ - this(args, null); - } - public TableDrop(Arguments args, OptArgs optargs) { - super(TermType.TABLE_DROP, args, optargs); - } - -} diff --git a/drivers/java/src/main/java/com/rethinkdb/gen/ast/TableList.java b/drivers/java/src/main/java/com/rethinkdb/gen/ast/TableList.java deleted file mode 100644 index 441aeac5427..00000000000 --- a/drivers/java/src/main/java/com/rethinkdb/gen/ast/TableList.java +++ /dev/null @@ -1,29 +0,0 @@ -// Autogenerated by metajava.py. -// Do not edit this file directly. -// The template for this file is located at: -// ../../../../../../../../templates/AstSubclass.java - -package com.rethinkdb.gen.ast; - -import com.rethinkdb.gen.proto.TermType; -import com.rethinkdb.gen.exc.ReqlDriverError; -import com.rethinkdb.model.Arguments; -import com.rethinkdb.model.OptArgs; -import com.rethinkdb.ast.ReqlAst; - - - -public class TableList extends ReqlExpr { - - - public TableList(Object arg) { - this(new Arguments(arg), null); - } - public TableList(Arguments args){ - this(args, null); - } - public TableList(Arguments args, OptArgs optargs) { - super(TermType.TABLE_LIST, args, optargs); - } - -} diff --git a/drivers/java/src/main/java/com/rethinkdb/gen/ast/Thursday.java b/drivers/java/src/main/java/com/rethinkdb/gen/ast/Thursday.java deleted file mode 100644 index 298061c8b8c..00000000000 --- a/drivers/java/src/main/java/com/rethinkdb/gen/ast/Thursday.java +++ /dev/null @@ -1,29 +0,0 @@ -// Autogenerated by metajava.py. -// Do not edit this file directly. -// The template for this file is located at: -// ../../../../../../../../templates/AstSubclass.java - -package com.rethinkdb.gen.ast; - -import com.rethinkdb.gen.proto.TermType; -import com.rethinkdb.gen.exc.ReqlDriverError; -import com.rethinkdb.model.Arguments; -import com.rethinkdb.model.OptArgs; -import com.rethinkdb.ast.ReqlAst; - - - -public class Thursday extends ReqlExpr { - - - public Thursday(Object arg) { - this(new Arguments(arg), null); - } - public Thursday(Arguments args){ - this(args, null); - } - public Thursday(Arguments args, OptArgs optargs) { - super(TermType.THURSDAY, args, optargs); - } - -} diff --git a/drivers/java/src/main/java/com/rethinkdb/gen/ast/Time.java b/drivers/java/src/main/java/com/rethinkdb/gen/ast/Time.java deleted file mode 100644 index f23f05def12..00000000000 --- a/drivers/java/src/main/java/com/rethinkdb/gen/ast/Time.java +++ /dev/null @@ -1,29 +0,0 @@ -// Autogenerated by metajava.py. -// Do not edit this file directly. -// The template for this file is located at: -// ../../../../../../../../templates/AstSubclass.java - -package com.rethinkdb.gen.ast; - -import com.rethinkdb.gen.proto.TermType; -import com.rethinkdb.gen.exc.ReqlDriverError; -import com.rethinkdb.model.Arguments; -import com.rethinkdb.model.OptArgs; -import com.rethinkdb.ast.ReqlAst; - - - -public class Time extends ReqlExpr { - - - public Time(Object arg) { - this(new Arguments(arg), null); - } - public Time(Arguments args){ - this(args, null); - } - public Time(Arguments args, OptArgs optargs) { - super(TermType.TIME, args, optargs); - } - -} diff --git a/drivers/java/src/main/java/com/rethinkdb/gen/ast/TimeOfDay.java b/drivers/java/src/main/java/com/rethinkdb/gen/ast/TimeOfDay.java deleted file mode 100644 index e354f2a92a1..00000000000 --- a/drivers/java/src/main/java/com/rethinkdb/gen/ast/TimeOfDay.java +++ /dev/null @@ -1,29 +0,0 @@ -// Autogenerated by metajava.py. -// Do not edit this file directly. -// The template for this file is located at: -// ../../../../../../../../templates/AstSubclass.java - -package com.rethinkdb.gen.ast; - -import com.rethinkdb.gen.proto.TermType; -import com.rethinkdb.gen.exc.ReqlDriverError; -import com.rethinkdb.model.Arguments; -import com.rethinkdb.model.OptArgs; -import com.rethinkdb.ast.ReqlAst; - - - -public class TimeOfDay extends ReqlExpr { - - - public TimeOfDay(Object arg) { - this(new Arguments(arg), null); - } - public TimeOfDay(Arguments args){ - this(args, null); - } - public TimeOfDay(Arguments args, OptArgs optargs) { - super(TermType.TIME_OF_DAY, args, optargs); - } - -} diff --git a/drivers/java/src/main/java/com/rethinkdb/gen/ast/Timezone.java b/drivers/java/src/main/java/com/rethinkdb/gen/ast/Timezone.java deleted file mode 100644 index 02f7b9d0264..00000000000 --- a/drivers/java/src/main/java/com/rethinkdb/gen/ast/Timezone.java +++ /dev/null @@ -1,29 +0,0 @@ -// Autogenerated by metajava.py. -// Do not edit this file directly. -// The template for this file is located at: -// ../../../../../../../../templates/AstSubclass.java - -package com.rethinkdb.gen.ast; - -import com.rethinkdb.gen.proto.TermType; -import com.rethinkdb.gen.exc.ReqlDriverError; -import com.rethinkdb.model.Arguments; -import com.rethinkdb.model.OptArgs; -import com.rethinkdb.ast.ReqlAst; - - - -public class Timezone extends ReqlExpr { - - - public Timezone(Object arg) { - this(new Arguments(arg), null); - } - public Timezone(Arguments args){ - this(args, null); - } - public Timezone(Arguments args, OptArgs optargs) { - super(TermType.TIMEZONE, args, optargs); - } - -} diff --git a/drivers/java/src/main/java/com/rethinkdb/gen/ast/ToEpochTime.java b/drivers/java/src/main/java/com/rethinkdb/gen/ast/ToEpochTime.java deleted file mode 100644 index ceb325c3b34..00000000000 --- a/drivers/java/src/main/java/com/rethinkdb/gen/ast/ToEpochTime.java +++ /dev/null @@ -1,29 +0,0 @@ -// Autogenerated by metajava.py. -// Do not edit this file directly. -// The template for this file is located at: -// ../../../../../../../../templates/AstSubclass.java - -package com.rethinkdb.gen.ast; - -import com.rethinkdb.gen.proto.TermType; -import com.rethinkdb.gen.exc.ReqlDriverError; -import com.rethinkdb.model.Arguments; -import com.rethinkdb.model.OptArgs; -import com.rethinkdb.ast.ReqlAst; - - - -public class ToEpochTime extends ReqlExpr { - - - public ToEpochTime(Object arg) { - this(new Arguments(arg), null); - } - public ToEpochTime(Arguments args){ - this(args, null); - } - public ToEpochTime(Arguments args, OptArgs optargs) { - super(TermType.TO_EPOCH_TIME, args, optargs); - } - -} diff --git a/drivers/java/src/main/java/com/rethinkdb/gen/ast/ToGeojson.java b/drivers/java/src/main/java/com/rethinkdb/gen/ast/ToGeojson.java deleted file mode 100644 index 32f3244f4aa..00000000000 --- a/drivers/java/src/main/java/com/rethinkdb/gen/ast/ToGeojson.java +++ /dev/null @@ -1,29 +0,0 @@ -// Autogenerated by metajava.py. -// Do not edit this file directly. -// The template for this file is located at: -// ../../../../../../../../templates/AstSubclass.java - -package com.rethinkdb.gen.ast; - -import com.rethinkdb.gen.proto.TermType; -import com.rethinkdb.gen.exc.ReqlDriverError; -import com.rethinkdb.model.Arguments; -import com.rethinkdb.model.OptArgs; -import com.rethinkdb.ast.ReqlAst; - - - -public class ToGeojson extends ReqlExpr { - - - public ToGeojson(Object arg) { - this(new Arguments(arg), null); - } - public ToGeojson(Arguments args){ - this(args, null); - } - public ToGeojson(Arguments args, OptArgs optargs) { - super(TermType.TO_GEOJSON, args, optargs); - } - -} diff --git a/drivers/java/src/main/java/com/rethinkdb/gen/ast/ToIso8601.java b/drivers/java/src/main/java/com/rethinkdb/gen/ast/ToIso8601.java deleted file mode 100644 index e45058cf23d..00000000000 --- a/drivers/java/src/main/java/com/rethinkdb/gen/ast/ToIso8601.java +++ /dev/null @@ -1,29 +0,0 @@ -// Autogenerated by metajava.py. -// Do not edit this file directly. -// The template for this file is located at: -// ../../../../../../../../templates/AstSubclass.java - -package com.rethinkdb.gen.ast; - -import com.rethinkdb.gen.proto.TermType; -import com.rethinkdb.gen.exc.ReqlDriverError; -import com.rethinkdb.model.Arguments; -import com.rethinkdb.model.OptArgs; -import com.rethinkdb.ast.ReqlAst; - - - -public class ToIso8601 extends ReqlExpr { - - - public ToIso8601(Object arg) { - this(new Arguments(arg), null); - } - public ToIso8601(Arguments args){ - this(args, null); - } - public ToIso8601(Arguments args, OptArgs optargs) { - super(TermType.TO_ISO8601, args, optargs); - } - -} diff --git a/drivers/java/src/main/java/com/rethinkdb/gen/ast/ToJsonString.java b/drivers/java/src/main/java/com/rethinkdb/gen/ast/ToJsonString.java deleted file mode 100644 index 4208268f329..00000000000 --- a/drivers/java/src/main/java/com/rethinkdb/gen/ast/ToJsonString.java +++ /dev/null @@ -1,29 +0,0 @@ -// Autogenerated by metajava.py. -// Do not edit this file directly. -// The template for this file is located at: -// ../../../../../../../../templates/AstSubclass.java - -package com.rethinkdb.gen.ast; - -import com.rethinkdb.gen.proto.TermType; -import com.rethinkdb.gen.exc.ReqlDriverError; -import com.rethinkdb.model.Arguments; -import com.rethinkdb.model.OptArgs; -import com.rethinkdb.ast.ReqlAst; - - - -public class ToJsonString extends ReqlExpr { - - - public ToJsonString(Object arg) { - this(new Arguments(arg), null); - } - public ToJsonString(Arguments args){ - this(args, null); - } - public ToJsonString(Arguments args, OptArgs optargs) { - super(TermType.TO_JSON_STRING, args, optargs); - } - -} diff --git a/drivers/java/src/main/java/com/rethinkdb/gen/ast/Tuesday.java b/drivers/java/src/main/java/com/rethinkdb/gen/ast/Tuesday.java deleted file mode 100644 index 25e61d572f7..00000000000 --- a/drivers/java/src/main/java/com/rethinkdb/gen/ast/Tuesday.java +++ /dev/null @@ -1,29 +0,0 @@ -// Autogenerated by metajava.py. -// Do not edit this file directly. -// The template for this file is located at: -// ../../../../../../../../templates/AstSubclass.java - -package com.rethinkdb.gen.ast; - -import com.rethinkdb.gen.proto.TermType; -import com.rethinkdb.gen.exc.ReqlDriverError; -import com.rethinkdb.model.Arguments; -import com.rethinkdb.model.OptArgs; -import com.rethinkdb.ast.ReqlAst; - - - -public class Tuesday extends ReqlExpr { - - - public Tuesday(Object arg) { - this(new Arguments(arg), null); - } - public Tuesday(Arguments args){ - this(args, null); - } - public Tuesday(Arguments args, OptArgs optargs) { - super(TermType.TUESDAY, args, optargs); - } - -} diff --git a/drivers/java/src/main/java/com/rethinkdb/gen/ast/TypeOf.java b/drivers/java/src/main/java/com/rethinkdb/gen/ast/TypeOf.java deleted file mode 100644 index 8421a8295c9..00000000000 --- a/drivers/java/src/main/java/com/rethinkdb/gen/ast/TypeOf.java +++ /dev/null @@ -1,29 +0,0 @@ -// Autogenerated by metajava.py. -// Do not edit this file directly. -// The template for this file is located at: -// ../../../../../../../../templates/AstSubclass.java - -package com.rethinkdb.gen.ast; - -import com.rethinkdb.gen.proto.TermType; -import com.rethinkdb.gen.exc.ReqlDriverError; -import com.rethinkdb.model.Arguments; -import com.rethinkdb.model.OptArgs; -import com.rethinkdb.ast.ReqlAst; - - - -public class TypeOf extends ReqlExpr { - - - public TypeOf(Object arg) { - this(new Arguments(arg), null); - } - public TypeOf(Arguments args){ - this(args, null); - } - public TypeOf(Arguments args, OptArgs optargs) { - super(TermType.TYPE_OF, args, optargs); - } - -} diff --git a/drivers/java/src/main/java/com/rethinkdb/gen/ast/Ungroup.java b/drivers/java/src/main/java/com/rethinkdb/gen/ast/Ungroup.java deleted file mode 100644 index c7f8224b114..00000000000 --- a/drivers/java/src/main/java/com/rethinkdb/gen/ast/Ungroup.java +++ /dev/null @@ -1,29 +0,0 @@ -// Autogenerated by metajava.py. -// Do not edit this file directly. -// The template for this file is located at: -// ../../../../../../../../templates/AstSubclass.java - -package com.rethinkdb.gen.ast; - -import com.rethinkdb.gen.proto.TermType; -import com.rethinkdb.gen.exc.ReqlDriverError; -import com.rethinkdb.model.Arguments; -import com.rethinkdb.model.OptArgs; -import com.rethinkdb.ast.ReqlAst; - - - -public class Ungroup extends ReqlExpr { - - - public Ungroup(Object arg) { - this(new Arguments(arg), null); - } - public Ungroup(Arguments args){ - this(args, null); - } - public Ungroup(Arguments args, OptArgs optargs) { - super(TermType.UNGROUP, args, optargs); - } - -} diff --git a/drivers/java/src/main/java/com/rethinkdb/gen/ast/Union.java b/drivers/java/src/main/java/com/rethinkdb/gen/ast/Union.java deleted file mode 100644 index 2d2030308e8..00000000000 --- a/drivers/java/src/main/java/com/rethinkdb/gen/ast/Union.java +++ /dev/null @@ -1,53 +0,0 @@ -// Autogenerated by metajava.py. -// Do not edit this file directly. -// The template for this file is located at: -// ../../../../../../../../templates/AstSubclass.java - -package com.rethinkdb.gen.ast; - -import com.rethinkdb.gen.proto.TermType; -import com.rethinkdb.gen.exc.ReqlDriverError; -import com.rethinkdb.model.Arguments; -import com.rethinkdb.model.OptArgs; -import com.rethinkdb.ast.ReqlAst; - - - -public class Union extends ReqlExpr { - - - public Union(Object arg) { - this(new Arguments(arg), null); - } - public Union(Arguments args){ - this(args, null); - } - public Union(Arguments args, OptArgs optargs) { - super(TermType.UNION, args, optargs); - } - public Union optArg(String optname, Object value) { - OptArgs newOptargs = OptArgs.fromMap(optargs).with(optname, value); - return new Union(args, newOptargs); - } - public Union optArg(String optname, ReqlFunction0 value) { - OptArgs newOptargs = OptArgs.fromMap(optargs).with(optname, value); - return new Union(args, newOptargs); - } - public Union optArg(String optname, ReqlFunction1 value) { - OptArgs newOptargs = OptArgs.fromMap(optargs).with(optname, value); - return new Union(args, newOptargs); - } - public Union optArg(String optname, ReqlFunction2 value) { - OptArgs newOptargs = OptArgs.fromMap(optargs).with(optname, value); - return new Union(args, newOptargs); - } - public Union optArg(String optname, ReqlFunction3 value) { - OptArgs newOptargs = OptArgs.fromMap(optargs).with(optname, value); - return new Union(args, newOptargs); - } - public Union optArg(String optname, ReqlFunction4 value) { - OptArgs newOptargs = OptArgs.fromMap(optargs).with(optname, value); - return new Union(args, newOptargs); - } - -} diff --git a/drivers/java/src/main/java/com/rethinkdb/gen/ast/Upcase.java b/drivers/java/src/main/java/com/rethinkdb/gen/ast/Upcase.java deleted file mode 100644 index 55e61c09597..00000000000 --- a/drivers/java/src/main/java/com/rethinkdb/gen/ast/Upcase.java +++ /dev/null @@ -1,29 +0,0 @@ -// Autogenerated by metajava.py. -// Do not edit this file directly. -// The template for this file is located at: -// ../../../../../../../../templates/AstSubclass.java - -package com.rethinkdb.gen.ast; - -import com.rethinkdb.gen.proto.TermType; -import com.rethinkdb.gen.exc.ReqlDriverError; -import com.rethinkdb.model.Arguments; -import com.rethinkdb.model.OptArgs; -import com.rethinkdb.ast.ReqlAst; - - - -public class Upcase extends ReqlExpr { - - - public Upcase(Object arg) { - this(new Arguments(arg), null); - } - public Upcase(Arguments args){ - this(args, null); - } - public Upcase(Arguments args, OptArgs optargs) { - super(TermType.UPCASE, args, optargs); - } - -} diff --git a/drivers/java/src/main/java/com/rethinkdb/gen/ast/Update.java b/drivers/java/src/main/java/com/rethinkdb/gen/ast/Update.java deleted file mode 100644 index 1b6ad617428..00000000000 --- a/drivers/java/src/main/java/com/rethinkdb/gen/ast/Update.java +++ /dev/null @@ -1,53 +0,0 @@ -// Autogenerated by metajava.py. -// Do not edit this file directly. -// The template for this file is located at: -// ../../../../../../../../templates/AstSubclass.java - -package com.rethinkdb.gen.ast; - -import com.rethinkdb.gen.proto.TermType; -import com.rethinkdb.gen.exc.ReqlDriverError; -import com.rethinkdb.model.Arguments; -import com.rethinkdb.model.OptArgs; -import com.rethinkdb.ast.ReqlAst; - - - -public class Update extends ReqlExpr { - - - public Update(Object arg) { - this(new Arguments(arg), null); - } - public Update(Arguments args){ - this(args, null); - } - public Update(Arguments args, OptArgs optargs) { - super(TermType.UPDATE, args, optargs); - } - public Update optArg(String optname, Object value) { - OptArgs newOptargs = OptArgs.fromMap(optargs).with(optname, value); - return new Update(args, newOptargs); - } - public Update optArg(String optname, ReqlFunction0 value) { - OptArgs newOptargs = OptArgs.fromMap(optargs).with(optname, value); - return new Update(args, newOptargs); - } - public Update optArg(String optname, ReqlFunction1 value) { - OptArgs newOptargs = OptArgs.fromMap(optargs).with(optname, value); - return new Update(args, newOptargs); - } - public Update optArg(String optname, ReqlFunction2 value) { - OptArgs newOptargs = OptArgs.fromMap(optargs).with(optname, value); - return new Update(args, newOptargs); - } - public Update optArg(String optname, ReqlFunction3 value) { - OptArgs newOptargs = OptArgs.fromMap(optargs).with(optname, value); - return new Update(args, newOptargs); - } - public Update optArg(String optname, ReqlFunction4 value) { - OptArgs newOptargs = OptArgs.fromMap(optargs).with(optname, value); - return new Update(args, newOptargs); - } - -} diff --git a/drivers/java/src/main/java/com/rethinkdb/gen/ast/Uuid.java b/drivers/java/src/main/java/com/rethinkdb/gen/ast/Uuid.java deleted file mode 100644 index 4f7a6722db2..00000000000 --- a/drivers/java/src/main/java/com/rethinkdb/gen/ast/Uuid.java +++ /dev/null @@ -1,29 +0,0 @@ -// Autogenerated by metajava.py. -// Do not edit this file directly. -// The template for this file is located at: -// ../../../../../../../../templates/AstSubclass.java - -package com.rethinkdb.gen.ast; - -import com.rethinkdb.gen.proto.TermType; -import com.rethinkdb.gen.exc.ReqlDriverError; -import com.rethinkdb.model.Arguments; -import com.rethinkdb.model.OptArgs; -import com.rethinkdb.ast.ReqlAst; - - - -public class Uuid extends ReqlExpr { - - - public Uuid(Object arg) { - this(new Arguments(arg), null); - } - public Uuid(Arguments args){ - this(args, null); - } - public Uuid(Arguments args, OptArgs optargs) { - super(TermType.UUID, args, optargs); - } - -} diff --git a/drivers/java/src/main/java/com/rethinkdb/gen/ast/Values.java b/drivers/java/src/main/java/com/rethinkdb/gen/ast/Values.java deleted file mode 100644 index 124d7c7c2db..00000000000 --- a/drivers/java/src/main/java/com/rethinkdb/gen/ast/Values.java +++ /dev/null @@ -1,29 +0,0 @@ -// Autogenerated by metajava.py. -// Do not edit this file directly. -// The template for this file is located at: -// ../../../../../../../../templates/AstSubclass.java - -package com.rethinkdb.gen.ast; - -import com.rethinkdb.gen.proto.TermType; -import com.rethinkdb.gen.exc.ReqlDriverError; -import com.rethinkdb.model.Arguments; -import com.rethinkdb.model.OptArgs; -import com.rethinkdb.ast.ReqlAst; - - - -public class Values extends ReqlExpr { - - - public Values(Object arg) { - this(new Arguments(arg), null); - } - public Values(Arguments args){ - this(args, null); - } - public Values(Arguments args, OptArgs optargs) { - super(TermType.VALUES, args, optargs); - } - -} diff --git a/drivers/java/src/main/java/com/rethinkdb/gen/ast/Var.java b/drivers/java/src/main/java/com/rethinkdb/gen/ast/Var.java deleted file mode 100644 index be1d69549a3..00000000000 --- a/drivers/java/src/main/java/com/rethinkdb/gen/ast/Var.java +++ /dev/null @@ -1,29 +0,0 @@ -// Autogenerated by metajava.py. -// Do not edit this file directly. -// The template for this file is located at: -// ../../../../../../../../templates/AstSubclass.java - -package com.rethinkdb.gen.ast; - -import com.rethinkdb.gen.proto.TermType; -import com.rethinkdb.gen.exc.ReqlDriverError; -import com.rethinkdb.model.Arguments; -import com.rethinkdb.model.OptArgs; -import com.rethinkdb.ast.ReqlAst; - - - -public class Var extends ReqlExpr { - - - public Var(Object arg) { - this(new Arguments(arg), null); - } - public Var(Arguments args){ - this(args, null); - } - public Var(Arguments args, OptArgs optargs) { - super(TermType.VAR, args, optargs); - } - -} diff --git a/drivers/java/src/main/java/com/rethinkdb/gen/ast/Wait.java b/drivers/java/src/main/java/com/rethinkdb/gen/ast/Wait.java deleted file mode 100644 index 36b2cf92ad3..00000000000 --- a/drivers/java/src/main/java/com/rethinkdb/gen/ast/Wait.java +++ /dev/null @@ -1,53 +0,0 @@ -// Autogenerated by metajava.py. -// Do not edit this file directly. -// The template for this file is located at: -// ../../../../../../../../templates/AstSubclass.java - -package com.rethinkdb.gen.ast; - -import com.rethinkdb.gen.proto.TermType; -import com.rethinkdb.gen.exc.ReqlDriverError; -import com.rethinkdb.model.Arguments; -import com.rethinkdb.model.OptArgs; -import com.rethinkdb.ast.ReqlAst; - - - -public class Wait extends ReqlExpr { - - - public Wait(Object arg) { - this(new Arguments(arg), null); - } - public Wait(Arguments args){ - this(args, null); - } - public Wait(Arguments args, OptArgs optargs) { - super(TermType.WAIT, args, optargs); - } - public Wait optArg(String optname, Object value) { - OptArgs newOptargs = OptArgs.fromMap(optargs).with(optname, value); - return new Wait(args, newOptargs); - } - public Wait optArg(String optname, ReqlFunction0 value) { - OptArgs newOptargs = OptArgs.fromMap(optargs).with(optname, value); - return new Wait(args, newOptargs); - } - public Wait optArg(String optname, ReqlFunction1 value) { - OptArgs newOptargs = OptArgs.fromMap(optargs).with(optname, value); - return new Wait(args, newOptargs); - } - public Wait optArg(String optname, ReqlFunction2 value) { - OptArgs newOptargs = OptArgs.fromMap(optargs).with(optname, value); - return new Wait(args, newOptargs); - } - public Wait optArg(String optname, ReqlFunction3 value) { - OptArgs newOptargs = OptArgs.fromMap(optargs).with(optname, value); - return new Wait(args, newOptargs); - } - public Wait optArg(String optname, ReqlFunction4 value) { - OptArgs newOptargs = OptArgs.fromMap(optargs).with(optname, value); - return new Wait(args, newOptargs); - } - -} diff --git a/drivers/java/src/main/java/com/rethinkdb/gen/ast/Wednesday.java b/drivers/java/src/main/java/com/rethinkdb/gen/ast/Wednesday.java deleted file mode 100644 index 7c57dd1b16b..00000000000 --- a/drivers/java/src/main/java/com/rethinkdb/gen/ast/Wednesday.java +++ /dev/null @@ -1,29 +0,0 @@ -// Autogenerated by metajava.py. -// Do not edit this file directly. -// The template for this file is located at: -// ../../../../../../../../templates/AstSubclass.java - -package com.rethinkdb.gen.ast; - -import com.rethinkdb.gen.proto.TermType; -import com.rethinkdb.gen.exc.ReqlDriverError; -import com.rethinkdb.model.Arguments; -import com.rethinkdb.model.OptArgs; -import com.rethinkdb.ast.ReqlAst; - - - -public class Wednesday extends ReqlExpr { - - - public Wednesday(Object arg) { - this(new Arguments(arg), null); - } - public Wednesday(Arguments args){ - this(args, null); - } - public Wednesday(Arguments args, OptArgs optargs) { - super(TermType.WEDNESDAY, args, optargs); - } - -} diff --git a/drivers/java/src/main/java/com/rethinkdb/gen/ast/WithFields.java b/drivers/java/src/main/java/com/rethinkdb/gen/ast/WithFields.java deleted file mode 100644 index 3504dd9728f..00000000000 --- a/drivers/java/src/main/java/com/rethinkdb/gen/ast/WithFields.java +++ /dev/null @@ -1,29 +0,0 @@ -// Autogenerated by metajava.py. -// Do not edit this file directly. -// The template for this file is located at: -// ../../../../../../../../templates/AstSubclass.java - -package com.rethinkdb.gen.ast; - -import com.rethinkdb.gen.proto.TermType; -import com.rethinkdb.gen.exc.ReqlDriverError; -import com.rethinkdb.model.Arguments; -import com.rethinkdb.model.OptArgs; -import com.rethinkdb.ast.ReqlAst; - - - -public class WithFields extends ReqlExpr { - - - public WithFields(Object arg) { - this(new Arguments(arg), null); - } - public WithFields(Arguments args){ - this(args, null); - } - public WithFields(Arguments args, OptArgs optargs) { - super(TermType.WITH_FIELDS, args, optargs); - } - -} diff --git a/drivers/java/src/main/java/com/rethinkdb/gen/ast/Without.java b/drivers/java/src/main/java/com/rethinkdb/gen/ast/Without.java deleted file mode 100644 index f7f35eeedc0..00000000000 --- a/drivers/java/src/main/java/com/rethinkdb/gen/ast/Without.java +++ /dev/null @@ -1,29 +0,0 @@ -// Autogenerated by metajava.py. -// Do not edit this file directly. -// The template for this file is located at: -// ../../../../../../../../templates/AstSubclass.java - -package com.rethinkdb.gen.ast; - -import com.rethinkdb.gen.proto.TermType; -import com.rethinkdb.gen.exc.ReqlDriverError; -import com.rethinkdb.model.Arguments; -import com.rethinkdb.model.OptArgs; -import com.rethinkdb.ast.ReqlAst; - - - -public class Without extends ReqlExpr { - - - public Without(Object arg) { - this(new Arguments(arg), null); - } - public Without(Arguments args){ - this(args, null); - } - public Without(Arguments args, OptArgs optargs) { - super(TermType.WITHOUT, args, optargs); - } - -} diff --git a/drivers/java/src/main/java/com/rethinkdb/gen/ast/Year.java b/drivers/java/src/main/java/com/rethinkdb/gen/ast/Year.java deleted file mode 100644 index 874638117f1..00000000000 --- a/drivers/java/src/main/java/com/rethinkdb/gen/ast/Year.java +++ /dev/null @@ -1,29 +0,0 @@ -// Autogenerated by metajava.py. -// Do not edit this file directly. -// The template for this file is located at: -// ../../../../../../../../templates/AstSubclass.java - -package com.rethinkdb.gen.ast; - -import com.rethinkdb.gen.proto.TermType; -import com.rethinkdb.gen.exc.ReqlDriverError; -import com.rethinkdb.model.Arguments; -import com.rethinkdb.model.OptArgs; -import com.rethinkdb.ast.ReqlAst; - - - -public class Year extends ReqlExpr { - - - public Year(Object arg) { - this(new Arguments(arg), null); - } - public Year(Arguments args){ - this(args, null); - } - public Year(Arguments args, OptArgs optargs) { - super(TermType.YEAR, args, optargs); - } - -} diff --git a/drivers/java/src/main/java/com/rethinkdb/gen/ast/Zip.java b/drivers/java/src/main/java/com/rethinkdb/gen/ast/Zip.java deleted file mode 100644 index 9bc1e520799..00000000000 --- a/drivers/java/src/main/java/com/rethinkdb/gen/ast/Zip.java +++ /dev/null @@ -1,29 +0,0 @@ -// Autogenerated by metajava.py. -// Do not edit this file directly. -// The template for this file is located at: -// ../../../../../../../../templates/AstSubclass.java - -package com.rethinkdb.gen.ast; - -import com.rethinkdb.gen.proto.TermType; -import com.rethinkdb.gen.exc.ReqlDriverError; -import com.rethinkdb.model.Arguments; -import com.rethinkdb.model.OptArgs; -import com.rethinkdb.ast.ReqlAst; - - - -public class Zip extends ReqlExpr { - - - public Zip(Object arg) { - this(new Arguments(arg), null); - } - public Zip(Arguments args){ - this(args, null); - } - public Zip(Arguments args, OptArgs optargs) { - super(TermType.ZIP, args, optargs); - } - -} diff --git a/drivers/java/src/main/java/com/rethinkdb/gen/exc/ReqlAuthError.java b/drivers/java/src/main/java/com/rethinkdb/gen/exc/ReqlAuthError.java deleted file mode 100644 index e1bd795bd6f..00000000000 --- a/drivers/java/src/main/java/com/rethinkdb/gen/exc/ReqlAuthError.java +++ /dev/null @@ -1,58 +0,0 @@ -// Autogenerated by metajava.py. -// Do not edit this file directly. -// The template for this file is located at: -// ../../../../../../../../templates/Exception.java -package com.rethinkdb.gen.exc; - -import java.util.Optional; -import com.rethinkdb.ast.ReqlAst; -import com.rethinkdb.model.Backtrace; - -public class ReqlAuthError extends ReqlDriverError { - - Optional backtrace = Optional.empty(); - Optional term = Optional.empty(); - - public ReqlAuthError() { - } - - public ReqlAuthError(String message) { - super(message); - } - - public ReqlAuthError(String format, Object... args) { - super(String.format(format, args)); - } - - public ReqlAuthError(String message, Throwable cause) { - super(message, cause); - } - - public ReqlAuthError(Throwable cause) { - super(cause); - } - - public ReqlAuthError(String msg, ReqlAst term, Backtrace bt) { - super(msg); - this.backtrace = Optional.ofNullable(bt); - this.term = Optional.ofNullable(term); - } - - public ReqlAuthError setBacktrace(Backtrace backtrace) { - this.backtrace = Optional.ofNullable(backtrace); - return this; - } - - public Optional getBacktrace() { - return backtrace; - } - - public ReqlAuthError setTerm(ReqlAst term) { - this.term = Optional.ofNullable(term); - return this; - } - - public Optional getTerm() { - return this.term; - } -} diff --git a/drivers/java/src/main/java/com/rethinkdb/gen/exc/ReqlAvailabilityError.java b/drivers/java/src/main/java/com/rethinkdb/gen/exc/ReqlAvailabilityError.java deleted file mode 100644 index 6d373df9c69..00000000000 --- a/drivers/java/src/main/java/com/rethinkdb/gen/exc/ReqlAvailabilityError.java +++ /dev/null @@ -1,58 +0,0 @@ -// Autogenerated by metajava.py. -// Do not edit this file directly. -// The template for this file is located at: -// ../../../../../../../../templates/Exception.java -package com.rethinkdb.gen.exc; - -import java.util.Optional; -import com.rethinkdb.ast.ReqlAst; -import com.rethinkdb.model.Backtrace; - -public class ReqlAvailabilityError extends ReqlRuntimeError { - - Optional backtrace = Optional.empty(); - Optional term = Optional.empty(); - - public ReqlAvailabilityError() { - } - - public ReqlAvailabilityError(String message) { - super(message); - } - - public ReqlAvailabilityError(String format, Object... args) { - super(String.format(format, args)); - } - - public ReqlAvailabilityError(String message, Throwable cause) { - super(message, cause); - } - - public ReqlAvailabilityError(Throwable cause) { - super(cause); - } - - public ReqlAvailabilityError(String msg, ReqlAst term, Backtrace bt) { - super(msg); - this.backtrace = Optional.ofNullable(bt); - this.term = Optional.ofNullable(term); - } - - public ReqlAvailabilityError setBacktrace(Backtrace backtrace) { - this.backtrace = Optional.ofNullable(backtrace); - return this; - } - - public Optional getBacktrace() { - return backtrace; - } - - public ReqlAvailabilityError setTerm(ReqlAst term) { - this.term = Optional.ofNullable(term); - return this; - } - - public Optional getTerm() { - return this.term; - } -} diff --git a/drivers/java/src/main/java/com/rethinkdb/gen/exc/ReqlClientError.java b/drivers/java/src/main/java/com/rethinkdb/gen/exc/ReqlClientError.java deleted file mode 100644 index 0f15c1f09bb..00000000000 --- a/drivers/java/src/main/java/com/rethinkdb/gen/exc/ReqlClientError.java +++ /dev/null @@ -1,58 +0,0 @@ -// Autogenerated by metajava.py. -// Do not edit this file directly. -// The template for this file is located at: -// ../../../../../../../../templates/Exception.java -package com.rethinkdb.gen.exc; - -import java.util.Optional; -import com.rethinkdb.ast.ReqlAst; -import com.rethinkdb.model.Backtrace; - -public class ReqlClientError extends ReqlError { - - Optional backtrace = Optional.empty(); - Optional term = Optional.empty(); - - public ReqlClientError() { - } - - public ReqlClientError(String message) { - super(message); - } - - public ReqlClientError(String format, Object... args) { - super(String.format(format, args)); - } - - public ReqlClientError(String message, Throwable cause) { - super(message, cause); - } - - public ReqlClientError(Throwable cause) { - super(cause); - } - - public ReqlClientError(String msg, ReqlAst term, Backtrace bt) { - super(msg); - this.backtrace = Optional.ofNullable(bt); - this.term = Optional.ofNullable(term); - } - - public ReqlClientError setBacktrace(Backtrace backtrace) { - this.backtrace = Optional.ofNullable(backtrace); - return this; - } - - public Optional getBacktrace() { - return backtrace; - } - - public ReqlClientError setTerm(ReqlAst term) { - this.term = Optional.ofNullable(term); - return this; - } - - public Optional getTerm() { - return this.term; - } -} diff --git a/drivers/java/src/main/java/com/rethinkdb/gen/exc/ReqlCompileError.java b/drivers/java/src/main/java/com/rethinkdb/gen/exc/ReqlCompileError.java deleted file mode 100644 index 5d290f53b37..00000000000 --- a/drivers/java/src/main/java/com/rethinkdb/gen/exc/ReqlCompileError.java +++ /dev/null @@ -1,58 +0,0 @@ -// Autogenerated by metajava.py. -// Do not edit this file directly. -// The template for this file is located at: -// ../../../../../../../../templates/Exception.java -package com.rethinkdb.gen.exc; - -import java.util.Optional; -import com.rethinkdb.ast.ReqlAst; -import com.rethinkdb.model.Backtrace; - -public class ReqlCompileError extends ReqlError { - - Optional backtrace = Optional.empty(); - Optional term = Optional.empty(); - - public ReqlCompileError() { - } - - public ReqlCompileError(String message) { - super(message); - } - - public ReqlCompileError(String format, Object... args) { - super(String.format(format, args)); - } - - public ReqlCompileError(String message, Throwable cause) { - super(message, cause); - } - - public ReqlCompileError(Throwable cause) { - super(cause); - } - - public ReqlCompileError(String msg, ReqlAst term, Backtrace bt) { - super(msg); - this.backtrace = Optional.ofNullable(bt); - this.term = Optional.ofNullable(term); - } - - public ReqlCompileError setBacktrace(Backtrace backtrace) { - this.backtrace = Optional.ofNullable(backtrace); - return this; - } - - public Optional getBacktrace() { - return backtrace; - } - - public ReqlCompileError setTerm(ReqlAst term) { - this.term = Optional.ofNullable(term); - return this; - } - - public Optional getTerm() { - return this.term; - } -} diff --git a/drivers/java/src/main/java/com/rethinkdb/gen/exc/ReqlDriverCompileError.java b/drivers/java/src/main/java/com/rethinkdb/gen/exc/ReqlDriverCompileError.java deleted file mode 100644 index 1434b155598..00000000000 --- a/drivers/java/src/main/java/com/rethinkdb/gen/exc/ReqlDriverCompileError.java +++ /dev/null @@ -1,58 +0,0 @@ -// Autogenerated by metajava.py. -// Do not edit this file directly. -// The template for this file is located at: -// ../../../../../../../../templates/Exception.java -package com.rethinkdb.gen.exc; - -import java.util.Optional; -import com.rethinkdb.ast.ReqlAst; -import com.rethinkdb.model.Backtrace; - -public class ReqlDriverCompileError extends ReqlCompileError { - - Optional backtrace = Optional.empty(); - Optional term = Optional.empty(); - - public ReqlDriverCompileError() { - } - - public ReqlDriverCompileError(String message) { - super(message); - } - - public ReqlDriverCompileError(String format, Object... args) { - super(String.format(format, args)); - } - - public ReqlDriverCompileError(String message, Throwable cause) { - super(message, cause); - } - - public ReqlDriverCompileError(Throwable cause) { - super(cause); - } - - public ReqlDriverCompileError(String msg, ReqlAst term, Backtrace bt) { - super(msg); - this.backtrace = Optional.ofNullable(bt); - this.term = Optional.ofNullable(term); - } - - public ReqlDriverCompileError setBacktrace(Backtrace backtrace) { - this.backtrace = Optional.ofNullable(backtrace); - return this; - } - - public Optional getBacktrace() { - return backtrace; - } - - public ReqlDriverCompileError setTerm(ReqlAst term) { - this.term = Optional.ofNullable(term); - return this; - } - - public Optional getTerm() { - return this.term; - } -} diff --git a/drivers/java/src/main/java/com/rethinkdb/gen/exc/ReqlDriverError.java b/drivers/java/src/main/java/com/rethinkdb/gen/exc/ReqlDriverError.java deleted file mode 100644 index f4c230f504a..00000000000 --- a/drivers/java/src/main/java/com/rethinkdb/gen/exc/ReqlDriverError.java +++ /dev/null @@ -1,58 +0,0 @@ -// Autogenerated by metajava.py. -// Do not edit this file directly. -// The template for this file is located at: -// ../../../../../../../../templates/Exception.java -package com.rethinkdb.gen.exc; - -import java.util.Optional; -import com.rethinkdb.ast.ReqlAst; -import com.rethinkdb.model.Backtrace; - -public class ReqlDriverError extends ReqlError { - - Optional backtrace = Optional.empty(); - Optional term = Optional.empty(); - - public ReqlDriverError() { - } - - public ReqlDriverError(String message) { - super(message); - } - - public ReqlDriverError(String format, Object... args) { - super(String.format(format, args)); - } - - public ReqlDriverError(String message, Throwable cause) { - super(message, cause); - } - - public ReqlDriverError(Throwable cause) { - super(cause); - } - - public ReqlDriverError(String msg, ReqlAst term, Backtrace bt) { - super(msg); - this.backtrace = Optional.ofNullable(bt); - this.term = Optional.ofNullable(term); - } - - public ReqlDriverError setBacktrace(Backtrace backtrace) { - this.backtrace = Optional.ofNullable(backtrace); - return this; - } - - public Optional getBacktrace() { - return backtrace; - } - - public ReqlDriverError setTerm(ReqlAst term) { - this.term = Optional.ofNullable(term); - return this; - } - - public Optional getTerm() { - return this.term; - } -} diff --git a/drivers/java/src/main/java/com/rethinkdb/gen/exc/ReqlError.java b/drivers/java/src/main/java/com/rethinkdb/gen/exc/ReqlError.java deleted file mode 100644 index af0193d8aad..00000000000 --- a/drivers/java/src/main/java/com/rethinkdb/gen/exc/ReqlError.java +++ /dev/null @@ -1,58 +0,0 @@ -// Autogenerated by metajava.py. -// Do not edit this file directly. -// The template for this file is located at: -// ../../../../../../../../templates/Exception.java -package com.rethinkdb.gen.exc; - -import java.util.Optional; -import com.rethinkdb.ast.ReqlAst; -import com.rethinkdb.model.Backtrace; - -public class ReqlError extends RuntimeException { - - Optional backtrace = Optional.empty(); - Optional term = Optional.empty(); - - public ReqlError() { - } - - public ReqlError(String message) { - super(message); - } - - public ReqlError(String format, Object... args) { - super(String.format(format, args)); - } - - public ReqlError(String message, Throwable cause) { - super(message, cause); - } - - public ReqlError(Throwable cause) { - super(cause); - } - - public ReqlError(String msg, ReqlAst term, Backtrace bt) { - super(msg); - this.backtrace = Optional.ofNullable(bt); - this.term = Optional.ofNullable(term); - } - - public ReqlError setBacktrace(Backtrace backtrace) { - this.backtrace = Optional.ofNullable(backtrace); - return this; - } - - public Optional getBacktrace() { - return backtrace; - } - - public ReqlError setTerm(ReqlAst term) { - this.term = Optional.ofNullable(term); - return this; - } - - public Optional getTerm() { - return this.term; - } -} diff --git a/drivers/java/src/main/java/com/rethinkdb/gen/exc/ReqlInternalError.java b/drivers/java/src/main/java/com/rethinkdb/gen/exc/ReqlInternalError.java deleted file mode 100644 index b533f2f43e3..00000000000 --- a/drivers/java/src/main/java/com/rethinkdb/gen/exc/ReqlInternalError.java +++ /dev/null @@ -1,58 +0,0 @@ -// Autogenerated by metajava.py. -// Do not edit this file directly. -// The template for this file is located at: -// ../../../../../../../../templates/Exception.java -package com.rethinkdb.gen.exc; - -import java.util.Optional; -import com.rethinkdb.ast.ReqlAst; -import com.rethinkdb.model.Backtrace; - -public class ReqlInternalError extends ReqlRuntimeError { - - Optional backtrace = Optional.empty(); - Optional term = Optional.empty(); - - public ReqlInternalError() { - } - - public ReqlInternalError(String message) { - super(message); - } - - public ReqlInternalError(String format, Object... args) { - super(String.format(format, args)); - } - - public ReqlInternalError(String message, Throwable cause) { - super(message, cause); - } - - public ReqlInternalError(Throwable cause) { - super(cause); - } - - public ReqlInternalError(String msg, ReqlAst term, Backtrace bt) { - super(msg); - this.backtrace = Optional.ofNullable(bt); - this.term = Optional.ofNullable(term); - } - - public ReqlInternalError setBacktrace(Backtrace backtrace) { - this.backtrace = Optional.ofNullable(backtrace); - return this; - } - - public Optional getBacktrace() { - return backtrace; - } - - public ReqlInternalError setTerm(ReqlAst term) { - this.term = Optional.ofNullable(term); - return this; - } - - public Optional getTerm() { - return this.term; - } -} diff --git a/drivers/java/src/main/java/com/rethinkdb/gen/exc/ReqlNonExistenceError.java b/drivers/java/src/main/java/com/rethinkdb/gen/exc/ReqlNonExistenceError.java deleted file mode 100644 index 7472a54d4c2..00000000000 --- a/drivers/java/src/main/java/com/rethinkdb/gen/exc/ReqlNonExistenceError.java +++ /dev/null @@ -1,58 +0,0 @@ -// Autogenerated by metajava.py. -// Do not edit this file directly. -// The template for this file is located at: -// ../../../../../../../../templates/Exception.java -package com.rethinkdb.gen.exc; - -import java.util.Optional; -import com.rethinkdb.ast.ReqlAst; -import com.rethinkdb.model.Backtrace; - -public class ReqlNonExistenceError extends ReqlQueryLogicError { - - Optional backtrace = Optional.empty(); - Optional term = Optional.empty(); - - public ReqlNonExistenceError() { - } - - public ReqlNonExistenceError(String message) { - super(message); - } - - public ReqlNonExistenceError(String format, Object... args) { - super(String.format(format, args)); - } - - public ReqlNonExistenceError(String message, Throwable cause) { - super(message, cause); - } - - public ReqlNonExistenceError(Throwable cause) { - super(cause); - } - - public ReqlNonExistenceError(String msg, ReqlAst term, Backtrace bt) { - super(msg); - this.backtrace = Optional.ofNullable(bt); - this.term = Optional.ofNullable(term); - } - - public ReqlNonExistenceError setBacktrace(Backtrace backtrace) { - this.backtrace = Optional.ofNullable(backtrace); - return this; - } - - public Optional getBacktrace() { - return backtrace; - } - - public ReqlNonExistenceError setTerm(ReqlAst term) { - this.term = Optional.ofNullable(term); - return this; - } - - public Optional getTerm() { - return this.term; - } -} diff --git a/drivers/java/src/main/java/com/rethinkdb/gen/exc/ReqlOpFailedError.java b/drivers/java/src/main/java/com/rethinkdb/gen/exc/ReqlOpFailedError.java deleted file mode 100644 index e9dd8b3f0a3..00000000000 --- a/drivers/java/src/main/java/com/rethinkdb/gen/exc/ReqlOpFailedError.java +++ /dev/null @@ -1,58 +0,0 @@ -// Autogenerated by metajava.py. -// Do not edit this file directly. -// The template for this file is located at: -// ../../../../../../../../templates/Exception.java -package com.rethinkdb.gen.exc; - -import java.util.Optional; -import com.rethinkdb.ast.ReqlAst; -import com.rethinkdb.model.Backtrace; - -public class ReqlOpFailedError extends ReqlAvailabilityError { - - Optional backtrace = Optional.empty(); - Optional term = Optional.empty(); - - public ReqlOpFailedError() { - } - - public ReqlOpFailedError(String message) { - super(message); - } - - public ReqlOpFailedError(String format, Object... args) { - super(String.format(format, args)); - } - - public ReqlOpFailedError(String message, Throwable cause) { - super(message, cause); - } - - public ReqlOpFailedError(Throwable cause) { - super(cause); - } - - public ReqlOpFailedError(String msg, ReqlAst term, Backtrace bt) { - super(msg); - this.backtrace = Optional.ofNullable(bt); - this.term = Optional.ofNullable(term); - } - - public ReqlOpFailedError setBacktrace(Backtrace backtrace) { - this.backtrace = Optional.ofNullable(backtrace); - return this; - } - - public Optional getBacktrace() { - return backtrace; - } - - public ReqlOpFailedError setTerm(ReqlAst term) { - this.term = Optional.ofNullable(term); - return this; - } - - public Optional getTerm() { - return this.term; - } -} diff --git a/drivers/java/src/main/java/com/rethinkdb/gen/exc/ReqlOpIndeterminateError.java b/drivers/java/src/main/java/com/rethinkdb/gen/exc/ReqlOpIndeterminateError.java deleted file mode 100644 index 758660a28f7..00000000000 --- a/drivers/java/src/main/java/com/rethinkdb/gen/exc/ReqlOpIndeterminateError.java +++ /dev/null @@ -1,58 +0,0 @@ -// Autogenerated by metajava.py. -// Do not edit this file directly. -// The template for this file is located at: -// ../../../../../../../../templates/Exception.java -package com.rethinkdb.gen.exc; - -import java.util.Optional; -import com.rethinkdb.ast.ReqlAst; -import com.rethinkdb.model.Backtrace; - -public class ReqlOpIndeterminateError extends ReqlAvailabilityError { - - Optional backtrace = Optional.empty(); - Optional term = Optional.empty(); - - public ReqlOpIndeterminateError() { - } - - public ReqlOpIndeterminateError(String message) { - super(message); - } - - public ReqlOpIndeterminateError(String format, Object... args) { - super(String.format(format, args)); - } - - public ReqlOpIndeterminateError(String message, Throwable cause) { - super(message, cause); - } - - public ReqlOpIndeterminateError(Throwable cause) { - super(cause); - } - - public ReqlOpIndeterminateError(String msg, ReqlAst term, Backtrace bt) { - super(msg); - this.backtrace = Optional.ofNullable(bt); - this.term = Optional.ofNullable(term); - } - - public ReqlOpIndeterminateError setBacktrace(Backtrace backtrace) { - this.backtrace = Optional.ofNullable(backtrace); - return this; - } - - public Optional getBacktrace() { - return backtrace; - } - - public ReqlOpIndeterminateError setTerm(ReqlAst term) { - this.term = Optional.ofNullable(term); - return this; - } - - public Optional getTerm() { - return this.term; - } -} diff --git a/drivers/java/src/main/java/com/rethinkdb/gen/exc/ReqlPermissionError.java b/drivers/java/src/main/java/com/rethinkdb/gen/exc/ReqlPermissionError.java deleted file mode 100644 index fc8a0a80df3..00000000000 --- a/drivers/java/src/main/java/com/rethinkdb/gen/exc/ReqlPermissionError.java +++ /dev/null @@ -1,58 +0,0 @@ -// Autogenerated by metajava.py. -// Do not edit this file directly. -// The template for this file is located at: -// ../../../../../../../../templates/Exception.java -package com.rethinkdb.gen.exc; - -import java.util.Optional; -import com.rethinkdb.ast.ReqlAst; -import com.rethinkdb.model.Backtrace; - -public class ReqlPermissionError extends ReqlRuntimeError { - - Optional backtrace = Optional.empty(); - Optional term = Optional.empty(); - - public ReqlPermissionError() { - } - - public ReqlPermissionError(String message) { - super(message); - } - - public ReqlPermissionError(String format, Object... args) { - super(String.format(format, args)); - } - - public ReqlPermissionError(String message, Throwable cause) { - super(message, cause); - } - - public ReqlPermissionError(Throwable cause) { - super(cause); - } - - public ReqlPermissionError(String msg, ReqlAst term, Backtrace bt) { - super(msg); - this.backtrace = Optional.ofNullable(bt); - this.term = Optional.ofNullable(term); - } - - public ReqlPermissionError setBacktrace(Backtrace backtrace) { - this.backtrace = Optional.ofNullable(backtrace); - return this; - } - - public Optional getBacktrace() { - return backtrace; - } - - public ReqlPermissionError setTerm(ReqlAst term) { - this.term = Optional.ofNullable(term); - return this; - } - - public Optional getTerm() { - return this.term; - } -} diff --git a/drivers/java/src/main/java/com/rethinkdb/gen/exc/ReqlQueryLogicError.java b/drivers/java/src/main/java/com/rethinkdb/gen/exc/ReqlQueryLogicError.java deleted file mode 100644 index fcaec6bedfd..00000000000 --- a/drivers/java/src/main/java/com/rethinkdb/gen/exc/ReqlQueryLogicError.java +++ /dev/null @@ -1,58 +0,0 @@ -// Autogenerated by metajava.py. -// Do not edit this file directly. -// The template for this file is located at: -// ../../../../../../../../templates/Exception.java -package com.rethinkdb.gen.exc; - -import java.util.Optional; -import com.rethinkdb.ast.ReqlAst; -import com.rethinkdb.model.Backtrace; - -public class ReqlQueryLogicError extends ReqlRuntimeError { - - Optional backtrace = Optional.empty(); - Optional term = Optional.empty(); - - public ReqlQueryLogicError() { - } - - public ReqlQueryLogicError(String message) { - super(message); - } - - public ReqlQueryLogicError(String format, Object... args) { - super(String.format(format, args)); - } - - public ReqlQueryLogicError(String message, Throwable cause) { - super(message, cause); - } - - public ReqlQueryLogicError(Throwable cause) { - super(cause); - } - - public ReqlQueryLogicError(String msg, ReqlAst term, Backtrace bt) { - super(msg); - this.backtrace = Optional.ofNullable(bt); - this.term = Optional.ofNullable(term); - } - - public ReqlQueryLogicError setBacktrace(Backtrace backtrace) { - this.backtrace = Optional.ofNullable(backtrace); - return this; - } - - public Optional getBacktrace() { - return backtrace; - } - - public ReqlQueryLogicError setTerm(ReqlAst term) { - this.term = Optional.ofNullable(term); - return this; - } - - public Optional getTerm() { - return this.term; - } -} diff --git a/drivers/java/src/main/java/com/rethinkdb/gen/exc/ReqlResourceLimitError.java b/drivers/java/src/main/java/com/rethinkdb/gen/exc/ReqlResourceLimitError.java deleted file mode 100644 index c097856c164..00000000000 --- a/drivers/java/src/main/java/com/rethinkdb/gen/exc/ReqlResourceLimitError.java +++ /dev/null @@ -1,58 +0,0 @@ -// Autogenerated by metajava.py. -// Do not edit this file directly. -// The template for this file is located at: -// ../../../../../../../../templates/Exception.java -package com.rethinkdb.gen.exc; - -import java.util.Optional; -import com.rethinkdb.ast.ReqlAst; -import com.rethinkdb.model.Backtrace; - -public class ReqlResourceLimitError extends ReqlRuntimeError { - - Optional backtrace = Optional.empty(); - Optional term = Optional.empty(); - - public ReqlResourceLimitError() { - } - - public ReqlResourceLimitError(String message) { - super(message); - } - - public ReqlResourceLimitError(String format, Object... args) { - super(String.format(format, args)); - } - - public ReqlResourceLimitError(String message, Throwable cause) { - super(message, cause); - } - - public ReqlResourceLimitError(Throwable cause) { - super(cause); - } - - public ReqlResourceLimitError(String msg, ReqlAst term, Backtrace bt) { - super(msg); - this.backtrace = Optional.ofNullable(bt); - this.term = Optional.ofNullable(term); - } - - public ReqlResourceLimitError setBacktrace(Backtrace backtrace) { - this.backtrace = Optional.ofNullable(backtrace); - return this; - } - - public Optional getBacktrace() { - return backtrace; - } - - public ReqlResourceLimitError setTerm(ReqlAst term) { - this.term = Optional.ofNullable(term); - return this; - } - - public Optional getTerm() { - return this.term; - } -} diff --git a/drivers/java/src/main/java/com/rethinkdb/gen/exc/ReqlRuntimeError.java b/drivers/java/src/main/java/com/rethinkdb/gen/exc/ReqlRuntimeError.java deleted file mode 100644 index 1d220600a8c..00000000000 --- a/drivers/java/src/main/java/com/rethinkdb/gen/exc/ReqlRuntimeError.java +++ /dev/null @@ -1,58 +0,0 @@ -// Autogenerated by metajava.py. -// Do not edit this file directly. -// The template for this file is located at: -// ../../../../../../../../templates/Exception.java -package com.rethinkdb.gen.exc; - -import java.util.Optional; -import com.rethinkdb.ast.ReqlAst; -import com.rethinkdb.model.Backtrace; - -public class ReqlRuntimeError extends ReqlError { - - Optional backtrace = Optional.empty(); - Optional term = Optional.empty(); - - public ReqlRuntimeError() { - } - - public ReqlRuntimeError(String message) { - super(message); - } - - public ReqlRuntimeError(String format, Object... args) { - super(String.format(format, args)); - } - - public ReqlRuntimeError(String message, Throwable cause) { - super(message, cause); - } - - public ReqlRuntimeError(Throwable cause) { - super(cause); - } - - public ReqlRuntimeError(String msg, ReqlAst term, Backtrace bt) { - super(msg); - this.backtrace = Optional.ofNullable(bt); - this.term = Optional.ofNullable(term); - } - - public ReqlRuntimeError setBacktrace(Backtrace backtrace) { - this.backtrace = Optional.ofNullable(backtrace); - return this; - } - - public Optional getBacktrace() { - return backtrace; - } - - public ReqlRuntimeError setTerm(ReqlAst term) { - this.term = Optional.ofNullable(term); - return this; - } - - public Optional getTerm() { - return this.term; - } -} diff --git a/drivers/java/src/main/java/com/rethinkdb/gen/exc/ReqlServerCompileError.java b/drivers/java/src/main/java/com/rethinkdb/gen/exc/ReqlServerCompileError.java deleted file mode 100644 index 28c5c4ac34a..00000000000 --- a/drivers/java/src/main/java/com/rethinkdb/gen/exc/ReqlServerCompileError.java +++ /dev/null @@ -1,58 +0,0 @@ -// Autogenerated by metajava.py. -// Do not edit this file directly. -// The template for this file is located at: -// ../../../../../../../../templates/Exception.java -package com.rethinkdb.gen.exc; - -import java.util.Optional; -import com.rethinkdb.ast.ReqlAst; -import com.rethinkdb.model.Backtrace; - -public class ReqlServerCompileError extends ReqlCompileError { - - Optional backtrace = Optional.empty(); - Optional term = Optional.empty(); - - public ReqlServerCompileError() { - } - - public ReqlServerCompileError(String message) { - super(message); - } - - public ReqlServerCompileError(String format, Object... args) { - super(String.format(format, args)); - } - - public ReqlServerCompileError(String message, Throwable cause) { - super(message, cause); - } - - public ReqlServerCompileError(Throwable cause) { - super(cause); - } - - public ReqlServerCompileError(String msg, ReqlAst term, Backtrace bt) { - super(msg); - this.backtrace = Optional.ofNullable(bt); - this.term = Optional.ofNullable(term); - } - - public ReqlServerCompileError setBacktrace(Backtrace backtrace) { - this.backtrace = Optional.ofNullable(backtrace); - return this; - } - - public Optional getBacktrace() { - return backtrace; - } - - public ReqlServerCompileError setTerm(ReqlAst term) { - this.term = Optional.ofNullable(term); - return this; - } - - public Optional getTerm() { - return this.term; - } -} diff --git a/drivers/java/src/main/java/com/rethinkdb/gen/exc/ReqlUserError.java b/drivers/java/src/main/java/com/rethinkdb/gen/exc/ReqlUserError.java deleted file mode 100644 index 9c215f31f01..00000000000 --- a/drivers/java/src/main/java/com/rethinkdb/gen/exc/ReqlUserError.java +++ /dev/null @@ -1,58 +0,0 @@ -// Autogenerated by metajava.py. -// Do not edit this file directly. -// The template for this file is located at: -// ../../../../../../../../templates/Exception.java -package com.rethinkdb.gen.exc; - -import java.util.Optional; -import com.rethinkdb.ast.ReqlAst; -import com.rethinkdb.model.Backtrace; - -public class ReqlUserError extends ReqlRuntimeError { - - Optional backtrace = Optional.empty(); - Optional term = Optional.empty(); - - public ReqlUserError() { - } - - public ReqlUserError(String message) { - super(message); - } - - public ReqlUserError(String format, Object... args) { - super(String.format(format, args)); - } - - public ReqlUserError(String message, Throwable cause) { - super(message, cause); - } - - public ReqlUserError(Throwable cause) { - super(cause); - } - - public ReqlUserError(String msg, ReqlAst term, Backtrace bt) { - super(msg); - this.backtrace = Optional.ofNullable(bt); - this.term = Optional.ofNullable(term); - } - - public ReqlUserError setBacktrace(Backtrace backtrace) { - this.backtrace = Optional.ofNullable(backtrace); - return this; - } - - public Optional getBacktrace() { - return backtrace; - } - - public ReqlUserError setTerm(ReqlAst term) { - this.term = Optional.ofNullable(term); - return this; - } - - public Optional getTerm() { - return this.term; - } -} diff --git a/drivers/java/src/main/java/com/rethinkdb/gen/model/TopLevel.java b/drivers/java/src/main/java/com/rethinkdb/gen/model/TopLevel.java deleted file mode 100644 index 2404a9c80c3..00000000000 --- a/drivers/java/src/main/java/com/rethinkdb/gen/model/TopLevel.java +++ /dev/null @@ -1,1756 +0,0 @@ -// Autogenerated by metajava.py. -// Do not edit this file directly. -// The template for this file is located at: -// ../../../../../../../../templates/TopLevel.java - -package com.rethinkdb.gen.model; - -import com.rethinkdb.ast.ReqlAst; -import com.rethinkdb.model.Arguments; -import com.rethinkdb.model.MapObject; -import com.rethinkdb.gen.ast.Error; -import com.rethinkdb.gen.ast.*; -import com.rethinkdb.ast.Util; -import com.rethinkdb.gen.exc.ReqlDriverError; - -import java.util.Arrays; -import java.util.ArrayList; -import java.util.List; - -public class TopLevel { - - public ReqlExpr expr(Object value){ - return Util.toReqlExpr(value); - } - - public ReqlExpr row(Object... values) { - throw new ReqlDriverError("r.row is not implemented in the Java driver."+ - " Use lambda syntax instead"); - } - - public MapObject hashMap(Object key, Object val){ - return new MapObject().with(key, val); - } - - public MapObject hashMap() { - return new MapObject(); - } - - public List array(Object val0, Object... vals){ - List res = new ArrayList(); - res.add(val0); - res.addAll(Arrays.asList(vals)); - return res; - } - public List array(ReqlFunction0 val0, ReqlFunction0... vals){ - List res = new ArrayList(); - res.add(val0); - res.addAll(Arrays.asList(vals)); - return res; - } - public List array(ReqlFunction1 val0, ReqlFunction1... vals){ - List res = new ArrayList(); - res.add(val0); - res.addAll(Arrays.asList(vals)); - return res; - } - public List array(ReqlFunction2 val0, ReqlFunction2... vals){ - List res = new ArrayList(); - res.add(val0); - res.addAll(Arrays.asList(vals)); - return res; - } - public List array(ReqlFunction3 val0, ReqlFunction3... vals){ - List res = new ArrayList(); - res.add(val0); - res.addAll(Arrays.asList(vals)); - return res; - } - public List array(ReqlFunction4 val0, ReqlFunction4... vals){ - List res = new ArrayList(); - res.add(val0); - res.addAll(Arrays.asList(vals)); - return res; - } - public List array(){ - return new ArrayList(); - } - - public Javascript js(Object expr){ - Arguments args = new Arguments(); - args.coerceAndAdd(expr); - return new Javascript(args); - } - public Uuid uuid(){ - Arguments args = new Arguments(); - return new Uuid(args); - } - public Uuid uuid(Object expr){ - Arguments args = new Arguments(); - args.coerceAndAdd(expr); - return new Uuid(args); - } - public Http http(Object expr){ - Arguments args = new Arguments(); - args.coerceAndAdd(expr); - return new Http(args); - } - public Error error(){ - Arguments args = new Arguments(); - return new Error(args); - } - public Error error(Object expr){ - Arguments args = new Arguments(); - args.coerceAndAdd(expr); - return new Error(args); - } - public Db db(Object expr){ - Arguments args = new Arguments(); - args.coerceAndAdd(expr); - return new Db(args); - } - public Table table(Object expr){ - Arguments args = new Arguments(); - args.coerceAndAdd(expr); - return new Table(args); - } - public Eq eq(Object expr, Object exprA, Object... exprs){ - Arguments args = new Arguments(); - args.coerceAndAdd(expr); - args.coerceAndAdd(exprA); - args.coerceAndAddAll(exprs); - return new Eq(args); - } - public Ne ne(Object expr, Object exprA, Object... exprs){ - Arguments args = new Arguments(); - args.coerceAndAdd(expr); - args.coerceAndAdd(exprA); - args.coerceAndAddAll(exprs); - return new Ne(args); - } - public Lt lt(Object expr, Object exprA, Object... exprs){ - Arguments args = new Arguments(); - args.coerceAndAdd(expr); - args.coerceAndAdd(exprA); - args.coerceAndAddAll(exprs); - return new Lt(args); - } - public Le le(Object expr, Object exprA, Object... exprs){ - Arguments args = new Arguments(); - args.coerceAndAdd(expr); - args.coerceAndAdd(exprA); - args.coerceAndAddAll(exprs); - return new Le(args); - } - public Gt gt(Object expr, Object exprA, Object... exprs){ - Arguments args = new Arguments(); - args.coerceAndAdd(expr); - args.coerceAndAdd(exprA); - args.coerceAndAddAll(exprs); - return new Gt(args); - } - public Ge ge(Object expr, Object exprA, Object... exprs){ - Arguments args = new Arguments(); - args.coerceAndAdd(expr); - args.coerceAndAdd(exprA); - args.coerceAndAddAll(exprs); - return new Ge(args); - } - public Not not(Object expr){ - Arguments args = new Arguments(); - args.coerceAndAdd(expr); - return new Not(args); - } - public Add add(Object expr, Object... exprs){ - Arguments args = new Arguments(); - args.coerceAndAdd(expr); - args.coerceAndAddAll(exprs); - return new Add(args); - } - public Sub sub(Object expr, Object... exprs){ - Arguments args = new Arguments(); - args.coerceAndAdd(expr); - args.coerceAndAddAll(exprs); - return new Sub(args); - } - public Mul mul(Object expr, Object... exprs){ - Arguments args = new Arguments(); - args.coerceAndAdd(expr); - args.coerceAndAddAll(exprs); - return new Mul(args); - } - public Div div(Object expr, Object... exprs){ - Arguments args = new Arguments(); - args.coerceAndAdd(expr); - args.coerceAndAddAll(exprs); - return new Div(args); - } - public Mod mod(Object expr, Object exprA){ - Arguments args = new Arguments(); - args.coerceAndAdd(expr); - args.coerceAndAdd(exprA); - return new Mod(args); - } - public Floor floor(Object expr){ - Arguments args = new Arguments(); - args.coerceAndAdd(expr); - return new Floor(args); - } - public Ceil ceil(Object expr){ - Arguments args = new Arguments(); - args.coerceAndAdd(expr); - return new Ceil(args); - } - public Round round(Object expr){ - Arguments args = new Arguments(); - args.coerceAndAdd(expr); - return new Round(args); - } - public Contains contains(Object expr){ - Arguments args = new Arguments(); - args.coerceAndAdd(expr); - return new Contains(args); - } - public Contains contains(Object expr, Javascript js){ - Arguments args = new Arguments(); - args.coerceAndAdd(expr); - args.coerceAndAdd(js); - return new Contains(args); - } - public Contains contains(Object expr, Javascript js, Javascript jsA){ - Arguments args = new Arguments(); - args.coerceAndAdd(expr); - args.coerceAndAdd(js); - args.coerceAndAdd(jsA); - return new Contains(args); - } - public Contains contains(Object expr, Javascript js, Javascript jsA, Javascript jsB){ - Arguments args = new Arguments(); - args.coerceAndAdd(expr); - args.coerceAndAdd(js); - args.coerceAndAdd(jsA); - args.coerceAndAdd(jsB); - return new Contains(args); - } - public Contains contains(Object expr, Javascript js, Javascript jsA, Javascript jsB, Javascript jsC){ - Arguments args = new Arguments(); - args.coerceAndAdd(expr); - args.coerceAndAdd(js); - args.coerceAndAdd(jsA); - args.coerceAndAdd(jsB); - args.coerceAndAdd(jsC); - return new Contains(args); - } - public Contains contains(Object expr, Javascript js, Javascript jsA, Javascript jsB, Object exprA){ - Arguments args = new Arguments(); - args.coerceAndAdd(expr); - args.coerceAndAdd(js); - args.coerceAndAdd(jsA); - args.coerceAndAdd(jsB); - args.coerceAndAdd(exprA); - return new Contains(args); - } - public Contains contains(Object expr, Javascript js, Javascript jsA, Object exprA){ - Arguments args = new Arguments(); - args.coerceAndAdd(expr); - args.coerceAndAdd(js); - args.coerceAndAdd(jsA); - args.coerceAndAdd(exprA); - return new Contains(args); - } - public Contains contains(Object expr, Javascript js, Javascript jsA, Object exprA, Javascript jsB){ - Arguments args = new Arguments(); - args.coerceAndAdd(expr); - args.coerceAndAdd(js); - args.coerceAndAdd(jsA); - args.coerceAndAdd(exprA); - args.coerceAndAdd(jsB); - return new Contains(args); - } - public Contains contains(Object expr, Javascript js, Javascript jsA, Object exprA, Object exprB){ - Arguments args = new Arguments(); - args.coerceAndAdd(expr); - args.coerceAndAdd(js); - args.coerceAndAdd(jsA); - args.coerceAndAdd(exprA); - args.coerceAndAdd(exprB); - return new Contains(args); - } - public Contains contains(Object expr, Javascript js, Object exprA){ - Arguments args = new Arguments(); - args.coerceAndAdd(expr); - args.coerceAndAdd(js); - args.coerceAndAdd(exprA); - return new Contains(args); - } - public Contains contains(Object expr, Javascript js, Object exprA, Javascript jsA){ - Arguments args = new Arguments(); - args.coerceAndAdd(expr); - args.coerceAndAdd(js); - args.coerceAndAdd(exprA); - args.coerceAndAdd(jsA); - return new Contains(args); - } - public Contains contains(Object expr, Javascript js, Object exprA, Javascript jsA, Javascript jsB){ - Arguments args = new Arguments(); - args.coerceAndAdd(expr); - args.coerceAndAdd(js); - args.coerceAndAdd(exprA); - args.coerceAndAdd(jsA); - args.coerceAndAdd(jsB); - return new Contains(args); - } - public Contains contains(Object expr, Javascript js, Object exprA, Javascript jsA, Object exprB){ - Arguments args = new Arguments(); - args.coerceAndAdd(expr); - args.coerceAndAdd(js); - args.coerceAndAdd(exprA); - args.coerceAndAdd(jsA); - args.coerceAndAdd(exprB); - return new Contains(args); - } - public Contains contains(Object expr, Javascript js, Object exprA, Object exprB){ - Arguments args = new Arguments(); - args.coerceAndAdd(expr); - args.coerceAndAdd(js); - args.coerceAndAdd(exprA); - args.coerceAndAdd(exprB); - return new Contains(args); - } - public Contains contains(Object expr, Javascript js, Object exprA, Object exprB, Javascript jsA){ - Arguments args = new Arguments(); - args.coerceAndAdd(expr); - args.coerceAndAdd(js); - args.coerceAndAdd(exprA); - args.coerceAndAdd(exprB); - args.coerceAndAdd(jsA); - return new Contains(args); - } - public Contains contains(Object expr, Javascript js, Object exprA, Object exprB, Object exprC){ - Arguments args = new Arguments(); - args.coerceAndAdd(expr); - args.coerceAndAdd(js); - args.coerceAndAdd(exprA); - args.coerceAndAdd(exprB); - args.coerceAndAdd(exprC); - return new Contains(args); - } - public Contains contains(Object expr, Object exprA){ - Arguments args = new Arguments(); - args.coerceAndAdd(expr); - args.coerceAndAdd(exprA); - return new Contains(args); - } - public Contains contains(Object expr, Object exprA, Javascript js){ - Arguments args = new Arguments(); - args.coerceAndAdd(expr); - args.coerceAndAdd(exprA); - args.coerceAndAdd(js); - return new Contains(args); - } - public Contains contains(Object expr, Object exprA, Javascript js, Javascript jsA){ - Arguments args = new Arguments(); - args.coerceAndAdd(expr); - args.coerceAndAdd(exprA); - args.coerceAndAdd(js); - args.coerceAndAdd(jsA); - return new Contains(args); - } - public Contains contains(Object expr, Object exprA, Javascript js, Javascript jsA, Javascript jsB){ - Arguments args = new Arguments(); - args.coerceAndAdd(expr); - args.coerceAndAdd(exprA); - args.coerceAndAdd(js); - args.coerceAndAdd(jsA); - args.coerceAndAdd(jsB); - return new Contains(args); - } - public Contains contains(Object expr, Object exprA, Javascript js, Javascript jsA, Object exprB){ - Arguments args = new Arguments(); - args.coerceAndAdd(expr); - args.coerceAndAdd(exprA); - args.coerceAndAdd(js); - args.coerceAndAdd(jsA); - args.coerceAndAdd(exprB); - return new Contains(args); - } - public Contains contains(Object expr, Object exprA, Javascript js, Object exprB){ - Arguments args = new Arguments(); - args.coerceAndAdd(expr); - args.coerceAndAdd(exprA); - args.coerceAndAdd(js); - args.coerceAndAdd(exprB); - return new Contains(args); - } - public Contains contains(Object expr, Object exprA, Javascript js, Object exprB, Javascript jsA){ - Arguments args = new Arguments(); - args.coerceAndAdd(expr); - args.coerceAndAdd(exprA); - args.coerceAndAdd(js); - args.coerceAndAdd(exprB); - args.coerceAndAdd(jsA); - return new Contains(args); - } - public Contains contains(Object expr, Object exprA, Javascript js, Object exprB, Object exprC){ - Arguments args = new Arguments(); - args.coerceAndAdd(expr); - args.coerceAndAdd(exprA); - args.coerceAndAdd(js); - args.coerceAndAdd(exprB); - args.coerceAndAdd(exprC); - return new Contains(args); - } - public Contains contains(Object expr, Object exprA, Object exprB){ - Arguments args = new Arguments(); - args.coerceAndAdd(expr); - args.coerceAndAdd(exprA); - args.coerceAndAdd(exprB); - return new Contains(args); - } - public Contains contains(Object expr, Object exprA, Object exprB, Javascript js){ - Arguments args = new Arguments(); - args.coerceAndAdd(expr); - args.coerceAndAdd(exprA); - args.coerceAndAdd(exprB); - args.coerceAndAdd(js); - return new Contains(args); - } - public Contains contains(Object expr, Object exprA, Object exprB, Javascript js, Javascript jsA){ - Arguments args = new Arguments(); - args.coerceAndAdd(expr); - args.coerceAndAdd(exprA); - args.coerceAndAdd(exprB); - args.coerceAndAdd(js); - args.coerceAndAdd(jsA); - return new Contains(args); - } - public Contains contains(Object expr, Object exprA, Object exprB, Javascript js, Object exprC){ - Arguments args = new Arguments(); - args.coerceAndAdd(expr); - args.coerceAndAdd(exprA); - args.coerceAndAdd(exprB); - args.coerceAndAdd(js); - args.coerceAndAdd(exprC); - return new Contains(args); - } - public Contains contains(Object expr, Object exprA, Object exprB, Object exprC){ - Arguments args = new Arguments(); - args.coerceAndAdd(expr); - args.coerceAndAdd(exprA); - args.coerceAndAdd(exprB); - args.coerceAndAdd(exprC); - return new Contains(args); - } - public Contains contains(Object expr, Object exprA, Object exprB, Object exprC, Javascript js){ - Arguments args = new Arguments(); - args.coerceAndAdd(expr); - args.coerceAndAdd(exprA); - args.coerceAndAdd(exprB); - args.coerceAndAdd(exprC); - args.coerceAndAdd(js); - return new Contains(args); - } - public Contains contains(Object expr, Object exprA, Object exprB, Object exprC, Object exprD){ - Arguments args = new Arguments(); - args.coerceAndAdd(expr); - args.coerceAndAdd(exprA); - args.coerceAndAdd(exprB); - args.coerceAndAdd(exprC); - args.coerceAndAdd(exprD); - return new Contains(args); - } - public Contains contains(Object expr, Object exprA, Object exprB, Object exprC, ReqlFunction1 func1){ - Arguments args = new Arguments(); - args.coerceAndAdd(expr); - args.coerceAndAdd(exprA); - args.coerceAndAdd(exprB); - args.coerceAndAdd(exprC); - args.coerceAndAdd(func1); - return new Contains(args); - } - public Contains contains(Object expr, Object exprA, Object exprB, ReqlFunction1 func1){ - Arguments args = new Arguments(); - args.coerceAndAdd(expr); - args.coerceAndAdd(exprA); - args.coerceAndAdd(exprB); - args.coerceAndAdd(func1); - return new Contains(args); - } - public Contains contains(Object expr, Object exprA, Object exprB, ReqlFunction1 func1, Object exprC){ - Arguments args = new Arguments(); - args.coerceAndAdd(expr); - args.coerceAndAdd(exprA); - args.coerceAndAdd(exprB); - args.coerceAndAdd(func1); - args.coerceAndAdd(exprC); - return new Contains(args); - } - public Contains contains(Object expr, Object exprA, Object exprB, ReqlFunction1 func1, ReqlFunction1 func1A){ - Arguments args = new Arguments(); - args.coerceAndAdd(expr); - args.coerceAndAdd(exprA); - args.coerceAndAdd(exprB); - args.coerceAndAdd(func1); - args.coerceAndAdd(func1A); - return new Contains(args); - } - public Contains contains(Object expr, Object exprA, ReqlFunction1 func1){ - Arguments args = new Arguments(); - args.coerceAndAdd(expr); - args.coerceAndAdd(exprA); - args.coerceAndAdd(func1); - return new Contains(args); - } - public Contains contains(Object expr, Object exprA, ReqlFunction1 func1, Object exprB){ - Arguments args = new Arguments(); - args.coerceAndAdd(expr); - args.coerceAndAdd(exprA); - args.coerceAndAdd(func1); - args.coerceAndAdd(exprB); - return new Contains(args); - } - public Contains contains(Object expr, Object exprA, ReqlFunction1 func1, Object exprB, Object exprC){ - Arguments args = new Arguments(); - args.coerceAndAdd(expr); - args.coerceAndAdd(exprA); - args.coerceAndAdd(func1); - args.coerceAndAdd(exprB); - args.coerceAndAdd(exprC); - return new Contains(args); - } - public Contains contains(Object expr, Object exprA, ReqlFunction1 func1, Object exprB, ReqlFunction1 func1A){ - Arguments args = new Arguments(); - args.coerceAndAdd(expr); - args.coerceAndAdd(exprA); - args.coerceAndAdd(func1); - args.coerceAndAdd(exprB); - args.coerceAndAdd(func1A); - return new Contains(args); - } - public Contains contains(Object expr, Object exprA, ReqlFunction1 func1, ReqlFunction1 func1A){ - Arguments args = new Arguments(); - args.coerceAndAdd(expr); - args.coerceAndAdd(exprA); - args.coerceAndAdd(func1); - args.coerceAndAdd(func1A); - return new Contains(args); - } - public Contains contains(Object expr, Object exprA, ReqlFunction1 func1, ReqlFunction1 func1A, Object exprB){ - Arguments args = new Arguments(); - args.coerceAndAdd(expr); - args.coerceAndAdd(exprA); - args.coerceAndAdd(func1); - args.coerceAndAdd(func1A); - args.coerceAndAdd(exprB); - return new Contains(args); - } - public Contains contains(Object expr, Object exprA, ReqlFunction1 func1, ReqlFunction1 func1A, ReqlFunction1 func1B){ - Arguments args = new Arguments(); - args.coerceAndAdd(expr); - args.coerceAndAdd(exprA); - args.coerceAndAdd(func1); - args.coerceAndAdd(func1A); - args.coerceAndAdd(func1B); - return new Contains(args); - } - public Contains contains(Object expr, ReqlFunction1 func1){ - Arguments args = new Arguments(); - args.coerceAndAdd(expr); - args.coerceAndAdd(func1); - return new Contains(args); - } - public Contains contains(Object expr, ReqlFunction1 func1, Object exprA){ - Arguments args = new Arguments(); - args.coerceAndAdd(expr); - args.coerceAndAdd(func1); - args.coerceAndAdd(exprA); - return new Contains(args); - } - public Contains contains(Object expr, ReqlFunction1 func1, Object exprA, Object exprB){ - Arguments args = new Arguments(); - args.coerceAndAdd(expr); - args.coerceAndAdd(func1); - args.coerceAndAdd(exprA); - args.coerceAndAdd(exprB); - return new Contains(args); - } - public Contains contains(Object expr, ReqlFunction1 func1, Object exprA, Object exprB, Object exprC){ - Arguments args = new Arguments(); - args.coerceAndAdd(expr); - args.coerceAndAdd(func1); - args.coerceAndAdd(exprA); - args.coerceAndAdd(exprB); - args.coerceAndAdd(exprC); - return new Contains(args); - } - public Contains contains(Object expr, ReqlFunction1 func1, Object exprA, Object exprB, ReqlFunction1 func1A){ - Arguments args = new Arguments(); - args.coerceAndAdd(expr); - args.coerceAndAdd(func1); - args.coerceAndAdd(exprA); - args.coerceAndAdd(exprB); - args.coerceAndAdd(func1A); - return new Contains(args); - } - public Contains contains(Object expr, ReqlFunction1 func1, Object exprA, ReqlFunction1 func1A){ - Arguments args = new Arguments(); - args.coerceAndAdd(expr); - args.coerceAndAdd(func1); - args.coerceAndAdd(exprA); - args.coerceAndAdd(func1A); - return new Contains(args); - } - public Contains contains(Object expr, ReqlFunction1 func1, Object exprA, ReqlFunction1 func1A, Object exprB){ - Arguments args = new Arguments(); - args.coerceAndAdd(expr); - args.coerceAndAdd(func1); - args.coerceAndAdd(exprA); - args.coerceAndAdd(func1A); - args.coerceAndAdd(exprB); - return new Contains(args); - } - public Contains contains(Object expr, ReqlFunction1 func1, Object exprA, ReqlFunction1 func1A, ReqlFunction1 func1B){ - Arguments args = new Arguments(); - args.coerceAndAdd(expr); - args.coerceAndAdd(func1); - args.coerceAndAdd(exprA); - args.coerceAndAdd(func1A); - args.coerceAndAdd(func1B); - return new Contains(args); - } - public Contains contains(Object expr, ReqlFunction1 func1, ReqlFunction1 func1A){ - Arguments args = new Arguments(); - args.coerceAndAdd(expr); - args.coerceAndAdd(func1); - args.coerceAndAdd(func1A); - return new Contains(args); - } - public Contains contains(Object expr, ReqlFunction1 func1, ReqlFunction1 func1A, Object exprA){ - Arguments args = new Arguments(); - args.coerceAndAdd(expr); - args.coerceAndAdd(func1); - args.coerceAndAdd(func1A); - args.coerceAndAdd(exprA); - return new Contains(args); - } - public Contains contains(Object expr, ReqlFunction1 func1, ReqlFunction1 func1A, Object exprA, Object exprB){ - Arguments args = new Arguments(); - args.coerceAndAdd(expr); - args.coerceAndAdd(func1); - args.coerceAndAdd(func1A); - args.coerceAndAdd(exprA); - args.coerceAndAdd(exprB); - return new Contains(args); - } - public Contains contains(Object expr, ReqlFunction1 func1, ReqlFunction1 func1A, Object exprA, ReqlFunction1 func1B){ - Arguments args = new Arguments(); - args.coerceAndAdd(expr); - args.coerceAndAdd(func1); - args.coerceAndAdd(func1A); - args.coerceAndAdd(exprA); - args.coerceAndAdd(func1B); - return new Contains(args); - } - public Contains contains(Object expr, ReqlFunction1 func1, ReqlFunction1 func1A, ReqlFunction1 func1B){ - Arguments args = new Arguments(); - args.coerceAndAdd(expr); - args.coerceAndAdd(func1); - args.coerceAndAdd(func1A); - args.coerceAndAdd(func1B); - return new Contains(args); - } - public Contains contains(Object expr, ReqlFunction1 func1, ReqlFunction1 func1A, ReqlFunction1 func1B, Object exprA){ - Arguments args = new Arguments(); - args.coerceAndAdd(expr); - args.coerceAndAdd(func1); - args.coerceAndAdd(func1A); - args.coerceAndAdd(func1B); - args.coerceAndAdd(exprA); - return new Contains(args); - } - public Contains contains(Object expr, ReqlFunction1 func1, ReqlFunction1 func1A, ReqlFunction1 func1B, ReqlFunction1 func1C){ - Arguments args = new Arguments(); - args.coerceAndAdd(expr); - args.coerceAndAdd(func1); - args.coerceAndAdd(func1A); - args.coerceAndAdd(func1B); - args.coerceAndAdd(func1C); - return new Contains(args); - } - public ReqlObject object(Object... exprs){ - Arguments args = new Arguments(); - args.coerceAndAddAll(exprs); - return new ReqlObject(args); - } - public Reduce reduce(Object expr, Javascript js){ - Arguments args = new Arguments(); - args.coerceAndAdd(expr); - args.coerceAndAdd(js); - return new Reduce(args); - } - public Reduce reduce(Object expr, ReqlFunction2 func2){ - Arguments args = new Arguments(); - args.coerceAndAdd(expr); - args.coerceAndAdd(func2); - return new Reduce(args); - } - public Fold fold(Object expr, Object exprA, Javascript js){ - Arguments args = new Arguments(); - args.coerceAndAdd(expr); - args.coerceAndAdd(exprA); - args.coerceAndAdd(js); - return new Fold(args); - } - public Fold fold(Object expr, Object exprA, ReqlFunction2 func2){ - Arguments args = new Arguments(); - args.coerceAndAdd(expr); - args.coerceAndAdd(exprA); - args.coerceAndAdd(func2); - return new Fold(args); - } - public Map map(Object expr, Javascript js){ - Arguments args = new Arguments(); - args.coerceAndAdd(expr); - args.coerceAndAdd(js); - return new Map(args); - } - public Map map(Object expr, Object exprA, Javascript js){ - Arguments args = new Arguments(); - args.coerceAndAdd(expr); - args.coerceAndAdd(exprA); - args.coerceAndAdd(js); - return new Map(args); - } - public Map map(Object expr, Object exprA, Object exprB, Javascript js){ - Arguments args = new Arguments(); - args.coerceAndAdd(expr); - args.coerceAndAdd(exprA); - args.coerceAndAdd(exprB); - args.coerceAndAdd(js); - return new Map(args); - } - public Map map(Object expr, Object exprA, Object exprB, Object exprC, Javascript js){ - Arguments args = new Arguments(); - args.coerceAndAdd(expr); - args.coerceAndAdd(exprA); - args.coerceAndAdd(exprB); - args.coerceAndAdd(exprC); - args.coerceAndAdd(js); - return new Map(args); - } - public Map map(Object expr, Object exprA, Object exprB, Object exprC, ReqlFunction4 func4){ - Arguments args = new Arguments(); - args.coerceAndAdd(expr); - args.coerceAndAdd(exprA); - args.coerceAndAdd(exprB); - args.coerceAndAdd(exprC); - args.coerceAndAdd(func4); - return new Map(args); - } - public Map map(Object expr, Object exprA, Object exprB, ReqlFunction3 func3){ - Arguments args = new Arguments(); - args.coerceAndAdd(expr); - args.coerceAndAdd(exprA); - args.coerceAndAdd(exprB); - args.coerceAndAdd(func3); - return new Map(args); - } - public Map map(Object expr, Object exprA, ReqlFunction2 func2){ - Arguments args = new Arguments(); - args.coerceAndAdd(expr); - args.coerceAndAdd(exprA); - args.coerceAndAdd(func2); - return new Map(args); - } - public Map map(Object expr, ReqlFunction0 func0){ - Arguments args = new Arguments(); - args.coerceAndAdd(expr); - args.coerceAndAdd(func0); - return new Map(args); - } - public Map map(Object expr, ReqlFunction1 func1){ - Arguments args = new Arguments(); - args.coerceAndAdd(expr); - args.coerceAndAdd(func1); - return new Map(args); - } - public Distinct distinct(Object expr){ - Arguments args = new Arguments(); - args.coerceAndAdd(expr); - return new Distinct(args); - } - public Count count(Object expr){ - Arguments args = new Arguments(); - args.coerceAndAdd(expr); - return new Count(args); - } - public Count count(Object expr, Javascript js){ - Arguments args = new Arguments(); - args.coerceAndAdd(expr); - args.coerceAndAdd(js); - return new Count(args); - } - public Count count(Object expr, Object exprA){ - Arguments args = new Arguments(); - args.coerceAndAdd(expr); - args.coerceAndAdd(exprA); - return new Count(args); - } - public Count count(Object expr, ReqlFunction1 func1){ - Arguments args = new Arguments(); - args.coerceAndAdd(expr); - args.coerceAndAdd(func1); - return new Count(args); - } - public Union union(Object expr, Object... exprs){ - Arguments args = new Arguments(); - args.coerceAndAdd(expr); - args.coerceAndAddAll(exprs); - return new Union(args); - } - public Range range(){ - Arguments args = new Arguments(); - return new Range(args); - } - public Range range(Object expr){ - Arguments args = new Arguments(); - args.coerceAndAdd(expr); - return new Range(args); - } - public Range range(Object expr, Object exprA){ - Arguments args = new Arguments(); - args.coerceAndAdd(expr); - args.coerceAndAdd(exprA); - return new Range(args); - } - public TypeOf typeOf(Object expr){ - Arguments args = new Arguments(); - args.coerceAndAdd(expr); - return new TypeOf(args); - } - public DbCreate dbCreate(Object expr){ - Arguments args = new Arguments(); - args.coerceAndAdd(expr); - return new DbCreate(args); - } - public DbDrop dbDrop(Object expr){ - Arguments args = new Arguments(); - args.coerceAndAdd(expr); - return new DbDrop(args); - } - public DbList dbList(){ - Arguments args = new Arguments(); - return new DbList(args); - } - public TableCreate tableCreate(Object expr){ - Arguments args = new Arguments(); - args.coerceAndAdd(expr); - return new TableCreate(args); - } - public TableDrop tableDrop(Object expr){ - Arguments args = new Arguments(); - args.coerceAndAdd(expr); - return new TableDrop(args); - } - public TableList tableList(){ - Arguments args = new Arguments(); - return new TableList(args); - } - public Grant grant(Object expr, Object exprA){ - Arguments args = new Arguments(); - args.coerceAndAdd(expr); - args.coerceAndAdd(exprA); - return new Grant(args); - } - public Funcall do_(Javascript js){ - Arguments args = new Arguments(); - args.coerceAndAdd(js); - return new Funcall(args); - } - public Funcall do_(Object expr, Javascript js){ - Arguments args = new Arguments(); - args.coerceAndAdd(expr); - args.coerceAndAdd(js); - return new Funcall(args); - } - public Funcall do_(Object expr, Object exprA, Javascript js){ - Arguments args = new Arguments(); - args.coerceAndAdd(expr); - args.coerceAndAdd(exprA); - args.coerceAndAdd(js); - return new Funcall(args); - } - public Funcall do_(Object expr, Object exprA, Object exprB, Javascript js){ - Arguments args = new Arguments(); - args.coerceAndAdd(expr); - args.coerceAndAdd(exprA); - args.coerceAndAdd(exprB); - args.coerceAndAdd(js); - return new Funcall(args); - } - public Funcall do_(Object expr, Object exprA, Object exprB, ReqlFunction3 func3){ - Arguments args = new Arguments(); - args.coerceAndAdd(expr); - args.coerceAndAdd(exprA); - args.coerceAndAdd(exprB); - args.coerceAndAdd(func3); - return new Funcall(args); - } - public Funcall do_(Object expr, Object exprA, ReqlFunction2 func2){ - Arguments args = new Arguments(); - args.coerceAndAdd(expr); - args.coerceAndAdd(exprA); - args.coerceAndAdd(func2); - return new Funcall(args); - } - public Funcall do_(Object expr, Object... exprs){ - Arguments args = new Arguments(); - args.coerceAndAdd(expr); - args.coerceAndAddAll(exprs); - return new Funcall(args); - } - public Funcall do_(Object expr, ReqlFunction1 func1){ - Arguments args = new Arguments(); - args.coerceAndAdd(expr); - args.coerceAndAdd(func1); - return new Funcall(args); - } - public Funcall do_(ReqlFunction0 func0){ - Arguments args = new Arguments(); - args.coerceAndAdd(func0); - return new Funcall(args); - } - public Branch branch(Object expr, Object exprA, Object exprB, Object... exprs){ - Arguments args = new Arguments(); - args.coerceAndAdd(expr); - args.coerceAndAdd(exprA); - args.coerceAndAdd(exprB); - args.coerceAndAddAll(exprs); - return new Branch(args); - } - public Or or(Object... exprs){ - Arguments args = new Arguments(); - args.coerceAndAddAll(exprs); - return new Or(args); - } - public And and(Object... exprs){ - Arguments args = new Arguments(); - args.coerceAndAddAll(exprs); - return new And(args); - } - public Asc asc(Javascript js){ - Arguments args = new Arguments(); - args.coerceAndAdd(js); - return new Asc(args); - } - public Asc asc(Object expr){ - Arguments args = new Arguments(); - args.coerceAndAdd(expr); - return new Asc(args); - } - public Asc asc(ReqlFunction1 func1){ - Arguments args = new Arguments(); - args.coerceAndAdd(func1); - return new Asc(args); - } - public Desc desc(Javascript js){ - Arguments args = new Arguments(); - args.coerceAndAdd(js); - return new Desc(args); - } - public Desc desc(Object expr){ - Arguments args = new Arguments(); - args.coerceAndAdd(expr); - return new Desc(args); - } - public Desc desc(ReqlFunction1 func1){ - Arguments args = new Arguments(); - args.coerceAndAdd(func1); - return new Desc(args); - } - public Info info(Object expr){ - Arguments args = new Arguments(); - args.coerceAndAdd(expr); - return new Info(args); - } - public Json json(Object expr){ - Arguments args = new Arguments(); - args.coerceAndAdd(expr); - return new Json(args); - } - public Iso8601 iso8601(Object expr){ - Arguments args = new Arguments(); - args.coerceAndAdd(expr); - return new Iso8601(args); - } - public EpochTime epochTime(Object expr){ - Arguments args = new Arguments(); - args.coerceAndAdd(expr); - return new EpochTime(args); - } - public Now now(){ - Arguments args = new Arguments(); - return new Now(args); - } - public Time time(Object expr, Object exprA, Object exprB, Object exprC){ - Arguments args = new Arguments(); - args.coerceAndAdd(expr); - args.coerceAndAdd(exprA); - args.coerceAndAdd(exprB); - args.coerceAndAdd(exprC); - return new Time(args); - } - public Time time(Object expr, Object exprA, Object exprB, Object exprC, Object exprD, Object exprE, Object exprF){ - Arguments args = new Arguments(); - args.coerceAndAdd(expr); - args.coerceAndAdd(exprA); - args.coerceAndAdd(exprB); - args.coerceAndAdd(exprC); - args.coerceAndAdd(exprD); - args.coerceAndAdd(exprE); - args.coerceAndAdd(exprF); - return new Time(args); - } - public Monday monday(){ - Arguments args = new Arguments(); - return new Monday(args); - } - public Tuesday tuesday(){ - Arguments args = new Arguments(); - return new Tuesday(args); - } - public Wednesday wednesday(){ - Arguments args = new Arguments(); - return new Wednesday(args); - } - public Thursday thursday(){ - Arguments args = new Arguments(); - return new Thursday(args); - } - public Friday friday(){ - Arguments args = new Arguments(); - return new Friday(args); - } - public Saturday saturday(){ - Arguments args = new Arguments(); - return new Saturday(args); - } - public Sunday sunday(){ - Arguments args = new Arguments(); - return new Sunday(args); - } - public January january(){ - Arguments args = new Arguments(); - return new January(args); - } - public February february(){ - Arguments args = new Arguments(); - return new February(args); - } - public March march(){ - Arguments args = new Arguments(); - return new March(args); - } - public April april(){ - Arguments args = new Arguments(); - return new April(args); - } - public May may(){ - Arguments args = new Arguments(); - return new May(args); - } - public June june(){ - Arguments args = new Arguments(); - return new June(args); - } - public July july(){ - Arguments args = new Arguments(); - return new July(args); - } - public August august(){ - Arguments args = new Arguments(); - return new August(args); - } - public September september(){ - Arguments args = new Arguments(); - return new September(args); - } - public October october(){ - Arguments args = new Arguments(); - return new October(args); - } - public November november(){ - Arguments args = new Arguments(); - return new November(args); - } - public December december(){ - Arguments args = new Arguments(); - return new December(args); - } - public Literal literal(){ - Arguments args = new Arguments(); - return new Literal(args); - } - public Literal literal(Object expr){ - Arguments args = new Arguments(); - args.coerceAndAdd(expr); - return new Literal(args); - } - public Group group(Object expr){ - Arguments args = new Arguments(); - args.coerceAndAdd(expr); - return new Group(args); - } - public Group group(Object expr, Javascript js){ - Arguments args = new Arguments(); - args.coerceAndAdd(expr); - args.coerceAndAdd(js); - return new Group(args); - } - public Group group(Object expr, Javascript js, Javascript jsA){ - Arguments args = new Arguments(); - args.coerceAndAdd(expr); - args.coerceAndAdd(js); - args.coerceAndAdd(jsA); - return new Group(args); - } - public Group group(Object expr, Javascript js, Javascript jsA, Javascript jsB){ - Arguments args = new Arguments(); - args.coerceAndAdd(expr); - args.coerceAndAdd(js); - args.coerceAndAdd(jsA); - args.coerceAndAdd(jsB); - return new Group(args); - } - public Group group(Object expr, Javascript js, Javascript jsA, Javascript jsB, Javascript jsC){ - Arguments args = new Arguments(); - args.coerceAndAdd(expr); - args.coerceAndAdd(js); - args.coerceAndAdd(jsA); - args.coerceAndAdd(jsB); - args.coerceAndAdd(jsC); - return new Group(args); - } - public Group group(Object expr, Javascript js, Javascript jsA, Javascript jsB, Object exprA){ - Arguments args = new Arguments(); - args.coerceAndAdd(expr); - args.coerceAndAdd(js); - args.coerceAndAdd(jsA); - args.coerceAndAdd(jsB); - args.coerceAndAdd(exprA); - return new Group(args); - } - public Group group(Object expr, Javascript js, Javascript jsA, Object exprA){ - Arguments args = new Arguments(); - args.coerceAndAdd(expr); - args.coerceAndAdd(js); - args.coerceAndAdd(jsA); - args.coerceAndAdd(exprA); - return new Group(args); - } - public Group group(Object expr, Javascript js, Javascript jsA, Object exprA, Javascript jsB){ - Arguments args = new Arguments(); - args.coerceAndAdd(expr); - args.coerceAndAdd(js); - args.coerceAndAdd(jsA); - args.coerceAndAdd(exprA); - args.coerceAndAdd(jsB); - return new Group(args); - } - public Group group(Object expr, Javascript js, Javascript jsA, Object exprA, Object exprB){ - Arguments args = new Arguments(); - args.coerceAndAdd(expr); - args.coerceAndAdd(js); - args.coerceAndAdd(jsA); - args.coerceAndAdd(exprA); - args.coerceAndAdd(exprB); - return new Group(args); - } - public Group group(Object expr, Javascript js, Object exprA){ - Arguments args = new Arguments(); - args.coerceAndAdd(expr); - args.coerceAndAdd(js); - args.coerceAndAdd(exprA); - return new Group(args); - } - public Group group(Object expr, Javascript js, Object exprA, Javascript jsA){ - Arguments args = new Arguments(); - args.coerceAndAdd(expr); - args.coerceAndAdd(js); - args.coerceAndAdd(exprA); - args.coerceAndAdd(jsA); - return new Group(args); - } - public Group group(Object expr, Javascript js, Object exprA, Javascript jsA, Javascript jsB){ - Arguments args = new Arguments(); - args.coerceAndAdd(expr); - args.coerceAndAdd(js); - args.coerceAndAdd(exprA); - args.coerceAndAdd(jsA); - args.coerceAndAdd(jsB); - return new Group(args); - } - public Group group(Object expr, Javascript js, Object exprA, Javascript jsA, Object exprB){ - Arguments args = new Arguments(); - args.coerceAndAdd(expr); - args.coerceAndAdd(js); - args.coerceAndAdd(exprA); - args.coerceAndAdd(jsA); - args.coerceAndAdd(exprB); - return new Group(args); - } - public Group group(Object expr, Javascript js, Object exprA, Object exprB){ - Arguments args = new Arguments(); - args.coerceAndAdd(expr); - args.coerceAndAdd(js); - args.coerceAndAdd(exprA); - args.coerceAndAdd(exprB); - return new Group(args); - } - public Group group(Object expr, Javascript js, Object exprA, Object exprB, Javascript jsA){ - Arguments args = new Arguments(); - args.coerceAndAdd(expr); - args.coerceAndAdd(js); - args.coerceAndAdd(exprA); - args.coerceAndAdd(exprB); - args.coerceAndAdd(jsA); - return new Group(args); - } - public Group group(Object expr, Javascript js, Object exprA, Object exprB, Object exprC){ - Arguments args = new Arguments(); - args.coerceAndAdd(expr); - args.coerceAndAdd(js); - args.coerceAndAdd(exprA); - args.coerceAndAdd(exprB); - args.coerceAndAdd(exprC); - return new Group(args); - } - public Group group(Object expr, Object exprA){ - Arguments args = new Arguments(); - args.coerceAndAdd(expr); - args.coerceAndAdd(exprA); - return new Group(args); - } - public Group group(Object expr, Object exprA, Javascript js){ - Arguments args = new Arguments(); - args.coerceAndAdd(expr); - args.coerceAndAdd(exprA); - args.coerceAndAdd(js); - return new Group(args); - } - public Group group(Object expr, Object exprA, Javascript js, Javascript jsA){ - Arguments args = new Arguments(); - args.coerceAndAdd(expr); - args.coerceAndAdd(exprA); - args.coerceAndAdd(js); - args.coerceAndAdd(jsA); - return new Group(args); - } - public Group group(Object expr, Object exprA, Javascript js, Javascript jsA, Javascript jsB){ - Arguments args = new Arguments(); - args.coerceAndAdd(expr); - args.coerceAndAdd(exprA); - args.coerceAndAdd(js); - args.coerceAndAdd(jsA); - args.coerceAndAdd(jsB); - return new Group(args); - } - public Group group(Object expr, Object exprA, Javascript js, Javascript jsA, Object exprB){ - Arguments args = new Arguments(); - args.coerceAndAdd(expr); - args.coerceAndAdd(exprA); - args.coerceAndAdd(js); - args.coerceAndAdd(jsA); - args.coerceAndAdd(exprB); - return new Group(args); - } - public Group group(Object expr, Object exprA, Javascript js, Object exprB){ - Arguments args = new Arguments(); - args.coerceAndAdd(expr); - args.coerceAndAdd(exprA); - args.coerceAndAdd(js); - args.coerceAndAdd(exprB); - return new Group(args); - } - public Group group(Object expr, Object exprA, Javascript js, Object exprB, Javascript jsA){ - Arguments args = new Arguments(); - args.coerceAndAdd(expr); - args.coerceAndAdd(exprA); - args.coerceAndAdd(js); - args.coerceAndAdd(exprB); - args.coerceAndAdd(jsA); - return new Group(args); - } - public Group group(Object expr, Object exprA, Javascript js, Object exprB, Object exprC){ - Arguments args = new Arguments(); - args.coerceAndAdd(expr); - args.coerceAndAdd(exprA); - args.coerceAndAdd(js); - args.coerceAndAdd(exprB); - args.coerceAndAdd(exprC); - return new Group(args); - } - public Group group(Object expr, Object exprA, Object exprB){ - Arguments args = new Arguments(); - args.coerceAndAdd(expr); - args.coerceAndAdd(exprA); - args.coerceAndAdd(exprB); - return new Group(args); - } - public Group group(Object expr, Object exprA, Object exprB, Javascript js){ - Arguments args = new Arguments(); - args.coerceAndAdd(expr); - args.coerceAndAdd(exprA); - args.coerceAndAdd(exprB); - args.coerceAndAdd(js); - return new Group(args); - } - public Group group(Object expr, Object exprA, Object exprB, Javascript js, Javascript jsA){ - Arguments args = new Arguments(); - args.coerceAndAdd(expr); - args.coerceAndAdd(exprA); - args.coerceAndAdd(exprB); - args.coerceAndAdd(js); - args.coerceAndAdd(jsA); - return new Group(args); - } - public Group group(Object expr, Object exprA, Object exprB, Javascript js, Object exprC){ - Arguments args = new Arguments(); - args.coerceAndAdd(expr); - args.coerceAndAdd(exprA); - args.coerceAndAdd(exprB); - args.coerceAndAdd(js); - args.coerceAndAdd(exprC); - return new Group(args); - } - public Group group(Object expr, Object exprA, Object exprB, Object exprC){ - Arguments args = new Arguments(); - args.coerceAndAdd(expr); - args.coerceAndAdd(exprA); - args.coerceAndAdd(exprB); - args.coerceAndAdd(exprC); - return new Group(args); - } - public Group group(Object expr, Object exprA, Object exprB, Object exprC, Javascript js){ - Arguments args = new Arguments(); - args.coerceAndAdd(expr); - args.coerceAndAdd(exprA); - args.coerceAndAdd(exprB); - args.coerceAndAdd(exprC); - args.coerceAndAdd(js); - return new Group(args); - } - public Group group(Object expr, Object exprA, Object exprB, Object exprC, Object exprD){ - Arguments args = new Arguments(); - args.coerceAndAdd(expr); - args.coerceAndAdd(exprA); - args.coerceAndAdd(exprB); - args.coerceAndAdd(exprC); - args.coerceAndAdd(exprD); - return new Group(args); - } - public Group group(Object expr, Object exprA, Object exprB, Object exprC, ReqlFunction1 func1){ - Arguments args = new Arguments(); - args.coerceAndAdd(expr); - args.coerceAndAdd(exprA); - args.coerceAndAdd(exprB); - args.coerceAndAdd(exprC); - args.coerceAndAdd(func1); - return new Group(args); - } - public Group group(Object expr, Object exprA, Object exprB, ReqlFunction1 func1){ - Arguments args = new Arguments(); - args.coerceAndAdd(expr); - args.coerceAndAdd(exprA); - args.coerceAndAdd(exprB); - args.coerceAndAdd(func1); - return new Group(args); - } - public Group group(Object expr, Object exprA, Object exprB, ReqlFunction1 func1, Object exprC){ - Arguments args = new Arguments(); - args.coerceAndAdd(expr); - args.coerceAndAdd(exprA); - args.coerceAndAdd(exprB); - args.coerceAndAdd(func1); - args.coerceAndAdd(exprC); - return new Group(args); - } - public Group group(Object expr, Object exprA, Object exprB, ReqlFunction1 func1, ReqlFunction1 func1A){ - Arguments args = new Arguments(); - args.coerceAndAdd(expr); - args.coerceAndAdd(exprA); - args.coerceAndAdd(exprB); - args.coerceAndAdd(func1); - args.coerceAndAdd(func1A); - return new Group(args); - } - public Group group(Object expr, Object exprA, ReqlFunction1 func1){ - Arguments args = new Arguments(); - args.coerceAndAdd(expr); - args.coerceAndAdd(exprA); - args.coerceAndAdd(func1); - return new Group(args); - } - public Group group(Object expr, Object exprA, ReqlFunction1 func1, Object exprB){ - Arguments args = new Arguments(); - args.coerceAndAdd(expr); - args.coerceAndAdd(exprA); - args.coerceAndAdd(func1); - args.coerceAndAdd(exprB); - return new Group(args); - } - public Group group(Object expr, Object exprA, ReqlFunction1 func1, Object exprB, Object exprC){ - Arguments args = new Arguments(); - args.coerceAndAdd(expr); - args.coerceAndAdd(exprA); - args.coerceAndAdd(func1); - args.coerceAndAdd(exprB); - args.coerceAndAdd(exprC); - return new Group(args); - } - public Group group(Object expr, Object exprA, ReqlFunction1 func1, Object exprB, ReqlFunction1 func1A){ - Arguments args = new Arguments(); - args.coerceAndAdd(expr); - args.coerceAndAdd(exprA); - args.coerceAndAdd(func1); - args.coerceAndAdd(exprB); - args.coerceAndAdd(func1A); - return new Group(args); - } - public Group group(Object expr, Object exprA, ReqlFunction1 func1, ReqlFunction1 func1A){ - Arguments args = new Arguments(); - args.coerceAndAdd(expr); - args.coerceAndAdd(exprA); - args.coerceAndAdd(func1); - args.coerceAndAdd(func1A); - return new Group(args); - } - public Group group(Object expr, Object exprA, ReqlFunction1 func1, ReqlFunction1 func1A, Object exprB){ - Arguments args = new Arguments(); - args.coerceAndAdd(expr); - args.coerceAndAdd(exprA); - args.coerceAndAdd(func1); - args.coerceAndAdd(func1A); - args.coerceAndAdd(exprB); - return new Group(args); - } - public Group group(Object expr, Object exprA, ReqlFunction1 func1, ReqlFunction1 func1A, ReqlFunction1 func1B){ - Arguments args = new Arguments(); - args.coerceAndAdd(expr); - args.coerceAndAdd(exprA); - args.coerceAndAdd(func1); - args.coerceAndAdd(func1A); - args.coerceAndAdd(func1B); - return new Group(args); - } - public Group group(Object expr, ReqlFunction1 func1){ - Arguments args = new Arguments(); - args.coerceAndAdd(expr); - args.coerceAndAdd(func1); - return new Group(args); - } - public Group group(Object expr, ReqlFunction1 func1, Object exprA){ - Arguments args = new Arguments(); - args.coerceAndAdd(expr); - args.coerceAndAdd(func1); - args.coerceAndAdd(exprA); - return new Group(args); - } - public Group group(Object expr, ReqlFunction1 func1, Object exprA, Object exprB){ - Arguments args = new Arguments(); - args.coerceAndAdd(expr); - args.coerceAndAdd(func1); - args.coerceAndAdd(exprA); - args.coerceAndAdd(exprB); - return new Group(args); - } - public Group group(Object expr, ReqlFunction1 func1, Object exprA, Object exprB, Object exprC){ - Arguments args = new Arguments(); - args.coerceAndAdd(expr); - args.coerceAndAdd(func1); - args.coerceAndAdd(exprA); - args.coerceAndAdd(exprB); - args.coerceAndAdd(exprC); - return new Group(args); - } - public Group group(Object expr, ReqlFunction1 func1, Object exprA, Object exprB, ReqlFunction1 func1A){ - Arguments args = new Arguments(); - args.coerceAndAdd(expr); - args.coerceAndAdd(func1); - args.coerceAndAdd(exprA); - args.coerceAndAdd(exprB); - args.coerceAndAdd(func1A); - return new Group(args); - } - public Group group(Object expr, ReqlFunction1 func1, Object exprA, ReqlFunction1 func1A){ - Arguments args = new Arguments(); - args.coerceAndAdd(expr); - args.coerceAndAdd(func1); - args.coerceAndAdd(exprA); - args.coerceAndAdd(func1A); - return new Group(args); - } - public Group group(Object expr, ReqlFunction1 func1, Object exprA, ReqlFunction1 func1A, Object exprB){ - Arguments args = new Arguments(); - args.coerceAndAdd(expr); - args.coerceAndAdd(func1); - args.coerceAndAdd(exprA); - args.coerceAndAdd(func1A); - args.coerceAndAdd(exprB); - return new Group(args); - } - public Group group(Object expr, ReqlFunction1 func1, Object exprA, ReqlFunction1 func1A, ReqlFunction1 func1B){ - Arguments args = new Arguments(); - args.coerceAndAdd(expr); - args.coerceAndAdd(func1); - args.coerceAndAdd(exprA); - args.coerceAndAdd(func1A); - args.coerceAndAdd(func1B); - return new Group(args); - } - public Group group(Object expr, ReqlFunction1 func1, ReqlFunction1 func1A){ - Arguments args = new Arguments(); - args.coerceAndAdd(expr); - args.coerceAndAdd(func1); - args.coerceAndAdd(func1A); - return new Group(args); - } - public Group group(Object expr, ReqlFunction1 func1, ReqlFunction1 func1A, Object exprA){ - Arguments args = new Arguments(); - args.coerceAndAdd(expr); - args.coerceAndAdd(func1); - args.coerceAndAdd(func1A); - args.coerceAndAdd(exprA); - return new Group(args); - } - public Group group(Object expr, ReqlFunction1 func1, ReqlFunction1 func1A, Object exprA, Object exprB){ - Arguments args = new Arguments(); - args.coerceAndAdd(expr); - args.coerceAndAdd(func1); - args.coerceAndAdd(func1A); - args.coerceAndAdd(exprA); - args.coerceAndAdd(exprB); - return new Group(args); - } - public Group group(Object expr, ReqlFunction1 func1, ReqlFunction1 func1A, Object exprA, ReqlFunction1 func1B){ - Arguments args = new Arguments(); - args.coerceAndAdd(expr); - args.coerceAndAdd(func1); - args.coerceAndAdd(func1A); - args.coerceAndAdd(exprA); - args.coerceAndAdd(func1B); - return new Group(args); - } - public Group group(Object expr, ReqlFunction1 func1, ReqlFunction1 func1A, ReqlFunction1 func1B){ - Arguments args = new Arguments(); - args.coerceAndAdd(expr); - args.coerceAndAdd(func1); - args.coerceAndAdd(func1A); - args.coerceAndAdd(func1B); - return new Group(args); - } - public Group group(Object expr, ReqlFunction1 func1, ReqlFunction1 func1A, ReqlFunction1 func1B, Object exprA){ - Arguments args = new Arguments(); - args.coerceAndAdd(expr); - args.coerceAndAdd(func1); - args.coerceAndAdd(func1A); - args.coerceAndAdd(func1B); - args.coerceAndAdd(exprA); - return new Group(args); - } - public Group group(Object expr, ReqlFunction1 func1, ReqlFunction1 func1A, ReqlFunction1 func1B, ReqlFunction1 func1C){ - Arguments args = new Arguments(); - args.coerceAndAdd(expr); - args.coerceAndAdd(func1); - args.coerceAndAdd(func1A); - args.coerceAndAdd(func1B); - args.coerceAndAdd(func1C); - return new Group(args); - } - public Sum sum(Object expr){ - Arguments args = new Arguments(); - args.coerceAndAdd(expr); - return new Sum(args); - } - public Sum sum(Object expr, Javascript js){ - Arguments args = new Arguments(); - args.coerceAndAdd(expr); - args.coerceAndAdd(js); - return new Sum(args); - } - public Sum sum(Object expr, Object exprA){ - Arguments args = new Arguments(); - args.coerceAndAdd(expr); - args.coerceAndAdd(exprA); - return new Sum(args); - } - public Sum sum(Object expr, ReqlFunction1 func1){ - Arguments args = new Arguments(); - args.coerceAndAdd(expr); - args.coerceAndAdd(func1); - return new Sum(args); - } - public Avg avg(Object expr){ - Arguments args = new Arguments(); - args.coerceAndAdd(expr); - return new Avg(args); - } - public Avg avg(Object expr, Javascript js){ - Arguments args = new Arguments(); - args.coerceAndAdd(expr); - args.coerceAndAdd(js); - return new Avg(args); - } - public Avg avg(Object expr, Object exprA){ - Arguments args = new Arguments(); - args.coerceAndAdd(expr); - args.coerceAndAdd(exprA); - return new Avg(args); - } - public Avg avg(Object expr, ReqlFunction1 func1){ - Arguments args = new Arguments(); - args.coerceAndAdd(expr); - args.coerceAndAdd(func1); - return new Avg(args); - } - public Min min(Object expr){ - Arguments args = new Arguments(); - args.coerceAndAdd(expr); - return new Min(args); - } - public Min min(Object expr, Javascript js){ - Arguments args = new Arguments(); - args.coerceAndAdd(expr); - args.coerceAndAdd(js); - return new Min(args); - } - public Min min(Object expr, Object exprA){ - Arguments args = new Arguments(); - args.coerceAndAdd(expr); - args.coerceAndAdd(exprA); - return new Min(args); - } - public Min min(Object expr, ReqlFunction1 func1){ - Arguments args = new Arguments(); - args.coerceAndAdd(expr); - args.coerceAndAdd(func1); - return new Min(args); - } - public Max max(Object expr){ - Arguments args = new Arguments(); - args.coerceAndAdd(expr); - return new Max(args); - } - public Max max(Object expr, Javascript js){ - Arguments args = new Arguments(); - args.coerceAndAdd(expr); - args.coerceAndAdd(js); - return new Max(args); - } - public Max max(Object expr, Object exprA){ - Arguments args = new Arguments(); - args.coerceAndAdd(expr); - args.coerceAndAdd(exprA); - return new Max(args); - } - public Max max(Object expr, ReqlFunction1 func1){ - Arguments args = new Arguments(); - args.coerceAndAdd(expr); - args.coerceAndAdd(func1); - return new Max(args); - } - public Random random(){ - Arguments args = new Arguments(); - return new Random(args); - } - public Random random(Object expr){ - Arguments args = new Arguments(); - args.coerceAndAdd(expr); - return new Random(args); - } - public Random random(Object expr, Object exprA){ - Arguments args = new Arguments(); - args.coerceAndAdd(expr); - args.coerceAndAdd(exprA); - return new Random(args); - } - public Args args(Object expr){ - Arguments args = new Arguments(); - args.coerceAndAdd(expr); - return new Args(args); - } - public Binary binary(Object expr){ - - if(expr instanceof byte[]){ - return new Binary((byte[]) expr); - }else{ - Arguments args = new Arguments(); - args.coerceAndAdd(expr); - return new Binary(args); - } - } - public Geojson geojson(Object expr){ - Arguments args = new Arguments(); - args.coerceAndAdd(expr); - return new Geojson(args); - } - public Point point(Object expr, Object exprA){ - Arguments args = new Arguments(); - args.coerceAndAdd(expr); - args.coerceAndAdd(exprA); - return new Point(args); - } - public Line line(Object expr, Object exprA, Object... exprs){ - Arguments args = new Arguments(); - args.coerceAndAdd(expr); - args.coerceAndAdd(exprA); - args.coerceAndAddAll(exprs); - return new Line(args); - } - public Polygon polygon(Object expr, Object exprA, Object exprB, Object... exprs){ - Arguments args = new Arguments(); - args.coerceAndAdd(expr); - args.coerceAndAdd(exprA); - args.coerceAndAdd(exprB); - args.coerceAndAddAll(exprs); - return new Polygon(args); - } - public Distance distance(Object expr, Object exprA){ - Arguments args = new Arguments(); - args.coerceAndAdd(expr); - args.coerceAndAdd(exprA); - return new Distance(args); - } - public Intersects intersects(Object expr, Object exprA){ - Arguments args = new Arguments(); - args.coerceAndAdd(expr); - args.coerceAndAdd(exprA); - return new Intersects(args); - } - public Circle circle(Object expr){ - Arguments args = new Arguments(); - args.coerceAndAdd(expr); - return new Circle(args); - } - public Circle circle(Object expr, Object exprA){ - Arguments args = new Arguments(); - args.coerceAndAdd(expr); - args.coerceAndAdd(exprA); - return new Circle(args); - } - public Circle circle(Object expr, Object exprA, Object exprB){ - Arguments args = new Arguments(); - args.coerceAndAdd(expr); - args.coerceAndAdd(exprA); - args.coerceAndAdd(exprB); - return new Circle(args); - } - public Minval minval(){ - Arguments args = new Arguments(); - return new Minval(args); - } - public Maxval maxval(){ - Arguments args = new Arguments(); - return new Maxval(args); - } -} diff --git a/drivers/java/src/main/java/com/rethinkdb/gen/proto/DatumType.java b/drivers/java/src/main/java/com/rethinkdb/gen/proto/DatumType.java deleted file mode 100644 index f0ca37af813..00000000000 --- a/drivers/java/src/main/java/com/rethinkdb/gen/proto/DatumType.java +++ /dev/null @@ -1,49 +0,0 @@ -// Autogenerated by metajava.py. -// Do not edit this file directly. -// The template for this file is located at: -// ../../../../../../../../templates/Enum.java - -package com.rethinkdb.gen.proto; - -import java.util.Optional; - -public enum DatumType { - - R_NULL(1), - R_BOOL(2), - R_NUM(3), - R_STR(4), - R_ARRAY(5), - R_OBJECT(6), - R_JSON(7); - - public final int value; - - private DatumType(int value){ - this.value = value; - } - - public static DatumType fromValue(int value) { - switch (value) { - case 1: return DatumType.R_NULL; - case 2: return DatumType.R_BOOL; - case 3: return DatumType.R_NUM; - case 4: return DatumType.R_STR; - case 5: return DatumType.R_ARRAY; - case 6: return DatumType.R_OBJECT; - case 7: return DatumType.R_JSON; - default: - throw new IllegalArgumentException(String.format( - "%s is not a legal value for DatumType", value)); - } - } - - public static Optional maybeFromValue(int value) { - try { - return Optional.of(fromValue(value)); - } catch (IllegalArgumentException iae) { - return Optional.empty(); - } - } - -} diff --git a/drivers/java/src/main/java/com/rethinkdb/gen/proto/ErrorType.java b/drivers/java/src/main/java/com/rethinkdb/gen/proto/ErrorType.java deleted file mode 100644 index 5d0619b8c5f..00000000000 --- a/drivers/java/src/main/java/com/rethinkdb/gen/proto/ErrorType.java +++ /dev/null @@ -1,51 +0,0 @@ -// Autogenerated by metajava.py. -// Do not edit this file directly. -// The template for this file is located at: -// ../../../../../../../../templates/Enum.java - -package com.rethinkdb.gen.proto; - -import java.util.Optional; - -public enum ErrorType { - - INTERNAL(1000000), - RESOURCE_LIMIT(2000000), - QUERY_LOGIC(3000000), - NON_EXISTENCE(3100000), - OP_FAILED(4100000), - OP_INDETERMINATE(4200000), - USER(5000000), - PERMISSION_ERROR(6000000); - - public final int value; - - private ErrorType(int value){ - this.value = value; - } - - public static ErrorType fromValue(int value) { - switch (value) { - case 1000000: return ErrorType.INTERNAL; - case 2000000: return ErrorType.RESOURCE_LIMIT; - case 3000000: return ErrorType.QUERY_LOGIC; - case 3100000: return ErrorType.NON_EXISTENCE; - case 4100000: return ErrorType.OP_FAILED; - case 4200000: return ErrorType.OP_INDETERMINATE; - case 5000000: return ErrorType.USER; - case 6000000: return ErrorType.PERMISSION_ERROR; - default: - throw new IllegalArgumentException(String.format( - "%s is not a legal value for ErrorType", value)); - } - } - - public static Optional maybeFromValue(int value) { - try { - return Optional.of(fromValue(value)); - } catch (IllegalArgumentException iae) { - return Optional.empty(); - } - } - -} diff --git a/drivers/java/src/main/java/com/rethinkdb/gen/proto/Protocol.java b/drivers/java/src/main/java/com/rethinkdb/gen/proto/Protocol.java deleted file mode 100644 index 9b080fe93b0..00000000000 --- a/drivers/java/src/main/java/com/rethinkdb/gen/proto/Protocol.java +++ /dev/null @@ -1,39 +0,0 @@ -// Autogenerated by metajava.py. -// Do not edit this file directly. -// The template for this file is located at: -// ../../../../../../../../templates/Enum.java - -package com.rethinkdb.gen.proto; - -import java.util.Optional; - -public enum Protocol { - - PROTOBUF(656407617), - JSON(2120839367); - - public final int value; - - private Protocol(int value){ - this.value = value; - } - - public static Protocol fromValue(int value) { - switch (value) { - case 656407617: return Protocol.PROTOBUF; - case 2120839367: return Protocol.JSON; - default: - throw new IllegalArgumentException(String.format( - "%s is not a legal value for Protocol", value)); - } - } - - public static Optional maybeFromValue(int value) { - try { - return Optional.of(fromValue(value)); - } catch (IllegalArgumentException iae) { - return Optional.empty(); - } - } - -} diff --git a/drivers/java/src/main/java/com/rethinkdb/gen/proto/QueryType.java b/drivers/java/src/main/java/com/rethinkdb/gen/proto/QueryType.java deleted file mode 100644 index 4fc1c9ed905..00000000000 --- a/drivers/java/src/main/java/com/rethinkdb/gen/proto/QueryType.java +++ /dev/null @@ -1,45 +0,0 @@ -// Autogenerated by metajava.py. -// Do not edit this file directly. -// The template for this file is located at: -// ../../../../../../../../templates/Enum.java - -package com.rethinkdb.gen.proto; - -import java.util.Optional; - -public enum QueryType { - - START(1), - CONTINUE(2), - STOP(3), - NOREPLY_WAIT(4), - SERVER_INFO(5); - - public final int value; - - private QueryType(int value){ - this.value = value; - } - - public static QueryType fromValue(int value) { - switch (value) { - case 1: return QueryType.START; - case 2: return QueryType.CONTINUE; - case 3: return QueryType.STOP; - case 4: return QueryType.NOREPLY_WAIT; - case 5: return QueryType.SERVER_INFO; - default: - throw new IllegalArgumentException(String.format( - "%s is not a legal value for QueryType", value)); - } - } - - public static Optional maybeFromValue(int value) { - try { - return Optional.of(fromValue(value)); - } catch (IllegalArgumentException iae) { - return Optional.empty(); - } - } - -} diff --git a/drivers/java/src/main/java/com/rethinkdb/gen/proto/ResponseNote.java b/drivers/java/src/main/java/com/rethinkdb/gen/proto/ResponseNote.java deleted file mode 100644 index 79ed27e625b..00000000000 --- a/drivers/java/src/main/java/com/rethinkdb/gen/proto/ResponseNote.java +++ /dev/null @@ -1,55 +0,0 @@ -// Autogenerated by metajava.py. -// Do not edit this file directly. -// The template for this file is located at: -// ../../../../../../../../templates/proto/ResponseNote.java - -package com.rethinkdb.gen.proto; - -import java.util.Optional; - -public enum ResponseNote { - - SEQUENCE_FEED(1), - ATOM_FEED(2), - ORDER_BY_LIMIT_FEED(3), - UNIONED_FEED(4), - INCLUDES_STATES(5); - - public final int value; - - private ResponseNote(int value){ - this.value = value; - } - - public static ResponseNote fromValue(int value) { - switch (value) { - case 1: return ResponseNote.SEQUENCE_FEED; - case 2: return ResponseNote.ATOM_FEED; - case 3: return ResponseNote.ORDER_BY_LIMIT_FEED; - case 4: return ResponseNote.UNIONED_FEED; - case 5: return ResponseNote.INCLUDES_STATES; - default: - throw new IllegalArgumentException(String.format( - "%s is not a legal value for ResponseNote", value)); - } - } - - public static Optional maybeFromValue(int value) { - try { - return Optional.of(fromValue(value)); - } catch (IllegalArgumentException iae) { - return Optional.empty(); - } - } - - public boolean isFeed() { - switch(this) { - case SEQUENCE_FEED: return true; - case ATOM_FEED: return true; - case ORDER_BY_LIMIT_FEED: return true; - case UNIONED_FEED: return true; - default: return false; - } - } - -} diff --git a/drivers/java/src/main/java/com/rethinkdb/gen/proto/ResponseType.java b/drivers/java/src/main/java/com/rethinkdb/gen/proto/ResponseType.java deleted file mode 100644 index 47f7895b63e..00000000000 --- a/drivers/java/src/main/java/com/rethinkdb/gen/proto/ResponseType.java +++ /dev/null @@ -1,60 +0,0 @@ -// Autogenerated by metajava.py. -// Do not edit this file directly. -// The template for this file is located at: -// ../../../../../../../../templates/proto/ResponseType.java - -package com.rethinkdb.gen.proto; - -import java.util.Optional; - -public enum ResponseType { - - SUCCESS_ATOM(1), - SUCCESS_SEQUENCE(2), - SUCCESS_PARTIAL(3), - WAIT_COMPLETE(4), - SERVER_INFO(5), - CLIENT_ERROR(16), - COMPILE_ERROR(17), - RUNTIME_ERROR(18); - - public final int value; - - private ResponseType(int value){ - this.value = value; - } - - public static ResponseType fromValue(int value) { - switch (value) { - case 1: return ResponseType.SUCCESS_ATOM; - case 2: return ResponseType.SUCCESS_SEQUENCE; - case 3: return ResponseType.SUCCESS_PARTIAL; - case 4: return ResponseType.WAIT_COMPLETE; - case 5: return ResponseType.SERVER_INFO; - case 16: return ResponseType.CLIENT_ERROR; - case 17: return ResponseType.COMPILE_ERROR; - case 18: return ResponseType.RUNTIME_ERROR; - default: - throw new IllegalArgumentException(String.format( - "%s is not a legal value for ResponseType", value)); - } - } - - public static Optional maybeFromValue(int value) { - try { - return Optional.of(fromValue(value)); - } catch (IllegalArgumentException iae) { - return Optional.empty(); - } - } - - public boolean isError() { - switch(this) { - case CLIENT_ERROR: return true; - case COMPILE_ERROR: return true; - case RUNTIME_ERROR: return true; - default: return false; - } - } - -} diff --git a/drivers/java/src/main/java/com/rethinkdb/gen/proto/TermType.java b/drivers/java/src/main/java/com/rethinkdb/gen/proto/TermType.java deleted file mode 100644 index ba67ea01a8d..00000000000 --- a/drivers/java/src/main/java/com/rethinkdb/gen/proto/TermType.java +++ /dev/null @@ -1,391 +0,0 @@ -// Autogenerated by metajava.py. -// Do not edit this file directly. -// The template for this file is located at: -// ../../../../../../../../templates/Enum.java - -package com.rethinkdb.gen.proto; - -import java.util.Optional; - -public enum TermType { - - DATUM(1), - MAKE_ARRAY(2), - MAKE_OBJ(3), - VAR(10), - JAVASCRIPT(11), - UUID(169), - HTTP(153), - ERROR(12), - IMPLICIT_VAR(13), - DB(14), - TABLE(15), - GET(16), - GET_ALL(78), - EQ(17), - NE(18), - LT(19), - LE(20), - GT(21), - GE(22), - NOT(23), - ADD(24), - SUB(25), - MUL(26), - DIV(27), - MOD(28), - FLOOR(183), - CEIL(184), - ROUND(185), - APPEND(29), - PREPEND(80), - DIFFERENCE(95), - SET_INSERT(88), - SET_INTERSECTION(89), - SET_UNION(90), - SET_DIFFERENCE(91), - SLICE(30), - SKIP(70), - LIMIT(71), - OFFSETS_OF(87), - CONTAINS(93), - GET_FIELD(31), - KEYS(94), - VALUES(186), - OBJECT(143), - HAS_FIELDS(32), - WITH_FIELDS(96), - PLUCK(33), - WITHOUT(34), - MERGE(35), - BETWEEN_DEPRECATED(36), - BETWEEN(182), - REDUCE(37), - MAP(38), - FOLD(187), - FILTER(39), - CONCAT_MAP(40), - ORDER_BY(41), - DISTINCT(42), - COUNT(43), - IS_EMPTY(86), - UNION(44), - NTH(45), - BRACKET(170), - INNER_JOIN(48), - OUTER_JOIN(49), - EQ_JOIN(50), - ZIP(72), - RANGE(173), - INSERT_AT(82), - DELETE_AT(83), - CHANGE_AT(84), - SPLICE_AT(85), - COERCE_TO(51), - TYPE_OF(52), - UPDATE(53), - DELETE(54), - REPLACE(55), - INSERT(56), - DB_CREATE(57), - DB_DROP(58), - DB_LIST(59), - TABLE_CREATE(60), - TABLE_DROP(61), - TABLE_LIST(62), - CONFIG(174), - STATUS(175), - WAIT(177), - RECONFIGURE(176), - REBALANCE(179), - SYNC(138), - GRANT(188), - INDEX_CREATE(75), - INDEX_DROP(76), - INDEX_LIST(77), - INDEX_STATUS(139), - INDEX_WAIT(140), - INDEX_RENAME(156), - FUNCALL(64), - BRANCH(65), - OR(66), - AND(67), - FOR_EACH(68), - FUNC(69), - ASC(73), - DESC(74), - INFO(79), - MATCH(97), - UPCASE(141), - DOWNCASE(142), - SAMPLE(81), - DEFAULT(92), - JSON(98), - TO_JSON_STRING(172), - ISO8601(99), - TO_ISO8601(100), - EPOCH_TIME(101), - TO_EPOCH_TIME(102), - NOW(103), - IN_TIMEZONE(104), - DURING(105), - DATE(106), - TIME_OF_DAY(126), - TIMEZONE(127), - YEAR(128), - MONTH(129), - DAY(130), - DAY_OF_WEEK(131), - DAY_OF_YEAR(132), - HOURS(133), - MINUTES(134), - SECONDS(135), - TIME(136), - MONDAY(107), - TUESDAY(108), - WEDNESDAY(109), - THURSDAY(110), - FRIDAY(111), - SATURDAY(112), - SUNDAY(113), - JANUARY(114), - FEBRUARY(115), - MARCH(116), - APRIL(117), - MAY(118), - JUNE(119), - JULY(120), - AUGUST(121), - SEPTEMBER(122), - OCTOBER(123), - NOVEMBER(124), - DECEMBER(125), - LITERAL(137), - GROUP(144), - SUM(145), - AVG(146), - MIN(147), - MAX(148), - SPLIT(149), - UNGROUP(150), - RANDOM(151), - CHANGES(152), - ARGS(154), - BINARY(155), - GEOJSON(157), - TO_GEOJSON(158), - POINT(159), - LINE(160), - POLYGON(161), - DISTANCE(162), - INTERSECTS(163), - INCLUDES(164), - CIRCLE(165), - GET_INTERSECTING(166), - FILL(167), - GET_NEAREST(168), - POLYGON_SUB(171), - MINVAL(180), - MAXVAL(181); - - public final int value; - - private TermType(int value){ - this.value = value; - } - - public static TermType fromValue(int value) { - switch (value) { - case 1: return TermType.DATUM; - case 2: return TermType.MAKE_ARRAY; - case 3: return TermType.MAKE_OBJ; - case 10: return TermType.VAR; - case 11: return TermType.JAVASCRIPT; - case 169: return TermType.UUID; - case 153: return TermType.HTTP; - case 12: return TermType.ERROR; - case 13: return TermType.IMPLICIT_VAR; - case 14: return TermType.DB; - case 15: return TermType.TABLE; - case 16: return TermType.GET; - case 78: return TermType.GET_ALL; - case 17: return TermType.EQ; - case 18: return TermType.NE; - case 19: return TermType.LT; - case 20: return TermType.LE; - case 21: return TermType.GT; - case 22: return TermType.GE; - case 23: return TermType.NOT; - case 24: return TermType.ADD; - case 25: return TermType.SUB; - case 26: return TermType.MUL; - case 27: return TermType.DIV; - case 28: return TermType.MOD; - case 183: return TermType.FLOOR; - case 184: return TermType.CEIL; - case 185: return TermType.ROUND; - case 29: return TermType.APPEND; - case 80: return TermType.PREPEND; - case 95: return TermType.DIFFERENCE; - case 88: return TermType.SET_INSERT; - case 89: return TermType.SET_INTERSECTION; - case 90: return TermType.SET_UNION; - case 91: return TermType.SET_DIFFERENCE; - case 30: return TermType.SLICE; - case 70: return TermType.SKIP; - case 71: return TermType.LIMIT; - case 87: return TermType.OFFSETS_OF; - case 93: return TermType.CONTAINS; - case 31: return TermType.GET_FIELD; - case 94: return TermType.KEYS; - case 186: return TermType.VALUES; - case 143: return TermType.OBJECT; - case 32: return TermType.HAS_FIELDS; - case 96: return TermType.WITH_FIELDS; - case 33: return TermType.PLUCK; - case 34: return TermType.WITHOUT; - case 35: return TermType.MERGE; - case 36: return TermType.BETWEEN_DEPRECATED; - case 182: return TermType.BETWEEN; - case 37: return TermType.REDUCE; - case 38: return TermType.MAP; - case 187: return TermType.FOLD; - case 39: return TermType.FILTER; - case 40: return TermType.CONCAT_MAP; - case 41: return TermType.ORDER_BY; - case 42: return TermType.DISTINCT; - case 43: return TermType.COUNT; - case 86: return TermType.IS_EMPTY; - case 44: return TermType.UNION; - case 45: return TermType.NTH; - case 170: return TermType.BRACKET; - case 48: return TermType.INNER_JOIN; - case 49: return TermType.OUTER_JOIN; - case 50: return TermType.EQ_JOIN; - case 72: return TermType.ZIP; - case 173: return TermType.RANGE; - case 82: return TermType.INSERT_AT; - case 83: return TermType.DELETE_AT; - case 84: return TermType.CHANGE_AT; - case 85: return TermType.SPLICE_AT; - case 51: return TermType.COERCE_TO; - case 52: return TermType.TYPE_OF; - case 53: return TermType.UPDATE; - case 54: return TermType.DELETE; - case 55: return TermType.REPLACE; - case 56: return TermType.INSERT; - case 57: return TermType.DB_CREATE; - case 58: return TermType.DB_DROP; - case 59: return TermType.DB_LIST; - case 60: return TermType.TABLE_CREATE; - case 61: return TermType.TABLE_DROP; - case 62: return TermType.TABLE_LIST; - case 174: return TermType.CONFIG; - case 175: return TermType.STATUS; - case 177: return TermType.WAIT; - case 176: return TermType.RECONFIGURE; - case 179: return TermType.REBALANCE; - case 138: return TermType.SYNC; - case 188: return TermType.GRANT; - case 75: return TermType.INDEX_CREATE; - case 76: return TermType.INDEX_DROP; - case 77: return TermType.INDEX_LIST; - case 139: return TermType.INDEX_STATUS; - case 140: return TermType.INDEX_WAIT; - case 156: return TermType.INDEX_RENAME; - case 64: return TermType.FUNCALL; - case 65: return TermType.BRANCH; - case 66: return TermType.OR; - case 67: return TermType.AND; - case 68: return TermType.FOR_EACH; - case 69: return TermType.FUNC; - case 73: return TermType.ASC; - case 74: return TermType.DESC; - case 79: return TermType.INFO; - case 97: return TermType.MATCH; - case 141: return TermType.UPCASE; - case 142: return TermType.DOWNCASE; - case 81: return TermType.SAMPLE; - case 92: return TermType.DEFAULT; - case 98: return TermType.JSON; - case 172: return TermType.TO_JSON_STRING; - case 99: return TermType.ISO8601; - case 100: return TermType.TO_ISO8601; - case 101: return TermType.EPOCH_TIME; - case 102: return TermType.TO_EPOCH_TIME; - case 103: return TermType.NOW; - case 104: return TermType.IN_TIMEZONE; - case 105: return TermType.DURING; - case 106: return TermType.DATE; - case 126: return TermType.TIME_OF_DAY; - case 127: return TermType.TIMEZONE; - case 128: return TermType.YEAR; - case 129: return TermType.MONTH; - case 130: return TermType.DAY; - case 131: return TermType.DAY_OF_WEEK; - case 132: return TermType.DAY_OF_YEAR; - case 133: return TermType.HOURS; - case 134: return TermType.MINUTES; - case 135: return TermType.SECONDS; - case 136: return TermType.TIME; - case 107: return TermType.MONDAY; - case 108: return TermType.TUESDAY; - case 109: return TermType.WEDNESDAY; - case 110: return TermType.THURSDAY; - case 111: return TermType.FRIDAY; - case 112: return TermType.SATURDAY; - case 113: return TermType.SUNDAY; - case 114: return TermType.JANUARY; - case 115: return TermType.FEBRUARY; - case 116: return TermType.MARCH; - case 117: return TermType.APRIL; - case 118: return TermType.MAY; - case 119: return TermType.JUNE; - case 120: return TermType.JULY; - case 121: return TermType.AUGUST; - case 122: return TermType.SEPTEMBER; - case 123: return TermType.OCTOBER; - case 124: return TermType.NOVEMBER; - case 125: return TermType.DECEMBER; - case 137: return TermType.LITERAL; - case 144: return TermType.GROUP; - case 145: return TermType.SUM; - case 146: return TermType.AVG; - case 147: return TermType.MIN; - case 148: return TermType.MAX; - case 149: return TermType.SPLIT; - case 150: return TermType.UNGROUP; - case 151: return TermType.RANDOM; - case 152: return TermType.CHANGES; - case 154: return TermType.ARGS; - case 155: return TermType.BINARY; - case 157: return TermType.GEOJSON; - case 158: return TermType.TO_GEOJSON; - case 159: return TermType.POINT; - case 160: return TermType.LINE; - case 161: return TermType.POLYGON; - case 162: return TermType.DISTANCE; - case 163: return TermType.INTERSECTS; - case 164: return TermType.INCLUDES; - case 165: return TermType.CIRCLE; - case 166: return TermType.GET_INTERSECTING; - case 167: return TermType.FILL; - case 168: return TermType.GET_NEAREST; - case 171: return TermType.POLYGON_SUB; - case 180: return TermType.MINVAL; - case 181: return TermType.MAXVAL; - default: - throw new IllegalArgumentException(String.format( - "%s is not a legal value for TermType", value)); - } - } - - public static Optional maybeFromValue(int value) { - try { - return Optional.of(fromValue(value)); - } catch (IllegalArgumentException iae) { - return Optional.empty(); - } - } - -} diff --git a/drivers/java/src/main/java/com/rethinkdb/gen/proto/Version.java b/drivers/java/src/main/java/com/rethinkdb/gen/proto/Version.java deleted file mode 100644 index ec2c930f4b4..00000000000 --- a/drivers/java/src/main/java/com/rethinkdb/gen/proto/Version.java +++ /dev/null @@ -1,45 +0,0 @@ -// Autogenerated by metajava.py. -// Do not edit this file directly. -// The template for this file is located at: -// ../../../../../../../../templates/Enum.java - -package com.rethinkdb.gen.proto; - -import java.util.Optional; - -public enum Version { - - V0_1(1063369270), - V0_2(1915781601), - V0_3(1601562686), - V0_4(1074539808), - V1_0(885177795); - - public final int value; - - private Version(int value){ - this.value = value; - } - - public static Version fromValue(int value) { - switch (value) { - case 1063369270: return Version.V0_1; - case 1915781601: return Version.V0_2; - case 1601562686: return Version.V0_3; - case 1074539808: return Version.V0_4; - case 885177795: return Version.V1_0; - default: - throw new IllegalArgumentException(String.format( - "%s is not a legal value for Version", value)); - } - } - - public static Optional maybeFromValue(int value) { - try { - return Optional.of(fromValue(value)); - } catch (IllegalArgumentException iae) { - return Optional.empty(); - } - } - -} diff --git a/drivers/java/src/main/java/com/rethinkdb/model/Arguments.java b/drivers/java/src/main/java/com/rethinkdb/model/Arguments.java deleted file mode 100644 index e611dbd0109..00000000000 --- a/drivers/java/src/main/java/com/rethinkdb/model/Arguments.java +++ /dev/null @@ -1,55 +0,0 @@ -package com.rethinkdb.model; - - -import com.rethinkdb.ast.ReqlAst; -import com.rethinkdb.ast.Util; - -import java.util.*; -import java.util.stream.Collectors; - -public class Arguments extends ArrayList { - - public Arguments() {} - - public Arguments(Object arg){ - if(arg instanceof List){ - coerceAndAddAll((List) arg); - } else { - coerceAndAdd(arg); - } - } - public Arguments(Arguments args) { - addAll(args); - } - public Arguments(ReqlAst arg) { - add(arg); - } - - public Arguments(Object[] args) { - coerceAndAddAll(args); - } - - public Arguments(List args) { - addAll(Collections.singletonList(args).stream() - .map(Util::toReqlAst) - .collect(Collectors.toList())); - } - - public static Arguments make(Object... args){ - return new Arguments(args); - } - - public void coerceAndAdd(Object obj) { - add(Util.toReqlAst(obj)); - } - - public void coerceAndAddAll(Object[] args) { - coerceAndAddAll(Arrays.asList(args)); - } - - public void coerceAndAddAll(List args){ - addAll(args.stream() - .map(Util::toReqlAst) - .collect(Collectors.toList())); - } -} diff --git a/drivers/java/src/main/java/com/rethinkdb/model/Backtrace.java b/drivers/java/src/main/java/com/rethinkdb/model/Backtrace.java deleted file mode 100644 index 164e1bddfe1..00000000000 --- a/drivers/java/src/main/java/com/rethinkdb/model/Backtrace.java +++ /dev/null @@ -1,26 +0,0 @@ -package com.rethinkdb.model; - -import org.json.simple.JSONArray; - -import java.util.Optional; - -public class Backtrace { - - private JSONArray rawBacktrace; - - private Backtrace(JSONArray rawBacktrace){ - this.rawBacktrace = rawBacktrace; - } - - public static Optional fromJSONArray(JSONArray rawBacktrace) { - if(rawBacktrace == null || rawBacktrace.size() == 0){ - return Optional.empty(); - }else{ - return Optional.of(new Backtrace(rawBacktrace)); - } - } - - public JSONArray getRawBacktrace(){ - return rawBacktrace; - } -} diff --git a/drivers/java/src/main/java/com/rethinkdb/model/GroupedResult.java b/drivers/java/src/main/java/com/rethinkdb/model/GroupedResult.java deleted file mode 100644 index 1bce25562ae..00000000000 --- a/drivers/java/src/main/java/com/rethinkdb/model/GroupedResult.java +++ /dev/null @@ -1,13 +0,0 @@ -package com.rethinkdb.model; - -import java.util.List; - -public class GroupedResult { - public final G group; - public final List values; - - public GroupedResult(G group, List values){ - this.group = group; - this.values = values; - } -} diff --git a/drivers/java/src/main/java/com/rethinkdb/model/MapObject.java b/drivers/java/src/main/java/com/rethinkdb/model/MapObject.java deleted file mode 100644 index 40a0836295b..00000000000 --- a/drivers/java/src/main/java/com/rethinkdb/model/MapObject.java +++ /dev/null @@ -1,14 +0,0 @@ -package com.rethinkdb.model; - -import java.util.HashMap; - -public class MapObject extends HashMap { - - public MapObject() { - } - - public MapObject with(Object key, Object value) { - put(key, value); - return this; - } -} diff --git a/drivers/java/src/main/java/com/rethinkdb/model/OptArgs.java b/drivers/java/src/main/java/com/rethinkdb/model/OptArgs.java deleted file mode 100644 index deb8c5173ed..00000000000 --- a/drivers/java/src/main/java/com/rethinkdb/model/OptArgs.java +++ /dev/null @@ -1,39 +0,0 @@ -package com.rethinkdb.model; - -import com.rethinkdb.ast.ReqlAst; -import com.rethinkdb.ast.Util; -import org.json.simple.JSONObject; - -import java.util.HashMap; -import java.util.List; -import java.util.Map; -import java.util.stream.Collectors; - -public class OptArgs extends HashMap { - public OptArgs with(String key, Object value) { - if (key != null) { - put(key, Util.toReqlAst(value)); - } - return this; - } - - public OptArgs with(String key, List value) { - if (key != null) { - put(key, Util.toReqlAst(value)); - } - return this; - } - - public static OptArgs fromMap(Map map) { - OptArgs oa = new OptArgs(); - oa.putAll(map); - return oa; - } - - public static OptArgs of(String key, Object val) { - OptArgs oa = new OptArgs(); - oa.with(key, val); - return oa; - } - -} diff --git a/drivers/java/src/main/java/com/rethinkdb/model/Profile.java b/drivers/java/src/main/java/com/rethinkdb/model/Profile.java deleted file mode 100644 index 03dcae4687b..00000000000 --- a/drivers/java/src/main/java/com/rethinkdb/model/Profile.java +++ /dev/null @@ -1,26 +0,0 @@ -package com.rethinkdb.model; - -import org.json.simple.JSONArray; - -import java.util.Optional; - -public class Profile { - - private JSONArray profileObj; - - private Profile(JSONArray profileObj){ - this.profileObj = profileObj; - } - - public static Optional fromJSONArray(JSONArray profileObj) { - if(profileObj == null || profileObj.size() == 0){ - return Optional.empty(); - } else { - return Optional.of(new Profile(profileObj)); - } - } - - public JSONArray getProfileObj(){ - return profileObj; - } -} diff --git a/drivers/java/src/main/java/com/rethinkdb/model/ReqlLambda.java b/drivers/java/src/main/java/com/rethinkdb/model/ReqlLambda.java deleted file mode 100644 index 7bcbee44a5d..00000000000 --- a/drivers/java/src/main/java/com/rethinkdb/model/ReqlLambda.java +++ /dev/null @@ -1,5 +0,0 @@ -package com.rethinkdb.model; - -public interface ReqlLambda { - -} diff --git a/drivers/java/src/main/java/com/rethinkdb/net/Connection.java b/drivers/java/src/main/java/com/rethinkdb/net/Connection.java deleted file mode 100644 index 50191e6761f..00000000000 --- a/drivers/java/src/main/java/com/rethinkdb/net/Connection.java +++ /dev/null @@ -1,428 +0,0 @@ -package com.rethinkdb.net; - -import com.rethinkdb.ast.Query; -import com.rethinkdb.ast.ReqlAst; -import com.rethinkdb.gen.ast.Db; -import com.rethinkdb.gen.exc.ReqlDriverError; -import com.rethinkdb.gen.proto.Protocol; -import com.rethinkdb.gen.proto.Version; -import com.rethinkdb.model.Arguments; -import com.rethinkdb.model.OptArgs; -import org.slf4j.Logger; -import org.slf4j.LoggerFactory; - -import javax.net.ssl.SSLContext; -import java.io.IOException; -import java.io.InputStream; -import java.io.Closeable; -import java.net.SocketAddress; -import java.nio.ByteBuffer; -import java.util.List; -import java.util.Map; -import java.util.Optional; -import java.util.concurrent.*; -import java.util.concurrent.atomic.AtomicLong; -import java.util.concurrent.locks.ReentrantLock; - -public class Connection implements Closeable { - // logger - private static final Logger log = LoggerFactory.getLogger(Connection.class); - - // public immutable - public final String hostname; - public final int port; - - private final AtomicLong nextToken = new AtomicLong(); - - // private mutable - private Optional dbname; - private Optional connectTimeout; - private Optional sslContext; - private final Handshake handshake; - - // network stuff - Optional socket = Optional.empty(); - - private Map cursorCache = new ConcurrentHashMap<>(); - - // execution stuff - private ExecutorService exec; - private final Map> awaiters = new ConcurrentHashMap<>(); - private Exception awaiterException = null; - private final ReentrantLock lock = new ReentrantLock(); - - public Connection(Builder builder) { - dbname = builder.dbname; - if (builder.authKey.isPresent() && builder.user.isPresent()) { - throw new ReqlDriverError("Either `authKey` or `user` can be used, but not both."); - } - String user = builder.user.orElse("admin"); - String password = builder.password.orElse(builder.authKey.orElse("")); - handshake = new Handshake(user, password); - hostname = builder.hostname.orElse("localhost"); - port = builder.port.orElse(28015); - // is certFile provided? if so, it has precedence over SSLContext - this.sslContext = Crypto.handleCertfile(builder.certFile, builder.sslContext); - connectTimeout = builder.timeout; - } - - public static Builder build() { - return new Builder(); - } - - public Optional db() { - return dbname; - } - - public void connect() throws TimeoutException { - connect(Optional.empty()); - } - - public Connection reconnect() { - try { - return reconnect(false, Optional.empty()); - } catch (TimeoutException toe) { - throw new RuntimeException("Timeout can't happen here."); - } - } - - public Connection reconnect(boolean noreplyWait, Optional timeout) throws TimeoutException { - if (!timeout.isPresent()) { - timeout = connectTimeout; - } - close(noreplyWait); - connect(timeout); - return this; - } - - void connect(Optional timeout) throws TimeoutException { - final SocketWrapper sock = new SocketWrapper(hostname, port, sslContext, timeout.isPresent() ? timeout : connectTimeout); - sock.connect(handshake); - socket = Optional.of(sock); - - // start response pump - exec = Executors.newSingleThreadExecutor(); - exec.submit((Runnable) () -> { - // pump responses until canceled - while (true) { - // validate socket is open - if (!isOpen()) { - awaiterException = new IOException("The socket is closed, exiting response pump."); - this.close(); - break; - } - - // read response and send it to whoever is waiting, if anyone - try { - final Response response = this.socket.orElseThrow(() -> new ReqlDriverError("No socket available.")).read(); - final CompletableFuture awaiter = awaiters.remove(response.token); - if (awaiter != null) { - awaiter.complete(response); - } - } catch (Exception e) { - awaiterException = e; - this.close(); - break; - } - } - }); - } - - public Optional clientPort() { - return socket.map(SocketWrapper::clientPort).orElse(Optional.empty()); - } - - public Optional clientAddress() { - return socket.map(SocketWrapper::clientAddress).orElse(Optional.empty()); - } - - public boolean isOpen() { - return socket.map(SocketWrapper::isOpen).orElse(false); - } - - @Override - public void close() { - close(false); - } - - public void close(boolean shouldNoreplyWait) { - // disconnect - try { - if (shouldNoreplyWait) { - noreplyWait(); - } - } finally { - // reset token - nextToken.set(0); - - // clear cursor cache - for (Cursor cursor : cursorCache.values()) { - cursor.setError("Connection is closed."); - } - cursorCache.clear(); - - // handle current awaiters - this.awaiters.values().stream().forEach(awaiter -> { - // what happened? - if (this.awaiterException != null) { // an exception - awaiter.completeExceptionally(this.awaiterException); - } else { // probably canceled - awaiter.cancel(true); - } - }); - awaiters.clear(); - - // terminate response pump - if (exec != null && !exec.isShutdown()) { - exec.shutdown(); - } - - // close the socket - socket.ifPresent(SocketWrapper::close); - } - - } - - public void use(String db) { - dbname = Optional.ofNullable(db); - } - - public Optional timeout() { - return connectTimeout; - } - - /** - * Writes a query and returns a completable future. - * Said completable future value will eventually be set by the runnable response pump (see {@link #connect}). - * - * @param query the query to execute. - * @param deadline the timeout. - * @return a completable future. - */ - private Future sendQuery(Query query, Optional deadline) { - // check if response pump is running - if (!exec.isShutdown() && !exec.isTerminated()) { - final CompletableFuture awaiter = new CompletableFuture<>(); - awaiters.put(query.token, awaiter); - try { - lock.lock(); - socket.orElseThrow(() -> new ReqlDriverError("No socket available.")) - .write(query.serialize()); - return awaiter.toCompletableFuture(); - } finally { - lock.unlock(); - } - } - - // shouldn't be here - throw new ReqlDriverError("Can't write query because response pump is not running."); - } - - /** - * Writes a query without waiting for a response - * - * @param query the query to execute. - */ - private void sendQueryNoreply(Query query) { - // check if response pump is running - if (!exec.isShutdown() && !exec.isTerminated()) { - try { - lock.lock(); - socket.orElseThrow(() -> new ReqlDriverError("No socket available.")) - .write(query.serialize()); - return; - } finally { - lock.unlock(); - } - } - - // shouldn't be here - throw new ReqlDriverError("Can't write query because response pump is not running."); - } - - - void runQueryNoreply(Query query) { - sendQueryNoreply(query); - } - - T runQuery(Query query) { - return runQuery(query, Optional.empty()); - } - - T runQuery(Query query, Optional> pojoClass) { - return runQuery(query, pojoClass, Optional.empty()); - } - - /** - * Runs a query and blocks until a response is retrieved. - * - * @param query - * @param pojoClass - * @param timeout - * @param - * @param

- * @return - */ - T runQuery(Query query, Optional> pojoClass, Optional timeout) { - Response res = null; - try { - res = sendQuery(query, timeout).get(); - } catch (InterruptedException | ExecutionException e) { - throw new ReqlDriverError(e); - } - - if (res.isAtom()) { - try { - Converter.FormatOptions fmt = new Converter.FormatOptions(query.globalOptions); - Object value = ((List) Converter.convertPseudotypes(res.data, fmt)).get(0); - return Util.convertToPojo(value, pojoClass); - } catch (IndexOutOfBoundsException ex) { - throw new ReqlDriverError("Atom response was empty!", ex); - } - } else if (res.isPartial() || res.isSequence()) { - Cursor cursor = Cursor.create(this, query, res, pojoClass); - return (T) cursor; - } else if (res.isWaitComplete()) { - return null; - } else { - throw res.makeError(query); - } - } - - private long newToken() { - return nextToken.incrementAndGet(); - } - - void addToCache(long token, Cursor cursor) { - cursorCache.put(token, cursor); - } - - void removeFromCache(long token) { - cursorCache.remove(token); - } - - public void noreplyWait() { - runQuery(Query.noreplyWait(newToken())); - } - - private void setDefaultDB(OptArgs globalOpts) { - if (!globalOpts.containsKey("db") && dbname.isPresent()) { - // Only override the db global arg if the user hasn't - // specified one already and one is specified on the connection - globalOpts.with("db", dbname.get()); - } - if (globalOpts.containsKey("db")) { - // The db arg must be wrapped in a db ast object - globalOpts.with("db", new Db(Arguments.make(globalOpts.get("db")))); - } - } - - public T run(ReqlAst term, OptArgs globalOpts, Optional> pojoClass) { - return run(term, globalOpts, pojoClass, Optional.empty()); - } - - public T run(ReqlAst term, OptArgs globalOpts, Optional> pojoClass, Optional timeout) { - setDefaultDB(globalOpts); - Query q = Query.start(newToken(), term, globalOpts); - if (globalOpts.containsKey("noreply")) { - throw new ReqlDriverError( - "Don't provide the noreply option as an optarg. " + - "Use `.runNoReply` instead of `.run`"); - } - return runQuery(q, pojoClass, timeout); - } - - public void runNoReply(ReqlAst term, OptArgs globalOpts) { - setDefaultDB(globalOpts); - globalOpts.with("noreply", true); - runQueryNoreply(Query.start(newToken(), term, globalOpts)); - } - - Future continue_(Cursor cursor) { - return sendQuery(Query.continue_(cursor.token), Optional.empty()); - } - - - void stop(Cursor cursor) { - // While the server does reply to the stop request, we ignore that reply. - // This works because the response pump in `connect` ignores replies for which - // no waiter exists. - runQueryNoreply(Query.stop(cursor.token)); - } - - /** - * Connection.Builder should be used to build a Connection instance. - */ - public static class Builder implements Cloneable { - private Optional hostname = Optional.empty(); - private Optional port = Optional.empty(); - private Optional dbname = Optional.empty(); - private Optional certFile = Optional.empty(); - private Optional sslContext = Optional.empty(); - private Optional timeout = Optional.empty(); - private Optional authKey = Optional.empty(); - private Optional user = Optional.empty(); - private Optional password = Optional.empty(); - - public Builder clone() throws CloneNotSupportedException { - Builder c = (Builder)super.clone(); - c.hostname = hostname; - c.port = port; - c.dbname = dbname; - c.certFile = certFile; - c.sslContext = sslContext; - c.timeout = timeout; - c.authKey = authKey; - c.user = user; - c.password = password; - return c; - } - - public Builder hostname(String val) { - hostname = Optional.of(val); - return this; - } - - public Builder port(int val) { - port = Optional.of(val); - return this; - } - - public Builder db(String val) { - dbname = Optional.of(val); - return this; - } - - public Builder authKey(String key) { - authKey = Optional.of(key); - return this; - } - - public Builder user(String user, String password) { - this.user = Optional.of(user); - this.password = Optional.of(password); - return this; - } - - public Builder certFile(InputStream val) { - certFile = Optional.of(val); - return this; - } - - public Builder sslContext(SSLContext val) { - sslContext = Optional.of(val); - return this; - } - - public Builder timeout(long val) { - timeout = Optional.of(val); - return this; - } - - public Connection connect() { - final Connection conn = new Connection(this); - conn.reconnect(); - return conn; - } - } -} diff --git a/drivers/java/src/main/java/com/rethinkdb/net/Converter.java b/drivers/java/src/main/java/com/rethinkdb/net/Converter.java deleted file mode 100644 index 471929aed28..00000000000 --- a/drivers/java/src/main/java/com/rethinkdb/net/Converter.java +++ /dev/null @@ -1,125 +0,0 @@ -package com.rethinkdb.net; - - -import com.rethinkdb.gen.ast.Datum; -import com.rethinkdb.gen.exc.ReqlDriverError; -import com.rethinkdb.model.GroupedResult; -import com.rethinkdb.model.MapObject; -import com.rethinkdb.model.OptArgs; - -import java.time.Instant; -import java.time.OffsetDateTime; -import java.time.ZoneOffset; -import java.util.Base64; -import java.util.HashMap; -import java.util.List; -import java.util.Map; -import java.util.stream.Collectors; - -public class Converter { - - private static final Base64.Decoder b64decoder = Base64.getMimeDecoder(); - private static final Base64.Encoder b64encoder = Base64.getMimeEncoder(); - - - public static final String PSEUDOTYPE_KEY = "$reql_type$"; - - public static final String TIME = "TIME"; - public static final String GROUPED_DATA = "GROUPED_DATA"; - public static final String GEOMETRY = "GEOMETRY"; - public static final String BINARY = "BINARY"; - - /* Compact way of keeping these flags around through multiple recursive - passes */ - public static class FormatOptions{ - public final boolean rawTime; - public final boolean rawGroups; - public final boolean rawBinary; - - public FormatOptions(OptArgs args){ - this.rawTime = ((Datum)args.getOrDefault("time_format", - new Datum("native"))).datum.equals("raw"); - this.rawBinary = ((Datum)args.getOrDefault("binary_format", - new Datum("native"))).datum.equals("raw"); - this.rawGroups = ((Datum)args.getOrDefault("group_format", - new Datum("native"))).datum.equals("raw"); - } - } - - @SuppressWarnings("unchecked") - public static Object convertPseudotypes(Object obj, FormatOptions fmt){ - if(obj instanceof List) { - return ((List) obj).stream() - .map(item -> convertPseudotypes(item, fmt)) - .collect(Collectors.toList()); - } else if(obj instanceof Map) { - Map mapobj = (Map) obj; - if(mapobj.containsKey(PSEUDOTYPE_KEY)){ - return convertPseudo(mapobj, fmt); - } - return mapobj.entrySet().stream() - .collect( - HashMap::new, - (map, entry) -> map.put( - entry.getKey(), - convertPseudotypes(entry.getValue(), fmt) - ), - HashMap::putAll - ); - } else { - return obj; - } - } - - public static Object convertPseudo(Map value, FormatOptions fmt) { - if(value == null){ - return null; - } - String reqlType = (String) value.get(PSEUDOTYPE_KEY); - switch (reqlType) { - case TIME: - return fmt.rawTime ? value : getTime(value); - case GROUPED_DATA: - return fmt.rawGroups ? value : getGrouped(value); - case BINARY: - return fmt.rawBinary ? value : getBinary(value); - case GEOMETRY: - // Nothing specific here - return value; - default: - // Just leave unknown pseudo-types alone - return value; - } - } - - @SuppressWarnings("unchecked") - private static List getGrouped(Map value) { - return ((List>) value.get("data")).stream() - .map(g -> new GroupedResult(g.remove(0), g)) - .collect(Collectors.toList()); - } - - private static OffsetDateTime getTime(Map obj) { - try { - ZoneOffset offset = ZoneOffset.of((String) obj.get("timezone")); - Double epochTime = ((Number) obj.get("epoch_time")).doubleValue(); - Instant timeInstant = Instant.ofEpochMilli(((Double) (epochTime * 1000.0)).longValue()); - return OffsetDateTime.ofInstant(timeInstant, offset); - } catch (Exception ex) { - throw new ReqlDriverError("Error handling date", ex); - } - } - - @SuppressWarnings("unchecked") - private static byte[] getBinary(Map value) { - String str = (String) value.get("data"); - return b64decoder.decode(str); - } - - public static Map toBinary(byte[] data){ - MapObject mob = new MapObject(); - mob.with("$reql_type$", BINARY); - mob.with("data", b64encoder.encodeToString(data)); - return mob; - } -} diff --git a/drivers/java/src/main/java/com/rethinkdb/net/Crypto.java b/drivers/java/src/main/java/com/rethinkdb/net/Crypto.java deleted file mode 100644 index f2c9d1bd0f8..00000000000 --- a/drivers/java/src/main/java/com/rethinkdb/net/Crypto.java +++ /dev/null @@ -1,163 +0,0 @@ -package com.rethinkdb.net; - -import com.rethinkdb.gen.exc.ReqlDriverError; - -import javax.crypto.Mac; -import javax.crypto.SecretKeyFactory; -import javax.crypto.spec.PBEKeySpec; -import javax.crypto.spec.SecretKeySpec; -import javax.net.ssl.SSLContext; -import javax.net.ssl.TrustManagerFactory; -import java.io.IOException; -import java.io.InputStream; -import java.security.*; -import java.security.cert.CertificateException; -import java.security.cert.CertificateFactory; -import java.security.cert.X509Certificate; -import java.security.spec.InvalidKeySpecException; -import java.util.*; -import java.util.concurrent.ConcurrentHashMap; - -import static com.rethinkdb.net.Util.fromUTF8; -import static com.rethinkdb.net.Util.toUTF8; - -class Crypto { - - private static final String DEFAULT_SSL_PROTOCOL = "TLSv1.2"; - private static final String HMAC_SHA_256 = "HmacSHA256"; - private static final String PBKDF2_ALGORITHM = "PBKDF2WithHmacSHA256"; - - private static final Base64.Encoder encoder = Base64.getEncoder(); - private static final Base64.Decoder decoder = Base64.getDecoder(); - private static final SecureRandom secureRandom = new SecureRandom(); - private static final Map pbkdf2Cache = new ConcurrentHashMap<>(); - private static final int NONCE_BYTES = 18; - - private static class PasswordLookup { - final byte[] password; - final byte[] salt; - final int iterations; - - PasswordLookup(byte[] password, byte[] salt, int iterations) { - this.password = password; - this.salt = salt; - this.iterations = iterations; - } - - @Override - public boolean equals(Object o) { - if (this == o) return true; - if (o == null || getClass() != o.getClass()) return false; - - PasswordLookup that = (PasswordLookup) o; - - if (iterations != that.iterations) return false; - if (!Arrays.equals(password, that.password)) return false; - return Arrays.equals(salt, that.salt); - - } - - @Override - public int hashCode() { - int result = Arrays.hashCode(password); - result = 31 * result + Arrays.hashCode(salt); - result = 31 * result + iterations; - return result; - } - } - private static byte[] cacheLookup(byte[] password, byte[] salt, int iterations) { - return pbkdf2Cache.get(new PasswordLookup(password, salt, iterations)); - } - - private static void setCache(byte[] password, byte[] salt, int iterations, byte[] result) { - pbkdf2Cache.put(new PasswordLookup(password, salt, iterations), result); - } - - static byte[] sha256(byte[] clientKey) { - try { - MessageDigest digest = MessageDigest.getInstance("SHA-256"); - return digest.digest(clientKey); - } catch (NoSuchAlgorithmException e) { - throw new ReqlDriverError(e); - } - } - - static byte[] hmac(byte[] key, String string) { - try { - Mac mac = Mac.getInstance(HMAC_SHA_256); - SecretKeySpec secretKey = new SecretKeySpec(key, HMAC_SHA_256); - mac.init(secretKey); - return mac.doFinal(toUTF8(string)); - } catch (InvalidKeyException | NoSuchAlgorithmException e) { - throw new ReqlDriverError(e); - } - } - - static byte[] pbkdf2(byte[] password, byte[] salt, Integer iterationCount) { - final byte[] cachedValue = cacheLookup(password, salt, iterationCount); - if (cachedValue != null) { - return cachedValue; - } - final PBEKeySpec spec = new PBEKeySpec( - fromUTF8(password).toCharArray(), salt, iterationCount, 256); - final SecretKeyFactory skf; - try { - skf = SecretKeyFactory.getInstance(PBKDF2_ALGORITHM); - final byte[] calculatedValue = skf.generateSecret(spec).getEncoded(); - setCache(password, salt, iterationCount, calculatedValue); - return calculatedValue; - } catch (NoSuchAlgorithmException | InvalidKeySpecException e) { - throw new ReqlDriverError(e); - } - } - - static String makeNonce() { - byte[] rawNonce = new byte[NONCE_BYTES]; - secureRandom.nextBytes(rawNonce); - return toBase64(rawNonce); - } - - static byte[] xor(byte[] a, byte[] b) { - if (a.length != b.length) { - throw new ReqlDriverError("arrays must be the same length"); - } - byte[] result = new byte[a.length]; - for (int i = 0; i < result.length; i++) { - result[i] = (byte) (a[i] ^ b[i]); - } - return result; - } - - static String toBase64(byte[] bytes) { - return fromUTF8(encoder.encode(bytes)); - } - - static byte[] fromBase64(String string) { - return decoder.decode(string); - } - - static Optional handleCertfile( - Optional certFile, Optional sslContext) { - if (certFile.isPresent()) { - try { - final CertificateFactory cf = CertificateFactory.getInstance("X.509"); - final X509Certificate caCert = (X509Certificate) cf.generateCertificate(certFile.get()); - - final TrustManagerFactory tmf = TrustManagerFactory - .getInstance(TrustManagerFactory.getDefaultAlgorithm()); - KeyStore ks = KeyStore.getInstance(KeyStore.getDefaultType()); - ks.load(null); // You don't need the KeyStore instance to come from a file. - ks.setCertificateEntry("caCert", caCert); - tmf.init(ks); - - final SSLContext ssc = SSLContext.getInstance(DEFAULT_SSL_PROTOCOL); - ssc.init(null, tmf.getTrustManagers(), null); - return Optional.of(ssc); - } catch (IOException | CertificateException | NoSuchAlgorithmException | KeyStoreException | KeyManagementException e) { - throw new ReqlDriverError(e); - } - } else { - return sslContext; - } - } -} diff --git a/drivers/java/src/main/java/com/rethinkdb/net/Cursor.java b/drivers/java/src/main/java/com/rethinkdb/net/Cursor.java deleted file mode 100644 index b03d0c4a57f..00000000000 --- a/drivers/java/src/main/java/com/rethinkdb/net/Cursor.java +++ /dev/null @@ -1,223 +0,0 @@ -package com.rethinkdb.net; - -import com.rethinkdb.ast.Query; -import com.rethinkdb.gen.exc.ReqlDriverError; -import com.rethinkdb.gen.exc.ReqlRuntimeError; -import com.rethinkdb.gen.proto.ResponseType; - -import java.io.Closeable; -import java.util.ArrayDeque; -import java.util.ArrayList; -import java.util.Deque; -import java.util.Iterator; -import java.util.List; -import java.util.NoSuchElementException; -import java.util.Optional; -import java.util.concurrent.Future; -import java.util.concurrent.TimeUnit; -import java.util.concurrent.TimeoutException; - - -public abstract class Cursor implements Iterator, Iterable, Closeable { - - // public immutable members - public final long token; - - // immutable members - protected final Connection connection; - protected final Query query; - protected final boolean _isFeed; - - // mutable members - protected Deque items = new ArrayDeque<>(); - protected int outstandingRequests = 0; - protected int threshold = 1; - protected Optional error = Optional.empty(); - protected boolean alreadyIterated = false; - - protected Future awaitingContinue = null; - - public Cursor(Connection connection, Query query, Response firstResponse) { - this.connection = connection; - this.query = query; - this.token = query.token; - this._isFeed = firstResponse.isFeed(); - connection.addToCache(query.token, this); - maybeSendContinue(); - extendInternal(firstResponse); - } - - public void close() { - connection.removeFromCache(this.token); - if (!error.isPresent()) { - error = Optional.of(new NoSuchElementException()); - if (connection.isOpen()) { - outstandingRequests += 1; - connection.stop(this); - } - } - } - - public int bufferedSize() { - return items.size(); - } - - public ArrayList bufferedItems() { - return new ArrayList<>(items); - } - - public boolean isFeed() { - return this._isFeed; - } - - void extend(Response response) { - outstandingRequests -= 1; - maybeSendContinue(); - extendInternal(response); - } - - private void extendInternal(Response response) { - threshold = response.data.size(); - if(!error.isPresent()){ - if(response.isPartial()){ - items.addAll(response.data); - } else if(response.isSequence()) { - items.addAll(response.data); - error = Optional.of(new NoSuchElementException()); - } else { - error = Optional.of(response.makeError(query)); - } - } - if(outstandingRequests == 0 && error.isPresent()) { - connection.removeFromCache(response.token); - } - } - - protected void maybeSendContinue() { - if(!error.isPresent() - && items.size() < threshold - && outstandingRequests == 0 ) { - outstandingRequests += 1; - this.awaitingContinue = connection.continue_(this); - } - } - - protected void waitOnCursorItems(Optional timeout) throws TimeoutException { - Response res = null; - try { - if(timeout.isPresent()){ - res = this.awaitingContinue.get(timeout.get(), TimeUnit.MILLISECONDS); - } else { - res = this.awaitingContinue.get(); - } - }catch(TimeoutException exc){ - throw exc; - }catch(Exception e){ - throw new ReqlDriverError(e); - } - this.extend(res); - } - - void setError(String errMsg) { - if(!error.isPresent()){ - error = Optional.of(new ReqlRuntimeError(errMsg)); - Response dummyResponse = Response - .make(query.token, ResponseType.SUCCESS_SEQUENCE) - .build(); - extendInternal(dummyResponse); - } - } - - public static Cursor create(Connection connection, Query query, Response firstResponse, Optional> pojoClass) { - return new DefaultCursor(connection, query, firstResponse, pojoClass); - } - - - public T next() { - try { - return getNext(Optional.empty()); - }catch(TimeoutException toe) { - throw new RuntimeException("Timeout can't happen here"); - } - } - - public T next(long timeout) throws TimeoutException { - return getNext(Optional.of(timeout)); - } - - public Iterator iterator(){ - if (!alreadyIterated) { - alreadyIterated = true; - return this; - } - throw new ReqlDriverError("The results of this query have already been consumed."); - } - - /** - * Iterates over all elements of this cursor and returns them as a list - * @return The list of this cursor's elements - */ - public List toList() { - List list = new ArrayList(); - forEachRemaining(list::add); - return list; - } - - // Abstract methods - abstract T getNext(Optional timeout) throws TimeoutException; - - private static class DefaultCursor extends Cursor { - private final Optional> pojoClass; - public final Converter.FormatOptions fmt; - - public DefaultCursor(Connection connection, Query query, Response firstResponse, Optional> pojoClass) { - super(connection, query, firstResponse); - - this.pojoClass = pojoClass; - fmt = new Converter.FormatOptions(query.globalOptions); - } - - /* This isn't great, but the Java iterator protocol relies on hasNext, - so it must be implemented in a reasonable way */ - public boolean hasNext(){ - try { - if(items.size() > 0){ - return true; - } - if(error.isPresent()){ - return false; - } - if(_isFeed){ - return true; - } - - maybeSendContinue(); - waitOnCursorItems(Optional.empty()); - - return items.size() > 0; - }catch(TimeoutException toe) { - throw new RuntimeException("Timeout can't happen here"); - } - } - - @SuppressWarnings("unchecked") - T getNext(Optional timeout) throws TimeoutException { - - while( items.size() == 0){ - maybeSendContinue(); - waitOnCursorItems(timeout); - - if( items.size() != 0){ - break; - } - - error.ifPresent(exc -> { - throw exc; - }); - } - - Object value = Converter.convertPseudotypes(items.pop(), fmt); - return Util.convertToPojo(value, pojoClass); - } - } -} diff --git a/drivers/java/src/main/java/com/rethinkdb/net/Handshake.java b/drivers/java/src/main/java/com/rethinkdb/net/Handshake.java deleted file mode 100644 index 4c50d5e3e4b..00000000000 --- a/drivers/java/src/main/java/com/rethinkdb/net/Handshake.java +++ /dev/null @@ -1,281 +0,0 @@ -package com.rethinkdb.net; - -import com.rethinkdb.gen.exc.ReqlAuthError; -import com.rethinkdb.gen.exc.ReqlDriverError; -import com.rethinkdb.gen.proto.Protocol; -import com.rethinkdb.gen.proto.Version; -import org.json.simple.JSONObject; - -import java.nio.ByteBuffer; -import java.security.MessageDigest; -import java.util.Optional; - -import static com.rethinkdb.net.Crypto.*; -import static com.rethinkdb.net.Util.toJSON; -import static com.rethinkdb.net.Util.toUTF8; - -public class Handshake { - static final Version VERSION = Version.V1_0; - static final Long SUB_PROTOCOL_VERSION = 0L; - static final Protocol PROTOCOL = Protocol.JSON; - - - private static final String CLIENT_KEY = "Client Key"; - private static final String SERVER_KEY = "Server Key"; - - private final String username; - private final String password; - private ProtocolState state; - - private interface ProtocolState { - ProtocolState nextState(String response); - Optional toSend(); - boolean isFinished(); - } - - private class InitialState implements ProtocolState { - private final String nonce; - private final String username; - private final byte[] password; - - InitialState(String username, String password) { - this.username = username; - this.password = toUTF8(password); - this.nonce = makeNonce(); - } - - @Override - public ProtocolState nextState(String response) { - if (response != null) { - throw new ReqlDriverError("Unexpected response"); - } - // We could use a json serializer, but it's fairly straightforward - ScramAttributes clientFirstMessageBare = ScramAttributes.create() - .username(username) - .nonce(nonce); - byte[] jsonBytes = toUTF8( - "{" + - "\"protocol_version\":" + SUB_PROTOCOL_VERSION + "," + - "\"authentication_method\":\"SCRAM-SHA-256\"," + - "\"authentication\":" + "\"n,," + clientFirstMessageBare + "\"" + - "}" - ); - ByteBuffer msg = Util.leByteBuffer( - Integer.BYTES + // size of VERSION - jsonBytes.length + // json auth payload - 1 // terminating null byte - ).putInt(VERSION.value) - .put(jsonBytes) - .put(new byte[1]); - return new WaitingForProtocolRange( - nonce, password, clientFirstMessageBare, msg); - } - - @Override - public Optional toSend() { - return Optional.empty(); - } - - @Override - public boolean isFinished() { - return false; - } - } - - private class WaitingForProtocolRange implements ProtocolState { - private final String nonce; - private final ByteBuffer message; - private final ScramAttributes clientFirstMessageBare; - private final byte[] password; - - WaitingForProtocolRange( - String nonce, - byte[] password, - ScramAttributes clientFirstMessageBare, - ByteBuffer message) { - this.nonce = nonce; - this.password = password; - this.clientFirstMessageBare = clientFirstMessageBare; - this.message = message; - } - - @Override - public ProtocolState nextState(String response) { - JSONObject json = toJSON(response); - throwIfFailure(json); - Long minVersion = (Long) json.get("min_protocol_version"); - Long maxVersion = (Long) json.get("max_protocol_version"); - if (SUB_PROTOCOL_VERSION < minVersion || SUB_PROTOCOL_VERSION > maxVersion) { - throw new ReqlDriverError( - "Unsupported protocol version " + SUB_PROTOCOL_VERSION + - ", expected between " + minVersion + " and " + maxVersion); - } - return new WaitingForAuthResponse(nonce, password, clientFirstMessageBare); - } - - @Override - public Optional toSend() { - return Optional.of(message); - } - - @Override - public boolean isFinished() { - return false; - } - } - - private class WaitingForAuthResponse implements ProtocolState { - private final String nonce; - private final byte[] password; - private final ScramAttributes clientFirstMessageBare; - - WaitingForAuthResponse( - String nonce, byte[] password, ScramAttributes clientFirstMessageBare) { - this.nonce = nonce; - this.password = password; - this.clientFirstMessageBare = clientFirstMessageBare; - } - - @Override - public ProtocolState nextState(String response) { - JSONObject json = toJSON(response); - throwIfFailure(json); - String serverFirstMessage = (String) json.get("authentication"); - ScramAttributes serverAuth = ScramAttributes.from(serverFirstMessage); - if (!serverAuth.nonce().startsWith(nonce)) { - throw new ReqlAuthError("Invalid nonce from server"); - } - ScramAttributes clientFinalMessageWithoutProof = ScramAttributes.create() - .headerAndChannelBinding("biws") - .nonce(serverAuth.nonce()); - - // SaltedPassword := Hi(Normalize(password), salt, i) - byte[] saltedPassword = pbkdf2( - password, serverAuth.salt(), serverAuth.iterationCount()); - - // ClientKey := HMAC(SaltedPassword, "Client Key") - byte[] clientKey = hmac(saltedPassword, CLIENT_KEY); - - // StoredKey := H(ClientKey) - byte[] storedKey = sha256(clientKey); - - // AuthMessage := client-first-message-bare + "," + - // server-first-message + "," + - // client-final-message-without-proof - String authMessage = - clientFirstMessageBare + "," + - serverFirstMessage + "," + - clientFinalMessageWithoutProof; - - // ClientSignature := HMAC(StoredKey, AuthMessage) - byte[] clientSignature = hmac(storedKey, authMessage); - - // ClientProof := ClientKey XOR ClientSignature - byte[] clientProof = xor(clientKey, clientSignature); - - // ServerKey := HMAC(SaltedPassword, "Server Key") - byte[] serverKey = hmac(saltedPassword, SERVER_KEY); - - // ServerSignature := HMAC(ServerKey, AuthMessage) - byte[] serverSignature = hmac(serverKey, authMessage); - - ScramAttributes auth = clientFinalMessageWithoutProof - .clientProof(clientProof); - byte[] authJson = toUTF8("{\"authentication\":\"" + auth + "\"}"); - ByteBuffer message = Util.leByteBuffer(authJson.length + 1) - .put(authJson) - .put(new byte[1]); - return new WaitingForAuthSuccess(serverSignature, message); - } - - @Override - public Optional toSend() { - return Optional.empty(); - } - - @Override - public boolean isFinished() { - return false; - } - } - - private class WaitingForAuthSuccess implements ProtocolState { - private final byte[] serverSignature; - private final ByteBuffer message; - - public WaitingForAuthSuccess(byte[] serverSignature, ByteBuffer message) { - this.serverSignature = serverSignature; - this.message = message; - } - - @Override - public ProtocolState nextState(String response) { - JSONObject json = toJSON(response); - throwIfFailure(json); - ScramAttributes auth = ScramAttributes - .from((String) json.get("authentication")); - if (!MessageDigest.isEqual(auth.serverSignature(), serverSignature)) { - throw new ReqlAuthError("Invalid server signature"); - } - return new HandshakeSuccess(); - } - - @Override - public Optional toSend() { - return Optional.of(message); - } - - @Override - public boolean isFinished() { - return false; - } - } - - private class HandshakeSuccess implements ProtocolState { - - @Override - public ProtocolState nextState(String response) { - return this; - } - - @Override - public Optional toSend() { - return Optional.empty(); - } - - @Override - public boolean isFinished() { - return true; - } - } - - private void throwIfFailure(JSONObject json) { - if (!(boolean) json.get("success")) { - Long errorCode = (Long) json.get("error_code"); - if (errorCode >= 10 && errorCode <= 20) { - throw new ReqlAuthError((String) json.get("error")); - } else { - throw new ReqlDriverError((String) json.get("error")); - } - } - } - - public Handshake(String username, String password) { - this.username = username; - this.password = password; - this.state = new InitialState(username, password); - } - - public void reset() { - this.state = new InitialState(this.username, this.password); - } - - public Optional nextMessage(String response) { - this.state = this.state.nextState(response); - return this.state.toSend(); - } - - public boolean isFinished() { - return this.state.isFinished(); - } -} diff --git a/drivers/java/src/main/java/com/rethinkdb/net/Response.java b/drivers/java/src/main/java/com/rethinkdb/net/Response.java deleted file mode 100644 index d47f8dba9f1..00000000000 --- a/drivers/java/src/main/java/com/rethinkdb/net/Response.java +++ /dev/null @@ -1,185 +0,0 @@ -package com.rethinkdb.net; - -import com.rethinkdb.*; -import com.rethinkdb.ast.*; -import com.rethinkdb.gen.exc.ReqlError; -import com.rethinkdb.gen.proto.ErrorType; -import com.rethinkdb.gen.proto.ResponseType; -import com.rethinkdb.gen.proto.ResponseNote; -import com.rethinkdb.model.Backtrace; -import com.rethinkdb.model.Profile; -import org.json.simple.*; -import org.slf4j.Logger; -import org.slf4j.LoggerFactory; - -import java.util.*; -import java.nio.ByteBuffer; -import java.util.stream.Collectors; - - -class Response { - public final long token; - public final ResponseType type; - public final ArrayList notes; - - public final JSONArray data; - public final Optional profile; - public final Optional backtrace; - public final Optional errorType; - - static final Logger logger = LoggerFactory.getLogger(Query.class); - - public static Response parseFrom(long token, ByteBuffer buf) { - if (Response.logger.isDebugEnabled()) { - Response.logger.debug( - "JSON Recv: Token: {} {}", token, Util.bufferToString(buf)); - } - JSONObject jsonResp = Util.toJSON(buf); - ResponseType responseType = ResponseType.fromValue( - ((Long) jsonResp.get("t")).intValue() - ); - ArrayList responseNoteVals = (ArrayList) jsonResp - .getOrDefault("n", new ArrayList()); - ArrayList responseNotes = responseNoteVals - .stream() - .map(Long::intValue) - .map(ResponseNote::maybeFromValue) - .filter(Optional::isPresent) - .map(Optional::get) - .collect(Collectors.toCollection(ArrayList::new)); - Builder res = new Builder(token, responseType); - if(jsonResp.containsKey("e")){ - res.setErrorType(((Long)jsonResp.get("e")).intValue()); - } - return res.setNotes(responseNotes) - .setProfile((JSONArray) jsonResp.getOrDefault("p", null)) - .setBacktrace((JSONArray) jsonResp.getOrDefault("b", null)) - .setData((JSONArray) jsonResp.getOrDefault("r", new JSONArray())) - .build(); - } - - private Response(long token, - ResponseType responseType, - JSONArray data, - ArrayList responseNotes, - Optional profile, - Optional backtrace, - Optional errorType - ) { - this.token = token; - this.type = responseType; - this.data = data; - this.notes = responseNotes; - this.profile = profile; - this.backtrace = backtrace; - this.errorType = errorType; - } - - static class Builder { - long token; - ResponseType responseType; - ArrayList notes = new ArrayList<>(); - JSONArray data = new JSONArray(); - Optional profile = Optional.empty(); - Optional backtrace = Optional.empty(); - Optional errorType = Optional.empty(); - - Builder(long token, ResponseType responseType){ - this.token = token; - this.responseType = responseType; - } - - Builder setNotes(ArrayList notes){ - this.notes.addAll(notes); - return this; - } - - Builder setData(JSONArray data){ - if(data != null){ - this.data = data; - } - return this; - } - - Builder setProfile(JSONArray profile) { - this.profile = Profile.fromJSONArray(profile); - return this; - } - - Builder setBacktrace(JSONArray backtrace) { - this.backtrace = Backtrace.fromJSONArray(backtrace); - return this; - } - - Builder setErrorType(int value) { - this.errorType = Optional.of(ErrorType.fromValue(value)); - return this; - } - - Response build() { - return new Response( - token, - responseType, - data, - notes, - profile, - backtrace, - errorType - ); - } - } - - static Builder make(long token, ResponseType type){ - return new Builder(token, type); - } - - boolean isWaitComplete() { - return type == ResponseType.WAIT_COMPLETE; - } - - /* Whether the response is any kind of feed */ - boolean isFeed() { - return notes.stream().anyMatch(ResponseNote::isFeed); - } - - /* Whether the response is any kind of error */ - boolean isError() { - return type.isError(); - } - - /* What type of success the response contains */ - boolean isAtom() { - return type == ResponseType.SUCCESS_ATOM; - } - - boolean isSequence() { - return type == ResponseType.SUCCESS_SEQUENCE; - } - - boolean isPartial() { - return type == ResponseType.SUCCESS_PARTIAL; - } - - ReqlError makeError(Query query) { - String msg = data.size() > 0 ? - (String) data.get(0) - : "Unknown error message"; - return new ErrorBuilder(msg, type) - .setBacktrace(backtrace) - .setErrorType(errorType) - .setTerm(query) - .build(); - } - - @Override - public String toString() { - return "Response{" + - "token=" + token + - ", type=" + type + - ", notes=" + notes + - ", data=" + data + - ", profile=" + profile + - ", backtrace=" + backtrace + - '}'; - } -} diff --git a/drivers/java/src/main/java/com/rethinkdb/net/ScramAttributes.java b/drivers/java/src/main/java/com/rethinkdb/net/ScramAttributes.java deleted file mode 100644 index 480a15539a8..00000000000 --- a/drivers/java/src/main/java/com/rethinkdb/net/ScramAttributes.java +++ /dev/null @@ -1,144 +0,0 @@ -package com.rethinkdb.net; - -import com.rethinkdb.gen.exc.ReqlAuthError; - -import java.util.Optional; - -public class ScramAttributes { - Optional _authIdentity = Optional.empty(); // a - Optional _username = Optional.empty(); // n - Optional _nonce = Optional.empty(); // r - Optional _headerAndChannelBinding = Optional.empty(); // c - Optional _salt = Optional.empty(); // s - Optional _iterationCount = Optional.empty(); // i - Optional _clientProof = Optional.empty(); // p - Optional _serverSignature = Optional.empty(); // v - Optional _error = Optional.empty(); // e - Optional _originalString = Optional.empty(); - - - public static ScramAttributes create() { - return new ScramAttributes(); - } - - static ScramAttributes from(ScramAttributes other) { - ScramAttributes out = new ScramAttributes(); - out._authIdentity = other._authIdentity; - out._username = other._username; - out._nonce = other._nonce; - out._headerAndChannelBinding = other._headerAndChannelBinding; - out._salt = other._salt; - out._iterationCount = other._iterationCount; - out._clientProof = other._clientProof; - out._serverSignature = other._serverSignature; - out._error = other._error; - return out; - } - - static ScramAttributes from(String input) { - - ScramAttributes sa = new ScramAttributes(); - sa._originalString = Optional.of(input); - for (String section : input.split(",")) { - String[] keyVal = section.split("=", 2); - sa.setAttribute(keyVal[0], keyVal[1]); - } - return sa; - } - - private void setAttribute(String key, String val) { - switch (key) { - case "a": - _authIdentity = Optional.of(val); - break; - case "n": - _username = Optional.of(val); - break; - case "r": - _nonce = Optional.of(val); - break; - case "m": - throw new ReqlAuthError("m field disallowed"); - case "c": - _headerAndChannelBinding = Optional.of(val); - break; - case "s": - _salt = Optional.of(Crypto.fromBase64(val)); - break; - case "i": - _iterationCount = Optional.of(Integer.parseInt(val)); - break; - case "p": - _clientProof = Optional.of(val); - break; - case "v": - _serverSignature = Optional.of(Crypto.fromBase64(val)); - break; - case "e": - _error = Optional.of(val); - break; - default: - // Supposed to ignore unexpected fields - } - } - - public String toString() { - if (_originalString.isPresent()) { - return _originalString.get(); - } - String output = ""; - if (_username.isPresent()) { - output += ",n=" + _username.get(); - } - if (_nonce.isPresent()) { - output += ",r=" + _nonce.get(); - } - if (_headerAndChannelBinding.isPresent()) { - output += ",c=" + _headerAndChannelBinding.get(); - } - if (_clientProof.isPresent()) { - output += ",p=" + _clientProof.get(); - } - if (output.startsWith(",")) { - return output.substring(1); - } else { - return output; - } - } - - // Setters with coercion - ScramAttributes username(String username) { - ScramAttributes next = ScramAttributes.from(this); - next._username = Optional.of(username.replace("=", "=3D").replace(",", "=2C")); - return next; - } - - ScramAttributes nonce(String nonce) { - ScramAttributes next = ScramAttributes.from(this); - next._nonce = Optional.of(nonce); - return next; - } - - ScramAttributes headerAndChannelBinding(String hacb) { - ScramAttributes next = ScramAttributes.from(this); - next._headerAndChannelBinding = Optional.of(hacb); - return next; - } - - ScramAttributes clientProof(byte[] clientProof) { - ScramAttributes next = ScramAttributes.from(this); - next._clientProof = Optional.of(Crypto.toBase64(clientProof)); - return next; - } - - // Getters - String authIdentity() { return _authIdentity.get(); } - String username() { return _username.get(); } - String nonce() { return _nonce.get(); } - String headerAndChannelBinding() { return _headerAndChannelBinding.get(); } - byte[] salt() { return _salt.get(); } - Integer iterationCount() { return _iterationCount.get(); } - String clientProof() { return _clientProof.get(); } - byte[] serverSignature() { return _serverSignature.get(); } - String error() { return _error.get(); } -} diff --git a/drivers/java/src/main/java/com/rethinkdb/net/SocketWrapper.java b/drivers/java/src/main/java/com/rethinkdb/net/SocketWrapper.java deleted file mode 100644 index 4c6c81b1d8d..00000000000 --- a/drivers/java/src/main/java/com/rethinkdb/net/SocketWrapper.java +++ /dev/null @@ -1,192 +0,0 @@ -package com.rethinkdb.net; - -import com.rethinkdb.gen.exc.ReqlDriverError; - -import javax.net.SocketFactory; -import javax.net.ssl.SSLContext; -import javax.net.ssl.SSLSocket; -import javax.net.ssl.SSLSocketFactory; -import java.io.DataInputStream; -import java.io.IOException; -import java.io.OutputStream; -import java.net.InetSocketAddress; -import java.net.Socket; -import java.net.SocketAddress; -import java.nio.ByteBuffer; -import java.nio.ByteOrder; -import java.util.Optional; - -public class SocketWrapper { - // networking stuff - private Socket socket = null; - private SocketFactory socketFactory = SocketFactory.getDefault(); - private SSLSocket sslSocket = null; - private OutputStream writeStream = null; - private DataInputStream readStream = null; - - // options - private Optional sslContext = Optional.empty(); - private Optional timeout = Optional.empty(); - private final String hostname; - private final int port; - - SocketWrapper(String hostname, - int port, - Optional sslContext, - Optional timeout) { - this.hostname = hostname; - this.port = port; - this.sslContext = sslContext; - this.timeout = timeout; - } - - /** - * @param handshake - */ - void connect(Handshake handshake) { - final Optional deadline = timeout.map(Util::deadline); - try { - handshake.reset(); - // establish connection - final InetSocketAddress addr = new InetSocketAddress(hostname, port); - socket = socketFactory.createSocket(); - socket.connect(addr, timeout.orElse(0L).intValue()); - socket.setTcpNoDelay(true); - socket.setKeepAlive(true); - - // should we secure the connection? - if (sslContext.isPresent()) { - socketFactory = sslContext.get().getSocketFactory(); - SSLSocketFactory sslSf = (SSLSocketFactory) socketFactory; - sslSocket = (SSLSocket) sslSf.createSocket(socket, - socket.getInetAddress().getHostAddress(), - socket.getPort(), - true); - - // replace input/output streams - readStream = new DataInputStream(sslSocket.getInputStream()); - writeStream = sslSocket.getOutputStream(); - - // execute SSL handshake - sslSocket.startHandshake(); - } else { - writeStream = socket.getOutputStream(); - readStream = new DataInputStream(socket.getInputStream()); - } - - // execute RethinkDB handshake - - // initialize handshake - Optional toWrite = handshake.nextMessage(null); - // Sit in the handshake until it's completed. Exceptions will be thrown if - // anything goes wrong. - while(!handshake.isFinished()) { - if (toWrite.isPresent()) { - write(toWrite.get()); - } - String serverMsg = readNullTerminatedString(deadline); - toWrite = handshake.nextMessage(serverMsg); - } - } catch (IOException e) { - throw new ReqlDriverError("Connection timed out.", e); - } - } - - void write(ByteBuffer buffer) { - try { - buffer.flip(); - writeStream.write(buffer.array()); - } catch (IOException e) { - throw new ReqlDriverError(e); - } - } - - /** - * Tries to read a null-terminated string from the socket. This operation may timeout if a timeout is specified. - * - * @param deadline an optional timeout. - * @return a string. - * @throws IOException - */ - private String readNullTerminatedString(Optional deadline) - throws IOException { - final StringBuilder sb = new StringBuilder(); - char c; - // set deadline instant - final Optional deadlineInstant = deadline.isPresent() ? Optional.of(System.currentTimeMillis() + deadline.get()) : Optional.empty(); - while ((c = (char) this.readStream.readByte()) != '\0') { - // is there a deadline? - if (deadlineInstant.isPresent()) { - // have we timed-out? - if (deadlineInstant.get() < System.currentTimeMillis()) { // reached time-out - throw new ReqlDriverError("Connection timed out."); - } - } - sb.append(c); - } - - return sb.toString(); - } - - /** - * Tries to read a {@link Response} from the socket. This operation is blocking. - * - * @return a {@link Response}. - * @throws IOException - */ - Response read() throws IOException { - final ByteBuffer header = readBytesToBuffer(12); - final long token = header.getLong(); - final int responseLength = header.getInt(); - return Response.parseFrom(token, readBytesToBuffer(responseLength).order(ByteOrder.LITTLE_ENDIAN)); - } - - private ByteBuffer readBytesToBuffer(int bufsize) throws IOException { - byte[] buf = new byte[bufsize]; - int bytesRead = 0; - while (bytesRead < bufsize) { - final int res = this.readStream.read(buf, bytesRead, bufsize - bytesRead); - if (res == -1) { - throw new ReqlDriverError("Reached the end of the read stream."); - } else { - bytesRead += res; - } - } - return ByteBuffer.wrap(buf).order(ByteOrder.LITTLE_ENDIAN); - } - - public Optional clientPort() { - Optional ret; - if (socket != null) { - ret = Optional.ofNullable(socket.getLocalPort()); - } else { - ret = Optional.empty(); - } - return ret; - } - - public Optional clientAddress() { - return Optional.ofNullable(socket.getLocalSocketAddress()); - } - /** - * Tells whether we have a working connection or not. - * - * @return true if connection is connected and open, false otherwise. - */ - boolean isOpen() { - return socket == null ? false : socket.isConnected() && !socket.isClosed(); - } - - /** - * Close connection. - */ - void close() { - // if needed, disconnect from server - if (socket != null && isOpen()) - try { - socket.close(); - } catch (IOException e) { - throw new ReqlDriverError(e); - } - } -} diff --git a/drivers/java/src/main/java/com/rethinkdb/net/Util.java b/drivers/java/src/main/java/com/rethinkdb/net/Util.java deleted file mode 100644 index 0fe25aa6575..00000000000 --- a/drivers/java/src/main/java/com/rethinkdb/net/Util.java +++ /dev/null @@ -1,100 +0,0 @@ -package com.rethinkdb.net; - -import com.rethinkdb.RethinkDB; -import org.json.simple.JSONObject; -import org.json.simple.JSONValue; -import org.slf4j.Logger; -import org.slf4j.LoggerFactory; - -import java.io.ByteArrayInputStream; -import java.io.InputStreamReader; -import java.nio.ByteBuffer; -import java.nio.ByteOrder; -import java.nio.charset.StandardCharsets; -import java.util.*; - -public class Util { - - public static long deadline(long timeout) { - return System.currentTimeMillis() + timeout; - } - - private static Logger log = LoggerFactory.getLogger(Util.class); - public static ByteBuffer leByteBuffer(int capacity) { - // Creating the ByteBuffer over an underlying array makes - // it easier to turn into a string later. - byte[] underlying = new byte[capacity]; - return ByteBuffer.wrap(underlying) - .order(ByteOrder.LITTLE_ENDIAN); - } - - public static String bufferToString(ByteBuffer buf) { - // This should only be used on ByteBuffers we've created by - // wrapping an array - return new String(buf.array(), StandardCharsets.UTF_8); - } - - public static JSONObject toJSON(String str) { - return (JSONObject) JSONValue.parse(str); - } - - public static JSONObject toJSON(ByteBuffer buf) { - InputStreamReader codepointReader = - new InputStreamReader(new ByteArrayInputStream(buf.array())); - return (JSONObject) JSONValue.parse(codepointReader); - } - - public static T convertToPojo(Object value, Optional> pojoClass) { - return !pojoClass.isPresent() || !(value instanceof Map) - ? (T) value - : (T) toPojo(pojoClass.get(), (Map) value); - } - - public static byte[] toUTF8(String s) { - return s.getBytes(StandardCharsets.UTF_8); - } - - public static String fromUTF8(byte[] ba) { - return new String(ba, StandardCharsets.UTF_8); - } - - /** - * Converts a String-to-Object map to a POJO using bean introspection.
- * The POJO's class must be public and satisfy one of the following conditions:
- * 1. Should have a public parameterless constructor and public setters for all properties - * in the map. Properties with no corresponding entries in the map would have default values
- * 2. Should have a public constructor with parameters matching the contents of the map - * either by names and value types. Names of parameters are only available since Java 8 - * and only in case javac is run with -parameters argument.
- * If the POJO's class doesn't satisfy the conditions, a ReqlDriverError is thrown. - * @param POJO's type - * @param pojoClass POJO's class to be instantiated - * @param map Map to be converted - * @return Instantiated POJO - */ - @SuppressWarnings("unchecked") - private static T toPojo(Class pojoClass, Map map) { - // Jackson will throw an error if the POJO is not annotated with an ignore - // annotation and the server gives a value that is not a field within the POJO To - // prevent this, we get a list of all the field names from the class, and iterate - // through the map. If the map contains a key that the does not correlate to a - // field name, then that entry from the map is removed and we log an error. - List nameFields = new ArrayList<>(); - Arrays.asList(pojoClass.getDeclaredFields()).forEach(field -> nameFields.add(field.getName())); - List toRemove = new ArrayList<>(); - - map.keySet().forEach(s -> { - if (!nameFields.contains(s)) - { - log.error("Got JSON field [" + s + "] from server. POJO does not contain field, removing from map!"); - toRemove.add(s); - } - }); - toRemove.forEach(map::remove); - - return RethinkDB.getObjectMapper().convertValue(map, pojoClass); - } -} - - - diff --git a/drivers/java/src/test/java/com/rethinkdb/AuthTest.java b/drivers/java/src/test/java/com/rethinkdb/AuthTest.java deleted file mode 100644 index 28f04aeee3c..00000000000 --- a/drivers/java/src/test/java/com/rethinkdb/AuthTest.java +++ /dev/null @@ -1,58 +0,0 @@ -package com.rethinkdb; - -import com.rethinkdb.gen.exc.ReqlDriverError; -import com.rethinkdb.model.MapObject; -import com.rethinkdb.model.OptArgs; -import com.rethinkdb.net.Connection; -import com.rethinkdb.net.Cursor; -import net.jodah.concurrentunit.Waiter; -import org.junit.*; -import org.junit.rules.ExpectedException; - -import java.time.OffsetDateTime; -import java.util.Arrays; -import java.util.List; -import java.util.Map; -import java.util.Properties; - -import static org.junit.Assert.assertEquals; -import static org.junit.Assert.assertTrue; - -public class AuthTest { - public static final RethinkDB r = RethinkDB.r; - static final String bogusUsername = "bogus_guy"; - static final String bogusPassword = "bogus_man+=,"; - - @Rule - public ExpectedException expectedEx = ExpectedException.none(); - - @BeforeClass - public static void oneTimeSetUp() throws Exception { - Connection adminConn = TestingFramework.createConnection(); - r.db("rethinkdb").table("users").insert( - r.hashMap("id", bogusUsername) - .with("password", bogusPassword)) - .run(adminConn); - adminConn.close(); - } - - @AfterClass - public static void oneTimeTearDown() throws Exception { - Connection adminConn = TestingFramework.createConnection(); - r.db("rethinkdb").table("users").get(bogusUsername).delete(); - adminConn.close(); - } - - @Test - public void testConnectWithNonAdminUser() throws Exception { - Connection bogusConn = TestingFramework.defaultConnectionBuilder().clone() - .user(bogusUsername, bogusPassword).connect(); - bogusConn.close(); - } - - @Test (expected=ReqlDriverError.class) - public void testConnectWithBothAuthKeyAndUsername() throws Exception { - Connection bogusConn = TestingFramework.defaultConnectionBuilder().clone() - .user(bogusUsername, bogusPassword).authKey("test").connect(); - } -} diff --git a/drivers/java/src/test/java/com/rethinkdb/RethinkDBTest.java b/drivers/java/src/test/java/com/rethinkdb/RethinkDBTest.java deleted file mode 100644 index e3cc44d59e2..00000000000 --- a/drivers/java/src/test/java/com/rethinkdb/RethinkDBTest.java +++ /dev/null @@ -1,433 +0,0 @@ -package com.rethinkdb; - -import com.rethinkdb.gen.exc.ReqlError; -import com.rethinkdb.gen.exc.ReqlQueryLogicError; -import com.rethinkdb.model.MapObject; -import com.rethinkdb.model.OptArgs; -import com.rethinkdb.net.Connection; -import com.rethinkdb.net.Cursor; -import net.jodah.concurrentunit.Waiter; -import org.junit.*; -import org.junit.rules.ExpectedException; - -import java.lang.reflect.Field; -import java.time.OffsetDateTime; -import java.util.Arrays; -import java.util.List; -import java.util.Map; -import java.util.concurrent.TimeoutException; -import java.util.concurrent.atomic.AtomicInteger; - -import static org.junit.Assert.assertEquals; -import static org.junit.Assert.assertTrue; - -public class RethinkDBTest{ - - public static final RethinkDB r = RethinkDB.r; - Connection conn; - public static final String dbName = "javatests"; - public static final String tableName = "atest"; - - @Rule - public ExpectedException expectedEx = ExpectedException.none(); - - @BeforeClass - public static void oneTimeSetUp() throws Exception { - Connection conn = TestingFramework.createConnection(); - try{ - r.dbCreate(dbName).run(conn); - } catch(ReqlError e){} - try { - r.db(dbName).wait_().run(conn); - r.db(dbName).tableCreate(tableName).run(conn); - r.db(dbName).table(tableName).wait_().run(conn); - } catch(ReqlError e){} - conn.close(); - } - - @AfterClass - public static void oneTimeTearDown() throws Exception { - Connection conn = TestingFramework.createConnection(); - try { - r.db(dbName).tableDrop(tableName).run(conn); - r.dbDrop(dbName).run(conn); - } catch(ReqlError e){} - conn.close(); - } - - @Before - public void setUp() throws Exception { - conn = TestingFramework.createConnection(); - r.db(dbName).table(tableName).delete().run(conn); - } - - @After - public void tearDown() throws Exception { - conn.close(); - } - - @Test - public void testBooleans() throws Exception { - Boolean t = r.expr(true).run(conn); - Assert.assertEquals(t.booleanValue(), true); - - Boolean f = r.expr(false).run(conn); - Assert.assertEquals(f.booleanValue(), false); - - String trueType = r.expr(true).typeOf().run(conn); - Assert.assertEquals(trueType, "BOOL"); - - String falseString = r.expr(false).coerceTo("string").run(conn); - Assert.assertEquals(falseString, "false"); - - Boolean boolCoerce = r.expr(true).coerceTo("bool").run(conn); - Assert.assertEquals(boolCoerce.booleanValue(), true); - } - - @Test - public void testNull() { - Object o = r.expr(null).run(conn); - Assert.assertEquals(o, null); - - String nullType = r.expr(null).typeOf().run(conn); - Assert.assertEquals(nullType, "NULL"); - - String nullCoerce = r.expr(null).coerceTo("string").run(conn); - Assert.assertEquals(nullCoerce, "null"); - - Object n = r.expr(null).coerceTo("null").run(conn); - Assert.assertEquals(n, null); - } - - @Test - public void testString() { - String str = r.expr("str").run(conn); - Assert.assertEquals(str, "str"); - - String unicode = r.expr("こんにちは").run(conn); - Assert.assertEquals(unicode, "こんにちは"); - - String strType = r.expr("foo").typeOf().run(conn); - Assert.assertEquals(strType, "STRING"); - - String strCoerce = r.expr("foo").coerceTo("string").run(conn); - Assert.assertEquals(strCoerce, "foo"); - - Number nmb12 = r.expr("-1.2").coerceTo("NUMBER").run(conn); - Assert.assertEquals(nmb12, -1.2); - - Long nmb10 = r.expr("0xa").coerceTo("NUMBER").run(conn); - Assert.assertEquals(nmb10.longValue(), 10L); - } - - @Test - public void testDate() { - OffsetDateTime date = OffsetDateTime.now(); - OffsetDateTime result = r.expr(date).run(conn); - Assert.assertEquals(date, result); - } - - @Test - public void testCoerceFailureDoubleNegative() { - expectedEx.expect(ReqlQueryLogicError.class); - expectedEx.expectMessage("Could not coerce `--1.2` to NUMBER."); - r.expr("--1.2").coerceTo("NUMBER").run(conn); - } - - @Test - public void testCoerceFailureTrailingNegative() { - expectedEx.expect(ReqlQueryLogicError.class); - expectedEx.expectMessage("Could not coerce `-1.2-` to NUMBER."); - r.expr("-1.2-").coerceTo("NUMBER").run(conn); - } - - @Test - public void testCoerceFailureInfinity() { - expectedEx.expect(ReqlQueryLogicError.class); - expectedEx.expectMessage("Non-finite number: inf"); - r.expr("inf").coerceTo("NUMBER").run(conn); - } - - @Test - public void testSplitEdgeCases() { - List emptySplitNothing = r.expr("").split().run(conn); - Assert.assertEquals(emptySplitNothing, Arrays.asList()); - - List nullSplit = r.expr("").split(null).run(conn); - Assert.assertEquals(nullSplit, Arrays.asList()); - - List emptySplitSpace = r.expr("").split(" ").run(conn); - Assert.assertEquals(Arrays.asList(""), emptySplitSpace); - - List emptySplitEmpty = r.expr("").split("").run(conn); - assertEquals(Arrays.asList(), emptySplitEmpty); - - List emptySplitNull5 = r.expr("").split(null, 5).run(conn); - assertEquals(Arrays.asList(), emptySplitNull5); - - List emptySplitSpace5 = r.expr("").split(" ", 5).run(conn); - assertEquals(Arrays.asList(""), emptySplitSpace5); - - List emptySplitEmpty5 = r.expr("").split("", 5).run(conn); - assertEquals(Arrays.asList(), emptySplitEmpty5); - } - - @Test - public void testSplitWithNullOrWhitespace() { - List extraWhitespace = r.expr("aaaa bbbb cccc ").split().run(conn); - assertEquals(Arrays.asList("aaaa", "bbbb", "cccc"), extraWhitespace); - - List extraWhitespaceNull = r.expr("aaaa bbbb cccc ").split(null).run(conn); - assertEquals(Arrays.asList("aaaa", "bbbb", "cccc"), extraWhitespaceNull); - - List extraWhitespaceSpace = r.expr("aaaa bbbb cccc ").split(" ").run(conn); - assertEquals(Arrays.asList("aaaa", "bbbb", "", "cccc", ""), extraWhitespaceSpace); - - List extraWhitespaceEmpty = r.expr("aaaa bbbb cccc ").split("").run(conn); - assertEquals(Arrays.asList("a", "a", "a", "a", " ", - "b", "b", "b", "b", " ", " ", "c", "c", "c", "c", " "), extraWhitespaceEmpty); - } - - @Test - public void testSplitWithString() { - List b = r.expr("aaaa bbbb cccc ").split("b").run(conn); - assertEquals(Arrays.asList("aaaa ", "", "", "", " cccc "), b); - } - - @Test - public void testTableInsert(){ - MapObject foo = new MapObject() - .with("hi", "There") - .with("yes", 7) - .with("no", null ); - Map result = r.db(dbName).table(tableName).insert(foo).run(conn); - assertEquals(result.get("inserted"), 1L); - } - - @Test - public void testDbGlobalArgInserted() { - final String tblName = "test_global_optargs"; - - try { - r.dbCreate("test").run(conn); - } catch (Exception e) {} - - r.expr(r.array("optargs", "conn_default")).forEach(r::dbCreate).run(conn); - r.expr(r.array("test", "optargs", "conn_default")).forEach(dbName -> - r.db(dbName).tableCreate(tblName).do_((unused) -> - r.db(dbName).table(tblName).insert(r.hashMap("dbName", dbName).with("id", 1)) - ) - ).run(conn); - - try { - // no optarg set, no default db - conn.use(null); - Map x1 = r.table(tblName).get(1).run(conn); - assertEquals("test", x1.get("dbName")); - - // no optarg set, default db set - conn.use("conn_default"); - Map x2 = r.table(tblName).get(1).run(conn); - assertEquals("conn_default", x2.get("dbName")); - - // optarg set, no default db - conn.use(null); - Map x3 = r.table(tblName).get(1).run(conn, OptArgs.of("db", "optargs")); - assertEquals("optargs", x3.get("dbName")); - - // optarg set, default db - conn.use("conn_default"); - Map x4 = r.table(tblName).get(1).run(conn, OptArgs.of("db", "optargs")); - assertEquals("optargs", x4.get("dbName")); - - } finally { - conn.use(null); - r.expr(r.array("optargs", "conn_default")).forEach(r::dbDrop).run(conn); - r.db("test").tableDrop(tblName).run(conn); - } - } - - @Test - public void testFilter() { - r.db(dbName).table(tableName).insert(new MapObject().with("field", "123")).run(conn); - r.db(dbName).table(tableName).insert(new MapObject().with("field", "456")).run(conn); - - Cursor> allEntries = r.db(dbName).table(tableName).run(conn); - assertEquals(2, allEntries.toList().size()); - - // The following won't work, because r.row is not implemented in the Java driver. Use lambda syntax instead - // Cursor> oneEntryRow = r.db(dbName).table(tableName).filter(r.row("field").eq("456")).run(conn); - // assertEquals(1, oneEntryRow.toList().size()); - - Cursor> oneEntryLambda = r.db(dbName).table(tableName).filter(table -> table.getField("field").eq("456")).run(conn); - assertEquals(1, oneEntryLambda.toList().size()); - } - - @Test - public void testCursorTryWithResources() { - r.db(dbName).table(tableName).insert(new MapObject().with("field", "123")).run(conn); - r.db(dbName).table(tableName).insert(new MapObject().with("field", "456")).run(conn); - - try(Cursor> allEntries = r.db(dbName).table(tableName).run(conn)) { - assertEquals(2, allEntries.toList().size()); - } - } - - @Test - public void testTableSelectOfPojo() { - TestPojo pojo = new TestPojo("foo", new TestPojoInner(42L, true)); - Map pojoResult = r.db(dbName).table(tableName).insert(pojo).run(conn); - assertEquals(1L, pojoResult.get("inserted")); - - String key = (String) ((List) pojoResult.get("generated_keys")).get(0); - TestPojo result = r.db(dbName).table(tableName).get(key).run(conn, TestPojo.class); - - assertEquals("foo", result.getStringProperty()); - assertTrue(42L == result.getPojoProperty().getLongProperty()); - assertEquals(true, result.getPojoProperty().getBooleanProperty()); - } - - @Test(expected = ClassCastException.class) - public void testTableSelectOfPojo_withNoPojoClass_throwsException() { - TestPojo pojo = new TestPojo("foo", new TestPojoInner(42L, true)); - Map pojoResult = r.db(dbName).table(tableName).insert(pojo).run(conn); - assertEquals(1L, pojoResult.get("inserted")); - - String key = (String) ((List) pojoResult.get("generated_keys")).get(0); - TestPojo result = r.db(dbName).table(tableName).get(key).run(conn /* TestPojo.class is not specified */); - } - - @Test - public void testTableSelectOfPojoCursor() { - TestPojo pojoOne = new TestPojo("foo", new TestPojoInner(42L, true)); - TestPojo pojoTwo = new TestPojo("bar", new TestPojoInner(53L, false)); - Map pojoOneResult = r.db(dbName).table(tableName).insert(pojoOne).run(conn); - Map pojoTwoResult = r.db(dbName).table(tableName).insert(pojoTwo).run(conn); - assertEquals(1L, pojoOneResult.get("inserted")); - assertEquals(1L, pojoTwoResult.get("inserted")); - - Cursor cursor = r.db(dbName).table(tableName).run(conn, TestPojo.class); - List result = cursor.toList(); - assertEquals(2, result.size()); - - TestPojo pojoOneSelected = "foo".equals(result.get(0).getStringProperty()) ? result.get(0) : result.get(1); - TestPojo pojoTwoSelected = "bar".equals(result.get(0).getStringProperty()) ? result.get(0) : result.get(1); - - assertEquals("foo", pojoOneSelected.getStringProperty()); - assertTrue(42L == pojoOneSelected.getPojoProperty().getLongProperty()); - assertEquals(true, pojoOneSelected.getPojoProperty().getBooleanProperty()); - - assertEquals("bar", pojoTwoSelected.getStringProperty()); - assertTrue(53L == pojoTwoSelected.getPojoProperty().getLongProperty()); - assertEquals(false, pojoTwoSelected.getPojoProperty().getBooleanProperty()); - } - - @Test(expected = ClassCastException.class) - public void testTableSelectOfPojoCursor_withNoPojoClass_throwsException() { - TestPojo pojoOne = new TestPojo("foo", new TestPojoInner(42L, true)); - TestPojo pojoTwo = new TestPojo("bar", new TestPojoInner(53L, false)); - Map pojoOneResult = r.db(dbName).table(tableName).insert(pojoOne).run(conn); - Map pojoTwoResult = r.db(dbName).table(tableName).insert(pojoTwo).run(conn); - assertEquals(1L, pojoOneResult.get("inserted")); - assertEquals(1L, pojoTwoResult.get("inserted")); - - Cursor cursor = r.db(dbName).table(tableName).run(conn /* TestPojo.class is not specified */); - List result = cursor.toList(); - - TestPojo pojoSelected = result.get(0); - } - - @Test(timeout=20000) - public void testConcurrentWrites() throws TimeoutException, InterruptedException { - final int total = 500; - final AtomicInteger writeCounter = new AtomicInteger(0); - final Waiter waiter = new Waiter(); - for (int i = 0; i < total; i++) - new Thread(() -> { - final TestPojo pojo = new TestPojo("writezz", new TestPojoInner(10L, true)); - final Map result = r.db(dbName).table(tableName).insert(pojo).run(conn); - waiter.assertEquals(1L, result.get("inserted")); - writeCounter.getAndIncrement(); - waiter.resume(); - }).start(); - - waiter.await(2500, total); - - assertEquals(total, writeCounter.get()); - } - - @Test(timeout=20000) - public void testConcurrentReads() throws TimeoutException { - final int total = 500; - final AtomicInteger readCounter = new AtomicInteger(0); - - // write to the database and retrieve the id - final TestPojo pojo = new TestPojo("readzz", new TestPojoInner(10L, true)); - final Map result = r.db(dbName).table(tableName).insert(pojo).optArg("return_changes", true).run(conn); - final String id = ((List) result.get("generated_keys")).get(0).toString(); - - final Waiter waiter = new Waiter(); - for (int i = 0; i < total; i++) - new Thread(() -> { - // make sure there's only one - final Cursor cursor = r.db(dbName).table(tableName).run(conn, TestPojo.class); - assertEquals(1, cursor.toList().size()); - // read that one - final TestPojo readPojo = r.db(dbName).table(tableName).get(id).run(conn, TestPojo.class); - waiter.assertNotNull(readPojo); - // assert inserted values - waiter.assertEquals("readzz", readPojo.getStringProperty()); - waiter.assertEquals(10L, readPojo.getPojoProperty().getLongProperty()); - waiter.assertEquals(true, readPojo.getPojoProperty().getBooleanProperty()); - readCounter.getAndIncrement(); - waiter.resume(); - }).start(); - - waiter.await(10000, total); - - assertEquals(total, readCounter.get()); - } - - @Test(timeout=20000) - public void testConcurrentCursor() throws TimeoutException, InterruptedException { - final int total = 500; - final Waiter waiter = new Waiter(); - for (int i = 0; i < total; i++) - new Thread(() -> { - final TestPojo pojo = new TestPojo("writezz", new TestPojoInner(10L, true)); - final Map result = r.db(dbName).table(tableName).insert(pojo).run(conn); - waiter.assertEquals(1L, result.get("inserted")); - waiter.resume(); - }).start(); - - waiter.await(2500, total); - - final Cursor all = r.db(dbName).table(tableName).run(conn); - assertEquals(total, all.toList().size()); - } - - @Test - public void testNoreply() throws Exception { - r.expr(null).runNoReply(conn); - } - - @Test - public void test_Changefeeds_Cursor_Close_cause_new_cursor_cause_memory_leak() throws Exception { - Field f_cursorCache = Connection.class.getDeclaredField("cursorCache"); - f_cursorCache.setAccessible(true); - - Map cursorCache = (Map) f_cursorCache.get(conn); - assertEquals(0, cursorCache.size()); - - Cursor c = r.db(dbName).table(tableName).changes().run(conn); - - try { - c.next(1000); - } catch (TimeoutException ex) { - } - c.close(); - - assertEquals(0, cursorCache.size()); - } -} - diff --git a/drivers/java/src/test/java/com/rethinkdb/TestPojo.java b/drivers/java/src/test/java/com/rethinkdb/TestPojo.java deleted file mode 100644 index 6f0ca529959..00000000000 --- a/drivers/java/src/test/java/com/rethinkdb/TestPojo.java +++ /dev/null @@ -1,22 +0,0 @@ -package com.rethinkdb; - -/** - * Has both public parameterless constructor and public parametrized constructor - */ -public class TestPojo { - private String stringProperty; - private TestPojoInner pojoProperty; - - public TestPojo() {} - - public TestPojo(String stringProperty, TestPojoInner pojoProperty) { - this.stringProperty = stringProperty; - this.pojoProperty = pojoProperty; - } - - public String getStringProperty() { return this.stringProperty; } - public TestPojoInner getPojoProperty() { return this.pojoProperty; } - - public void setStringProperty(String stringProperty) { this.stringProperty = stringProperty; } - public void setPojoProperty(TestPojoInner pojoProperty) { this.pojoProperty = pojoProperty; } -} diff --git a/drivers/java/src/test/java/com/rethinkdb/TestPojoInner.java b/drivers/java/src/test/java/com/rethinkdb/TestPojoInner.java deleted file mode 100644 index b8394228270..00000000000 --- a/drivers/java/src/test/java/com/rethinkdb/TestPojoInner.java +++ /dev/null @@ -1,23 +0,0 @@ -package com.rethinkdb; - -/** - * Has only public parametrized constructor and no public parameterless constructor - */ -public class TestPojoInner { - private Long longProperty; - private Boolean booleanProperty; - - public TestPojoInner() { - } - - public TestPojoInner(Long longProperty, Boolean booleanProperty) { - this.longProperty = longProperty; - this.booleanProperty = booleanProperty; - } - - public Long getLongProperty() { return this.longProperty; } - public Boolean getBooleanProperty() { return this.booleanProperty; } - - public void setLongProperty(Long longProperty) { this.longProperty = longProperty; } - public void setBooleanProperty(Boolean booleanProperty) { this.booleanProperty = booleanProperty; } -} diff --git a/drivers/java/src/test/java/com/rethinkdb/TestingCommon.java b/drivers/java/src/test/java/com/rethinkdb/TestingCommon.java deleted file mode 100644 index 4313ea9a1e9..00000000000 --- a/drivers/java/src/test/java/com/rethinkdb/TestingCommon.java +++ /dev/null @@ -1,463 +0,0 @@ -package com.rethinkdb; - -import com.rethinkdb.ast.ReqlAst; -import com.rethinkdb.model.OptArgs; -import com.rethinkdb.net.Connection; -import com.rethinkdb.net.Cursor; - -import java.time.Instant; -import java.time.OffsetDateTime; -import java.time.ZoneOffset; -import java.util.ArrayList; -import java.util.Collections; -import java.util.List; -import java.util.Map; -import java.util.regex.Pattern; -import java.util.stream.Collectors; -import java.util.stream.LongStream; - -public final class TestingCommon { - - // Python test conversion compatibility definitions - - public static int len(List array) { - return array.size(); - } - - public static class Lst { - final List lst; - public Lst(List lst) { - this.lst = lst; - } - - public boolean equals(Object other) { - return lst.equals(other); - } - } - - public static class Bag { - final List lst; - public Bag(List lst) { - stringSort(lst); - this.lst = lst; - } - - public boolean equals(Object other) { - if(!(other instanceof List)) { - return false; - } - List otherList = (List) other; - stringSort(otherList); - return lst.equals(otherList); - } - - public void stringSort(List input) { - Collections.sort(input, (Object a, Object b) -> - a.toString().compareTo(b.toString())); - } - - public String toString() { - return "Bag(" + lst + ")"; - } - } - - public static Bag bag(List lst) { - return new Bag(lst); - } - - public static class Partial {} - - public static class PartialLst extends Partial { - final List lst; - public PartialLst(List lst){ - this.lst = lst; - } - - public String toString(){ - return "PartialLst(" + lst + ")"; - } - - public boolean equals(Object other) { - if(!(other instanceof List)) { - return false; - } - List otherList = (List) other; - if(lst.size() > otherList.size()){ - return false; - } - for(Object item: lst) { - if(otherList.indexOf(item) == -1){ - return false; - } - } - return true; - } - } - - public static PartialLst partial(List lst) { - return new PartialLst(lst); - } - - public static class Dct { - final Map dct; - public Dct(Map dct){ - this.dct = dct; - } - - public boolean equals(Object other) { - return dct.equals(other); - } - } - - public static class PartialDct extends Partial { - final Map dct; - public PartialDct(Map dct){ - this.dct = dct; - } - - public boolean equals(Object other_) { - if(!(other_ instanceof Map)) { - return false; - } - Map other = ((Map) other_); - for(Map.Entry entry : ((Map)dct).entrySet()){ - if(!other.containsKey(entry.getKey())){ - System.out.println("Obtained didn't have key " + entry.getKey()); - return false; - } - Object val = other.get(entry.getKey()); - if(entry.getValue() == null && val == null){ - continue; - } - if(entry.getValue() == null && val != null || - val == null && entry.getValue() != null){ - System.out.println("One was null and the other wasn't for key " + entry.getKey()); - return false; - } - if(!entry.getValue().equals(val)){ - System.out.println("Weren't equal: " + entry.getValue() + " and " + val); - return false; - } - } - return true; - } - - public String toString() { - return "PartialDct(" + dct + ")"; - } - } - public static PartialDct partial(Map dct) { - return new PartialDct(dct); - } - - public static class ArrLen { - final int length; - final Object thing; - public ArrLen(int length, Object thing) { - this.length = length; - this.thing = thing; - } - - public String toString() { - return "ArrLen(length="+length+" of "+thing+")"; - } - - public boolean equals(Object other) { - if(!(other instanceof List)){ - return false; - } - List otherList = (List) other; - if(length != otherList.size()) { - return false; - } - if(thing == null) { - return true; - } - for(Object item: otherList) { - if(!thing.equals(item)){ - return false; - } - } - return true; - } - } - - public static ArrLen arrlen(Long length, Object thing) { - return new ArrLen(length.intValue(), thing); - } - - public static ArrLen arrlen(Long length) { - return new ArrLen(length.intValue(), null); - } - - public static class UUIDMatch { - static final String uuidRgx = - "[a-z0-9]{8}-[a-z0-9]{4}-[a-z0-9]{4}-[a-z0-9]{4}-[a-z0-9]{12}"; - - public boolean equals(Object other) { - if(!(other instanceof String)) { - return false; - } - return Pattern.matches(uuidRgx, (String) other); - } - - public String toString() { - return "Uuid()"; - } - } - - public static UUIDMatch uuid() { - return new UUIDMatch(); - } - - public static class IntCmp { - final Long nbr; - public IntCmp(Long nbr) { - this.nbr = nbr; - } - public boolean equals(Object other) { - return nbr.equals(other); - } - } - - public static IntCmp int_cmp(Long nbr) { - return new IntCmp(nbr); - } - - public static class FloatCmp { - final Double nbr; - public FloatCmp(Double nbr) { - this.nbr = nbr; - } - public boolean equals(Object other) { - return nbr.equals(other); - } - } - - public static FloatCmp float_cmp(Double nbr) { - return new FloatCmp(nbr); - } - - public static class Regex { - public final Pattern pattern; - - public Regex(String regexString){ - this.pattern = Pattern.compile(regexString, Pattern.DOTALL); - } - - public String toString(){ - return "Regex(" + pattern + ")"; - } - - public boolean equals(Object other){ - if(!(other instanceof String)){ - return false; - }else{ - return pattern.matcher((String) other).matches(); - } - } - } - - public static Regex regex(String regexString){ - return new Regex(regexString); - } - - public static class Err { - public final Class clazz; - public final String message; - public final Pattern inRegex = Pattern.compile( - "^(?[^\n]*?)(?: in)?:\n.*$", - Pattern.DOTALL); - public final Pattern assertionRegex = Pattern.compile( - "^(?[^\n]*?)\nFailed assertion:.*$", - Pattern.DOTALL); - - public String toString() { - return "Err(" + clazz + ": " + message + ")"; - } - - public Err(String classname, String message) { - String clazzname = "com.rethinkdb.gen.exc." + classname; - try { - this.clazz = Class.forName(clazzname); - } catch (ClassNotFoundException cnfe) { - throw new RuntimeException("Bad exception class: "+clazzname, cnfe); - } - this.message = message; - } - - public boolean equals(Object other) { - if(!clazz.isInstance(other)) { - System.out.println("Classes didn't match: " - + clazz + " vs. " + other.getClass()); - return false; - } - String otherMessage = ((Exception) other).getMessage(); - otherMessage = inRegex.matcher(otherMessage) - .replaceFirst("${message}:"); - otherMessage = assertionRegex.matcher(otherMessage) - .replaceFirst("${message}"); - return message.equals(otherMessage); - } - } - - public static Err err(String classname, String message) { - return new Err(classname, message); - } - - public static Err err(String classname, String message, List _unused) { - return err(classname, message); - } - - public static class ErrRegex { - public final Class clazz; - public final String message_rgx; - - public ErrRegex(String classname, String message_rgx) { - String clazzname = "com.rethinkdb.gen.exc." + classname; - try { - this.clazz = Class.forName(clazzname); - } catch (ClassNotFoundException cnfe) { - throw new RuntimeException("Bad exception class: "+clazzname, cnfe); - } - this.message_rgx = message_rgx; - } - - public boolean equals(Object other) { - if(!clazz.isInstance(other)) { - return false; - } - return Pattern.matches(message_rgx, ((Exception)other).getMessage()); - } - } - - public static ErrRegex err_regex(String classname, String message_rgx) { - return new ErrRegex(classname, message_rgx); - } - - public static ErrRegex err_regex(String classname, String message_rgx, Object dummy) { - // Some invocations pass a stack frame as a third argument - return new ErrRegex(classname, message_rgx); - } - - public static ArrayList fetch(Object cursor_, long limit) throws Exception { - if(limit < 0) { - limit = Long.MAX_VALUE; - } - Cursor cursor = (Cursor) cursor_; - long total = 0; - ArrayList result = new ArrayList((int) limit); - for(long i = 0; i < limit; i++) { - if(!cursor.hasNext()){ - break; - } - result.add(cursor.next(500)); - } - return result; - } - - public static ArrayList fetch(Cursor cursor) throws Exception { - return fetch(cursor, -1); - } - - public static Object runOrCatch(Object query, OptArgs runopts, Connection conn) { - if(query == null) { - return null; - } - if(query instanceof List) { - return query; - } - try { - Object res = ((ReqlAst)query).run(conn, runopts); - if(res instanceof com.rethinkdb.net.Cursor) { - ArrayList ret = new ArrayList(); - ((com.rethinkdb.net.Cursor) res).forEachRemaining(ret::add); - return ret; - }else{ - return res; - } - } catch (Exception e) { - return e; - } - } - - public static LongStream range(long start, long stop) { - return LongStream.range(start, stop); - } - - public static List list(LongStream str) { - return str.boxed().collect(Collectors.toList()); - } - - public static class sys { - public static class floatInfo { - public static final Double min = Double.MIN_VALUE; - public static final Double max = Double.MAX_VALUE; - } - } - - public static ZoneOffset PacificTimeZone() { - return ZoneOffset.ofHours(-7); - } - - public static ZoneOffset UTCTimeZone() { - return ZoneOffset.ofHours(0); - } - - public static class datetime { - public static OffsetDateTime fromtimestamp(double seconds, ZoneOffset offset) { - Instant inst = Instant.ofEpochMilli( - (new Double(seconds * 1000)).longValue()); - return OffsetDateTime.ofInstant(inst, offset); - } - - public static OffsetDateTime now() { - return OffsetDateTime.now(); - } - } - - public static class ast { - public static ZoneOffset rqlTzinfo(String offset) { - if(offset.equals("00:00")){ - offset = "Z"; - } - return ZoneOffset.of(offset); - } - } - - public static Double float_(Double nbr) { - return nbr; - } - - public static Object wait_(long length) { - try { - Thread.sleep(length * 1000); - }catch(InterruptedException ie) {} - return null; - } - - public static Object maybeRun(Object query, Connection conn, OptArgs runopts) { - if (query instanceof ReqlAst) { - return ((ReqlAst)query).run(conn, runopts); - } else { - return query; - } - } - - public static Object maybeRun(Object query, Connection conn) { - if (query instanceof ReqlAst) { - return ((ReqlAst)query).run(conn); - } else { - return query; - } - } - - public static Object AnythingIsFine = new Object() { - public boolean equals(Object other) { - return true; - } - public String toString() { - return "AnythingIsFine"; - } - }; -} diff --git a/drivers/java/src/test/java/com/rethinkdb/TestingFramework.java b/drivers/java/src/test/java/com/rethinkdb/TestingFramework.java deleted file mode 100644 index 220dda9f9e0..00000000000 --- a/drivers/java/src/test/java/com/rethinkdb/TestingFramework.java +++ /dev/null @@ -1,89 +0,0 @@ -package com.rethinkdb; - -import com.rethinkdb.net.Connection; - -import java.io.*; -import java.util.Properties; - -/** - * Very basic testing framework lying miserably in the java's default package. - */ -public class TestingFramework { - - private static final String DEFAULT_CONFIG_RESOURCE = "default-config.properties"; - private static final String OVERRIDE_FILE_NAME = "test-config-override.properties"; - - // properties used to populate configuration - private static final String PROP_HOSTNAME = "hostName"; - private static final String PROP_PORT = "port"; - private static final String PROP_AUTHKEY = "authKey"; - - private static Connection.Builder defaultConnectionBuilder; - - /** - * Provision a connection builder based on the test configuration. - *

- * Put a propertiy file called "test-config-override.properties" in the working - * directory of the tests to override default values. - *

- * Example: - *

-     *     hostName=myHost
-     *     port=12345
-     * 
- *

- * - * @return Default connection builder. - */ - public static Connection.Builder defaultConnectionBuilder() { - if (defaultConnectionBuilder == null) { - Properties config = new Properties(); - - try (InputStream is = TestingFramework.class.getClassLoader().getResourceAsStream(DEFAULT_CONFIG_RESOURCE)) { - config.load(is); - } catch (NullPointerException | IOException e) { - throw new IllegalStateException(e); - } - - // Check the local override file. - String workdir = System.getProperty("user.dir"); - File defaultFile = new File(workdir, OVERRIDE_FILE_NAME); - if (defaultFile.exists()) { - try (InputStream is = new FileInputStream(defaultFile)) { - config.load(is); - } catch (IOException e) { - throw new IllegalStateException(e); - } - } - - // provision connection builder based on configuration - defaultConnectionBuilder = RethinkDB.r.connection(); - // mandatory fields - defaultConnectionBuilder = defaultConnectionBuilder.hostname(config.getProperty(PROP_HOSTNAME).trim()); - defaultConnectionBuilder = defaultConnectionBuilder.port(Integer.parseInt(config.getProperty(PROP_PORT).trim())); - // optinal fields - final String authKey = config.getProperty(PROP_AUTHKEY); - if (authKey != null) { - defaultConnectionBuilder.authKey(config.getProperty(PROP_AUTHKEY).trim()); - } - } - - return defaultConnectionBuilder; - } - - /** - * @return A new connection from the configuration. - */ - public static Connection createConnection() throws Exception { - return createConnection(defaultConnectionBuilder()); - } - - /** - * @return A new connection from a specific builder to be used in tests where a specific connection is needed, - * i.e. connection secured with SSL. - */ - public static Connection createConnection(Connection.Builder builder) throws Exception { - return builder.connect(); - } - -} diff --git a/drivers/java/src/test/java/com/rethinkdb/gen/ChangefeedsIncludeStates.java b/drivers/java/src/test/java/com/rethinkdb/gen/ChangefeedsIncludeStates.java deleted file mode 100644 index 730daa51576..00000000000 --- a/drivers/java/src/test/java/com/rethinkdb/gen/ChangefeedsIncludeStates.java +++ /dev/null @@ -1,355 +0,0 @@ -// Autogenerated by convert_tests.py and process_polyglot.py. -// Do not edit this file directly. -// The template for this file is located at: -// ../../../../../../../templates/Test.java -package com.rethinkdb.gen; - -import com.rethinkdb.RethinkDB; -import com.rethinkdb.gen.exc.*; -import com.rethinkdb.gen.ast.*; -import com.rethinkdb.ast.ReqlAst; -import com.rethinkdb.model.MapObject; -import com.rethinkdb.model.OptArgs; -import com.rethinkdb.net.Connection; -import com.rethinkdb.net.Cursor; -import junit.framework.TestCase; -import static org.junit.Assert.assertEquals; -import static org.junit.Assert.assertArrayEquals; -import org.slf4j.Logger; -import org.slf4j.LoggerFactory; - -import org.junit.*; -import org.junit.rules.ExpectedException; - -import java.util.Arrays; -import java.util.ArrayList; -import java.util.List; -import java.util.Map; -import java.util.Set; -import java.time.OffsetDateTime; -import java.time.ZoneOffset; -import java.time.Instant; -import java.util.stream.LongStream; -import java.util.stream.Collectors; -import java.util.stream.Stream; -import java.util.concurrent.TimeoutException; -import java.util.regex.Pattern; -import java.util.Collections; -import java.nio.charset.StandardCharsets; - -import static com.rethinkdb.TestingCommon.*; -import com.rethinkdb.TestingFramework; - -public class ChangefeedsIncludeStates { - // Test `include_states` - Logger logger = LoggerFactory.getLogger(ChangefeedsIncludeStates.class); - public static final RethinkDB r = RethinkDB.r; - public static final Table tbl = r.db("test").table("tbl"); - - Connection conn; - - @Before - public void setUp() throws Exception { - logger.info("Setting up."); - conn = TestingFramework.createConnection(); - try { - r.dbCreate("test").run(conn); - r.db("test").wait_().run(conn); - }catch (Exception e){} - try { - r.db("test").tableCreate("tbl").run(conn); - r.db("test").table(tbl).wait_().run(conn); - }catch (Exception e){} - } - - @After - public void tearDown() throws Exception { - logger.info("Tearing down."); - r.db("rethinkdb").table("_debug_scratch").delete().run(conn); - if(!conn.isOpen()){ - conn.close(); - conn = TestingFramework.createConnection(); - } - r.db("test").tableDrop("tbl").run(conn); - r.dbDrop("test").run(conn); - conn.close(false); - } - - // Autogenerated tests below - - @Test(timeout=120000) - public void test() throws Exception { - - { - // changefeeds/include_states.yaml line #4 - /* [{'state':'ready'}] */ - List expected_ = r.array(r.hashMap("state", "ready")); - /* tbl.changes(squash=true, include_states=true).limit(1) */ - logger.info("About to run line #4: tbl.changes().optArg('squash', true).optArg('include_states', true).limit(1L)"); - Object obtained = runOrCatch(tbl.changes().optArg("squash", true).optArg("include_states", true).limit(1L), - new OptArgs() - ,conn); - try { - assertEquals(expected_, obtained); - logger.info("Finished running line #4"); - } catch (Throwable ae) { - logger.error("Whoops, got exception on line #4:" + ae.toString()); - if(obtained instanceof Throwable) { - ae.addSuppressed((Throwable) obtained); - } - throw ae; - } - } - - { - // changefeeds/include_states.yaml line #9 - /* [{'state':'initializing'}, {'new_val':null}, {'state':'ready'}] */ - List expected_ = r.array(r.hashMap("state", "initializing"), r.hashMap("new_val", null), r.hashMap("state", "ready")); - /* tbl.get(0).changes(squash=true, include_states=true, include_initial=true).limit(3) */ - logger.info("About to run line #9: tbl.get(0L).changes().optArg('squash', true).optArg('include_states', true).optArg('include_initial', true).limit(3L)"); - Object obtained = runOrCatch(tbl.get(0L).changes().optArg("squash", true).optArg("include_states", true).optArg("include_initial", true).limit(3L), - new OptArgs() - ,conn); - try { - assertEquals(expected_, obtained); - logger.info("Finished running line #9"); - } catch (Throwable ae) { - logger.error("Whoops, got exception on line #9:" + ae.toString()); - if(obtained instanceof Throwable) { - ae.addSuppressed((Throwable) obtained); - } - throw ae; - } - } - - { - // changefeeds/include_states.yaml line #14 - /* [{'state':'initializing'}, {'state':'ready'}] */ - List expected_ = r.array(r.hashMap("state", "initializing"), r.hashMap("state", "ready")); - /* tbl.order_by(index='id').limit(10).changes(squash=true, include_states=true, include_initial=true).limit(2) */ - logger.info("About to run line #14: tbl.orderBy().optArg('index', 'id').limit(10L).changes().optArg('squash', true).optArg('include_states', true).optArg('include_initial', true).limit(2L)"); - Object obtained = runOrCatch(tbl.orderBy().optArg("index", "id").limit(10L).changes().optArg("squash", true).optArg("include_states", true).optArg("include_initial", true).limit(2L), - new OptArgs() - ,conn); - try { - assertEquals(expected_, obtained); - logger.info("Finished running line #14"); - } catch (Throwable ae) { - logger.error("Whoops, got exception on line #14:" + ae.toString()); - if(obtained instanceof Throwable) { - ae.addSuppressed((Throwable) obtained); - } - throw ae; - } - } - - { - // changefeeds/include_states.yaml line #19 - /* AnythingIsFine */ - Object expected_ = AnythingIsFine; - /* tbl.insert({'id':1}) */ - logger.info("About to run line #19: tbl.insert(r.hashMap('id', 1L))"); - Object obtained = runOrCatch(tbl.insert(r.hashMap("id", 1L)), - new OptArgs() - ,conn); - try { - assertEquals(expected_, obtained); - logger.info("Finished running line #19"); - } catch (Throwable ae) { - logger.error("Whoops, got exception on line #19:" + ae.toString()); - if(obtained instanceof Throwable) { - ae.addSuppressed((Throwable) obtained); - } - throw ae; - } - } - - { - // changefeeds/include_states.yaml line #21 - /* [{'state':'initializing'}, {'new_val':{'id':1}}, {'state':'ready'}] */ - List expected_ = r.array(r.hashMap("state", "initializing"), r.hashMap("new_val", r.hashMap("id", 1L)), r.hashMap("state", "ready")); - /* tbl.order_by(index='id').limit(10).changes(squash=true, include_states=true, include_initial=true).limit(3) */ - logger.info("About to run line #21: tbl.orderBy().optArg('index', 'id').limit(10L).changes().optArg('squash', true).optArg('include_states', true).optArg('include_initial', true).limit(3L)"); - Object obtained = runOrCatch(tbl.orderBy().optArg("index", "id").limit(10L).changes().optArg("squash", true).optArg("include_states", true).optArg("include_initial", true).limit(3L), - new OptArgs() - ,conn); - try { - assertEquals(expected_, obtained); - logger.info("Finished running line #21"); - } catch (Throwable ae) { - logger.error("Whoops, got exception on line #21:" + ae.toString()); - if(obtained instanceof Throwable) { - ae.addSuppressed((Throwable) obtained); - } - throw ae; - } - } - - // changefeeds/include_states.yaml line #26 - // tblchanges = tbl.changes(squash=true, include_states=true) - logger.info("Possibly executing: Changes tblchanges = (Changes) (tbl.changes().optArg('squash', true).optArg('include_states', true));"); - Object tblchanges = maybeRun((Changes) (tbl.changes().optArg("squash", true).optArg("include_states", true)), conn); - - { - // changefeeds/include_states.yaml line #30 - /* AnythingIsFine */ - Object expected_ = AnythingIsFine; - /* tbl.insert({'id':2}) */ - logger.info("About to run line #30: tbl.insert(r.hashMap('id', 2L))"); - Object obtained = runOrCatch(tbl.insert(r.hashMap("id", 2L)), - new OptArgs() - ,conn); - try { - assertEquals(expected_, obtained); - logger.info("Finished running line #30"); - } catch (Throwable ae) { - logger.error("Whoops, got exception on line #30:" + ae.toString()); - if(obtained instanceof Throwable) { - ae.addSuppressed((Throwable) obtained); - } - throw ae; - } - } - - { - // changefeeds/include_states.yaml line #32 - /* [{'state':'ready'},{'new_val':{'id':2},'old_val':null}] */ - List expected_ = r.array(r.hashMap("state", "ready"), r.hashMap("new_val", r.hashMap("id", 2L)).with("old_val", null)); - /* fetch(tblchanges, 2) */ - logger.info("About to run line #32: fetch(tblchanges, 2L)"); - Object obtained = runOrCatch(fetch(tblchanges, 2L), - new OptArgs() - ,conn); - try { - assertEquals(expected_, obtained); - logger.info("Finished running line #32"); - } catch (Throwable ae) { - logger.error("Whoops, got exception on line #32:" + ae.toString()); - if(obtained instanceof Throwable) { - ae.addSuppressed((Throwable) obtained); - } - throw ae; - } - } - - // changefeeds/include_states.yaml line #35 - // getchanges = tbl.get(2).changes(include_states=true, include_initial=true) - logger.info("Possibly executing: Changes getchanges = (Changes) (tbl.get(2L).changes().optArg('include_states', true).optArg('include_initial', true));"); - Object getchanges = maybeRun((Changes) (tbl.get(2L).changes().optArg("include_states", true).optArg("include_initial", true)), conn); - - { - // changefeeds/include_states.yaml line #39 - /* AnythingIsFine */ - Object expected_ = AnythingIsFine; - /* tbl.get(2).update({'a':1}) */ - logger.info("About to run line #39: tbl.get(2L).update(r.hashMap('a', 1L))"); - Object obtained = runOrCatch(tbl.get(2L).update(r.hashMap("a", 1L)), - new OptArgs() - ,conn); - try { - assertEquals(expected_, obtained); - logger.info("Finished running line #39"); - } catch (Throwable ae) { - logger.error("Whoops, got exception on line #39:" + ae.toString()); - if(obtained instanceof Throwable) { - ae.addSuppressed((Throwable) obtained); - } - throw ae; - } - } - - { - // changefeeds/include_states.yaml line #41 - /* [{'state':'initializing'}, {'new_val':{'id':2}}, {'state':'ready'}, {'old_val':{'id':2},'new_val':{'id':2,'a':1}}] */ - List expected_ = r.array(r.hashMap("state", "initializing"), r.hashMap("new_val", r.hashMap("id", 2L)), r.hashMap("state", "ready"), r.hashMap("old_val", r.hashMap("id", 2L)).with("new_val", r.hashMap("id", 2L).with("a", 1L))); - /* fetch(getchanges, 4) */ - logger.info("About to run line #41: fetch(getchanges, 4L)"); - Object obtained = runOrCatch(fetch(getchanges, 4L), - new OptArgs() - ,conn); - try { - assertEquals(expected_, obtained); - logger.info("Finished running line #41"); - } catch (Throwable ae) { - logger.error("Whoops, got exception on line #41:" + ae.toString()); - if(obtained instanceof Throwable) { - ae.addSuppressed((Throwable) obtained); - } - throw ae; - } - } - - // changefeeds/include_states.yaml line #44 - // limitchanges = tbl.order_by(index='id').limit(10).changes(include_states=true, include_initial=true) - logger.info("Possibly executing: Changes limitchanges = (Changes) (tbl.orderBy().optArg('index', 'id').limit(10L).changes().optArg('include_states', true).optArg('include_initial', true));"); - Object limitchanges = maybeRun((Changes) (tbl.orderBy().optArg("index", "id").limit(10L).changes().optArg("include_states", true).optArg("include_initial", true)), conn); - - // changefeeds/include_states.yaml line #48 - // limitchangesdesc = tbl.order_by(index=r.desc('id')).limit(10).changes(include_states=true, include_initial=true) - logger.info("Possibly executing: Changes limitchangesdesc = (Changes) (tbl.orderBy().optArg('index', r.desc('id')).limit(10L).changes().optArg('include_states', true).optArg('include_initial', true));"); - Object limitchangesdesc = maybeRun((Changes) (tbl.orderBy().optArg("index", r.desc("id")).limit(10L).changes().optArg("include_states", true).optArg("include_initial", true)), conn); - - { - // changefeeds/include_states.yaml line #52 - /* AnythingIsFine */ - Object expected_ = AnythingIsFine; - /* tbl.insert({'id':3}) */ - logger.info("About to run line #52: tbl.insert(r.hashMap('id', 3L))"); - Object obtained = runOrCatch(tbl.insert(r.hashMap("id", 3L)), - new OptArgs() - ,conn); - try { - assertEquals(expected_, obtained); - logger.info("Finished running line #52"); - } catch (Throwable ae) { - logger.error("Whoops, got exception on line #52:" + ae.toString()); - if(obtained instanceof Throwable) { - ae.addSuppressed((Throwable) obtained); - } - throw ae; - } - } - - { - // changefeeds/include_states.yaml line #54 - /* [{'state':'initializing'}, {'new_val':{'id':1}}, {'new_val':{'a':1, 'id':2}}, {'state':'ready'}, {'old_val':null, 'new_val':{'id':3}}] */ - List expected_ = r.array(r.hashMap("state", "initializing"), r.hashMap("new_val", r.hashMap("id", 1L)), r.hashMap("new_val", r.hashMap("a", 1L).with("id", 2L)), r.hashMap("state", "ready"), r.hashMap("old_val", null).with("new_val", r.hashMap("id", 3L))); - /* fetch(limitchanges, 5) */ - logger.info("About to run line #54: fetch(limitchanges, 5L)"); - Object obtained = runOrCatch(fetch(limitchanges, 5L), - new OptArgs() - ,conn); - try { - assertEquals(expected_, obtained); - logger.info("Finished running line #54"); - } catch (Throwable ae) { - logger.error("Whoops, got exception on line #54:" + ae.toString()); - if(obtained instanceof Throwable) { - ae.addSuppressed((Throwable) obtained); - } - throw ae; - } - } - - { - // changefeeds/include_states.yaml line #57 - /* [{'state':'initializing'}, {'new_val':{'a':1, 'id':2}}, {'new_val':{'id':1}}, {'state':'ready'}, {'old_val':null, 'new_val':{'id':3}}] */ - List expected_ = r.array(r.hashMap("state", "initializing"), r.hashMap("new_val", r.hashMap("a", 1L).with("id", 2L)), r.hashMap("new_val", r.hashMap("id", 1L)), r.hashMap("state", "ready"), r.hashMap("old_val", null).with("new_val", r.hashMap("id", 3L))); - /* fetch(limitchangesdesc, 5) */ - logger.info("About to run line #57: fetch(limitchangesdesc, 5L)"); - Object obtained = runOrCatch(fetch(limitchangesdesc, 5L), - new OptArgs() - ,conn); - try { - assertEquals(expected_, obtained); - logger.info("Finished running line #57"); - } catch (Throwable ae) { - logger.error("Whoops, got exception on line #57:" + ae.toString()); - if(obtained instanceof Throwable) { - ae.addSuppressed((Throwable) obtained); - } - throw ae; - } - } - } -} diff --git a/drivers/java/src/test/java/com/rethinkdb/gen/ChangefeedsTable.java b/drivers/java/src/test/java/com/rethinkdb/gen/ChangefeedsTable.java deleted file mode 100644 index 47bd58e39bd..00000000000 --- a/drivers/java/src/test/java/com/rethinkdb/gen/ChangefeedsTable.java +++ /dev/null @@ -1,514 +0,0 @@ -// Autogenerated by convert_tests.py and process_polyglot.py. -// Do not edit this file directly. -// The template for this file is located at: -// ../../../../../../../templates/Test.java -package com.rethinkdb.gen; - -import com.rethinkdb.RethinkDB; -import com.rethinkdb.gen.exc.*; -import com.rethinkdb.gen.ast.*; -import com.rethinkdb.ast.ReqlAst; -import com.rethinkdb.model.MapObject; -import com.rethinkdb.model.OptArgs; -import com.rethinkdb.net.Connection; -import com.rethinkdb.net.Cursor; -import junit.framework.TestCase; -import static org.junit.Assert.assertEquals; -import static org.junit.Assert.assertArrayEquals; -import org.slf4j.Logger; -import org.slf4j.LoggerFactory; - -import org.junit.*; -import org.junit.rules.ExpectedException; - -import java.util.Arrays; -import java.util.ArrayList; -import java.util.List; -import java.util.Map; -import java.util.Set; -import java.time.OffsetDateTime; -import java.time.ZoneOffset; -import java.time.Instant; -import java.util.stream.LongStream; -import java.util.stream.Collectors; -import java.util.stream.Stream; -import java.util.concurrent.TimeoutException; -import java.util.regex.Pattern; -import java.util.Collections; -import java.nio.charset.StandardCharsets; - -import static com.rethinkdb.TestingCommon.*; -import com.rethinkdb.TestingFramework; - -public class ChangefeedsTable { - // Test changefeeds on a table - Logger logger = LoggerFactory.getLogger(ChangefeedsTable.class); - public static final RethinkDB r = RethinkDB.r; - public static final Table tbl = r.db("test").table("tbl"); - - Connection conn; - - @Before - public void setUp() throws Exception { - logger.info("Setting up."); - conn = TestingFramework.createConnection(); - try { - r.dbCreate("test").run(conn); - r.db("test").wait_().run(conn); - }catch (Exception e){} - try { - r.db("test").tableCreate("tbl").run(conn); - r.db("test").table(tbl).wait_().run(conn); - }catch (Exception e){} - } - - @After - public void tearDown() throws Exception { - logger.info("Tearing down."); - r.db("rethinkdb").table("_debug_scratch").delete().run(conn); - if(!conn.isOpen()){ - conn.close(); - conn = TestingFramework.createConnection(); - } - r.db("test").tableDrop("tbl").run(conn); - r.dbDrop("test").run(conn); - conn.close(false); - } - - // Autogenerated tests below - - @Test(timeout=120000) - public void test() throws Exception { - - // changefeeds/table.yaml line #9 - // all = tbl.changes() - logger.info("Possibly executing: Changes all = (Changes) (tbl.changes());"); - Object all = maybeRun((Changes) (tbl.changes()), conn); - - { - // changefeeds/table.yaml line #15 - /* partial({'errors':0, 'inserted':2}) */ - Partial expected_ = partial(r.hashMap("errors", 0L).with("inserted", 2L)); - /* tbl.insert([{'id':1}, {'id':2}]) */ - logger.info("About to run line #15: tbl.insert(r.array(r.hashMap('id', 1L), r.hashMap('id', 2L)))"); - Object obtained = runOrCatch(tbl.insert(r.array(r.hashMap("id", 1L), r.hashMap("id", 2L))), - new OptArgs() - ,conn); - try { - assertEquals(expected_, obtained); - logger.info("Finished running line #15"); - } catch (Throwable ae) { - logger.error("Whoops, got exception on line #15:" + ae.toString()); - if(obtained instanceof Throwable) { - ae.addSuppressed((Throwable) obtained); - } - throw ae; - } - } - - { - // changefeeds/table.yaml line #17 - /* bag([{'old_val':null, 'new_val':{'id':1}}, {'old_val':null, 'new_val':{'id':2}}]) */ - Bag expected_ = bag(r.array(r.hashMap("old_val", null).with("new_val", r.hashMap("id", 1L)), r.hashMap("old_val", null).with("new_val", r.hashMap("id", 2L)))); - /* fetch(all, 2) */ - logger.info("About to run line #17: fetch(all, 2L)"); - Object obtained = runOrCatch(fetch(all, 2L), - new OptArgs() - ,conn); - try { - assertEquals(expected_, obtained); - logger.info("Finished running line #17"); - } catch (Throwable ae) { - logger.error("Whoops, got exception on line #17:" + ae.toString()); - if(obtained instanceof Throwable) { - ae.addSuppressed((Throwable) obtained); - } - throw ae; - } - } - - { - // changefeeds/table.yaml line #22 - /* partial({'errors':0, 'replaced':1}) */ - Partial expected_ = partial(r.hashMap("errors", 0L).with("replaced", 1L)); - /* tbl.get(1).update({'version':1}) */ - logger.info("About to run line #22: tbl.get(1L).update(r.hashMap('version', 1L))"); - Object obtained = runOrCatch(tbl.get(1L).update(r.hashMap("version", 1L)), - new OptArgs() - ,conn); - try { - assertEquals(expected_, obtained); - logger.info("Finished running line #22"); - } catch (Throwable ae) { - logger.error("Whoops, got exception on line #22:" + ae.toString()); - if(obtained instanceof Throwable) { - ae.addSuppressed((Throwable) obtained); - } - throw ae; - } - } - - { - // changefeeds/table.yaml line #24 - /* [{'old_val':{'id':1}, 'new_val':{'id':1, 'version':1}}] */ - List expected_ = r.array(r.hashMap("old_val", r.hashMap("id", 1L)).with("new_val", r.hashMap("id", 1L).with("version", 1L))); - /* fetch(all, 1) */ - logger.info("About to run line #24: fetch(all, 1L)"); - Object obtained = runOrCatch(fetch(all, 1L), - new OptArgs() - ,conn); - try { - assertEquals(expected_, obtained); - logger.info("Finished running line #24"); - } catch (Throwable ae) { - logger.error("Whoops, got exception on line #24:" + ae.toString()); - if(obtained instanceof Throwable) { - ae.addSuppressed((Throwable) obtained); - } - throw ae; - } - } - - { - // changefeeds/table.yaml line #29 - /* partial({'errors':0, 'deleted':1}) */ - Partial expected_ = partial(r.hashMap("errors", 0L).with("deleted", 1L)); - /* tbl.get(1).delete() */ - logger.info("About to run line #29: tbl.get(1L).delete()"); - Object obtained = runOrCatch(tbl.get(1L).delete(), - new OptArgs() - ,conn); - try { - assertEquals(expected_, obtained); - logger.info("Finished running line #29"); - } catch (Throwable ae) { - logger.error("Whoops, got exception on line #29:" + ae.toString()); - if(obtained instanceof Throwable) { - ae.addSuppressed((Throwable) obtained); - } - throw ae; - } - } - - { - // changefeeds/table.yaml line #31 - /* [{'old_val':{'id':1, 'version':1}, 'new_val':null}] */ - List expected_ = r.array(r.hashMap("old_val", r.hashMap("id", 1L).with("version", 1L)).with("new_val", null)); - /* fetch(all, 1) */ - logger.info("About to run line #31: fetch(all, 1L)"); - Object obtained = runOrCatch(fetch(all, 1L), - new OptArgs() - ,conn); - try { - assertEquals(expected_, obtained); - logger.info("Finished running line #31"); - } catch (Throwable ae) { - logger.error("Whoops, got exception on line #31:" + ae.toString()); - if(obtained instanceof Throwable) { - ae.addSuppressed((Throwable) obtained); - } - throw ae; - } - } - - // changefeeds/table.yaml line #36 - // pluck = tbl.changes().pluck({'new_val':['version']}) - logger.info("Possibly executing: Pluck pluck = (Pluck) (tbl.changes().pluck(r.hashMap('new_val', r.array('version'))));"); - Object pluck = maybeRun((Pluck) (tbl.changes().pluck(r.hashMap("new_val", r.array("version")))), conn); - - { - // changefeeds/table.yaml line #37 - /* partial({'errors':0, 'inserted':1}) */ - Partial expected_ = partial(r.hashMap("errors", 0L).with("inserted", 1L)); - /* tbl.insert([{'id':5, 'version':5}]) */ - logger.info("About to run line #37: tbl.insert(r.array(r.hashMap('id', 5L).with('version', 5L)))"); - Object obtained = runOrCatch(tbl.insert(r.array(r.hashMap("id", 5L).with("version", 5L))), - new OptArgs() - ,conn); - try { - assertEquals(expected_, obtained); - logger.info("Finished running line #37"); - } catch (Throwable ae) { - logger.error("Whoops, got exception on line #37:" + ae.toString()); - if(obtained instanceof Throwable) { - ae.addSuppressed((Throwable) obtained); - } - throw ae; - } - } - - { - // changefeeds/table.yaml line #39 - /* [{'new_val':{'version':5}}] */ - List expected_ = r.array(r.hashMap("new_val", r.hashMap("version", 5L))); - /* fetch(pluck, 1) */ - logger.info("About to run line #39: fetch(pluck, 1L)"); - Object obtained = runOrCatch(fetch(pluck, 1L), - new OptArgs() - ,conn); - try { - assertEquals(expected_, obtained); - logger.info("Finished running line #39"); - } catch (Throwable ae) { - logger.error("Whoops, got exception on line #39:" + ae.toString()); - if(obtained instanceof Throwable) { - ae.addSuppressed((Throwable) obtained); - } - throw ae; - } - } - - { - // changefeeds/table.yaml line #44 - /* err('ReqlQueryLogicError', "Cannot call a terminal (`reduce`, `count`, etc.) on an infinite stream (such as a changefeed).") */ - Err expected_ = err("ReqlQueryLogicError", "Cannot call a terminal (`reduce`, `count`, etc.) on an infinite stream (such as a changefeed)."); - /* tbl.changes().order_by('id') */ - logger.info("About to run line #44: tbl.changes().orderBy('id')"); - Object obtained = runOrCatch(tbl.changes().orderBy("id"), - new OptArgs() - ,conn); - try { - assertEquals(expected_, obtained); - logger.info("Finished running line #44"); - } catch (Throwable ae) { - logger.error("Whoops, got exception on line #44:" + ae.toString()); - if(obtained instanceof Throwable) { - ae.addSuppressed((Throwable) obtained); - } - throw ae; - } - } - - // changefeeds/table.yaml line #59 - // overflow = tbl.changes() - logger.info("Possibly executing: Changes overflow = (Changes) (tbl.changes());"); - Object overflow = maybeRun((Changes) (tbl.changes()), conn, new OptArgs() - .with("changefeed_queue_size", 100L) - ); - - { - // changefeeds/table.yaml line #64 - /* AnythingIsFine */ - Object expected_ = AnythingIsFine; - /* tbl.insert(r.range(200).map(lambda x: {})) */ - logger.info("About to run line #64: tbl.insert(r.range(200L).map(x -> r.hashMap()))"); - Object obtained = runOrCatch(tbl.insert(r.range(200L).map(x -> r.hashMap())), - new OptArgs() - ,conn); - try { - assertEquals(expected_, obtained); - logger.info("Finished running line #64"); - } catch (Throwable ae) { - logger.error("Whoops, got exception on line #64:" + ae.toString()); - if(obtained instanceof Throwable) { - ae.addSuppressed((Throwable) obtained); - } - throw ae; - } - } - - { - // changefeeds/table.yaml line #66 - /* partial([{'error': regex('Changefeed cache over array size limit, skipped \d+ elements.')}]) */ - Partial expected_ = partial(r.array(r.hashMap("error", regex("Changefeed cache over array size limit, skipped \\d+ elements.")))); - /* fetch(overflow, 90) */ - logger.info("About to run line #66: fetch(overflow, 90L)"); - Object obtained = runOrCatch(fetch(overflow, 90L), - new OptArgs() - ,conn); - try { - assertEquals(expected_, obtained); - logger.info("Finished running line #66"); - } catch (Throwable ae) { - logger.error("Whoops, got exception on line #66:" + ae.toString()); - if(obtained instanceof Throwable) { - ae.addSuppressed((Throwable) obtained); - } - throw ae; - } - } - - // changefeeds/table.yaml line #71 - // vtbl = r.db('rethinkdb').table('_debug_scratch') - logger.info("Possibly executing: Table vtbl = (Table) (r.db('rethinkdb').table('_debug_scratch'));"); - Table vtbl = (Table) (r.db("rethinkdb").table("_debug_scratch")); - - // changefeeds/table.yaml line #72 - // allVirtual = vtbl.changes() - logger.info("Possibly executing: Changes allVirtual = (Changes) (vtbl.changes());"); - Object allVirtual = maybeRun((Changes) (vtbl.changes()), conn); - - { - // changefeeds/table.yaml line #76 - /* partial({'errors':0, 'inserted':2}) */ - Partial expected_ = partial(r.hashMap("errors", 0L).with("inserted", 2L)); - /* vtbl.insert([{'id':1}, {'id':2}]) */ - logger.info("About to run line #76: vtbl.insert(r.array(r.hashMap('id', 1L), r.hashMap('id', 2L)))"); - Object obtained = runOrCatch(vtbl.insert(r.array(r.hashMap("id", 1L), r.hashMap("id", 2L))), - new OptArgs() - ,conn); - try { - assertEquals(expected_, obtained); - logger.info("Finished running line #76"); - } catch (Throwable ae) { - logger.error("Whoops, got exception on line #76:" + ae.toString()); - if(obtained instanceof Throwable) { - ae.addSuppressed((Throwable) obtained); - } - throw ae; - } - } - - { - // changefeeds/table.yaml line #78 - /* bag([{'old_val':null, 'new_val':{'id':1}}, {'old_val':null, 'new_val':{'id':2}}]) */ - Bag expected_ = bag(r.array(r.hashMap("old_val", null).with("new_val", r.hashMap("id", 1L)), r.hashMap("old_val", null).with("new_val", r.hashMap("id", 2L)))); - /* fetch(allVirtual, 2) */ - logger.info("About to run line #78: fetch(allVirtual, 2L)"); - Object obtained = runOrCatch(fetch(allVirtual, 2L), - new OptArgs() - ,conn); - try { - assertEquals(expected_, obtained); - logger.info("Finished running line #78"); - } catch (Throwable ae) { - logger.error("Whoops, got exception on line #78:" + ae.toString()); - if(obtained instanceof Throwable) { - ae.addSuppressed((Throwable) obtained); - } - throw ae; - } - } - - { - // changefeeds/table.yaml line #83 - /* partial({'errors':0, 'replaced':1}) */ - Partial expected_ = partial(r.hashMap("errors", 0L).with("replaced", 1L)); - /* vtbl.get(1).update({'version':1}) */ - logger.info("About to run line #83: vtbl.get(1L).update(r.hashMap('version', 1L))"); - Object obtained = runOrCatch(vtbl.get(1L).update(r.hashMap("version", 1L)), - new OptArgs() - ,conn); - try { - assertEquals(expected_, obtained); - logger.info("Finished running line #83"); - } catch (Throwable ae) { - logger.error("Whoops, got exception on line #83:" + ae.toString()); - if(obtained instanceof Throwable) { - ae.addSuppressed((Throwable) obtained); - } - throw ae; - } - } - - { - // changefeeds/table.yaml line #85 - /* [{'old_val':{'id':1}, 'new_val':{'id':1, 'version':1}}] */ - List expected_ = r.array(r.hashMap("old_val", r.hashMap("id", 1L)).with("new_val", r.hashMap("id", 1L).with("version", 1L))); - /* fetch(allVirtual, 1) */ - logger.info("About to run line #85: fetch(allVirtual, 1L)"); - Object obtained = runOrCatch(fetch(allVirtual, 1L), - new OptArgs() - ,conn); - try { - assertEquals(expected_, obtained); - logger.info("Finished running line #85"); - } catch (Throwable ae) { - logger.error("Whoops, got exception on line #85:" + ae.toString()); - if(obtained instanceof Throwable) { - ae.addSuppressed((Throwable) obtained); - } - throw ae; - } - } - - { - // changefeeds/table.yaml line #90 - /* partial({'errors':0, 'deleted':1}) */ - Partial expected_ = partial(r.hashMap("errors", 0L).with("deleted", 1L)); - /* vtbl.get(1).delete() */ - logger.info("About to run line #90: vtbl.get(1L).delete()"); - Object obtained = runOrCatch(vtbl.get(1L).delete(), - new OptArgs() - ,conn); - try { - assertEquals(expected_, obtained); - logger.info("Finished running line #90"); - } catch (Throwable ae) { - logger.error("Whoops, got exception on line #90:" + ae.toString()); - if(obtained instanceof Throwable) { - ae.addSuppressed((Throwable) obtained); - } - throw ae; - } - } - - { - // changefeeds/table.yaml line #92 - /* [{'old_val':{'id':1, 'version':1}, 'new_val':null}] */ - List expected_ = r.array(r.hashMap("old_val", r.hashMap("id", 1L).with("version", 1L)).with("new_val", null)); - /* fetch(allVirtual, 1) */ - logger.info("About to run line #92: fetch(allVirtual, 1L)"); - Object obtained = runOrCatch(fetch(allVirtual, 1L), - new OptArgs() - ,conn); - try { - assertEquals(expected_, obtained); - logger.info("Finished running line #92"); - } catch (Throwable ae) { - logger.error("Whoops, got exception on line #92:" + ae.toString()); - if(obtained instanceof Throwable) { - ae.addSuppressed((Throwable) obtained); - } - throw ae; - } - } - - // changefeeds/table.yaml line #97 - // vpluck = vtbl.changes().pluck({'new_val':['version']}) - logger.info("Possibly executing: Pluck vpluck = (Pluck) (vtbl.changes().pluck(r.hashMap('new_val', r.array('version'))));"); - Object vpluck = maybeRun((Pluck) (vtbl.changes().pluck(r.hashMap("new_val", r.array("version")))), conn); - - { - // changefeeds/table.yaml line #98 - /* partial({'errors':0, 'inserted':1}) */ - Partial expected_ = partial(r.hashMap("errors", 0L).with("inserted", 1L)); - /* vtbl.insert([{'id':5, 'version':5}]) */ - logger.info("About to run line #98: vtbl.insert(r.array(r.hashMap('id', 5L).with('version', 5L)))"); - Object obtained = runOrCatch(vtbl.insert(r.array(r.hashMap("id", 5L).with("version", 5L))), - new OptArgs() - ,conn); - try { - assertEquals(expected_, obtained); - logger.info("Finished running line #98"); - } catch (Throwable ae) { - logger.error("Whoops, got exception on line #98:" + ae.toString()); - if(obtained instanceof Throwable) { - ae.addSuppressed((Throwable) obtained); - } - throw ae; - } - } - - { - // changefeeds/table.yaml line #100 - /* [{'new_val':{'version':5}}] */ - List expected_ = r.array(r.hashMap("new_val", r.hashMap("version", 5L))); - /* fetch(vpluck, 1) */ - logger.info("About to run line #100: fetch(vpluck, 1L)"); - Object obtained = runOrCatch(fetch(vpluck, 1L), - new OptArgs() - ,conn); - try { - assertEquals(expected_, obtained); - logger.info("Finished running line #100"); - } catch (Throwable ae) { - logger.error("Whoops, got exception on line #100:" + ae.toString()); - if(obtained instanceof Throwable) { - ae.addSuppressed((Throwable) obtained); - } - throw ae; - } - } - } -} diff --git a/drivers/java/src/test/java/com/rethinkdb/gen/DatumArray.java b/drivers/java/src/test/java/com/rethinkdb/gen/DatumArray.java deleted file mode 100644 index f0d81565c3d..00000000000 --- a/drivers/java/src/test/java/com/rethinkdb/gen/DatumArray.java +++ /dev/null @@ -1,1127 +0,0 @@ -// Autogenerated by convert_tests.py and process_polyglot.py. -// Do not edit this file directly. -// The template for this file is located at: -// ../../../../../../../templates/Test.java -package com.rethinkdb.gen; - -import com.rethinkdb.RethinkDB; -import com.rethinkdb.gen.exc.*; -import com.rethinkdb.gen.ast.*; -import com.rethinkdb.ast.ReqlAst; -import com.rethinkdb.model.MapObject; -import com.rethinkdb.model.OptArgs; -import com.rethinkdb.net.Connection; -import com.rethinkdb.net.Cursor; -import junit.framework.TestCase; -import static org.junit.Assert.assertEquals; -import static org.junit.Assert.assertArrayEquals; -import org.slf4j.Logger; -import org.slf4j.LoggerFactory; - -import org.junit.*; -import org.junit.rules.ExpectedException; - -import java.util.Arrays; -import java.util.ArrayList; -import java.util.List; -import java.util.Map; -import java.util.Set; -import java.time.OffsetDateTime; -import java.time.ZoneOffset; -import java.time.Instant; -import java.util.stream.LongStream; -import java.util.stream.Collectors; -import java.util.stream.Stream; -import java.util.concurrent.TimeoutException; -import java.util.regex.Pattern; -import java.util.Collections; -import java.nio.charset.StandardCharsets; - -import static com.rethinkdb.TestingCommon.*; -import com.rethinkdb.TestingFramework; - -public class DatumArray { - // Tests conversion to and from the RQL array type - Logger logger = LoggerFactory.getLogger(DatumArray.class); - public static final RethinkDB r = RethinkDB.r; - - Connection conn; - - @Before - public void setUp() throws Exception { - logger.info("Setting up."); - conn = TestingFramework.createConnection(); - try { - r.dbCreate("test").run(conn); - r.db("test").wait_().run(conn); - }catch (Exception e){} - } - - @After - public void tearDown() throws Exception { - logger.info("Tearing down."); - r.db("rethinkdb").table("_debug_scratch").delete().run(conn); - if(!conn.isOpen()){ - conn.close(); - conn = TestingFramework.createConnection(); - } - r.dbDrop("test").run(conn); - conn.close(false); - } - - // Autogenerated tests below - - @Test(timeout=120000) - public void test() throws Exception { - - { - // datum/array.yaml line #6 - /* [] */ - List expected_ = r.array(); - /* r.expr([]) */ - logger.info("About to run line #6: r.expr(r.array())"); - Object obtained = runOrCatch(r.expr(r.array()), - new OptArgs() - ,conn); - try { - assertEquals(expected_, obtained); - logger.info("Finished running line #6"); - } catch (Throwable ae) { - logger.error("Whoops, got exception on line #6:" + ae.toString()); - if(obtained instanceof Throwable) { - ae.addSuppressed((Throwable) obtained); - } - throw ae; - } - } - - { - // datum/array.yaml line #9 - /* [1] */ - List expected_ = r.array(1L); - /* r.expr([1]) */ - logger.info("About to run line #9: r.expr(r.array(1L))"); - Object obtained = runOrCatch(r.expr(r.array(1L)), - new OptArgs() - ,conn); - try { - assertEquals(expected_, obtained); - logger.info("Finished running line #9"); - } catch (Throwable ae) { - logger.error("Whoops, got exception on line #9:" + ae.toString()); - if(obtained instanceof Throwable) { - ae.addSuppressed((Throwable) obtained); - } - throw ae; - } - } - - { - // datum/array.yaml line #14 - /* [1,2,3,4,5] */ - List expected_ = r.array(1L, 2L, 3L, 4L, 5L); - /* r.expr([1,2,3,4,5]) */ - logger.info("About to run line #14: r.expr(r.array(1L, 2L, 3L, 4L, 5L))"); - Object obtained = runOrCatch(r.expr(r.array(1L, 2L, 3L, 4L, 5L)), - new OptArgs() - ,conn); - try { - assertEquals(expected_, obtained); - logger.info("Finished running line #14"); - } catch (Throwable ae) { - logger.error("Whoops, got exception on line #14:" + ae.toString()); - if(obtained instanceof Throwable) { - ae.addSuppressed((Throwable) obtained); - } - throw ae; - } - } - - { - // datum/array.yaml line #19 - /* 'ARRAY' */ - String expected_ = "ARRAY"; - /* r.expr([]).type_of() */ - logger.info("About to run line #19: r.expr(r.array()).typeOf()"); - Object obtained = runOrCatch(r.expr(r.array()).typeOf(), - new OptArgs() - ,conn); - try { - assertEquals(expected_, obtained); - logger.info("Finished running line #19"); - } catch (Throwable ae) { - logger.error("Whoops, got exception on line #19:" + ae.toString()); - if(obtained instanceof Throwable) { - ae.addSuppressed((Throwable) obtained); - } - throw ae; - } - } - - { - // datum/array.yaml line #24 - /* '[1,2]' */ - String expected_ = "[1,2]"; - /* r.expr([1, 2]).coerce_to('string') */ - logger.info("About to run line #24: r.expr(r.array(1L, 2L)).coerceTo('string')"); - Object obtained = runOrCatch(r.expr(r.array(1L, 2L)).coerceTo("string"), - new OptArgs() - ,conn); - try { - assertEquals(expected_, obtained); - logger.info("Finished running line #24"); - } catch (Throwable ae) { - logger.error("Whoops, got exception on line #24:" + ae.toString()); - if(obtained instanceof Throwable) { - ae.addSuppressed((Throwable) obtained); - } - throw ae; - } - } - - { - // datum/array.yaml line #25 - /* '[1,2]' */ - String expected_ = "[1,2]"; - /* r.expr([1, 2]).coerce_to('STRING') */ - logger.info("About to run line #25: r.expr(r.array(1L, 2L)).coerceTo('STRING')"); - Object obtained = runOrCatch(r.expr(r.array(1L, 2L)).coerceTo("STRING"), - new OptArgs() - ,conn); - try { - assertEquals(expected_, obtained); - logger.info("Finished running line #25"); - } catch (Throwable ae) { - logger.error("Whoops, got exception on line #25:" + ae.toString()); - if(obtained instanceof Throwable) { - ae.addSuppressed((Throwable) obtained); - } - throw ae; - } - } - - { - // datum/array.yaml line #28 - /* [1, 2] */ - List expected_ = r.array(1L, 2L); - /* r.expr([1, 2]).coerce_to('array') */ - logger.info("About to run line #28: r.expr(r.array(1L, 2L)).coerceTo('array')"); - Object obtained = runOrCatch(r.expr(r.array(1L, 2L)).coerceTo("array"), - new OptArgs() - ,conn); - try { - assertEquals(expected_, obtained); - logger.info("Finished running line #28"); - } catch (Throwable ae) { - logger.error("Whoops, got exception on line #28:" + ae.toString()); - if(obtained instanceof Throwable) { - ae.addSuppressed((Throwable) obtained); - } - throw ae; - } - } - - { - // datum/array.yaml line #31 - /* err('ReqlQueryLogicError', 'Cannot coerce ARRAY to NUMBER.', [0]) */ - Err expected_ = err("ReqlQueryLogicError", "Cannot coerce ARRAY to NUMBER.", r.array(0L)); - /* r.expr([1, 2]).coerce_to('number') */ - logger.info("About to run line #31: r.expr(r.array(1L, 2L)).coerceTo('number')"); - Object obtained = runOrCatch(r.expr(r.array(1L, 2L)).coerceTo("number"), - new OptArgs() - ,conn); - try { - assertEquals(expected_, obtained); - logger.info("Finished running line #31"); - } catch (Throwable ae) { - logger.error("Whoops, got exception on line #31:" + ae.toString()); - if(obtained instanceof Throwable) { - ae.addSuppressed((Throwable) obtained); - } - throw ae; - } - } - - { - // datum/array.yaml line #34 - /* {'a':1,'b':2} */ - Map expected_ = r.hashMap("a", 1L).with("b", 2L); - /* r.expr([['a', 1], ['b', 2]]).coerce_to('object') */ - logger.info("About to run line #34: r.expr(r.array(r.array('a', 1L), r.array('b', 2L))).coerceTo('object')"); - Object obtained = runOrCatch(r.expr(r.array(r.array("a", 1L), r.array("b", 2L))).coerceTo("object"), - new OptArgs() - ,conn); - try { - assertEquals(expected_, obtained); - logger.info("Finished running line #34"); - } catch (Throwable ae) { - logger.error("Whoops, got exception on line #34:" + ae.toString()); - if(obtained instanceof Throwable) { - ae.addSuppressed((Throwable) obtained); - } - throw ae; - } - } - - { - // datum/array.yaml line #37 - /* err('ReqlQueryLogicError', 'Expected array of size 2, but got size 0.') */ - Err expected_ = err("ReqlQueryLogicError", "Expected array of size 2, but got size 0."); - /* r.expr([[]]).coerce_to('object') */ - logger.info("About to run line #37: r.expr(r.array(r.array())).coerceTo('object')"); - Object obtained = runOrCatch(r.expr(r.array(r.array())).coerceTo("object"), - new OptArgs() - ,conn); - try { - assertEquals(expected_, obtained); - logger.info("Finished running line #37"); - } catch (Throwable ae) { - logger.error("Whoops, got exception on line #37:" + ae.toString()); - if(obtained instanceof Throwable) { - ae.addSuppressed((Throwable) obtained); - } - throw ae; - } - } - - { - // datum/array.yaml line #40 - /* err('ReqlQueryLogicError', 'Expected array of size 2, but got size 3.') */ - Err expected_ = err("ReqlQueryLogicError", "Expected array of size 2, but got size 3."); - /* r.expr([['1',2,3]]).coerce_to('object') */ - logger.info("About to run line #40: r.expr(r.array(r.array('1', 2L, 3L))).coerceTo('object')"); - Object obtained = runOrCatch(r.expr(r.array(r.array("1", 2L, 3L))).coerceTo("object"), - new OptArgs() - ,conn); - try { - assertEquals(expected_, obtained); - logger.info("Finished running line #40"); - } catch (Throwable ae) { - logger.error("Whoops, got exception on line #40:" + ae.toString()); - if(obtained instanceof Throwable) { - ae.addSuppressed((Throwable) obtained); - } - throw ae; - } - } - - { - // datum/array.yaml line #44 - /* [1] */ - List expected_ = r.array(1L); - /* r.expr([r.expr(1)]) */ - logger.info("About to run line #44: r.expr(r.array(r.expr(1L)))"); - Object obtained = runOrCatch(r.expr(r.array(r.expr(1L))), - new OptArgs() - ,conn); - try { - assertEquals(expected_, obtained); - logger.info("Finished running line #44"); - } catch (Throwable ae) { - logger.error("Whoops, got exception on line #44:" + ae.toString()); - if(obtained instanceof Throwable) { - ae.addSuppressed((Throwable) obtained); - } - throw ae; - } - } - - { - // datum/array.yaml line #47 - /* [1,2,3,4] */ - List expected_ = r.array(1L, 2L, 3L, 4L); - /* r.expr([1,3,4]).insert_at(1, 2) */ - logger.info("About to run line #47: r.expr(r.array(1L, 3L, 4L)).insertAt(1L, 2L)"); - Object obtained = runOrCatch(r.expr(r.array(1L, 3L, 4L)).insertAt(1L, 2L), - new OptArgs() - ,conn); - try { - assertEquals(expected_, obtained); - logger.info("Finished running line #47"); - } catch (Throwable ae) { - logger.error("Whoops, got exception on line #47:" + ae.toString()); - if(obtained instanceof Throwable) { - ae.addSuppressed((Throwable) obtained); - } - throw ae; - } - } - - { - // datum/array.yaml line #49 - /* [1,2,3] */ - List expected_ = r.array(1L, 2L, 3L); - /* r.expr([2,3]).insert_at(0, 1) */ - logger.info("About to run line #49: r.expr(r.array(2L, 3L)).insertAt(0L, 1L)"); - Object obtained = runOrCatch(r.expr(r.array(2L, 3L)).insertAt(0L, 1L), - new OptArgs() - ,conn); - try { - assertEquals(expected_, obtained); - logger.info("Finished running line #49"); - } catch (Throwable ae) { - logger.error("Whoops, got exception on line #49:" + ae.toString()); - if(obtained instanceof Throwable) { - ae.addSuppressed((Throwable) obtained); - } - throw ae; - } - } - - { - // datum/array.yaml line #51 - /* [1,2,3,4] */ - List expected_ = r.array(1L, 2L, 3L, 4L); - /* r.expr([1,2,3]).insert_at(-1, 4) */ - logger.info("About to run line #51: r.expr(r.array(1L, 2L, 3L)).insertAt(-1L, 4L)"); - Object obtained = runOrCatch(r.expr(r.array(1L, 2L, 3L)).insertAt(-1L, 4L), - new OptArgs() - ,conn); - try { - assertEquals(expected_, obtained); - logger.info("Finished running line #51"); - } catch (Throwable ae) { - logger.error("Whoops, got exception on line #51:" + ae.toString()); - if(obtained instanceof Throwable) { - ae.addSuppressed((Throwable) obtained); - } - throw ae; - } - } - - { - // datum/array.yaml line #53 - /* [1,2,3,4] */ - List expected_ = r.array(1L, 2L, 3L, 4L); - /* r.expr([1,2,3]).insert_at(3, 4) */ - logger.info("About to run line #53: r.expr(r.array(1L, 2L, 3L)).insertAt(3L, 4L)"); - Object obtained = runOrCatch(r.expr(r.array(1L, 2L, 3L)).insertAt(3L, 4L), - new OptArgs() - ,conn); - try { - assertEquals(expected_, obtained); - logger.info("Finished running line #53"); - } catch (Throwable ae) { - logger.error("Whoops, got exception on line #53:" + ae.toString()); - if(obtained instanceof Throwable) { - ae.addSuppressed((Throwable) obtained); - } - throw ae; - } - } - - { - // datum/array.yaml line #55 - /* AnythingIsFine */ - Object expected_ = AnythingIsFine; - /* r.expr(3).do(lambda x: r.expr([1,2,3]).insert_at(x, 4)) */ - logger.info("About to run line #55: r.expr(3L).do_(x -> r.expr(r.array(1L, 2L, 3L)).insertAt(x, 4L))"); - Object obtained = runOrCatch(r.expr(3L).do_(x -> r.expr(r.array(1L, 2L, 3L)).insertAt(x, 4L)), - new OptArgs() - ,conn); - try { - assertEquals(expected_, obtained); - logger.info("Finished running line #55"); - } catch (Throwable ae) { - logger.error("Whoops, got exception on line #55:" + ae.toString()); - if(obtained instanceof Throwable) { - ae.addSuppressed((Throwable) obtained); - } - throw ae; - } - } - - { - // datum/array.yaml line #59 - /* err('ReqlNonExistenceError', 'Index `4` out of bounds for array of size: `3`.', [0]) */ - Err expected_ = err("ReqlNonExistenceError", "Index `4` out of bounds for array of size: `3`.", r.array(0L)); - /* r.expr([1,2,3]).insert_at(4, 5) */ - logger.info("About to run line #59: r.expr(r.array(1L, 2L, 3L)).insertAt(4L, 5L)"); - Object obtained = runOrCatch(r.expr(r.array(1L, 2L, 3L)).insertAt(4L, 5L), - new OptArgs() - ,conn); - try { - assertEquals(expected_, obtained); - logger.info("Finished running line #59"); - } catch (Throwable ae) { - logger.error("Whoops, got exception on line #59:" + ae.toString()); - if(obtained instanceof Throwable) { - ae.addSuppressed((Throwable) obtained); - } - throw ae; - } - } - - { - // datum/array.yaml line #61 - /* err('ReqlNonExistenceError', 'Index out of bounds: -5', [0]) */ - Err expected_ = err("ReqlNonExistenceError", "Index out of bounds: -5", r.array(0L)); - /* r.expr([1,2,3]).insert_at(-5, -1) */ - logger.info("About to run line #61: r.expr(r.array(1L, 2L, 3L)).insertAt(-5L, -1L)"); - Object obtained = runOrCatch(r.expr(r.array(1L, 2L, 3L)).insertAt(-5L, -1L), - new OptArgs() - ,conn); - try { - assertEquals(expected_, obtained); - logger.info("Finished running line #61"); - } catch (Throwable ae) { - logger.error("Whoops, got exception on line #61:" + ae.toString()); - if(obtained instanceof Throwable) { - ae.addSuppressed((Throwable) obtained); - } - throw ae; - } - } - - { - // datum/array.yaml line #63 - /* err('ReqlQueryLogicError', 'Number not an integer: 1.5', [0]) */ - Err expected_ = err("ReqlQueryLogicError", "Number not an integer: 1.5", r.array(0L)); - /* r.expr([1,2,3]).insert_at(1.5, 1) */ - logger.info("About to run line #63: r.expr(r.array(1L, 2L, 3L)).insertAt(1.5, 1L)"); - Object obtained = runOrCatch(r.expr(r.array(1L, 2L, 3L)).insertAt(1.5, 1L), - new OptArgs() - ,conn); - try { - assertEquals(expected_, obtained); - logger.info("Finished running line #63"); - } catch (Throwable ae) { - logger.error("Whoops, got exception on line #63:" + ae.toString()); - if(obtained instanceof Throwable) { - ae.addSuppressed((Throwable) obtained); - } - throw ae; - } - } - - { - // datum/array.yaml line #65 - /* err('ReqlNonExistenceError', 'Expected type NUMBER but found NULL.', [0]) */ - Err expected_ = err("ReqlNonExistenceError", "Expected type NUMBER but found NULL.", r.array(0L)); - /* r.expr([1,2,3]).insert_at(null, 1) */ - logger.info("About to run line #65: r.expr(r.array(1L, 2L, 3L)).insertAt((ReqlExpr) null, 1L)"); - Object obtained = runOrCatch(r.expr(r.array(1L, 2L, 3L)).insertAt((ReqlExpr) null, 1L), - new OptArgs() - ,conn); - try { - assertEquals(expected_, obtained); - logger.info("Finished running line #65"); - } catch (Throwable ae) { - logger.error("Whoops, got exception on line #65:" + ae.toString()); - if(obtained instanceof Throwable) { - ae.addSuppressed((Throwable) obtained); - } - throw ae; - } - } - - { - // datum/array.yaml line #68 - /* [1,2,3,4] */ - List expected_ = r.array(1L, 2L, 3L, 4L); - /* r.expr([1,4]).splice_at(1, [2,3]) */ - logger.info("About to run line #68: r.expr(r.array(1L, 4L)).spliceAt(1L, r.array(2L, 3L))"); - Object obtained = runOrCatch(r.expr(r.array(1L, 4L)).spliceAt(1L, r.array(2L, 3L)), - new OptArgs() - ,conn); - try { - assertEquals(expected_, obtained); - logger.info("Finished running line #68"); - } catch (Throwable ae) { - logger.error("Whoops, got exception on line #68:" + ae.toString()); - if(obtained instanceof Throwable) { - ae.addSuppressed((Throwable) obtained); - } - throw ae; - } - } - - { - // datum/array.yaml line #70 - /* [1,2,3,4] */ - List expected_ = r.array(1L, 2L, 3L, 4L); - /* r.expr([3,4]).splice_at(0, [1,2]) */ - logger.info("About to run line #70: r.expr(r.array(3L, 4L)).spliceAt(0L, r.array(1L, 2L))"); - Object obtained = runOrCatch(r.expr(r.array(3L, 4L)).spliceAt(0L, r.array(1L, 2L)), - new OptArgs() - ,conn); - try { - assertEquals(expected_, obtained); - logger.info("Finished running line #70"); - } catch (Throwable ae) { - logger.error("Whoops, got exception on line #70:" + ae.toString()); - if(obtained instanceof Throwable) { - ae.addSuppressed((Throwable) obtained); - } - throw ae; - } - } - - { - // datum/array.yaml line #72 - /* [1,2,3,4] */ - List expected_ = r.array(1L, 2L, 3L, 4L); - /* r.expr([1,2]).splice_at(2, [3,4]) */ - logger.info("About to run line #72: r.expr(r.array(1L, 2L)).spliceAt(2L, r.array(3L, 4L))"); - Object obtained = runOrCatch(r.expr(r.array(1L, 2L)).spliceAt(2L, r.array(3L, 4L)), - new OptArgs() - ,conn); - try { - assertEquals(expected_, obtained); - logger.info("Finished running line #72"); - } catch (Throwable ae) { - logger.error("Whoops, got exception on line #72:" + ae.toString()); - if(obtained instanceof Throwable) { - ae.addSuppressed((Throwable) obtained); - } - throw ae; - } - } - - { - // datum/array.yaml line #74 - /* [1,2,3,4] */ - List expected_ = r.array(1L, 2L, 3L, 4L); - /* r.expr([1,2]).splice_at(-1, [3,4]) */ - logger.info("About to run line #74: r.expr(r.array(1L, 2L)).spliceAt(-1L, r.array(3L, 4L))"); - Object obtained = runOrCatch(r.expr(r.array(1L, 2L)).spliceAt(-1L, r.array(3L, 4L)), - new OptArgs() - ,conn); - try { - assertEquals(expected_, obtained); - logger.info("Finished running line #74"); - } catch (Throwable ae) { - logger.error("Whoops, got exception on line #74:" + ae.toString()); - if(obtained instanceof Throwable) { - ae.addSuppressed((Throwable) obtained); - } - throw ae; - } - } - - { - // datum/array.yaml line #76 - /* AnythingIsFine */ - Object expected_ = AnythingIsFine; - /* r.expr(2).do(lambda x: r.expr([1,2]).splice_at(x, [3,4])) */ - logger.info("About to run line #76: r.expr(2L).do_(x -> r.expr(r.array(1L, 2L)).spliceAt(x, r.array(3L, 4L)))"); - Object obtained = runOrCatch(r.expr(2L).do_(x -> r.expr(r.array(1L, 2L)).spliceAt(x, r.array(3L, 4L))), - new OptArgs() - ,conn); - try { - assertEquals(expected_, obtained); - logger.info("Finished running line #76"); - } catch (Throwable ae) { - logger.error("Whoops, got exception on line #76:" + ae.toString()); - if(obtained instanceof Throwable) { - ae.addSuppressed((Throwable) obtained); - } - throw ae; - } - } - - { - // datum/array.yaml line #80 - /* err('ReqlNonExistenceError', 'Index `3` out of bounds for array of size: `2`.', [0]) */ - Err expected_ = err("ReqlNonExistenceError", "Index `3` out of bounds for array of size: `2`.", r.array(0L)); - /* r.expr([1,2]).splice_at(3, [3,4]) */ - logger.info("About to run line #80: r.expr(r.array(1L, 2L)).spliceAt(3L, r.array(3L, 4L))"); - Object obtained = runOrCatch(r.expr(r.array(1L, 2L)).spliceAt(3L, r.array(3L, 4L)), - new OptArgs() - ,conn); - try { - assertEquals(expected_, obtained); - logger.info("Finished running line #80"); - } catch (Throwable ae) { - logger.error("Whoops, got exception on line #80:" + ae.toString()); - if(obtained instanceof Throwable) { - ae.addSuppressed((Throwable) obtained); - } - throw ae; - } - } - - { - // datum/array.yaml line #82 - /* err('ReqlNonExistenceError', 'Index out of bounds: -4', [0]) */ - Err expected_ = err("ReqlNonExistenceError", "Index out of bounds: -4", r.array(0L)); - /* r.expr([1,2]).splice_at(-4, [3,4]) */ - logger.info("About to run line #82: r.expr(r.array(1L, 2L)).spliceAt(-4L, r.array(3L, 4L))"); - Object obtained = runOrCatch(r.expr(r.array(1L, 2L)).spliceAt(-4L, r.array(3L, 4L)), - new OptArgs() - ,conn); - try { - assertEquals(expected_, obtained); - logger.info("Finished running line #82"); - } catch (Throwable ae) { - logger.error("Whoops, got exception on line #82:" + ae.toString()); - if(obtained instanceof Throwable) { - ae.addSuppressed((Throwable) obtained); - } - throw ae; - } - } - - { - // datum/array.yaml line #84 - /* err('ReqlQueryLogicError', 'Number not an integer: 1.5', [0]) */ - Err expected_ = err("ReqlQueryLogicError", "Number not an integer: 1.5", r.array(0L)); - /* r.expr([1,2,3]).splice_at(1.5, [1]) */ - logger.info("About to run line #84: r.expr(r.array(1L, 2L, 3L)).spliceAt(1.5, r.array(1L))"); - Object obtained = runOrCatch(r.expr(r.array(1L, 2L, 3L)).spliceAt(1.5, r.array(1L)), - new OptArgs() - ,conn); - try { - assertEquals(expected_, obtained); - logger.info("Finished running line #84"); - } catch (Throwable ae) { - logger.error("Whoops, got exception on line #84:" + ae.toString()); - if(obtained instanceof Throwable) { - ae.addSuppressed((Throwable) obtained); - } - throw ae; - } - } - - { - // datum/array.yaml line #86 - /* err('ReqlNonExistenceError', 'Expected type NUMBER but found NULL.', [0]) */ - Err expected_ = err("ReqlNonExistenceError", "Expected type NUMBER but found NULL.", r.array(0L)); - /* r.expr([1,2,3]).splice_at(null, [1]) */ - logger.info("About to run line #86: r.expr(r.array(1L, 2L, 3L)).spliceAt((ReqlExpr) null, r.array(1L))"); - Object obtained = runOrCatch(r.expr(r.array(1L, 2L, 3L)).spliceAt((ReqlExpr) null, r.array(1L)), - new OptArgs() - ,conn); - try { - assertEquals(expected_, obtained); - logger.info("Finished running line #86"); - } catch (Throwable ae) { - logger.error("Whoops, got exception on line #86:" + ae.toString()); - if(obtained instanceof Throwable) { - ae.addSuppressed((Throwable) obtained); - } - throw ae; - } - } - - { - // datum/array.yaml line #88 - /* err('ReqlQueryLogicError', 'Expected type ARRAY but found NUMBER.', [0]) */ - Err expected_ = err("ReqlQueryLogicError", "Expected type ARRAY but found NUMBER.", r.array(0L)); - /* r.expr([1,4]).splice_at(1, 2) */ - logger.info("About to run line #88: r.expr(r.array(1L, 4L)).spliceAt(1L, 2L)"); - Object obtained = runOrCatch(r.expr(r.array(1L, 4L)).spliceAt(1L, 2L), - new OptArgs() - ,conn); - try { - assertEquals(expected_, obtained); - logger.info("Finished running line #88"); - } catch (Throwable ae) { - logger.error("Whoops, got exception on line #88:" + ae.toString()); - if(obtained instanceof Throwable) { - ae.addSuppressed((Throwable) obtained); - } - throw ae; - } - } - - { - // datum/array.yaml line #91 - /* [2,3,4] */ - List expected_ = r.array(2L, 3L, 4L); - /* r.expr([1,2,3,4]).delete_at(0) */ - logger.info("About to run line #91: r.expr(r.array(1L, 2L, 3L, 4L)).deleteAt(0L)"); - Object obtained = runOrCatch(r.expr(r.array(1L, 2L, 3L, 4L)).deleteAt(0L), - new OptArgs() - ,conn); - try { - assertEquals(expected_, obtained); - logger.info("Finished running line #91"); - } catch (Throwable ae) { - logger.error("Whoops, got exception on line #91:" + ae.toString()); - if(obtained instanceof Throwable) { - ae.addSuppressed((Throwable) obtained); - } - throw ae; - } - } - - { - // datum/array.yaml line #93 - /* AnythingIsFine */ - Object expected_ = AnythingIsFine; - /* r.expr(0).do(lambda x: r.expr([1,2,3,4]).delete_at(x)) */ - logger.info("About to run line #93: r.expr(0L).do_(x -> r.expr(r.array(1L, 2L, 3L, 4L)).deleteAt(x))"); - Object obtained = runOrCatch(r.expr(0L).do_(x -> r.expr(r.array(1L, 2L, 3L, 4L)).deleteAt(x)), - new OptArgs() - ,conn); - try { - assertEquals(expected_, obtained); - logger.info("Finished running line #93"); - } catch (Throwable ae) { - logger.error("Whoops, got exception on line #93:" + ae.toString()); - if(obtained instanceof Throwable) { - ae.addSuppressed((Throwable) obtained); - } - throw ae; - } - } - - { - // datum/array.yaml line #97 - /* [1,2,3] */ - List expected_ = r.array(1L, 2L, 3L); - /* r.expr([1,2,3,4]).delete_at(-1) */ - logger.info("About to run line #97: r.expr(r.array(1L, 2L, 3L, 4L)).deleteAt(-1L)"); - Object obtained = runOrCatch(r.expr(r.array(1L, 2L, 3L, 4L)).deleteAt(-1L), - new OptArgs() - ,conn); - try { - assertEquals(expected_, obtained); - logger.info("Finished running line #97"); - } catch (Throwable ae) { - logger.error("Whoops, got exception on line #97:" + ae.toString()); - if(obtained instanceof Throwable) { - ae.addSuppressed((Throwable) obtained); - } - throw ae; - } - } - - { - // datum/array.yaml line #99 - /* [1,4] */ - List expected_ = r.array(1L, 4L); - /* r.expr([1,2,3,4]).delete_at(1,3) */ - logger.info("About to run line #99: r.expr(r.array(1L, 2L, 3L, 4L)).deleteAt(1L, 3L)"); - Object obtained = runOrCatch(r.expr(r.array(1L, 2L, 3L, 4L)).deleteAt(1L, 3L), - new OptArgs() - ,conn); - try { - assertEquals(expected_, obtained); - logger.info("Finished running line #99"); - } catch (Throwable ae) { - logger.error("Whoops, got exception on line #99:" + ae.toString()); - if(obtained instanceof Throwable) { - ae.addSuppressed((Throwable) obtained); - } - throw ae; - } - } - - { - // datum/array.yaml line #101 - /* [1,2,3,4] */ - List expected_ = r.array(1L, 2L, 3L, 4L); - /* r.expr([1,2,3,4]).delete_at(4,4) */ - logger.info("About to run line #101: r.expr(r.array(1L, 2L, 3L, 4L)).deleteAt(4L, 4L)"); - Object obtained = runOrCatch(r.expr(r.array(1L, 2L, 3L, 4L)).deleteAt(4L, 4L), - new OptArgs() - ,conn); - try { - assertEquals(expected_, obtained); - logger.info("Finished running line #101"); - } catch (Throwable ae) { - logger.error("Whoops, got exception on line #101:" + ae.toString()); - if(obtained instanceof Throwable) { - ae.addSuppressed((Throwable) obtained); - } - throw ae; - } - } - - { - // datum/array.yaml line #103 - /* [] */ - List expected_ = r.array(); - /* r.expr([]).delete_at(0,0) */ - logger.info("About to run line #103: r.expr(r.array()).deleteAt(0L, 0L)"); - Object obtained = runOrCatch(r.expr(r.array()).deleteAt(0L, 0L), - new OptArgs() - ,conn); - try { - assertEquals(expected_, obtained); - logger.info("Finished running line #103"); - } catch (Throwable ae) { - logger.error("Whoops, got exception on line #103:" + ae.toString()); - if(obtained instanceof Throwable) { - ae.addSuppressed((Throwable) obtained); - } - throw ae; - } - } - - { - // datum/array.yaml line #105 - /* [1,4] */ - List expected_ = r.array(1L, 4L); - /* r.expr([1,2,3,4]).delete_at(1,-1) */ - logger.info("About to run line #105: r.expr(r.array(1L, 2L, 3L, 4L)).deleteAt(1L, -1L)"); - Object obtained = runOrCatch(r.expr(r.array(1L, 2L, 3L, 4L)).deleteAt(1L, -1L), - new OptArgs() - ,conn); - try { - assertEquals(expected_, obtained); - logger.info("Finished running line #105"); - } catch (Throwable ae) { - logger.error("Whoops, got exception on line #105:" + ae.toString()); - if(obtained instanceof Throwable) { - ae.addSuppressed((Throwable) obtained); - } - throw ae; - } - } - - { - // datum/array.yaml line #107 - /* err('ReqlNonExistenceError', 'Index `4` out of bounds for array of size: `4`.', [0]) */ - Err expected_ = err("ReqlNonExistenceError", "Index `4` out of bounds for array of size: `4`.", r.array(0L)); - /* r.expr([1,2,3,4]).delete_at(4) */ - logger.info("About to run line #107: r.expr(r.array(1L, 2L, 3L, 4L)).deleteAt(4L)"); - Object obtained = runOrCatch(r.expr(r.array(1L, 2L, 3L, 4L)).deleteAt(4L), - new OptArgs() - ,conn); - try { - assertEquals(expected_, obtained); - logger.info("Finished running line #107"); - } catch (Throwable ae) { - logger.error("Whoops, got exception on line #107:" + ae.toString()); - if(obtained instanceof Throwable) { - ae.addSuppressed((Throwable) obtained); - } - throw ae; - } - } - - { - // datum/array.yaml line #109 - /* err('ReqlNonExistenceError', 'Index out of bounds: -5', [0]) */ - Err expected_ = err("ReqlNonExistenceError", "Index out of bounds: -5", r.array(0L)); - /* r.expr([1,2,3,4]).delete_at(-5) */ - logger.info("About to run line #109: r.expr(r.array(1L, 2L, 3L, 4L)).deleteAt(-5L)"); - Object obtained = runOrCatch(r.expr(r.array(1L, 2L, 3L, 4L)).deleteAt(-5L), - new OptArgs() - ,conn); - try { - assertEquals(expected_, obtained); - logger.info("Finished running line #109"); - } catch (Throwable ae) { - logger.error("Whoops, got exception on line #109:" + ae.toString()); - if(obtained instanceof Throwable) { - ae.addSuppressed((Throwable) obtained); - } - throw ae; - } - } - - { - // datum/array.yaml line #111 - /* err('ReqlQueryLogicError', 'Number not an integer: 1.5', [0]) */ - Err expected_ = err("ReqlQueryLogicError", "Number not an integer: 1.5", r.array(0L)); - /* r.expr([1,2,3]).delete_at(1.5) */ - logger.info("About to run line #111: r.expr(r.array(1L, 2L, 3L)).deleteAt(1.5)"); - Object obtained = runOrCatch(r.expr(r.array(1L, 2L, 3L)).deleteAt(1.5), - new OptArgs() - ,conn); - try { - assertEquals(expected_, obtained); - logger.info("Finished running line #111"); - } catch (Throwable ae) { - logger.error("Whoops, got exception on line #111:" + ae.toString()); - if(obtained instanceof Throwable) { - ae.addSuppressed((Throwable) obtained); - } - throw ae; - } - } - - { - // datum/array.yaml line #113 - /* err('ReqlNonExistenceError', 'Expected type NUMBER but found NULL.', [0]) */ - Err expected_ = err("ReqlNonExistenceError", "Expected type NUMBER but found NULL.", r.array(0L)); - /* r.expr([1,2,3]).delete_at(null) */ - logger.info("About to run line #113: r.expr(r.array(1L, 2L, 3L)).deleteAt((ReqlExpr) null)"); - Object obtained = runOrCatch(r.expr(r.array(1L, 2L, 3L)).deleteAt((ReqlExpr) null), - new OptArgs() - ,conn); - try { - assertEquals(expected_, obtained); - logger.info("Finished running line #113"); - } catch (Throwable ae) { - logger.error("Whoops, got exception on line #113:" + ae.toString()); - if(obtained instanceof Throwable) { - ae.addSuppressed((Throwable) obtained); - } - throw ae; - } - } - - { - // datum/array.yaml line #116 - /* [1,2,3] */ - List expected_ = r.array(1L, 2L, 3L); - /* r.expr([0,2,3]).change_at(0, 1) */ - logger.info("About to run line #116: r.expr(r.array(0L, 2L, 3L)).changeAt(0L, 1L)"); - Object obtained = runOrCatch(r.expr(r.array(0L, 2L, 3L)).changeAt(0L, 1L), - new OptArgs() - ,conn); - try { - assertEquals(expected_, obtained); - logger.info("Finished running line #116"); - } catch (Throwable ae) { - logger.error("Whoops, got exception on line #116:" + ae.toString()); - if(obtained instanceof Throwable) { - ae.addSuppressed((Throwable) obtained); - } - throw ae; - } - } - - { - // datum/array.yaml line #118 - /* AnythingIsFine */ - Object expected_ = AnythingIsFine; - /* r.expr(1).do(lambda x: r.expr([0,2,3]).change_at(0,x)) */ - logger.info("About to run line #118: r.expr(1L).do_(x -> r.expr(r.array(0L, 2L, 3L)).changeAt(0L, x))"); - Object obtained = runOrCatch(r.expr(1L).do_(x -> r.expr(r.array(0L, 2L, 3L)).changeAt(0L, x)), - new OptArgs() - ,conn); - try { - assertEquals(expected_, obtained); - logger.info("Finished running line #118"); - } catch (Throwable ae) { - logger.error("Whoops, got exception on line #118:" + ae.toString()); - if(obtained instanceof Throwable) { - ae.addSuppressed((Throwable) obtained); - } - throw ae; - } - } - - { - // datum/array.yaml line #122 - /* [1,2,3] */ - List expected_ = r.array(1L, 2L, 3L); - /* r.expr([1,0,3]).change_at(1, 2) */ - logger.info("About to run line #122: r.expr(r.array(1L, 0L, 3L)).changeAt(1L, 2L)"); - Object obtained = runOrCatch(r.expr(r.array(1L, 0L, 3L)).changeAt(1L, 2L), - new OptArgs() - ,conn); - try { - assertEquals(expected_, obtained); - logger.info("Finished running line #122"); - } catch (Throwable ae) { - logger.error("Whoops, got exception on line #122:" + ae.toString()); - if(obtained instanceof Throwable) { - ae.addSuppressed((Throwable) obtained); - } - throw ae; - } - } - - { - // datum/array.yaml line #124 - /* [1,2,3] */ - List expected_ = r.array(1L, 2L, 3L); - /* r.expr([1,2,0]).change_at(2, 3) */ - logger.info("About to run line #124: r.expr(r.array(1L, 2L, 0L)).changeAt(2L, 3L)"); - Object obtained = runOrCatch(r.expr(r.array(1L, 2L, 0L)).changeAt(2L, 3L), - new OptArgs() - ,conn); - try { - assertEquals(expected_, obtained); - logger.info("Finished running line #124"); - } catch (Throwable ae) { - logger.error("Whoops, got exception on line #124:" + ae.toString()); - if(obtained instanceof Throwable) { - ae.addSuppressed((Throwable) obtained); - } - throw ae; - } - } - - { - // datum/array.yaml line #126 - /* err('ReqlNonExistenceError', 'Index `3` out of bounds for array of size: `3`.', [0]) */ - Err expected_ = err("ReqlNonExistenceError", "Index `3` out of bounds for array of size: `3`.", r.array(0L)); - /* r.expr([1,2,3]).change_at(3, 4) */ - logger.info("About to run line #126: r.expr(r.array(1L, 2L, 3L)).changeAt(3L, 4L)"); - Object obtained = runOrCatch(r.expr(r.array(1L, 2L, 3L)).changeAt(3L, 4L), - new OptArgs() - ,conn); - try { - assertEquals(expected_, obtained); - logger.info("Finished running line #126"); - } catch (Throwable ae) { - logger.error("Whoops, got exception on line #126:" + ae.toString()); - if(obtained instanceof Throwable) { - ae.addSuppressed((Throwable) obtained); - } - throw ae; - } - } - - { - // datum/array.yaml line #128 - /* err('ReqlNonExistenceError', 'Index out of bounds: -5', [0]) */ - Err expected_ = err("ReqlNonExistenceError", "Index out of bounds: -5", r.array(0L)); - /* r.expr([1,2,3,4]).change_at(-5, 1) */ - logger.info("About to run line #128: r.expr(r.array(1L, 2L, 3L, 4L)).changeAt(-5L, 1L)"); - Object obtained = runOrCatch(r.expr(r.array(1L, 2L, 3L, 4L)).changeAt(-5L, 1L), - new OptArgs() - ,conn); - try { - assertEquals(expected_, obtained); - logger.info("Finished running line #128"); - } catch (Throwable ae) { - logger.error("Whoops, got exception on line #128:" + ae.toString()); - if(obtained instanceof Throwable) { - ae.addSuppressed((Throwable) obtained); - } - throw ae; - } - } - - { - // datum/array.yaml line #130 - /* err('ReqlQueryLogicError', 'Number not an integer: 1.5', [0]) */ - Err expected_ = err("ReqlQueryLogicError", "Number not an integer: 1.5", r.array(0L)); - /* r.expr([1,2,3]).change_at(1.5, 1) */ - logger.info("About to run line #130: r.expr(r.array(1L, 2L, 3L)).changeAt(1.5, 1L)"); - Object obtained = runOrCatch(r.expr(r.array(1L, 2L, 3L)).changeAt(1.5, 1L), - new OptArgs() - ,conn); - try { - assertEquals(expected_, obtained); - logger.info("Finished running line #130"); - } catch (Throwable ae) { - logger.error("Whoops, got exception on line #130:" + ae.toString()); - if(obtained instanceof Throwable) { - ae.addSuppressed((Throwable) obtained); - } - throw ae; - } - } - - { - // datum/array.yaml line #132 - /* err('ReqlNonExistenceError', 'Expected type NUMBER but found NULL.', [0]) */ - Err expected_ = err("ReqlNonExistenceError", "Expected type NUMBER but found NULL.", r.array(0L)); - /* r.expr([1,2,3]).change_at(null, 1) */ - logger.info("About to run line #132: r.expr(r.array(1L, 2L, 3L)).changeAt((ReqlExpr) null, 1L)"); - Object obtained = runOrCatch(r.expr(r.array(1L, 2L, 3L)).changeAt((ReqlExpr) null, 1L), - new OptArgs() - ,conn); - try { - assertEquals(expected_, obtained); - logger.info("Finished running line #132"); - } catch (Throwable ae) { - logger.error("Whoops, got exception on line #132:" + ae.toString()); - if(obtained instanceof Throwable) { - ae.addSuppressed((Throwable) obtained); - } - throw ae; - } - } - } -} diff --git a/drivers/java/src/test/java/com/rethinkdb/gen/DatumBinary.java b/drivers/java/src/test/java/com/rethinkdb/gen/DatumBinary.java deleted file mode 100644 index 08d3dde7420..00000000000 --- a/drivers/java/src/test/java/com/rethinkdb/gen/DatumBinary.java +++ /dev/null @@ -1,2253 +0,0 @@ -// Autogenerated by convert_tests.py and process_polyglot.py. -// Do not edit this file directly. -// The template for this file is located at: -// ../../../../../../../templates/Test.java -package com.rethinkdb.gen; - -import com.rethinkdb.RethinkDB; -import com.rethinkdb.gen.exc.*; -import com.rethinkdb.gen.ast.*; -import com.rethinkdb.ast.ReqlAst; -import com.rethinkdb.model.MapObject; -import com.rethinkdb.model.OptArgs; -import com.rethinkdb.net.Connection; -import com.rethinkdb.net.Cursor; -import junit.framework.TestCase; -import static org.junit.Assert.assertEquals; -import static org.junit.Assert.assertArrayEquals; -import org.slf4j.Logger; -import org.slf4j.LoggerFactory; - -import org.junit.*; -import org.junit.rules.ExpectedException; - -import java.util.Arrays; -import java.util.ArrayList; -import java.util.List; -import java.util.Map; -import java.util.Set; -import java.time.OffsetDateTime; -import java.time.ZoneOffset; -import java.time.Instant; -import java.util.stream.LongStream; -import java.util.stream.Collectors; -import java.util.stream.Stream; -import java.util.concurrent.TimeoutException; -import java.util.regex.Pattern; -import java.util.Collections; -import java.nio.charset.StandardCharsets; - -import static com.rethinkdb.TestingCommon.*; -import com.rethinkdb.TestingFramework; - -public class DatumBinary { - // Tests of converstion to and from the RQL binary type - Logger logger = LoggerFactory.getLogger(DatumBinary.class); - public static final RethinkDB r = RethinkDB.r; - - Connection conn; - - @Before - public void setUp() throws Exception { - logger.info("Setting up."); - conn = TestingFramework.createConnection(); - try { - r.dbCreate("test").run(conn); - r.db("test").wait_().run(conn); - }catch (Exception e){} - } - - @After - public void tearDown() throws Exception { - logger.info("Tearing down."); - r.db("rethinkdb").table("_debug_scratch").delete().run(conn); - if(!conn.isOpen()){ - conn.close(); - conn = TestingFramework.createConnection(); - } - r.dbDrop("test").run(conn); - conn.close(false); - } - - // Autogenerated tests below - - @Test(timeout=120000) - public void test() throws Exception { - - // datum/binary.yaml line #8 - // s = b'' - logger.info("Possibly executing: byte[] s = (byte[]) (new byte[]{});"); - byte[] s = (byte[]) (new byte[]{}); - - { - // datum/binary.yaml line #10 - /* s */ - byte[] expected_ = s; - /* r.binary(s) */ - logger.info("About to run line #10: r.binary(s)"); - Object obtained = runOrCatch(r.binary(s), - new OptArgs() - ,conn); - try { - assertArrayEquals(expected_, (byte[]) obtained); - logger.info("Finished running line #10"); - } catch (Throwable ae) { - logger.error("Whoops, got exception on line #10:" + ae.toString()); - if(obtained instanceof Throwable) { - ae.addSuppressed((Throwable) obtained); - } - throw ae; - } - } - - { - // datum/binary.yaml line #12 - /* 0 */ - Long expected_ = 0L; - /* r.binary(s).count() */ - logger.info("About to run line #12: r.binary(s).count()"); - Object obtained = runOrCatch(r.binary(s).count(), - new OptArgs() - ,conn); - try { - assertEquals(expected_, obtained); - logger.info("Finished running line #12"); - } catch (Throwable ae) { - logger.error("Whoops, got exception on line #12:" + ae.toString()); - if(obtained instanceof Throwable) { - ae.addSuppressed((Throwable) obtained); - } - throw ae; - } - } - - // datum/binary.yaml line #17 - // s = b'\x00' - logger.info("Possibly executing: byte[] s = (byte[]) (new byte[]{0});"); - s = ((byte[]) (new byte[]{0})); - - { - // datum/binary.yaml line #19 - /* s */ - byte[] expected_ = s; - /* r.binary(s) */ - logger.info("About to run line #19: r.binary(s)"); - Object obtained = runOrCatch(r.binary(s), - new OptArgs() - ,conn); - try { - assertArrayEquals(expected_, (byte[]) obtained); - logger.info("Finished running line #19"); - } catch (Throwable ae) { - logger.error("Whoops, got exception on line #19:" + ae.toString()); - if(obtained instanceof Throwable) { - ae.addSuppressed((Throwable) obtained); - } - throw ae; - } - } - - { - // datum/binary.yaml line #21 - /* 1 */ - Long expected_ = 1L; - /* r.binary(s).count() */ - logger.info("About to run line #21: r.binary(s).count()"); - Object obtained = runOrCatch(r.binary(s).count(), - new OptArgs() - ,conn); - try { - assertEquals(expected_, obtained); - logger.info("Finished running line #21"); - } catch (Throwable ae) { - logger.error("Whoops, got exception on line #21:" + ae.toString()); - if(obtained instanceof Throwable) { - ae.addSuppressed((Throwable) obtained); - } - throw ae; - } - } - - // datum/binary.yaml line #26 - // s = b'\x00\x42' - logger.info("Possibly executing: byte[] s = (byte[]) (new byte[]{0, 66});"); - s = ((byte[]) (new byte[]{0, 66})); - - { - // datum/binary.yaml line #28 - /* s */ - byte[] expected_ = s; - /* r.binary(s) */ - logger.info("About to run line #28: r.binary(s)"); - Object obtained = runOrCatch(r.binary(s), - new OptArgs() - ,conn); - try { - assertArrayEquals(expected_, (byte[]) obtained); - logger.info("Finished running line #28"); - } catch (Throwable ae) { - logger.error("Whoops, got exception on line #28:" + ae.toString()); - if(obtained instanceof Throwable) { - ae.addSuppressed((Throwable) obtained); - } - throw ae; - } - } - - { - // datum/binary.yaml line #30 - /* 2 */ - Long expected_ = 2L; - /* r.binary(s).count() */ - logger.info("About to run line #30: r.binary(s).count()"); - Object obtained = runOrCatch(r.binary(s).count(), - new OptArgs() - ,conn); - try { - assertEquals(expected_, obtained); - logger.info("Finished running line #30"); - } catch (Throwable ae) { - logger.error("Whoops, got exception on line #30:" + ae.toString()); - if(obtained instanceof Throwable) { - ae.addSuppressed((Throwable) obtained); - } - throw ae; - } - } - - // datum/binary.yaml line #35 - // s = b'\x00\xfe\x7a' - logger.info("Possibly executing: byte[] s = (byte[]) (new byte[]{0, -2, 122});"); - s = ((byte[]) (new byte[]{0, -2, 122})); - - { - // datum/binary.yaml line #37 - /* s */ - byte[] expected_ = s; - /* r.binary(s) */ - logger.info("About to run line #37: r.binary(s)"); - Object obtained = runOrCatch(r.binary(s), - new OptArgs() - ,conn); - try { - assertArrayEquals(expected_, (byte[]) obtained); - logger.info("Finished running line #37"); - } catch (Throwable ae) { - logger.error("Whoops, got exception on line #37:" + ae.toString()); - if(obtained instanceof Throwable) { - ae.addSuppressed((Throwable) obtained); - } - throw ae; - } - } - - { - // datum/binary.yaml line #39 - /* 3 */ - Long expected_ = 3L; - /* r.binary(s).count() */ - logger.info("About to run line #39: r.binary(s).count()"); - Object obtained = runOrCatch(r.binary(s).count(), - new OptArgs() - ,conn); - try { - assertEquals(expected_, obtained); - logger.info("Finished running line #39"); - } catch (Throwable ae) { - logger.error("Whoops, got exception on line #39:" + ae.toString()); - if(obtained instanceof Throwable) { - ae.addSuppressed((Throwable) obtained); - } - throw ae; - } - } - - // datum/binary.yaml line #44 - // s = b'\xed\xfe\x00\xba' - logger.info("Possibly executing: byte[] s = (byte[]) (new byte[]{-19, -2, 0, -70});"); - s = ((byte[]) (new byte[]{-19, -2, 0, -70})); - - { - // datum/binary.yaml line #46 - /* s */ - byte[] expected_ = s; - /* r.binary(s) */ - logger.info("About to run line #46: r.binary(s)"); - Object obtained = runOrCatch(r.binary(s), - new OptArgs() - ,conn); - try { - assertArrayEquals(expected_, (byte[]) obtained); - logger.info("Finished running line #46"); - } catch (Throwable ae) { - logger.error("Whoops, got exception on line #46:" + ae.toString()); - if(obtained instanceof Throwable) { - ae.addSuppressed((Throwable) obtained); - } - throw ae; - } - } - - { - // datum/binary.yaml line #48 - /* 4 */ - Long expected_ = 4L; - /* r.binary(s).count() */ - logger.info("About to run line #48: r.binary(s).count()"); - Object obtained = runOrCatch(r.binary(s).count(), - new OptArgs() - ,conn); - try { - assertEquals(expected_, obtained); - logger.info("Finished running line #48"); - } catch (Throwable ae) { - logger.error("Whoops, got exception on line #48:" + ae.toString()); - if(obtained instanceof Throwable) { - ae.addSuppressed((Throwable) obtained); - } - throw ae; - } - } - - // datum/binary.yaml line #53 - // s = b'\x50\xf9\x00\x77\xf9' - logger.info("Possibly executing: byte[] s = (byte[]) (new byte[]{80, -7, 0, 119, -7});"); - s = ((byte[]) (new byte[]{80, -7, 0, 119, -7})); - - { - // datum/binary.yaml line #55 - /* s */ - byte[] expected_ = s; - /* r.binary(s) */ - logger.info("About to run line #55: r.binary(s)"); - Object obtained = runOrCatch(r.binary(s), - new OptArgs() - ,conn); - try { - assertArrayEquals(expected_, (byte[]) obtained); - logger.info("Finished running line #55"); - } catch (Throwable ae) { - logger.error("Whoops, got exception on line #55:" + ae.toString()); - if(obtained instanceof Throwable) { - ae.addSuppressed((Throwable) obtained); - } - throw ae; - } - } - - { - // datum/binary.yaml line #57 - /* 5 */ - Long expected_ = 5L; - /* r.binary(s).count() */ - logger.info("About to run line #57: r.binary(s).count()"); - Object obtained = runOrCatch(r.binary(s).count(), - new OptArgs() - ,conn); - try { - assertEquals(expected_, obtained); - logger.info("Finished running line #57"); - } catch (Throwable ae) { - logger.error("Whoops, got exception on line #57:" + ae.toString()); - if(obtained instanceof Throwable) { - ae.addSuppressed((Throwable) obtained); - } - throw ae; - } - } - - // datum/binary.yaml line #62 - // s = b'\x2f\xe3\xb5\x57\x00\x92' - logger.info("Possibly executing: byte[] s = (byte[]) (new byte[]{47, -29, -75, 87, 0, -110});"); - s = ((byte[]) (new byte[]{47, -29, -75, 87, 0, -110})); - - { - // datum/binary.yaml line #64 - /* s */ - byte[] expected_ = s; - /* r.binary(s) */ - logger.info("About to run line #64: r.binary(s)"); - Object obtained = runOrCatch(r.binary(s), - new OptArgs() - ,conn); - try { - assertArrayEquals(expected_, (byte[]) obtained); - logger.info("Finished running line #64"); - } catch (Throwable ae) { - logger.error("Whoops, got exception on line #64:" + ae.toString()); - if(obtained instanceof Throwable) { - ae.addSuppressed((Throwable) obtained); - } - throw ae; - } - } - - { - // datum/binary.yaml line #66 - /* 6 */ - Long expected_ = 6L; - /* r.binary(s).count() */ - logger.info("About to run line #66: r.binary(s).count()"); - Object obtained = runOrCatch(r.binary(s).count(), - new OptArgs() - ,conn); - try { - assertEquals(expected_, obtained); - logger.info("Finished running line #66"); - } catch (Throwable ae) { - logger.error("Whoops, got exception on line #66:" + ae.toString()); - if(obtained instanceof Throwable) { - ae.addSuppressed((Throwable) obtained); - } - throw ae; - } - } - - // datum/binary.yaml line #71 - // s = b'\xa9\x43\x54\xe9\x00\xf8\xfb' - logger.info("Possibly executing: byte[] s = (byte[]) (new byte[]{-87, 67, 84, -23, 0, -8, -5});"); - s = ((byte[]) (new byte[]{-87, 67, 84, -23, 0, -8, -5})); - - { - // datum/binary.yaml line #73 - /* s */ - byte[] expected_ = s; - /* r.binary(s) */ - logger.info("About to run line #73: r.binary(s)"); - Object obtained = runOrCatch(r.binary(s), - new OptArgs() - ,conn); - try { - assertArrayEquals(expected_, (byte[]) obtained); - logger.info("Finished running line #73"); - } catch (Throwable ae) { - logger.error("Whoops, got exception on line #73:" + ae.toString()); - if(obtained instanceof Throwable) { - ae.addSuppressed((Throwable) obtained); - } - throw ae; - } - } - - { - // datum/binary.yaml line #75 - /* 7 */ - Long expected_ = 7L; - /* r.binary(s).count() */ - logger.info("About to run line #75: r.binary(s).count()"); - Object obtained = runOrCatch(r.binary(s).count(), - new OptArgs() - ,conn); - try { - assertEquals(expected_, obtained); - logger.info("Finished running line #75"); - } catch (Throwable ae) { - logger.error("Whoops, got exception on line #75:" + ae.toString()); - if(obtained instanceof Throwable) { - ae.addSuppressed((Throwable) obtained); - } - throw ae; - } - } - - // datum/binary.yaml line #80 - // s = b'\x57\xbb\xe5\x82\x8b\xd3\x00\xf9' - logger.info("Possibly executing: byte[] s = (byte[]) (new byte[]{87, -69, -27, -126, -117, -45, 0, -7});"); - s = ((byte[]) (new byte[]{87, -69, -27, -126, -117, -45, 0, -7})); - - { - // datum/binary.yaml line #82 - /* s */ - byte[] expected_ = s; - /* r.binary(s) */ - logger.info("About to run line #82: r.binary(s)"); - Object obtained = runOrCatch(r.binary(s), - new OptArgs() - ,conn); - try { - assertArrayEquals(expected_, (byte[]) obtained); - logger.info("Finished running line #82"); - } catch (Throwable ae) { - logger.error("Whoops, got exception on line #82:" + ae.toString()); - if(obtained instanceof Throwable) { - ae.addSuppressed((Throwable) obtained); - } - throw ae; - } - } - - { - // datum/binary.yaml line #84 - /* 8 */ - Long expected_ = 8L; - /* r.binary(s).count() */ - logger.info("About to run line #84: r.binary(s).count()"); - Object obtained = runOrCatch(r.binary(s).count(), - new OptArgs() - ,conn); - try { - assertEquals(expected_, obtained); - logger.info("Finished running line #84"); - } catch (Throwable ae) { - logger.error("Whoops, got exception on line #84:" + ae.toString()); - if(obtained instanceof Throwable) { - ae.addSuppressed((Throwable) obtained); - } - throw ae; - } - } - - // datum/binary.yaml line #89 - // s = b'\x44\x1b\x3e\x00\x13\x19\x29\x2a\xbf' - logger.info("Possibly executing: byte[] s = (byte[]) (new byte[]{68, 27, 62, 0, 19, 25, 41, 42, -65});"); - s = ((byte[]) (new byte[]{68, 27, 62, 0, 19, 25, 41, 42, -65})); - - { - // datum/binary.yaml line #91 - /* s */ - byte[] expected_ = s; - /* r.binary(s) */ - logger.info("About to run line #91: r.binary(s)"); - Object obtained = runOrCatch(r.binary(s), - new OptArgs() - ,conn); - try { - assertArrayEquals(expected_, (byte[]) obtained); - logger.info("Finished running line #91"); - } catch (Throwable ae) { - logger.error("Whoops, got exception on line #91:" + ae.toString()); - if(obtained instanceof Throwable) { - ae.addSuppressed((Throwable) obtained); - } - throw ae; - } - } - - { - // datum/binary.yaml line #93 - /* 9 */ - Long expected_ = 9L; - /* r.binary(s).count() */ - logger.info("About to run line #93: r.binary(s).count()"); - Object obtained = runOrCatch(r.binary(s).count(), - new OptArgs() - ,conn); - try { - assertEquals(expected_, obtained); - logger.info("Finished running line #93"); - } catch (Throwable ae) { - logger.error("Whoops, got exception on line #93:" + ae.toString()); - if(obtained instanceof Throwable) { - ae.addSuppressed((Throwable) obtained); - } - throw ae; - } - } - - // datum/binary.yaml line #98 - // s = b'\x8a\x1d\x09\x00\x5d\x60\x6b\x2e\x70\xd9' - logger.info("Possibly executing: byte[] s = (byte[]) (new byte[]{-118, 29, 9, 0, 93, 96, 107, 46, 112, -39});"); - s = ((byte[]) (new byte[]{-118, 29, 9, 0, 93, 96, 107, 46, 112, -39})); - - { - // datum/binary.yaml line #100 - /* s */ - byte[] expected_ = s; - /* r.binary(s) */ - logger.info("About to run line #100: r.binary(s)"); - Object obtained = runOrCatch(r.binary(s), - new OptArgs() - ,conn); - try { - assertArrayEquals(expected_, (byte[]) obtained); - logger.info("Finished running line #100"); - } catch (Throwable ae) { - logger.error("Whoops, got exception on line #100:" + ae.toString()); - if(obtained instanceof Throwable) { - ae.addSuppressed((Throwable) obtained); - } - throw ae; - } - } - - { - // datum/binary.yaml line #102 - /* 10 */ - Long expected_ = 10L; - /* r.binary(s).count() */ - logger.info("About to run line #102: r.binary(s).count()"); - Object obtained = runOrCatch(r.binary(s).count(), - new OptArgs() - ,conn); - try { - assertEquals(expected_, obtained); - logger.info("Finished running line #102"); - } catch (Throwable ae) { - logger.error("Whoops, got exception on line #102:" + ae.toString()); - if(obtained instanceof Throwable) { - ae.addSuppressed((Throwable) obtained); - } - throw ae; - } - } - - // datum/binary.yaml line #107 - // s = b'\x00\xaf\x47\x4b\x38\x99\x14\x8d\x8f\x10\x51' - logger.info("Possibly executing: byte[] s = (byte[]) (new byte[]{0, -81, 71, 75, 56, -103, 20, -115, -113, 16, 81});"); - s = ((byte[]) (new byte[]{0, -81, 71, 75, 56, -103, 20, -115, -113, 16, 81})); - - { - // datum/binary.yaml line #109 - /* s */ - byte[] expected_ = s; - /* r.binary(s) */ - logger.info("About to run line #109: r.binary(s)"); - Object obtained = runOrCatch(r.binary(s), - new OptArgs() - ,conn); - try { - assertArrayEquals(expected_, (byte[]) obtained); - logger.info("Finished running line #109"); - } catch (Throwable ae) { - logger.error("Whoops, got exception on line #109:" + ae.toString()); - if(obtained instanceof Throwable) { - ae.addSuppressed((Throwable) obtained); - } - throw ae; - } - } - - { - // datum/binary.yaml line #111 - /* 11 */ - Long expected_ = 11L; - /* r.binary(s).count() */ - logger.info("About to run line #111: r.binary(s).count()"); - Object obtained = runOrCatch(r.binary(s).count(), - new OptArgs() - ,conn); - try { - assertEquals(expected_, obtained); - logger.info("Finished running line #111"); - } catch (Throwable ae) { - logger.error("Whoops, got exception on line #111:" + ae.toString()); - if(obtained instanceof Throwable) { - ae.addSuppressed((Throwable) obtained); - } - throw ae; - } - } - - // datum/binary.yaml line #116 - // s = b'\x45\x39\x00\xf7\xc2\x37\xfd\xe0\x38\x82\x40\xa9' - logger.info("Possibly executing: byte[] s = (byte[]) (new byte[]{69, 57, 0, -9, -62, 55, -3, -32, 56, -126, 64, -87});"); - s = ((byte[]) (new byte[]{69, 57, 0, -9, -62, 55, -3, -32, 56, -126, 64, -87})); - - { - // datum/binary.yaml line #118 - /* s */ - byte[] expected_ = s; - /* r.binary(s) */ - logger.info("About to run line #118: r.binary(s)"); - Object obtained = runOrCatch(r.binary(s), - new OptArgs() - ,conn); - try { - assertArrayEquals(expected_, (byte[]) obtained); - logger.info("Finished running line #118"); - } catch (Throwable ae) { - logger.error("Whoops, got exception on line #118:" + ae.toString()); - if(obtained instanceof Throwable) { - ae.addSuppressed((Throwable) obtained); - } - throw ae; - } - } - - { - // datum/binary.yaml line #120 - /* 12 */ - Long expected_ = 12L; - /* r.binary(s).count() */ - logger.info("About to run line #120: r.binary(s).count()"); - Object obtained = runOrCatch(r.binary(s).count(), - new OptArgs() - ,conn); - try { - assertEquals(expected_, obtained); - logger.info("Finished running line #120"); - } catch (Throwable ae) { - logger.error("Whoops, got exception on line #120:" + ae.toString()); - if(obtained instanceof Throwable) { - ae.addSuppressed((Throwable) obtained); - } - throw ae; - } - } - - // datum/binary.yaml line #128 - // a = b'\x00' - logger.info("Possibly executing: byte[] a = (byte[]) (new byte[]{0});"); - byte[] a = (byte[]) (new byte[]{0}); - - // datum/binary.yaml line #132 - // b = b'\x00\x01' - logger.info("Possibly executing: byte[] b = (byte[]) (new byte[]{0, 1});"); - byte[] b = (byte[]) (new byte[]{0, 1}); - - // datum/binary.yaml line #136 - // c = b'\x01' - logger.info("Possibly executing: byte[] c = (byte[]) (new byte[]{1});"); - byte[] c = (byte[]) (new byte[]{1}); - - // datum/binary.yaml line #140 - // d = b'\x70\x22' - logger.info("Possibly executing: byte[] d = (byte[]) (new byte[]{112, 34});"); - byte[] d = (byte[]) (new byte[]{112, 34}); - - // datum/binary.yaml line #144 - // e = b'\x80' - logger.info("Possibly executing: byte[] e = (byte[]) (new byte[]{-128});"); - byte[] e = (byte[]) (new byte[]{-128}); - - // datum/binary.yaml line #148 - // f = b'\xFE' - logger.info("Possibly executing: byte[] f = (byte[]) (new byte[]{-2});"); - byte[] f = (byte[]) (new byte[]{-2}); - - { - // datum/binary.yaml line #151 - /* true */ - Boolean expected_ = true; - /* r.binary(a).eq(r.binary(a)) */ - logger.info("About to run line #151: r.binary(a).eq(r.binary(a))"); - Object obtained = runOrCatch(r.binary(a).eq(r.binary(a)), - new OptArgs() - ,conn); - try { - assertEquals(expected_, obtained); - logger.info("Finished running line #151"); - } catch (Throwable ae) { - logger.error("Whoops, got exception on line #151:" + ae.toString()); - if(obtained instanceof Throwable) { - ae.addSuppressed((Throwable) obtained); - } - throw ae; - } - } - - { - // datum/binary.yaml line #153 - /* true */ - Boolean expected_ = true; - /* r.binary(a).le(r.binary(a)) */ - logger.info("About to run line #153: r.binary(a).le(r.binary(a))"); - Object obtained = runOrCatch(r.binary(a).le(r.binary(a)), - new OptArgs() - ,conn); - try { - assertEquals(expected_, obtained); - logger.info("Finished running line #153"); - } catch (Throwable ae) { - logger.error("Whoops, got exception on line #153:" + ae.toString()); - if(obtained instanceof Throwable) { - ae.addSuppressed((Throwable) obtained); - } - throw ae; - } - } - - { - // datum/binary.yaml line #155 - /* true */ - Boolean expected_ = true; - /* r.binary(a).ge(r.binary(a)) */ - logger.info("About to run line #155: r.binary(a).ge(r.binary(a))"); - Object obtained = runOrCatch(r.binary(a).ge(r.binary(a)), - new OptArgs() - ,conn); - try { - assertEquals(expected_, obtained); - logger.info("Finished running line #155"); - } catch (Throwable ae) { - logger.error("Whoops, got exception on line #155:" + ae.toString()); - if(obtained instanceof Throwable) { - ae.addSuppressed((Throwable) obtained); - } - throw ae; - } - } - - { - // datum/binary.yaml line #157 - /* false */ - Boolean expected_ = false; - /* r.binary(a).ne(r.binary(a)) */ - logger.info("About to run line #157: r.binary(a).ne(r.binary(a))"); - Object obtained = runOrCatch(r.binary(a).ne(r.binary(a)), - new OptArgs() - ,conn); - try { - assertEquals(expected_, obtained); - logger.info("Finished running line #157"); - } catch (Throwable ae) { - logger.error("Whoops, got exception on line #157:" + ae.toString()); - if(obtained instanceof Throwable) { - ae.addSuppressed((Throwable) obtained); - } - throw ae; - } - } - - { - // datum/binary.yaml line #159 - /* false */ - Boolean expected_ = false; - /* r.binary(a).lt(r.binary(a)) */ - logger.info("About to run line #159: r.binary(a).lt(r.binary(a))"); - Object obtained = runOrCatch(r.binary(a).lt(r.binary(a)), - new OptArgs() - ,conn); - try { - assertEquals(expected_, obtained); - logger.info("Finished running line #159"); - } catch (Throwable ae) { - logger.error("Whoops, got exception on line #159:" + ae.toString()); - if(obtained instanceof Throwable) { - ae.addSuppressed((Throwable) obtained); - } - throw ae; - } - } - - { - // datum/binary.yaml line #161 - /* false */ - Boolean expected_ = false; - /* r.binary(a).gt(r.binary(a)) */ - logger.info("About to run line #161: r.binary(a).gt(r.binary(a))"); - Object obtained = runOrCatch(r.binary(a).gt(r.binary(a)), - new OptArgs() - ,conn); - try { - assertEquals(expected_, obtained); - logger.info("Finished running line #161"); - } catch (Throwable ae) { - logger.error("Whoops, got exception on line #161:" + ae.toString()); - if(obtained instanceof Throwable) { - ae.addSuppressed((Throwable) obtained); - } - throw ae; - } - } - - { - // datum/binary.yaml line #165 - /* true */ - Boolean expected_ = true; - /* r.binary(a).ne(r.binary(b)) */ - logger.info("About to run line #165: r.binary(a).ne(r.binary(b))"); - Object obtained = runOrCatch(r.binary(a).ne(r.binary(b)), - new OptArgs() - ,conn); - try { - assertEquals(expected_, obtained); - logger.info("Finished running line #165"); - } catch (Throwable ae) { - logger.error("Whoops, got exception on line #165:" + ae.toString()); - if(obtained instanceof Throwable) { - ae.addSuppressed((Throwable) obtained); - } - throw ae; - } - } - - { - // datum/binary.yaml line #167 - /* true */ - Boolean expected_ = true; - /* r.binary(a).lt(r.binary(b)) */ - logger.info("About to run line #167: r.binary(a).lt(r.binary(b))"); - Object obtained = runOrCatch(r.binary(a).lt(r.binary(b)), - new OptArgs() - ,conn); - try { - assertEquals(expected_, obtained); - logger.info("Finished running line #167"); - } catch (Throwable ae) { - logger.error("Whoops, got exception on line #167:" + ae.toString()); - if(obtained instanceof Throwable) { - ae.addSuppressed((Throwable) obtained); - } - throw ae; - } - } - - { - // datum/binary.yaml line #169 - /* true */ - Boolean expected_ = true; - /* r.binary(a).le(r.binary(b)) */ - logger.info("About to run line #169: r.binary(a).le(r.binary(b))"); - Object obtained = runOrCatch(r.binary(a).le(r.binary(b)), - new OptArgs() - ,conn); - try { - assertEquals(expected_, obtained); - logger.info("Finished running line #169"); - } catch (Throwable ae) { - logger.error("Whoops, got exception on line #169:" + ae.toString()); - if(obtained instanceof Throwable) { - ae.addSuppressed((Throwable) obtained); - } - throw ae; - } - } - - { - // datum/binary.yaml line #171 - /* false */ - Boolean expected_ = false; - /* r.binary(a).ge(r.binary(b)) */ - logger.info("About to run line #171: r.binary(a).ge(r.binary(b))"); - Object obtained = runOrCatch(r.binary(a).ge(r.binary(b)), - new OptArgs() - ,conn); - try { - assertEquals(expected_, obtained); - logger.info("Finished running line #171"); - } catch (Throwable ae) { - logger.error("Whoops, got exception on line #171:" + ae.toString()); - if(obtained instanceof Throwable) { - ae.addSuppressed((Throwable) obtained); - } - throw ae; - } - } - - { - // datum/binary.yaml line #173 - /* false */ - Boolean expected_ = false; - /* r.binary(a).gt(r.binary(b)) */ - logger.info("About to run line #173: r.binary(a).gt(r.binary(b))"); - Object obtained = runOrCatch(r.binary(a).gt(r.binary(b)), - new OptArgs() - ,conn); - try { - assertEquals(expected_, obtained); - logger.info("Finished running line #173"); - } catch (Throwable ae) { - logger.error("Whoops, got exception on line #173:" + ae.toString()); - if(obtained instanceof Throwable) { - ae.addSuppressed((Throwable) obtained); - } - throw ae; - } - } - - { - // datum/binary.yaml line #175 - /* false */ - Boolean expected_ = false; - /* r.binary(a).eq(r.binary(b)) */ - logger.info("About to run line #175: r.binary(a).eq(r.binary(b))"); - Object obtained = runOrCatch(r.binary(a).eq(r.binary(b)), - new OptArgs() - ,conn); - try { - assertEquals(expected_, obtained); - logger.info("Finished running line #175"); - } catch (Throwable ae) { - logger.error("Whoops, got exception on line #175:" + ae.toString()); - if(obtained instanceof Throwable) { - ae.addSuppressed((Throwable) obtained); - } - throw ae; - } - } - - { - // datum/binary.yaml line #179 - /* true */ - Boolean expected_ = true; - /* r.binary(b).ne(r.binary(c)) */ - logger.info("About to run line #179: r.binary(b).ne(r.binary(c))"); - Object obtained = runOrCatch(r.binary(b).ne(r.binary(c)), - new OptArgs() - ,conn); - try { - assertEquals(expected_, obtained); - logger.info("Finished running line #179"); - } catch (Throwable ae) { - logger.error("Whoops, got exception on line #179:" + ae.toString()); - if(obtained instanceof Throwable) { - ae.addSuppressed((Throwable) obtained); - } - throw ae; - } - } - - { - // datum/binary.yaml line #181 - /* true */ - Boolean expected_ = true; - /* r.binary(b).lt(r.binary(c)) */ - logger.info("About to run line #181: r.binary(b).lt(r.binary(c))"); - Object obtained = runOrCatch(r.binary(b).lt(r.binary(c)), - new OptArgs() - ,conn); - try { - assertEquals(expected_, obtained); - logger.info("Finished running line #181"); - } catch (Throwable ae) { - logger.error("Whoops, got exception on line #181:" + ae.toString()); - if(obtained instanceof Throwable) { - ae.addSuppressed((Throwable) obtained); - } - throw ae; - } - } - - { - // datum/binary.yaml line #183 - /* true */ - Boolean expected_ = true; - /* r.binary(b).le(r.binary(c)) */ - logger.info("About to run line #183: r.binary(b).le(r.binary(c))"); - Object obtained = runOrCatch(r.binary(b).le(r.binary(c)), - new OptArgs() - ,conn); - try { - assertEquals(expected_, obtained); - logger.info("Finished running line #183"); - } catch (Throwable ae) { - logger.error("Whoops, got exception on line #183:" + ae.toString()); - if(obtained instanceof Throwable) { - ae.addSuppressed((Throwable) obtained); - } - throw ae; - } - } - - { - // datum/binary.yaml line #185 - /* false */ - Boolean expected_ = false; - /* r.binary(b).ge(r.binary(c)) */ - logger.info("About to run line #185: r.binary(b).ge(r.binary(c))"); - Object obtained = runOrCatch(r.binary(b).ge(r.binary(c)), - new OptArgs() - ,conn); - try { - assertEquals(expected_, obtained); - logger.info("Finished running line #185"); - } catch (Throwable ae) { - logger.error("Whoops, got exception on line #185:" + ae.toString()); - if(obtained instanceof Throwable) { - ae.addSuppressed((Throwable) obtained); - } - throw ae; - } - } - - { - // datum/binary.yaml line #187 - /* false */ - Boolean expected_ = false; - /* r.binary(b).gt(r.binary(c)) */ - logger.info("About to run line #187: r.binary(b).gt(r.binary(c))"); - Object obtained = runOrCatch(r.binary(b).gt(r.binary(c)), - new OptArgs() - ,conn); - try { - assertEquals(expected_, obtained); - logger.info("Finished running line #187"); - } catch (Throwable ae) { - logger.error("Whoops, got exception on line #187:" + ae.toString()); - if(obtained instanceof Throwable) { - ae.addSuppressed((Throwable) obtained); - } - throw ae; - } - } - - { - // datum/binary.yaml line #189 - /* false */ - Boolean expected_ = false; - /* r.binary(b).eq(r.binary(c)) */ - logger.info("About to run line #189: r.binary(b).eq(r.binary(c))"); - Object obtained = runOrCatch(r.binary(b).eq(r.binary(c)), - new OptArgs() - ,conn); - try { - assertEquals(expected_, obtained); - logger.info("Finished running line #189"); - } catch (Throwable ae) { - logger.error("Whoops, got exception on line #189:" + ae.toString()); - if(obtained instanceof Throwable) { - ae.addSuppressed((Throwable) obtained); - } - throw ae; - } - } - - { - // datum/binary.yaml line #193 - /* true */ - Boolean expected_ = true; - /* r.binary(c).ne(r.binary(d)) */ - logger.info("About to run line #193: r.binary(c).ne(r.binary(d))"); - Object obtained = runOrCatch(r.binary(c).ne(r.binary(d)), - new OptArgs() - ,conn); - try { - assertEquals(expected_, obtained); - logger.info("Finished running line #193"); - } catch (Throwable ae) { - logger.error("Whoops, got exception on line #193:" + ae.toString()); - if(obtained instanceof Throwable) { - ae.addSuppressed((Throwable) obtained); - } - throw ae; - } - } - - { - // datum/binary.yaml line #195 - /* true */ - Boolean expected_ = true; - /* r.binary(c).lt(r.binary(d)) */ - logger.info("About to run line #195: r.binary(c).lt(r.binary(d))"); - Object obtained = runOrCatch(r.binary(c).lt(r.binary(d)), - new OptArgs() - ,conn); - try { - assertEquals(expected_, obtained); - logger.info("Finished running line #195"); - } catch (Throwable ae) { - logger.error("Whoops, got exception on line #195:" + ae.toString()); - if(obtained instanceof Throwable) { - ae.addSuppressed((Throwable) obtained); - } - throw ae; - } - } - - { - // datum/binary.yaml line #197 - /* true */ - Boolean expected_ = true; - /* r.binary(c).le(r.binary(d)) */ - logger.info("About to run line #197: r.binary(c).le(r.binary(d))"); - Object obtained = runOrCatch(r.binary(c).le(r.binary(d)), - new OptArgs() - ,conn); - try { - assertEquals(expected_, obtained); - logger.info("Finished running line #197"); - } catch (Throwable ae) { - logger.error("Whoops, got exception on line #197:" + ae.toString()); - if(obtained instanceof Throwable) { - ae.addSuppressed((Throwable) obtained); - } - throw ae; - } - } - - { - // datum/binary.yaml line #199 - /* false */ - Boolean expected_ = false; - /* r.binary(c).ge(r.binary(d)) */ - logger.info("About to run line #199: r.binary(c).ge(r.binary(d))"); - Object obtained = runOrCatch(r.binary(c).ge(r.binary(d)), - new OptArgs() - ,conn); - try { - assertEquals(expected_, obtained); - logger.info("Finished running line #199"); - } catch (Throwable ae) { - logger.error("Whoops, got exception on line #199:" + ae.toString()); - if(obtained instanceof Throwable) { - ae.addSuppressed((Throwable) obtained); - } - throw ae; - } - } - - { - // datum/binary.yaml line #201 - /* false */ - Boolean expected_ = false; - /* r.binary(c).gt(r.binary(d)) */ - logger.info("About to run line #201: r.binary(c).gt(r.binary(d))"); - Object obtained = runOrCatch(r.binary(c).gt(r.binary(d)), - new OptArgs() - ,conn); - try { - assertEquals(expected_, obtained); - logger.info("Finished running line #201"); - } catch (Throwable ae) { - logger.error("Whoops, got exception on line #201:" + ae.toString()); - if(obtained instanceof Throwable) { - ae.addSuppressed((Throwable) obtained); - } - throw ae; - } - } - - { - // datum/binary.yaml line #203 - /* false */ - Boolean expected_ = false; - /* r.binary(c).eq(r.binary(d)) */ - logger.info("About to run line #203: r.binary(c).eq(r.binary(d))"); - Object obtained = runOrCatch(r.binary(c).eq(r.binary(d)), - new OptArgs() - ,conn); - try { - assertEquals(expected_, obtained); - logger.info("Finished running line #203"); - } catch (Throwable ae) { - logger.error("Whoops, got exception on line #203:" + ae.toString()); - if(obtained instanceof Throwable) { - ae.addSuppressed((Throwable) obtained); - } - throw ae; - } - } - - { - // datum/binary.yaml line #207 - /* true */ - Boolean expected_ = true; - /* r.binary(d).ne(r.binary(e)) */ - logger.info("About to run line #207: r.binary(d).ne(r.binary(e))"); - Object obtained = runOrCatch(r.binary(d).ne(r.binary(e)), - new OptArgs() - ,conn); - try { - assertEquals(expected_, obtained); - logger.info("Finished running line #207"); - } catch (Throwable ae) { - logger.error("Whoops, got exception on line #207:" + ae.toString()); - if(obtained instanceof Throwable) { - ae.addSuppressed((Throwable) obtained); - } - throw ae; - } - } - - { - // datum/binary.yaml line #209 - /* true */ - Boolean expected_ = true; - /* r.binary(d).lt(r.binary(e)) */ - logger.info("About to run line #209: r.binary(d).lt(r.binary(e))"); - Object obtained = runOrCatch(r.binary(d).lt(r.binary(e)), - new OptArgs() - ,conn); - try { - assertEquals(expected_, obtained); - logger.info("Finished running line #209"); - } catch (Throwable ae) { - logger.error("Whoops, got exception on line #209:" + ae.toString()); - if(obtained instanceof Throwable) { - ae.addSuppressed((Throwable) obtained); - } - throw ae; - } - } - - { - // datum/binary.yaml line #211 - /* true */ - Boolean expected_ = true; - /* r.binary(d).le(r.binary(e)) */ - logger.info("About to run line #211: r.binary(d).le(r.binary(e))"); - Object obtained = runOrCatch(r.binary(d).le(r.binary(e)), - new OptArgs() - ,conn); - try { - assertEquals(expected_, obtained); - logger.info("Finished running line #211"); - } catch (Throwable ae) { - logger.error("Whoops, got exception on line #211:" + ae.toString()); - if(obtained instanceof Throwable) { - ae.addSuppressed((Throwable) obtained); - } - throw ae; - } - } - - { - // datum/binary.yaml line #213 - /* false */ - Boolean expected_ = false; - /* r.binary(d).ge(r.binary(e)) */ - logger.info("About to run line #213: r.binary(d).ge(r.binary(e))"); - Object obtained = runOrCatch(r.binary(d).ge(r.binary(e)), - new OptArgs() - ,conn); - try { - assertEquals(expected_, obtained); - logger.info("Finished running line #213"); - } catch (Throwable ae) { - logger.error("Whoops, got exception on line #213:" + ae.toString()); - if(obtained instanceof Throwable) { - ae.addSuppressed((Throwable) obtained); - } - throw ae; - } - } - - { - // datum/binary.yaml line #215 - /* false */ - Boolean expected_ = false; - /* r.binary(d).gt(r.binary(e)) */ - logger.info("About to run line #215: r.binary(d).gt(r.binary(e))"); - Object obtained = runOrCatch(r.binary(d).gt(r.binary(e)), - new OptArgs() - ,conn); - try { - assertEquals(expected_, obtained); - logger.info("Finished running line #215"); - } catch (Throwable ae) { - logger.error("Whoops, got exception on line #215:" + ae.toString()); - if(obtained instanceof Throwable) { - ae.addSuppressed((Throwable) obtained); - } - throw ae; - } - } - - { - // datum/binary.yaml line #217 - /* false */ - Boolean expected_ = false; - /* r.binary(d).eq(r.binary(e)) */ - logger.info("About to run line #217: r.binary(d).eq(r.binary(e))"); - Object obtained = runOrCatch(r.binary(d).eq(r.binary(e)), - new OptArgs() - ,conn); - try { - assertEquals(expected_, obtained); - logger.info("Finished running line #217"); - } catch (Throwable ae) { - logger.error("Whoops, got exception on line #217:" + ae.toString()); - if(obtained instanceof Throwable) { - ae.addSuppressed((Throwable) obtained); - } - throw ae; - } - } - - { - // datum/binary.yaml line #221 - /* true */ - Boolean expected_ = true; - /* r.binary(e).ne(r.binary(f)) */ - logger.info("About to run line #221: r.binary(e).ne(r.binary(f))"); - Object obtained = runOrCatch(r.binary(e).ne(r.binary(f)), - new OptArgs() - ,conn); - try { - assertEquals(expected_, obtained); - logger.info("Finished running line #221"); - } catch (Throwable ae) { - logger.error("Whoops, got exception on line #221:" + ae.toString()); - if(obtained instanceof Throwable) { - ae.addSuppressed((Throwable) obtained); - } - throw ae; - } - } - - { - // datum/binary.yaml line #223 - /* true */ - Boolean expected_ = true; - /* r.binary(e).lt(r.binary(f)) */ - logger.info("About to run line #223: r.binary(e).lt(r.binary(f))"); - Object obtained = runOrCatch(r.binary(e).lt(r.binary(f)), - new OptArgs() - ,conn); - try { - assertEquals(expected_, obtained); - logger.info("Finished running line #223"); - } catch (Throwable ae) { - logger.error("Whoops, got exception on line #223:" + ae.toString()); - if(obtained instanceof Throwable) { - ae.addSuppressed((Throwable) obtained); - } - throw ae; - } - } - - { - // datum/binary.yaml line #225 - /* true */ - Boolean expected_ = true; - /* r.binary(e).le(r.binary(f)) */ - logger.info("About to run line #225: r.binary(e).le(r.binary(f))"); - Object obtained = runOrCatch(r.binary(e).le(r.binary(f)), - new OptArgs() - ,conn); - try { - assertEquals(expected_, obtained); - logger.info("Finished running line #225"); - } catch (Throwable ae) { - logger.error("Whoops, got exception on line #225:" + ae.toString()); - if(obtained instanceof Throwable) { - ae.addSuppressed((Throwable) obtained); - } - throw ae; - } - } - - { - // datum/binary.yaml line #227 - /* false */ - Boolean expected_ = false; - /* r.binary(e).ge(r.binary(f)) */ - logger.info("About to run line #227: r.binary(e).ge(r.binary(f))"); - Object obtained = runOrCatch(r.binary(e).ge(r.binary(f)), - new OptArgs() - ,conn); - try { - assertEquals(expected_, obtained); - logger.info("Finished running line #227"); - } catch (Throwable ae) { - logger.error("Whoops, got exception on line #227:" + ae.toString()); - if(obtained instanceof Throwable) { - ae.addSuppressed((Throwable) obtained); - } - throw ae; - } - } - - { - // datum/binary.yaml line #229 - /* false */ - Boolean expected_ = false; - /* r.binary(e).gt(r.binary(f)) */ - logger.info("About to run line #229: r.binary(e).gt(r.binary(f))"); - Object obtained = runOrCatch(r.binary(e).gt(r.binary(f)), - new OptArgs() - ,conn); - try { - assertEquals(expected_, obtained); - logger.info("Finished running line #229"); - } catch (Throwable ae) { - logger.error("Whoops, got exception on line #229:" + ae.toString()); - if(obtained instanceof Throwable) { - ae.addSuppressed((Throwable) obtained); - } - throw ae; - } - } - - { - // datum/binary.yaml line #231 - /* false */ - Boolean expected_ = false; - /* r.binary(e).eq(r.binary(f)) */ - logger.info("About to run line #231: r.binary(e).eq(r.binary(f))"); - Object obtained = runOrCatch(r.binary(e).eq(r.binary(f)), - new OptArgs() - ,conn); - try { - assertEquals(expected_, obtained); - logger.info("Finished running line #231"); - } catch (Throwable ae) { - logger.error("Whoops, got exception on line #231:" + ae.toString()); - if(obtained instanceof Throwable) { - ae.addSuppressed((Throwable) obtained); - } - throw ae; - } - } - - { - // datum/binary.yaml line #235 - /* true */ - Boolean expected_ = true; - /* r.binary(f).eq(r.binary(f)) */ - logger.info("About to run line #235: r.binary(f).eq(r.binary(f))"); - Object obtained = runOrCatch(r.binary(f).eq(r.binary(f)), - new OptArgs() - ,conn); - try { - assertEquals(expected_, obtained); - logger.info("Finished running line #235"); - } catch (Throwable ae) { - logger.error("Whoops, got exception on line #235:" + ae.toString()); - if(obtained instanceof Throwable) { - ae.addSuppressed((Throwable) obtained); - } - throw ae; - } - } - - { - // datum/binary.yaml line #237 - /* true */ - Boolean expected_ = true; - /* r.binary(f).le(r.binary(f)) */ - logger.info("About to run line #237: r.binary(f).le(r.binary(f))"); - Object obtained = runOrCatch(r.binary(f).le(r.binary(f)), - new OptArgs() - ,conn); - try { - assertEquals(expected_, obtained); - logger.info("Finished running line #237"); - } catch (Throwable ae) { - logger.error("Whoops, got exception on line #237:" + ae.toString()); - if(obtained instanceof Throwable) { - ae.addSuppressed((Throwable) obtained); - } - throw ae; - } - } - - { - // datum/binary.yaml line #239 - /* true */ - Boolean expected_ = true; - /* r.binary(f).ge(r.binary(f)) */ - logger.info("About to run line #239: r.binary(f).ge(r.binary(f))"); - Object obtained = runOrCatch(r.binary(f).ge(r.binary(f)), - new OptArgs() - ,conn); - try { - assertEquals(expected_, obtained); - logger.info("Finished running line #239"); - } catch (Throwable ae) { - logger.error("Whoops, got exception on line #239:" + ae.toString()); - if(obtained instanceof Throwable) { - ae.addSuppressed((Throwable) obtained); - } - throw ae; - } - } - - { - // datum/binary.yaml line #241 - /* false */ - Boolean expected_ = false; - /* r.binary(f).ne(r.binary(f)) */ - logger.info("About to run line #241: r.binary(f).ne(r.binary(f))"); - Object obtained = runOrCatch(r.binary(f).ne(r.binary(f)), - new OptArgs() - ,conn); - try { - assertEquals(expected_, obtained); - logger.info("Finished running line #241"); - } catch (Throwable ae) { - logger.error("Whoops, got exception on line #241:" + ae.toString()); - if(obtained instanceof Throwable) { - ae.addSuppressed((Throwable) obtained); - } - throw ae; - } - } - - { - // datum/binary.yaml line #243 - /* false */ - Boolean expected_ = false; - /* r.binary(f).lt(r.binary(f)) */ - logger.info("About to run line #243: r.binary(f).lt(r.binary(f))"); - Object obtained = runOrCatch(r.binary(f).lt(r.binary(f)), - new OptArgs() - ,conn); - try { - assertEquals(expected_, obtained); - logger.info("Finished running line #243"); - } catch (Throwable ae) { - logger.error("Whoops, got exception on line #243:" + ae.toString()); - if(obtained instanceof Throwable) { - ae.addSuppressed((Throwable) obtained); - } - throw ae; - } - } - - { - // datum/binary.yaml line #245 - /* false */ - Boolean expected_ = false; - /* r.binary(f).gt(r.binary(f)) */ - logger.info("About to run line #245: r.binary(f).gt(r.binary(f))"); - Object obtained = runOrCatch(r.binary(f).gt(r.binary(f)), - new OptArgs() - ,conn); - try { - assertEquals(expected_, obtained); - logger.info("Finished running line #245"); - } catch (Throwable ae) { - logger.error("Whoops, got exception on line #245:" + ae.toString()); - if(obtained instanceof Throwable) { - ae.addSuppressed((Throwable) obtained); - } - throw ae; - } - } - - { - // datum/binary.yaml line #250 - /* u'イロハニホヘト チリヌルヲ ワカヨタレソ ツネナラム'.encode('utf-8') */ - byte[] expected_ = "イロハニホヘト チリヌルヲ ワカヨタレソ ツネナラム".getBytes(StandardCharsets.UTF_8); - /* r.binary(u'イロハニホヘト チリヌルヲ ワカヨタレソ ツネナラム'.encode('utf-8')) */ - logger.info("About to run line #250: r.binary('イロハニホヘト チリヌルヲ ワカヨタレソ ツネナラム'.getBytes(StandardCharsets.UTF_8))"); - Object obtained = runOrCatch(r.binary("イロハニホヘト チリヌルヲ ワカヨタレソ ツネナラム".getBytes(StandardCharsets.UTF_8)), - new OptArgs() - ,conn); - try { - assertArrayEquals(expected_, (byte[]) obtained); - logger.info("Finished running line #250"); - } catch (Throwable ae) { - logger.error("Whoops, got exception on line #250:" + ae.toString()); - if(obtained instanceof Throwable) { - ae.addSuppressed((Throwable) obtained); - } - throw ae; - } - } - - { - // datum/binary.yaml line #256 - /* u'ƀƁƂƃƄƅƆƇƈƉƊƋƌƍƎƏ'.encode('utf-16') */ - byte[] expected_ = "ƀƁƂƃƄƅƆƇƈƉƊƋƌƍƎƏ".getBytes(StandardCharsets.UTF_16); - /* r.binary(u'ƀƁƂƃƄƅƆƇƈƉƊƋƌƍƎƏ'.encode('utf-16')) */ - logger.info("About to run line #256: r.binary('ƀƁƂƃƄƅƆƇƈƉƊƋƌƍƎƏ'.getBytes(StandardCharsets.UTF_16))"); - Object obtained = runOrCatch(r.binary("ƀƁƂƃƄƅƆƇƈƉƊƋƌƍƎƏ".getBytes(StandardCharsets.UTF_16)), - new OptArgs() - ,conn); - try { - assertArrayEquals(expected_, (byte[]) obtained); - logger.info("Finished running line #256"); - } catch (Throwable ae) { - logger.error("Whoops, got exception on line #256:" + ae.toString()); - if(obtained instanceof Throwable) { - ae.addSuppressed((Throwable) obtained); - } - throw ae; - } - } - - { - // datum/binary.yaml line #262 - /* u'lorem ipsum'.encode('ascii') */ - byte[] expected_ = "lorem ipsum".getBytes(StandardCharsets.US_ASCII); - /* r.binary(u'lorem ipsum'.encode('ascii')) */ - logger.info("About to run line #262: r.binary('lorem ipsum'.getBytes(StandardCharsets.US_ASCII))"); - Object obtained = runOrCatch(r.binary("lorem ipsum".getBytes(StandardCharsets.US_ASCII)), - new OptArgs() - ,conn); - try { - assertArrayEquals(expected_, (byte[]) obtained); - logger.info("Finished running line #262"); - } catch (Throwable ae) { - logger.error("Whoops, got exception on line #262:" + ae.toString()); - if(obtained instanceof Throwable) { - ae.addSuppressed((Throwable) obtained); - } - throw ae; - } - } - - { - // datum/binary.yaml line #269 - /* 'foo' */ - String expected_ = "foo"; - /* r.binary(b'foo').coerce_to('string') */ - logger.info("About to run line #269: r.binary(new byte[]{102, 111, 111}).coerceTo('string')"); - Object obtained = runOrCatch(r.binary(new byte[]{102, 111, 111}).coerceTo("string"), - new OptArgs() - ,conn); - try { - assertEquals(expected_, obtained); - logger.info("Finished running line #269"); - } catch (Throwable ae) { - logger.error("Whoops, got exception on line #269:" + ae.toString()); - if(obtained instanceof Throwable) { - ae.addSuppressed((Throwable) obtained); - } - throw ae; - } - } - - { - // datum/binary.yaml line #272 - /* u'イロハニホヘト チリヌルヲ ワカヨタレソ ツネナラム' */ - String expected_ = "イロハニホヘト チリヌルヲ ワカヨタレソ ツネナラム"; - /* r.binary(u'イロハニホヘト チリヌルヲ ワカヨタレソ ツネナラム'.encode('utf-8')).coerce_to('string') */ - logger.info("About to run line #272: r.binary('イロハニホヘト チリヌルヲ ワカヨタレソ ツネナラム'.getBytes(StandardCharsets.UTF_8)).coerceTo('string')"); - Object obtained = runOrCatch(r.binary("イロハニホヘト チリヌルヲ ワカヨタレソ ツネナラム".getBytes(StandardCharsets.UTF_8)).coerceTo("string"), - new OptArgs() - ,conn); - try { - assertEquals(expected_, obtained); - logger.info("Finished running line #272"); - } catch (Throwable ae) { - logger.error("Whoops, got exception on line #272:" + ae.toString()); - if(obtained instanceof Throwable) { - ae.addSuppressed((Throwable) obtained); - } - throw ae; - } - } - - { - // datum/binary.yaml line #278 - /* u'lorem ipsum' */ - String expected_ = "lorem ipsum"; - /* r.binary(u'lorem ipsum'.encode('ascii')).coerce_to('string') */ - logger.info("About to run line #278: r.binary('lorem ipsum'.getBytes(StandardCharsets.US_ASCII)).coerceTo('string')"); - Object obtained = runOrCatch(r.binary("lorem ipsum".getBytes(StandardCharsets.US_ASCII)).coerceTo("string"), - new OptArgs() - ,conn); - try { - assertEquals(expected_, obtained); - logger.info("Finished running line #278"); - } catch (Throwable ae) { - logger.error("Whoops, got exception on line #278:" + ae.toString()); - if(obtained instanceof Throwable) { - ae.addSuppressed((Throwable) obtained); - } - throw ae; - } - } - - { - // datum/binary.yaml line #284 - /* b'foo' */ - byte[] expected_ = new byte[]{102, 111, 111}; - /* r.expr('foo').coerce_to('binary') */ - logger.info("About to run line #284: r.expr('foo').coerceTo('binary')"); - Object obtained = runOrCatch(r.expr("foo").coerceTo("binary"), - new OptArgs() - ,conn); - try { - assertArrayEquals(expected_, (byte[]) obtained); - logger.info("Finished running line #284"); - } catch (Throwable ae) { - logger.error("Whoops, got exception on line #284:" + ae.toString()); - if(obtained instanceof Throwable) { - ae.addSuppressed((Throwable) obtained); - } - throw ae; - } - } - - { - // datum/binary.yaml line #287 - /* True */ - Boolean expected_ = true; - /* r.binary(a).coerce_to('bool') */ - logger.info("About to run line #287: r.binary(a).coerceTo('bool')"); - Object obtained = runOrCatch(r.binary(a).coerceTo("bool"), - new OptArgs() - ,conn); - try { - assertEquals(expected_, obtained); - logger.info("Finished running line #287"); - } catch (Throwable ae) { - logger.error("Whoops, got exception on line #287:" + ae.toString()); - if(obtained instanceof Throwable) { - ae.addSuppressed((Throwable) obtained); - } - throw ae; - } - } - - { - // datum/binary.yaml line #290 - /* b'foo' */ - byte[] expected_ = new byte[]{102, 111, 111}; - /* r.binary(b'foo').coerce_to('binary') */ - logger.info("About to run line #290: r.binary(new byte[]{102, 111, 111}).coerceTo('binary')"); - Object obtained = runOrCatch(r.binary(new byte[]{102, 111, 111}).coerceTo("binary"), - new OptArgs() - ,conn); - try { - assertArrayEquals(expected_, (byte[]) obtained); - logger.info("Finished running line #290"); - } catch (Throwable ae) { - logger.error("Whoops, got exception on line #290:" + ae.toString()); - if(obtained instanceof Throwable) { - ae.addSuppressed((Throwable) obtained); - } - throw ae; - } - } - - { - // datum/binary.yaml line #294 - /* b'ef' */ - byte[] expected_ = new byte[]{101, 102}; - /* r.binary(b'abcdefg').slice(-3,-1) */ - logger.info("About to run line #294: r.binary(new byte[]{97, 98, 99, 100, 101, 102, 103}).slice(-3L, -1L)"); - Object obtained = runOrCatch(r.binary(new byte[]{97, 98, 99, 100, 101, 102, 103}).slice(-3L, -1L), - new OptArgs() - ,conn); - try { - assertArrayEquals(expected_, (byte[]) obtained); - logger.info("Finished running line #294"); - } catch (Throwable ae) { - logger.error("Whoops, got exception on line #294:" + ae.toString()); - if(obtained instanceof Throwable) { - ae.addSuppressed((Throwable) obtained); - } - throw ae; - } - } - - { - // datum/binary.yaml line #296 - /* b'ab' */ - byte[] expected_ = new byte[]{97, 98}; - /* r.binary(b'abcdefg').slice(0, 2) */ - logger.info("About to run line #296: r.binary(new byte[]{97, 98, 99, 100, 101, 102, 103}).slice(0L, 2L)"); - Object obtained = runOrCatch(r.binary(new byte[]{97, 98, 99, 100, 101, 102, 103}).slice(0L, 2L), - new OptArgs() - ,conn); - try { - assertArrayEquals(expected_, (byte[]) obtained); - logger.info("Finished running line #296"); - } catch (Throwable ae) { - logger.error("Whoops, got exception on line #296:" + ae.toString()); - if(obtained instanceof Throwable) { - ae.addSuppressed((Throwable) obtained); - } - throw ae; - } - } - - { - // datum/binary.yaml line #298 - /* b'def' */ - byte[] expected_ = new byte[]{100, 101, 102}; - /* r.binary(b'abcdefg').slice(3, -1) */ - logger.info("About to run line #298: r.binary(new byte[]{97, 98, 99, 100, 101, 102, 103}).slice(3L, -1L)"); - Object obtained = runOrCatch(r.binary(new byte[]{97, 98, 99, 100, 101, 102, 103}).slice(3L, -1L), - new OptArgs() - ,conn); - try { - assertArrayEquals(expected_, (byte[]) obtained); - logger.info("Finished running line #298"); - } catch (Throwable ae) { - logger.error("Whoops, got exception on line #298:" + ae.toString()); - if(obtained instanceof Throwable) { - ae.addSuppressed((Throwable) obtained); - } - throw ae; - } - } - - { - // datum/binary.yaml line #300 - /* b'cde' */ - byte[] expected_ = new byte[]{99, 100, 101}; - /* r.binary(b'abcdefg').slice(-5, 5) */ - logger.info("About to run line #300: r.binary(new byte[]{97, 98, 99, 100, 101, 102, 103}).slice(-5L, 5L)"); - Object obtained = runOrCatch(r.binary(new byte[]{97, 98, 99, 100, 101, 102, 103}).slice(-5L, 5L), - new OptArgs() - ,conn); - try { - assertArrayEquals(expected_, (byte[]) obtained); - logger.info("Finished running line #300"); - } catch (Throwable ae) { - logger.error("Whoops, got exception on line #300:" + ae.toString()); - if(obtained instanceof Throwable) { - ae.addSuppressed((Throwable) obtained); - } - throw ae; - } - } - - { - // datum/binary.yaml line #302 - /* b'ab' */ - byte[] expected_ = new byte[]{97, 98}; - /* r.binary(b'abcdefg').slice(-8, 2) */ - logger.info("About to run line #302: r.binary(new byte[]{97, 98, 99, 100, 101, 102, 103}).slice(-8L, 2L)"); - Object obtained = runOrCatch(r.binary(new byte[]{97, 98, 99, 100, 101, 102, 103}).slice(-8L, 2L), - new OptArgs() - ,conn); - try { - assertArrayEquals(expected_, (byte[]) obtained); - logger.info("Finished running line #302"); - } catch (Throwable ae) { - logger.error("Whoops, got exception on line #302:" + ae.toString()); - if(obtained instanceof Throwable) { - ae.addSuppressed((Throwable) obtained); - } - throw ae; - } - } - - { - // datum/binary.yaml line #304 - /* b'fg' */ - byte[] expected_ = new byte[]{102, 103}; - /* r.binary(b'abcdefg').slice(5, 7) */ - logger.info("About to run line #304: r.binary(new byte[]{97, 98, 99, 100, 101, 102, 103}).slice(5L, 7L)"); - Object obtained = runOrCatch(r.binary(new byte[]{97, 98, 99, 100, 101, 102, 103}).slice(5L, 7L), - new OptArgs() - ,conn); - try { - assertArrayEquals(expected_, (byte[]) obtained); - logger.info("Finished running line #304"); - } catch (Throwable ae) { - logger.error("Whoops, got exception on line #304:" + ae.toString()); - if(obtained instanceof Throwable) { - ae.addSuppressed((Throwable) obtained); - } - throw ae; - } - } - - { - // datum/binary.yaml line #308 - /* b'ab' */ - byte[] expected_ = new byte[]{97, 98}; - /* r.binary(b'abcdefg').slice(-9, 2) */ - logger.info("About to run line #308: r.binary(new byte[]{97, 98, 99, 100, 101, 102, 103}).slice(-9L, 2L)"); - Object obtained = runOrCatch(r.binary(new byte[]{97, 98, 99, 100, 101, 102, 103}).slice(-9L, 2L), - new OptArgs() - ,conn); - try { - assertArrayEquals(expected_, (byte[]) obtained); - logger.info("Finished running line #308"); - } catch (Throwable ae) { - logger.error("Whoops, got exception on line #308:" + ae.toString()); - if(obtained instanceof Throwable) { - ae.addSuppressed((Throwable) obtained); - } - throw ae; - } - } - - { - // datum/binary.yaml line #312 - /* b'fg' */ - byte[] expected_ = new byte[]{102, 103}; - /* r.binary(b'abcdefg').slice(5, 9) */ - logger.info("About to run line #312: r.binary(new byte[]{97, 98, 99, 100, 101, 102, 103}).slice(5L, 9L)"); - Object obtained = runOrCatch(r.binary(new byte[]{97, 98, 99, 100, 101, 102, 103}).slice(5L, 9L), - new OptArgs() - ,conn); - try { - assertArrayEquals(expected_, (byte[]) obtained); - logger.info("Finished running line #312"); - } catch (Throwable ae) { - logger.error("Whoops, got exception on line #312:" + ae.toString()); - if(obtained instanceof Throwable) { - ae.addSuppressed((Throwable) obtained); - } - throw ae; - } - } - - { - // datum/binary.yaml line #316 - /* b */ - byte[] expected_ = b; - /* r.binary(b) */ - logger.info("About to run line #316: r.binary(b)"); - Object obtained = runOrCatch(r.binary(b), - new OptArgs() - .with("binary_format", "native") - ,conn); - try { - assertArrayEquals(expected_, (byte[]) obtained); - logger.info("Finished running line #316"); - } catch (Throwable ae) { - logger.error("Whoops, got exception on line #316:" + ae.toString()); - if(obtained instanceof Throwable) { - ae.addSuppressed((Throwable) obtained); - } - throw ae; - } - } - - { - // datum/binary.yaml line #320 - /* {'$reql_type$':'BINARY','data':'AAE='} */ - Map expected_ = r.hashMap("$reql_type$", "BINARY").with("data", "AAE="); - /* r.binary(b) */ - logger.info("About to run line #320: r.binary(b)"); - Object obtained = runOrCatch(r.binary(b), - new OptArgs() - .with("binary_format", "raw") - ,conn); - try { - assertEquals(expected_, obtained); - logger.info("Finished running line #320"); - } catch (Throwable ae) { - logger.error("Whoops, got exception on line #320:" + ae.toString()); - if(obtained instanceof Throwable) { - ae.addSuppressed((Throwable) obtained); - } - throw ae; - } - } - - { - // datum/binary.yaml line #326 - /* b"data" */ - byte[] expected_ = new byte[]{100, 97, 116, 97}; - /* r.binary(r.expr("data")) */ - logger.info("About to run line #326: r.binary(r.expr('data'))"); - Object obtained = runOrCatch(r.binary(r.expr("data")), - new OptArgs() - ,conn); - try { - assertArrayEquals(expected_, (byte[]) obtained); - logger.info("Finished running line #326"); - } catch (Throwable ae) { - logger.error("Whoops, got exception on line #326:" + ae.toString()); - if(obtained instanceof Throwable) { - ae.addSuppressed((Throwable) obtained); - } - throw ae; - } - } - - { - // datum/binary.yaml line #332 - /* err('ReqlQueryLogicError', 'Expected type STRING but found OBJECT.', []) */ - Err expected_ = err("ReqlQueryLogicError", "Expected type STRING but found OBJECT.", r.array()); - /* r.binary(r.expr({})) */ - logger.info("About to run line #332: r.binary(r.expr(r.hashMap()))"); - Object obtained = runOrCatch(r.binary(r.expr(r.hashMap())), - new OptArgs() - ,conn); - try { - assertEquals(expected_, obtained); - logger.info("Finished running line #332"); - } catch (Throwable ae) { - logger.error("Whoops, got exception on line #332:" + ae.toString()); - if(obtained instanceof Throwable) { - ae.addSuppressed((Throwable) obtained); - } - throw ae; - } - } - - { - // datum/binary.yaml line #335 - /* err('ReqlQueryLogicError', 'Expected type STRING but found ARRAY.', []) */ - Err expected_ = err("ReqlQueryLogicError", "Expected type STRING but found ARRAY.", r.array()); - /* r.binary(r.expr([])) */ - logger.info("About to run line #335: r.binary(r.expr(r.array()))"); - Object obtained = runOrCatch(r.binary(r.expr(r.array())), - new OptArgs() - ,conn); - try { - assertEquals(expected_, obtained); - logger.info("Finished running line #335"); - } catch (Throwable ae) { - logger.error("Whoops, got exception on line #335:" + ae.toString()); - if(obtained instanceof Throwable) { - ae.addSuppressed((Throwable) obtained); - } - throw ae; - } - } - - { - // datum/binary.yaml line #341 - /* err('ReqlQueryLogicError','Invalid binary pseudotype:'+' lacking `data` key.',[]) */ - Err expected_ = err("ReqlQueryLogicError", "Invalid binary pseudotype:" + " lacking `data` key.", r.array()); - /* r.expr({'$reql_type$':'BINARY'}) */ - logger.info("About to run line #341: r.expr(r.hashMap('$reql_type$', 'BINARY'))"); - Object obtained = runOrCatch(r.expr(r.hashMap("$reql_type$", "BINARY")), - new OptArgs() - ,conn); - try { - assertEquals(expected_, obtained); - logger.info("Finished running line #341"); - } catch (Throwable ae) { - logger.error("Whoops, got exception on line #341:" + ae.toString()); - if(obtained instanceof Throwable) { - ae.addSuppressed((Throwable) obtained); - } - throw ae; - } - } - - { - // datum/binary.yaml line #346 - /* err('ReqlQueryLogicError','Invalid base64 format, data found after padding character \'=\'.',[]) */ - Err expected_ = err("ReqlQueryLogicError", "Invalid base64 format, data found after padding character '='.", r.array()); - /* r.expr({'$reql_type$':'BINARY','data':'ABCDEFGH==AA'}) */ - logger.info("About to run line #346: r.expr(r.hashMap('$reql_type$', 'BINARY').with('data', 'ABCDEFGH==AA'))"); - Object obtained = runOrCatch(r.expr(r.hashMap("$reql_type$", "BINARY").with("data", "ABCDEFGH==AA")), - new OptArgs() - ,conn); - try { - assertEquals(expected_, obtained); - logger.info("Finished running line #346"); - } catch (Throwable ae) { - logger.error("Whoops, got exception on line #346:" + ae.toString()); - if(obtained instanceof Throwable) { - ae.addSuppressed((Throwable) obtained); - } - throw ae; - } - } - - { - // datum/binary.yaml line #348 - /* err('ReqlQueryLogicError','Invalid base64 format, data found after padding character \'=\'.',[]) */ - Err expected_ = err("ReqlQueryLogicError", "Invalid base64 format, data found after padding character '='.", r.array()); - /* r.expr({'$reql_type$':'BINARY','data':'ABCDEF==$'}) */ - logger.info("About to run line #348: r.expr(r.hashMap('$reql_type$', 'BINARY').with('data', 'ABCDEF==$'))"); - Object obtained = runOrCatch(r.expr(r.hashMap("$reql_type$", "BINARY").with("data", "ABCDEF==$")), - new OptArgs() - ,conn); - try { - assertEquals(expected_, obtained); - logger.info("Finished running line #348"); - } catch (Throwable ae) { - logger.error("Whoops, got exception on line #348:" + ae.toString()); - if(obtained instanceof Throwable) { - ae.addSuppressed((Throwable) obtained); - } - throw ae; - } - } - - { - // datum/binary.yaml line #350 - /* err('ReqlQueryLogicError','Invalid base64 character found:'+' \'^\'.',[]) */ - Err expected_ = err("ReqlQueryLogicError", "Invalid base64 character found:" + " '^'.", r.array()); - /* r.expr({'$reql_type$':'BINARY','data':'A^CDEFGH'}) */ - logger.info("About to run line #350: r.expr(r.hashMap('$reql_type$', 'BINARY').with('data', 'A^CDEFGH'))"); - Object obtained = runOrCatch(r.expr(r.hashMap("$reql_type$", "BINARY").with("data", "A^CDEFGH")), - new OptArgs() - ,conn); - try { - assertEquals(expected_, obtained); - logger.info("Finished running line #350"); - } catch (Throwable ae) { - logger.error("Whoops, got exception on line #350:" + ae.toString()); - if(obtained instanceof Throwable) { - ae.addSuppressed((Throwable) obtained); - } - throw ae; - } - } - - { - // datum/binary.yaml line #352 - /* err('ReqlQueryLogicError','Invalid base64 length:'+' 1 character remaining, cannot decode a full byte.',[]) */ - Err expected_ = err("ReqlQueryLogicError", "Invalid base64 length:" + " 1 character remaining, cannot decode a full byte.", r.array()); - /* r.expr({'$reql_type$':'BINARY','data':'ABCDE'}) */ - logger.info("About to run line #352: r.expr(r.hashMap('$reql_type$', 'BINARY').with('data', 'ABCDE'))"); - Object obtained = runOrCatch(r.expr(r.hashMap("$reql_type$", "BINARY").with("data", "ABCDE")), - new OptArgs() - ,conn); - try { - assertEquals(expected_, obtained); - logger.info("Finished running line #352"); - } catch (Throwable ae) { - logger.error("Whoops, got exception on line #352:" + ae.toString()); - if(obtained instanceof Throwable) { - ae.addSuppressed((Throwable) obtained); - } - throw ae; - } - } - - { - // datum/binary.yaml line #356 - /* err('ReqlQueryLogicError','Cannot coerce BINARY to ARRAY.',[]) */ - Err expected_ = err("ReqlQueryLogicError", "Cannot coerce BINARY to ARRAY.", r.array()); - /* r.binary(a).coerce_to('array') */ - logger.info("About to run line #356: r.binary(a).coerceTo('array')"); - Object obtained = runOrCatch(r.binary(a).coerceTo("array"), - new OptArgs() - ,conn); - try { - assertEquals(expected_, obtained); - logger.info("Finished running line #356"); - } catch (Throwable ae) { - logger.error("Whoops, got exception on line #356:" + ae.toString()); - if(obtained instanceof Throwable) { - ae.addSuppressed((Throwable) obtained); - } - throw ae; - } - } - - { - // datum/binary.yaml line #358 - /* err('ReqlQueryLogicError','Cannot coerce BINARY to OBJECT.',[]) */ - Err expected_ = err("ReqlQueryLogicError", "Cannot coerce BINARY to OBJECT.", r.array()); - /* r.binary(a).coerce_to('object') */ - logger.info("About to run line #358: r.binary(a).coerceTo('object')"); - Object obtained = runOrCatch(r.binary(a).coerceTo("object"), - new OptArgs() - ,conn); - try { - assertEquals(expected_, obtained); - logger.info("Finished running line #358"); - } catch (Throwable ae) { - logger.error("Whoops, got exception on line #358:" + ae.toString()); - if(obtained instanceof Throwable) { - ae.addSuppressed((Throwable) obtained); - } - throw ae; - } - } - - { - // datum/binary.yaml line #360 - /* err('ReqlQueryLogicError','Cannot coerce BINARY to NUMBER.',[]) */ - Err expected_ = err("ReqlQueryLogicError", "Cannot coerce BINARY to NUMBER.", r.array()); - /* r.binary(a).coerce_to('number') */ - logger.info("About to run line #360: r.binary(a).coerceTo('number')"); - Object obtained = runOrCatch(r.binary(a).coerceTo("number"), - new OptArgs() - ,conn); - try { - assertEquals(expected_, obtained); - logger.info("Finished running line #360"); - } catch (Throwable ae) { - logger.error("Whoops, got exception on line #360:" + ae.toString()); - if(obtained instanceof Throwable) { - ae.addSuppressed((Throwable) obtained); - } - throw ae; - } - } - - { - // datum/binary.yaml line #362 - /* err('ReqlQueryLogicError','Cannot coerce BINARY to NULL.',[]) */ - Err expected_ = err("ReqlQueryLogicError", "Cannot coerce BINARY to NULL.", r.array()); - /* r.binary(a).coerce_to('nu'+'ll') */ - logger.info("About to run line #362: r.binary(a).coerceTo(r.add('nu', 'll'))"); - Object obtained = runOrCatch(r.binary(a).coerceTo(r.add("nu", "ll")), - new OptArgs() - ,conn); - try { - assertEquals(expected_, obtained); - logger.info("Finished running line #362"); - } catch (Throwable ae) { - logger.error("Whoops, got exception on line #362:" + ae.toString()); - if(obtained instanceof Throwable) { - ae.addSuppressed((Throwable) obtained); - } - throw ae; - } - } - } -} diff --git a/drivers/java/src/test/java/com/rethinkdb/gen/DatumBool.java b/drivers/java/src/test/java/com/rethinkdb/gen/DatumBool.java deleted file mode 100644 index 127302346b7..00000000000 --- a/drivers/java/src/test/java/com/rethinkdb/gen/DatumBool.java +++ /dev/null @@ -1,329 +0,0 @@ -// Autogenerated by convert_tests.py and process_polyglot.py. -// Do not edit this file directly. -// The template for this file is located at: -// ../../../../../../../templates/Test.java -package com.rethinkdb.gen; - -import com.rethinkdb.RethinkDB; -import com.rethinkdb.gen.exc.*; -import com.rethinkdb.gen.ast.*; -import com.rethinkdb.ast.ReqlAst; -import com.rethinkdb.model.MapObject; -import com.rethinkdb.model.OptArgs; -import com.rethinkdb.net.Connection; -import com.rethinkdb.net.Cursor; -import junit.framework.TestCase; -import static org.junit.Assert.assertEquals; -import static org.junit.Assert.assertArrayEquals; -import org.slf4j.Logger; -import org.slf4j.LoggerFactory; - -import org.junit.*; -import org.junit.rules.ExpectedException; - -import java.util.Arrays; -import java.util.ArrayList; -import java.util.List; -import java.util.Map; -import java.util.Set; -import java.time.OffsetDateTime; -import java.time.ZoneOffset; -import java.time.Instant; -import java.util.stream.LongStream; -import java.util.stream.Collectors; -import java.util.stream.Stream; -import java.util.concurrent.TimeoutException; -import java.util.regex.Pattern; -import java.util.Collections; -import java.nio.charset.StandardCharsets; - -import static com.rethinkdb.TestingCommon.*; -import com.rethinkdb.TestingFramework; - -public class DatumBool { - // Tests of conversion to and from the RQL bool type - Logger logger = LoggerFactory.getLogger(DatumBool.class); - public static final RethinkDB r = RethinkDB.r; - - Connection conn; - - @Before - public void setUp() throws Exception { - logger.info("Setting up."); - conn = TestingFramework.createConnection(); - try { - r.dbCreate("test").run(conn); - r.db("test").wait_().run(conn); - }catch (Exception e){} - } - - @After - public void tearDown() throws Exception { - logger.info("Tearing down."); - r.db("rethinkdb").table("_debug_scratch").delete().run(conn); - if(!conn.isOpen()){ - conn.close(); - conn = TestingFramework.createConnection(); - } - r.dbDrop("test").run(conn); - conn.close(false); - } - - // Autogenerated tests below - - @Test(timeout=120000) - public void test() throws Exception { - - { - // datum/bool.yaml line #3 - /* true */ - Boolean expected_ = true; - /* r.expr(True) */ - logger.info("About to run line #3: r.expr(true)"); - Object obtained = runOrCatch(r.expr(true), - new OptArgs() - ,conn); - try { - assertEquals(expected_, obtained); - logger.info("Finished running line #3"); - } catch (Throwable ae) { - logger.error("Whoops, got exception on line #3:" + ae.toString()); - if(obtained instanceof Throwable) { - ae.addSuppressed((Throwable) obtained); - } - throw ae; - } - } - - { - // datum/bool.yaml line #10 - /* false */ - Boolean expected_ = false; - /* r.expr(False) */ - logger.info("About to run line #10: r.expr(false)"); - Object obtained = runOrCatch(r.expr(false), - new OptArgs() - ,conn); - try { - assertEquals(expected_, obtained); - logger.info("Finished running line #10"); - } catch (Throwable ae) { - logger.error("Whoops, got exception on line #10:" + ae.toString()); - if(obtained instanceof Throwable) { - ae.addSuppressed((Throwable) obtained); - } - throw ae; - } - } - - { - // datum/bool.yaml line #17 - /* 'BOOL' */ - String expected_ = "BOOL"; - /* r.expr(False).type_of() */ - logger.info("About to run line #17: r.expr(false).typeOf()"); - Object obtained = runOrCatch(r.expr(false).typeOf(), - new OptArgs() - ,conn); - try { - assertEquals(expected_, obtained); - logger.info("Finished running line #17"); - } catch (Throwable ae) { - logger.error("Whoops, got exception on line #17:" + ae.toString()); - if(obtained instanceof Throwable) { - ae.addSuppressed((Throwable) obtained); - } - throw ae; - } - } - - { - // datum/bool.yaml line #21 - /* 'true' */ - String expected_ = "true"; - /* r.expr(True).coerce_to('string') */ - logger.info("About to run line #21: r.expr(true).coerceTo('string')"); - Object obtained = runOrCatch(r.expr(true).coerceTo("string"), - new OptArgs() - ,conn); - try { - assertEquals(expected_, obtained); - logger.info("Finished running line #21"); - } catch (Throwable ae) { - logger.error("Whoops, got exception on line #21:" + ae.toString()); - if(obtained instanceof Throwable) { - ae.addSuppressed((Throwable) obtained); - } - throw ae; - } - } - - { - // datum/bool.yaml line #24 - /* True */ - Boolean expected_ = true; - /* r.expr(True).coerce_to('bool') */ - logger.info("About to run line #24: r.expr(true).coerceTo('bool')"); - Object obtained = runOrCatch(r.expr(true).coerceTo("bool"), - new OptArgs() - ,conn); - try { - assertEquals(expected_, obtained); - logger.info("Finished running line #24"); - } catch (Throwable ae) { - logger.error("Whoops, got exception on line #24:" + ae.toString()); - if(obtained instanceof Throwable) { - ae.addSuppressed((Throwable) obtained); - } - throw ae; - } - } - - { - // datum/bool.yaml line #27 - /* False */ - Boolean expected_ = false; - /* r.expr(False).coerce_to('bool') */ - logger.info("About to run line #27: r.expr(false).coerceTo('bool')"); - Object obtained = runOrCatch(r.expr(false).coerceTo("bool"), - new OptArgs() - ,conn); - try { - assertEquals(expected_, obtained); - logger.info("Finished running line #27"); - } catch (Throwable ae) { - logger.error("Whoops, got exception on line #27:" + ae.toString()); - if(obtained instanceof Throwable) { - ae.addSuppressed((Throwable) obtained); - } - throw ae; - } - } - - { - // datum/bool.yaml line #30 - /* False */ - Boolean expected_ = false; - /* r.expr(null).coerce_to('bool') */ - logger.info("About to run line #30: r.expr((ReqlExpr) null).coerceTo('bool')"); - Object obtained = runOrCatch(r.expr((ReqlExpr) null).coerceTo("bool"), - new OptArgs() - ,conn); - try { - assertEquals(expected_, obtained); - logger.info("Finished running line #30"); - } catch (Throwable ae) { - logger.error("Whoops, got exception on line #30:" + ae.toString()); - if(obtained instanceof Throwable) { - ae.addSuppressed((Throwable) obtained); - } - throw ae; - } - } - - { - // datum/bool.yaml line #33 - /* True */ - Boolean expected_ = true; - /* r.expr(0).coerce_to('bool') */ - logger.info("About to run line #33: r.expr(0L).coerceTo('bool')"); - Object obtained = runOrCatch(r.expr(0L).coerceTo("bool"), - new OptArgs() - ,conn); - try { - assertEquals(expected_, obtained); - logger.info("Finished running line #33"); - } catch (Throwable ae) { - logger.error("Whoops, got exception on line #33:" + ae.toString()); - if(obtained instanceof Throwable) { - ae.addSuppressed((Throwable) obtained); - } - throw ae; - } - } - - { - // datum/bool.yaml line #36 - /* True */ - Boolean expected_ = true; - /* r.expr('false').coerce_to('bool') */ - logger.info("About to run line #36: r.expr('false').coerceTo('bool')"); - Object obtained = runOrCatch(r.expr("false").coerceTo("bool"), - new OptArgs() - ,conn); - try { - assertEquals(expected_, obtained); - logger.info("Finished running line #36"); - } catch (Throwable ae) { - logger.error("Whoops, got exception on line #36:" + ae.toString()); - if(obtained instanceof Throwable) { - ae.addSuppressed((Throwable) obtained); - } - throw ae; - } - } - - { - // datum/bool.yaml line #39 - /* True */ - Boolean expected_ = true; - /* r.expr('foo').coerce_to('bool') */ - logger.info("About to run line #39: r.expr('foo').coerceTo('bool')"); - Object obtained = runOrCatch(r.expr("foo").coerceTo("bool"), - new OptArgs() - ,conn); - try { - assertEquals(expected_, obtained); - logger.info("Finished running line #39"); - } catch (Throwable ae) { - logger.error("Whoops, got exception on line #39:" + ae.toString()); - if(obtained instanceof Throwable) { - ae.addSuppressed((Throwable) obtained); - } - throw ae; - } - } - - { - // datum/bool.yaml line #42 - /* True */ - Boolean expected_ = true; - /* r.expr([]).coerce_to('bool') */ - logger.info("About to run line #42: r.expr(r.array()).coerceTo('bool')"); - Object obtained = runOrCatch(r.expr(r.array()).coerceTo("bool"), - new OptArgs() - ,conn); - try { - assertEquals(expected_, obtained); - logger.info("Finished running line #42"); - } catch (Throwable ae) { - logger.error("Whoops, got exception on line #42:" + ae.toString()); - if(obtained instanceof Throwable) { - ae.addSuppressed((Throwable) obtained); - } - throw ae; - } - } - - { - // datum/bool.yaml line #45 - /* True */ - Boolean expected_ = true; - /* r.expr({}).coerce_to('bool') */ - logger.info("About to run line #45: r.expr(r.hashMap()).coerceTo('bool')"); - Object obtained = runOrCatch(r.expr(r.hashMap()).coerceTo("bool"), - new OptArgs() - ,conn); - try { - assertEquals(expected_, obtained); - logger.info("Finished running line #45"); - } catch (Throwable ae) { - logger.error("Whoops, got exception on line #45:" + ae.toString()); - if(obtained instanceof Throwable) { - ae.addSuppressed((Throwable) obtained); - } - throw ae; - } - } - } -} diff --git a/drivers/java/src/test/java/com/rethinkdb/gen/DatumNull.java b/drivers/java/src/test/java/com/rethinkdb/gen/DatumNull.java deleted file mode 100644 index 42339f948ea..00000000000 --- a/drivers/java/src/test/java/com/rethinkdb/gen/DatumNull.java +++ /dev/null @@ -1,161 +0,0 @@ -// Autogenerated by convert_tests.py and process_polyglot.py. -// Do not edit this file directly. -// The template for this file is located at: -// ../../../../../../../templates/Test.java -package com.rethinkdb.gen; - -import com.rethinkdb.RethinkDB; -import com.rethinkdb.gen.exc.*; -import com.rethinkdb.gen.ast.*; -import com.rethinkdb.ast.ReqlAst; -import com.rethinkdb.model.MapObject; -import com.rethinkdb.model.OptArgs; -import com.rethinkdb.net.Connection; -import com.rethinkdb.net.Cursor; -import junit.framework.TestCase; -import static org.junit.Assert.assertEquals; -import static org.junit.Assert.assertArrayEquals; -import org.slf4j.Logger; -import org.slf4j.LoggerFactory; - -import org.junit.*; -import org.junit.rules.ExpectedException; - -import java.util.Arrays; -import java.util.ArrayList; -import java.util.List; -import java.util.Map; -import java.util.Set; -import java.time.OffsetDateTime; -import java.time.ZoneOffset; -import java.time.Instant; -import java.util.stream.LongStream; -import java.util.stream.Collectors; -import java.util.stream.Stream; -import java.util.concurrent.TimeoutException; -import java.util.regex.Pattern; -import java.util.Collections; -import java.nio.charset.StandardCharsets; - -import static com.rethinkdb.TestingCommon.*; -import com.rethinkdb.TestingFramework; - -public class DatumNull { - // Tests of conversion to and from the RQL null type - Logger logger = LoggerFactory.getLogger(DatumNull.class); - public static final RethinkDB r = RethinkDB.r; - - Connection conn; - - @Before - public void setUp() throws Exception { - logger.info("Setting up."); - conn = TestingFramework.createConnection(); - try { - r.dbCreate("test").run(conn); - r.db("test").wait_().run(conn); - }catch (Exception e){} - } - - @After - public void tearDown() throws Exception { - logger.info("Tearing down."); - r.db("rethinkdb").table("_debug_scratch").delete().run(conn); - if(!conn.isOpen()){ - conn.close(); - conn = TestingFramework.createConnection(); - } - r.dbDrop("test").run(conn); - conn.close(false); - } - - // Autogenerated tests below - - @Test(timeout=120000) - public void test() throws Exception { - - { - // datum/null.yaml line #6 - /* (null) */ - Object expected_ = null; - /* r.expr(null) */ - logger.info("About to run line #6: r.expr((ReqlExpr) null)"); - Object obtained = runOrCatch(r.expr((ReqlExpr) null), - new OptArgs() - ,conn); - try { - assertEquals(expected_, obtained); - logger.info("Finished running line #6"); - } catch (Throwable ae) { - logger.error("Whoops, got exception on line #6:" + ae.toString()); - if(obtained instanceof Throwable) { - ae.addSuppressed((Throwable) obtained); - } - throw ae; - } - } - - { - // datum/null.yaml line #9 - /* 'NULL' */ - String expected_ = "NULL"; - /* r.expr(null).type_of() */ - logger.info("About to run line #9: r.expr((ReqlExpr) null).typeOf()"); - Object obtained = runOrCatch(r.expr((ReqlExpr) null).typeOf(), - new OptArgs() - ,conn); - try { - assertEquals(expected_, obtained); - logger.info("Finished running line #9"); - } catch (Throwable ae) { - logger.error("Whoops, got exception on line #9:" + ae.toString()); - if(obtained instanceof Throwable) { - ae.addSuppressed((Throwable) obtained); - } - throw ae; - } - } - - { - // datum/null.yaml line #14 - /* 'null' */ - String expected_ = "null"; - /* r.expr(null).coerce_to('string') */ - logger.info("About to run line #14: r.expr((ReqlExpr) null).coerceTo('string')"); - Object obtained = runOrCatch(r.expr((ReqlExpr) null).coerceTo("string"), - new OptArgs() - ,conn); - try { - assertEquals(expected_, obtained); - logger.info("Finished running line #14"); - } catch (Throwable ae) { - logger.error("Whoops, got exception on line #14:" + ae.toString()); - if(obtained instanceof Throwable) { - ae.addSuppressed((Throwable) obtained); - } - throw ae; - } - } - - { - // datum/null.yaml line #17 - /* null */ - Object expected_ = null; - /* r.expr(null).coerce_to('null') */ - logger.info("About to run line #17: r.expr((ReqlExpr) null).coerceTo('null')"); - Object obtained = runOrCatch(r.expr((ReqlExpr) null).coerceTo("null"), - new OptArgs() - ,conn); - try { - assertEquals(expected_, obtained); - logger.info("Finished running line #17"); - } catch (Throwable ae) { - logger.error("Whoops, got exception on line #17:" + ae.toString()); - if(obtained instanceof Throwable) { - ae.addSuppressed((Throwable) obtained); - } - throw ae; - } - } - } -} diff --git a/drivers/java/src/test/java/com/rethinkdb/gen/DatumNumber.java b/drivers/java/src/test/java/com/rethinkdb/gen/DatumNumber.java deleted file mode 100644 index bb4c1ec46be..00000000000 --- a/drivers/java/src/test/java/com/rethinkdb/gen/DatumNumber.java +++ /dev/null @@ -1,446 +0,0 @@ -// Autogenerated by convert_tests.py and process_polyglot.py. -// Do not edit this file directly. -// The template for this file is located at: -// ../../../../../../../templates/Test.java -package com.rethinkdb.gen; - -import com.rethinkdb.RethinkDB; -import com.rethinkdb.gen.exc.*; -import com.rethinkdb.gen.ast.*; -import com.rethinkdb.ast.ReqlAst; -import com.rethinkdb.model.MapObject; -import com.rethinkdb.model.OptArgs; -import com.rethinkdb.net.Connection; -import com.rethinkdb.net.Cursor; -import junit.framework.TestCase; -import static org.junit.Assert.assertEquals; -import static org.junit.Assert.assertArrayEquals; -import org.slf4j.Logger; -import org.slf4j.LoggerFactory; - -import org.junit.*; -import org.junit.rules.ExpectedException; - -import java.util.Arrays; -import java.util.ArrayList; -import java.util.List; -import java.util.Map; -import java.util.Set; -import java.time.OffsetDateTime; -import java.time.ZoneOffset; -import java.time.Instant; -import java.util.stream.LongStream; -import java.util.stream.Collectors; -import java.util.stream.Stream; -import java.util.concurrent.TimeoutException; -import java.util.regex.Pattern; -import java.util.Collections; -import java.nio.charset.StandardCharsets; - -import static com.rethinkdb.TestingCommon.*; -import com.rethinkdb.TestingFramework; - -public class DatumNumber { - // Tests of conversion to and from the RQL number type - Logger logger = LoggerFactory.getLogger(DatumNumber.class); - public static final RethinkDB r = RethinkDB.r; - - Connection conn; - - @Before - public void setUp() throws Exception { - logger.info("Setting up."); - conn = TestingFramework.createConnection(); - try { - r.dbCreate("test").run(conn); - r.db("test").wait_().run(conn); - }catch (Exception e){} - } - - @After - public void tearDown() throws Exception { - logger.info("Tearing down."); - r.db("rethinkdb").table("_debug_scratch").delete().run(conn); - if(!conn.isOpen()){ - conn.close(); - conn = TestingFramework.createConnection(); - } - r.dbDrop("test").run(conn); - conn.close(false); - } - - // Autogenerated tests below - - @Test(timeout=120000) - public void test() throws Exception { - - { - // datum/number.yaml line #6 - /* 1 */ - Long expected_ = 1L; - /* r.expr(1) */ - logger.info("About to run line #6: r.expr(1L)"); - Object obtained = runOrCatch(r.expr(1L), - new OptArgs() - ,conn); - try { - assertEquals(expected_, obtained); - logger.info("Finished running line #6"); - } catch (Throwable ae) { - logger.error("Whoops, got exception on line #6:" + ae.toString()); - if(obtained instanceof Throwable) { - ae.addSuppressed((Throwable) obtained); - } - throw ae; - } - } - - { - // datum/number.yaml line #15 - /* -1 */ - Long expected_ = -1L; - /* r.expr(-1) */ - logger.info("About to run line #15: r.expr(-1L)"); - Object obtained = runOrCatch(r.expr(-1L), - new OptArgs() - ,conn); - try { - assertEquals(expected_, obtained); - logger.info("Finished running line #15"); - } catch (Throwable ae) { - logger.error("Whoops, got exception on line #15:" + ae.toString()); - if(obtained instanceof Throwable) { - ae.addSuppressed((Throwable) obtained); - } - throw ae; - } - } - - { - // datum/number.yaml line #24 - /* 0 */ - Long expected_ = 0L; - /* r.expr(0) */ - logger.info("About to run line #24: r.expr(0L)"); - Object obtained = runOrCatch(r.expr(0L), - new OptArgs() - ,conn); - try { - assertEquals(expected_, obtained); - logger.info("Finished running line #24"); - } catch (Throwable ae) { - logger.error("Whoops, got exception on line #24:" + ae.toString()); - if(obtained instanceof Throwable) { - ae.addSuppressed((Throwable) obtained); - } - throw ae; - } - } - - { - // datum/number.yaml line #35 - /* 1.0 */ - Double expected_ = 1.0; - /* r.expr(1.0) */ - logger.info("About to run line #35: r.expr(1.0)"); - Object obtained = runOrCatch(r.expr(1.0), - new OptArgs() - ,conn); - try { - assertEquals((double) expected_, - ((Number) obtained).doubleValue(), - 0.00000000001); - logger.info("Finished running line #35"); - } catch (Throwable ae) { - logger.error("Whoops, got exception on line #35:" + ae.toString()); - if(obtained instanceof Throwable) { - ae.addSuppressed((Throwable) obtained); - } - throw ae; - } - } - - { - // datum/number.yaml line #44 - /* 1.5 */ - Double expected_ = 1.5; - /* r.expr(1.5) */ - logger.info("About to run line #44: r.expr(1.5)"); - Object obtained = runOrCatch(r.expr(1.5), - new OptArgs() - ,conn); - try { - assertEquals((double) expected_, - ((Number) obtained).doubleValue(), - 0.00000000001); - logger.info("Finished running line #44"); - } catch (Throwable ae) { - logger.error("Whoops, got exception on line #44:" + ae.toString()); - if(obtained instanceof Throwable) { - ae.addSuppressed((Throwable) obtained); - } - throw ae; - } - } - - { - // datum/number.yaml line #53 - /* -0.5 */ - Double expected_ = -0.5; - /* r.expr(-0.5) */ - logger.info("About to run line #53: r.expr(-0.5)"); - Object obtained = runOrCatch(r.expr(-0.5), - new OptArgs() - ,conn); - try { - assertEquals((double) expected_, - ((Number) obtained).doubleValue(), - 0.00000000001); - logger.info("Finished running line #53"); - } catch (Throwable ae) { - logger.error("Whoops, got exception on line #53:" + ae.toString()); - if(obtained instanceof Throwable) { - ae.addSuppressed((Throwable) obtained); - } - throw ae; - } - } - - { - // datum/number.yaml line #62 - /* 67498.89278 */ - Double expected_ = 67498.89278; - /* r.expr(67498.89278) */ - logger.info("About to run line #62: r.expr(67498.89278)"); - Object obtained = runOrCatch(r.expr(67498.89278), - new OptArgs() - ,conn); - try { - assertEquals((double) expected_, - ((Number) obtained).doubleValue(), - 0.00000000001); - logger.info("Finished running line #62"); - } catch (Throwable ae) { - logger.error("Whoops, got exception on line #62:" + ae.toString()); - if(obtained instanceof Throwable) { - ae.addSuppressed((Throwable) obtained); - } - throw ae; - } - } - - { - // datum/number.yaml line #73 - /* 1234567890 */ - Long expected_ = 1234567890L; - /* r.expr(1234567890) */ - logger.info("About to run line #73: r.expr(1234567890L)"); - Object obtained = runOrCatch(r.expr(1234567890L), - new OptArgs() - ,conn); - try { - assertEquals(expected_, obtained); - logger.info("Finished running line #73"); - } catch (Throwable ae) { - logger.error("Whoops, got exception on line #73:" + ae.toString()); - if(obtained instanceof Throwable) { - ae.addSuppressed((Throwable) obtained); - } - throw ae; - } - } - - { - // datum/number.yaml line #83 - /* -73850380122423 */ - Long expected_ = -73850380122423L; - /* r.expr(-73850380122423) */ - logger.info("About to run line #83: r.expr(-73850380122423L)"); - Object obtained = runOrCatch(r.expr(-73850380122423L), - new OptArgs() - ,conn); - try { - assertEquals(expected_, obtained); - logger.info("Finished running line #83"); - } catch (Throwable ae) { - logger.error("Whoops, got exception on line #83:" + ae.toString()); - if(obtained instanceof Throwable) { - ae.addSuppressed((Throwable) obtained); - } - throw ae; - } - } - - { - // datum/number.yaml line #95 - /* float(1234567890123456789012345678901234567890) */ - Double expected_ = float_(1234567890123456789012345678901234567890.0); - /* r.expr(1234567890123456789012345678901234567890) */ - logger.info("About to run line #95: r.expr(1234567890123456789012345678901234567890.0)"); - Object obtained = runOrCatch(r.expr(1234567890123456789012345678901234567890.0), - new OptArgs() - ,conn); - try { - assertEquals((double) expected_, - ((Number) obtained).doubleValue(), - 0.00000000001); - logger.info("Finished running line #95"); - } catch (Throwable ae) { - logger.error("Whoops, got exception on line #95:" + ae.toString()); - if(obtained instanceof Throwable) { - ae.addSuppressed((Throwable) obtained); - } - throw ae; - } - } - - { - // datum/number.yaml line #100 - /* 123.4567890123456789012345678901234567890 */ - Double expected_ = 123.45678901234568; - /* r.expr(123.4567890123456789012345678901234567890) */ - logger.info("About to run line #100: r.expr(123.45678901234568)"); - Object obtained = runOrCatch(r.expr(123.45678901234568), - new OptArgs() - ,conn); - try { - assertEquals((double) expected_, - ((Number) obtained).doubleValue(), - 0.00000000001); - logger.info("Finished running line #100"); - } catch (Throwable ae) { - logger.error("Whoops, got exception on line #100:" + ae.toString()); - if(obtained instanceof Throwable) { - ae.addSuppressed((Throwable) obtained); - } - throw ae; - } - } - - { - // datum/number.yaml line #103 - /* 'NUMBER' */ - String expected_ = "NUMBER"; - /* r.expr(1).type_of() */ - logger.info("About to run line #103: r.expr(1L).typeOf()"); - Object obtained = runOrCatch(r.expr(1L).typeOf(), - new OptArgs() - ,conn); - try { - assertEquals(expected_, obtained); - logger.info("Finished running line #103"); - } catch (Throwable ae) { - logger.error("Whoops, got exception on line #103:" + ae.toString()); - if(obtained instanceof Throwable) { - ae.addSuppressed((Throwable) obtained); - } - throw ae; - } - } - - { - // datum/number.yaml line #107 - /* '1' */ - String expected_ = "1"; - /* r.expr(1).coerce_to('string') */ - logger.info("About to run line #107: r.expr(1L).coerceTo('string')"); - Object obtained = runOrCatch(r.expr(1L).coerceTo("string"), - new OptArgs() - ,conn); - try { - assertEquals(expected_, obtained); - logger.info("Finished running line #107"); - } catch (Throwable ae) { - logger.error("Whoops, got exception on line #107:" + ae.toString()); - if(obtained instanceof Throwable) { - ae.addSuppressed((Throwable) obtained); - } - throw ae; - } - } - - { - // datum/number.yaml line #110 - /* 1 */ - Long expected_ = 1L; - /* r.expr(1).coerce_to('number') */ - logger.info("About to run line #110: r.expr(1L).coerceTo('number')"); - Object obtained = runOrCatch(r.expr(1L).coerceTo("number"), - new OptArgs() - ,conn); - try { - assertEquals(expected_, obtained); - logger.info("Finished running line #110"); - } catch (Throwable ae) { - logger.error("Whoops, got exception on line #110:" + ae.toString()); - if(obtained instanceof Throwable) { - ae.addSuppressed((Throwable) obtained); - } - throw ae; - } - } - - { - // datum/number.yaml line #115 - /* int_cmp(1) */ - IntCmp expected_ = int_cmp(1L); - /* r.expr(1.0) */ - logger.info("About to run line #115: r.expr(1.0)"); - Object obtained = runOrCatch(r.expr(1.0), - new OptArgs() - ,conn); - try { - assertEquals(expected_, obtained); - logger.info("Finished running line #115"); - } catch (Throwable ae) { - logger.error("Whoops, got exception on line #115:" + ae.toString()); - if(obtained instanceof Throwable) { - ae.addSuppressed((Throwable) obtained); - } - throw ae; - } - } - - { - // datum/number.yaml line #119 - /* int_cmp(45) */ - IntCmp expected_ = int_cmp(45L); - /* r.expr(45) */ - logger.info("About to run line #119: r.expr(45L)"); - Object obtained = runOrCatch(r.expr(45L), - new OptArgs() - ,conn); - try { - assertEquals(expected_, obtained); - logger.info("Finished running line #119"); - } catch (Throwable ae) { - logger.error("Whoops, got exception on line #119:" + ae.toString()); - if(obtained instanceof Throwable) { - ae.addSuppressed((Throwable) obtained); - } - throw ae; - } - } - - { - // datum/number.yaml line #123 - /* float_cmp(1.2) */ - FloatCmp expected_ = float_cmp(1.2); - /* r.expr(1.2) */ - logger.info("About to run line #123: r.expr(1.2)"); - Object obtained = runOrCatch(r.expr(1.2), - new OptArgs() - ,conn); - try { - assertEquals(expected_, obtained); - logger.info("Finished running line #123"); - } catch (Throwable ae) { - logger.error("Whoops, got exception on line #123:" + ae.toString()); - if(obtained instanceof Throwable) { - ae.addSuppressed((Throwable) obtained); - } - throw ae; - } - } - } -} diff --git a/drivers/java/src/test/java/com/rethinkdb/gen/DatumObject.java b/drivers/java/src/test/java/com/rethinkdb/gen/DatumObject.java deleted file mode 100644 index 485215f8978..00000000000 --- a/drivers/java/src/test/java/com/rethinkdb/gen/DatumObject.java +++ /dev/null @@ -1,392 +0,0 @@ -// Autogenerated by convert_tests.py and process_polyglot.py. -// Do not edit this file directly. -// The template for this file is located at: -// ../../../../../../../templates/Test.java -package com.rethinkdb.gen; - -import com.rethinkdb.RethinkDB; -import com.rethinkdb.gen.exc.*; -import com.rethinkdb.gen.ast.*; -import com.rethinkdb.ast.ReqlAst; -import com.rethinkdb.model.MapObject; -import com.rethinkdb.model.OptArgs; -import com.rethinkdb.net.Connection; -import com.rethinkdb.net.Cursor; -import junit.framework.TestCase; -import static org.junit.Assert.assertEquals; -import static org.junit.Assert.assertArrayEquals; -import org.slf4j.Logger; -import org.slf4j.LoggerFactory; - -import org.junit.*; -import org.junit.rules.ExpectedException; - -import java.util.Arrays; -import java.util.ArrayList; -import java.util.List; -import java.util.Map; -import java.util.Set; -import java.time.OffsetDateTime; -import java.time.ZoneOffset; -import java.time.Instant; -import java.util.stream.LongStream; -import java.util.stream.Collectors; -import java.util.stream.Stream; -import java.util.concurrent.TimeoutException; -import java.util.regex.Pattern; -import java.util.Collections; -import java.nio.charset.StandardCharsets; - -import static com.rethinkdb.TestingCommon.*; -import com.rethinkdb.TestingFramework; - -public class DatumObject { - // Tests conversion to and from the RQL object type - Logger logger = LoggerFactory.getLogger(DatumObject.class); - public static final RethinkDB r = RethinkDB.r; - - Connection conn; - - @Before - public void setUp() throws Exception { - logger.info("Setting up."); - conn = TestingFramework.createConnection(); - try { - r.dbCreate("test").run(conn); - r.db("test").wait_().run(conn); - }catch (Exception e){} - } - - @After - public void tearDown() throws Exception { - logger.info("Tearing down."); - r.db("rethinkdb").table("_debug_scratch").delete().run(conn); - if(!conn.isOpen()){ - conn.close(); - conn = TestingFramework.createConnection(); - } - r.dbDrop("test").run(conn); - conn.close(false); - } - - // Autogenerated tests below - - @Test(timeout=120000) - public void test() throws Exception { - - { - // datum/object.yaml line #6 - /* {} */ - Map expected_ = r.hashMap(); - /* r.expr({}) */ - logger.info("About to run line #6: r.expr(r.hashMap())"); - Object obtained = runOrCatch(r.expr(r.hashMap()), - new OptArgs() - ,conn); - try { - assertEquals(expected_, obtained); - logger.info("Finished running line #6"); - } catch (Throwable ae) { - logger.error("Whoops, got exception on line #6:" + ae.toString()); - if(obtained instanceof Throwable) { - ae.addSuppressed((Throwable) obtained); - } - throw ae; - } - } - - { - // datum/object.yaml line #11 - /* {'a':1} */ - Map expected_ = r.hashMap("a", 1L); - /* r.expr({'a':1}) */ - logger.info("About to run line #11: r.expr(r.hashMap('a', 1L))"); - Object obtained = runOrCatch(r.expr(r.hashMap("a", 1L)), - new OptArgs() - ,conn); - try { - assertEquals(expected_, obtained); - logger.info("Finished running line #11"); - } catch (Throwable ae) { - logger.error("Whoops, got exception on line #11:" + ae.toString()); - if(obtained instanceof Throwable) { - ae.addSuppressed((Throwable) obtained); - } - throw ae; - } - } - - { - // datum/object.yaml line #16 - /* {'a':1, 'b':'two', 'c':True} */ - Map expected_ = r.hashMap("a", 1L).with("b", "two").with("c", true); - /* r.expr({'a':1, 'b':'two', 'c':True}) */ - logger.info("About to run line #16: r.expr(r.hashMap('a', 1L).with('b', 'two').with('c', true))"); - Object obtained = runOrCatch(r.expr(r.hashMap("a", 1L).with("b", "two").with("c", true)), - new OptArgs() - ,conn); - try { - assertEquals(expected_, obtained); - logger.info("Finished running line #16"); - } catch (Throwable ae) { - logger.error("Whoops, got exception on line #16:" + ae.toString()); - if(obtained instanceof Throwable) { - ae.addSuppressed((Throwable) obtained); - } - throw ae; - } - } - - { - // datum/object.yaml line #20 - /* {'a':1} */ - Map expected_ = r.hashMap("a", 1L); - /* r.expr({'a':r.expr(1)}) */ - logger.info("About to run line #20: r.expr(r.hashMap('a', r.expr(1L)))"); - Object obtained = runOrCatch(r.expr(r.hashMap("a", r.expr(1L))), - new OptArgs() - ,conn); - try { - assertEquals(expected_, obtained); - logger.info("Finished running line #20"); - } catch (Throwable ae) { - logger.error("Whoops, got exception on line #20:" + ae.toString()); - if(obtained instanceof Throwable) { - ae.addSuppressed((Throwable) obtained); - } - throw ae; - } - } - - { - // datum/object.yaml line #23 - /* {'a':{'b':[{'c':2}, 'a', 4]}} */ - Map expected_ = r.hashMap("a", r.hashMap("b", r.array(r.hashMap("c", 2L), "a", 4L))); - /* r.expr({'a':{'b':[{'c':2}, 'a', 4]}}) */ - logger.info("About to run line #23: r.expr(r.hashMap('a', r.hashMap('b', r.array(r.hashMap('c', 2L), 'a', 4L))))"); - Object obtained = runOrCatch(r.expr(r.hashMap("a", r.hashMap("b", r.array(r.hashMap("c", 2L), "a", 4L)))), - new OptArgs() - ,conn); - try { - assertEquals(expected_, obtained); - logger.info("Finished running line #23"); - } catch (Throwable ae) { - logger.error("Whoops, got exception on line #23:" + ae.toString()); - if(obtained instanceof Throwable) { - ae.addSuppressed((Throwable) obtained); - } - throw ae; - } - } - - { - // datum/object.yaml line #26 - /* 'OBJECT' */ - String expected_ = "OBJECT"; - /* r.expr({'a':1}).type_of() */ - logger.info("About to run line #26: r.expr(r.hashMap('a', 1L)).typeOf()"); - Object obtained = runOrCatch(r.expr(r.hashMap("a", 1L)).typeOf(), - new OptArgs() - ,conn); - try { - assertEquals(expected_, obtained); - logger.info("Finished running line #26"); - } catch (Throwable ae) { - logger.error("Whoops, got exception on line #26:" + ae.toString()); - if(obtained instanceof Throwable) { - ae.addSuppressed((Throwable) obtained); - } - throw ae; - } - } - - { - // datum/object.yaml line #30 - /* '{"a":1}' */ - String expected_ = "{\"a\":1}"; - /* r.expr({'a':1}).coerce_to('string') */ - logger.info("About to run line #30: r.expr(r.hashMap('a', 1L)).coerceTo('string')"); - Object obtained = runOrCatch(r.expr(r.hashMap("a", 1L)).coerceTo("string"), - new OptArgs() - ,conn); - try { - assertEquals(expected_, obtained); - logger.info("Finished running line #30"); - } catch (Throwable ae) { - logger.error("Whoops, got exception on line #30:" + ae.toString()); - if(obtained instanceof Throwable) { - ae.addSuppressed((Throwable) obtained); - } - throw ae; - } - } - - { - // datum/object.yaml line #34 - /* {'a':1} */ - Map expected_ = r.hashMap("a", 1L); - /* r.expr({'a':1}).coerce_to('object') */ - logger.info("About to run line #34: r.expr(r.hashMap('a', 1L)).coerceTo('object')"); - Object obtained = runOrCatch(r.expr(r.hashMap("a", 1L)).coerceTo("object"), - new OptArgs() - ,conn); - try { - assertEquals(expected_, obtained); - logger.info("Finished running line #34"); - } catch (Throwable ae) { - logger.error("Whoops, got exception on line #34:" + ae.toString()); - if(obtained instanceof Throwable) { - ae.addSuppressed((Throwable) obtained); - } - throw ae; - } - } - - { - // datum/object.yaml line #37 - /* [['a',1]] */ - List expected_ = r.array(r.array("a", 1L)); - /* r.expr({'a':1}).coerce_to('array') */ - logger.info("About to run line #37: r.expr(r.hashMap('a', 1L)).coerceTo('array')"); - Object obtained = runOrCatch(r.expr(r.hashMap("a", 1L)).coerceTo("array"), - new OptArgs() - ,conn); - try { - assertEquals(expected_, obtained); - logger.info("Finished running line #37"); - } catch (Throwable ae) { - logger.error("Whoops, got exception on line #37:" + ae.toString()); - if(obtained instanceof Throwable) { - ae.addSuppressed((Throwable) obtained); - } - throw ae; - } - } - - { - // datum/object.yaml line #66 - /* {} */ - Map expected_ = r.hashMap(); - /* r.object() */ - logger.info("About to run line #66: r.object()"); - Object obtained = runOrCatch(r.object(), - new OptArgs() - ,conn); - try { - assertEquals(expected_, obtained); - logger.info("Finished running line #66"); - } catch (Throwable ae) { - logger.error("Whoops, got exception on line #66:" + ae.toString()); - if(obtained instanceof Throwable) { - ae.addSuppressed((Throwable) obtained); - } - throw ae; - } - } - - { - // datum/object.yaml line #69 - /* {'a':1,'b':2} */ - Map expected_ = r.hashMap("a", 1L).with("b", 2L); - /* r.object('a', 1, 'b', 2) */ - logger.info("About to run line #69: r.object('a', 1L, 'b', 2L)"); - Object obtained = runOrCatch(r.object("a", 1L, "b", 2L), - new OptArgs() - ,conn); - try { - assertEquals(expected_, obtained); - logger.info("Finished running line #69"); - } catch (Throwable ae) { - logger.error("Whoops, got exception on line #69:" + ae.toString()); - if(obtained instanceof Throwable) { - ae.addSuppressed((Throwable) obtained); - } - throw ae; - } - } - - { - // datum/object.yaml line #72 - /* {'cd':3} */ - Map expected_ = r.hashMap("cd", 3L); - /* r.object('c'+'d', 3) */ - logger.info("About to run line #72: r.object(r.add('c', 'd'), 3L)"); - Object obtained = runOrCatch(r.object(r.add("c", "d"), 3L), - new OptArgs() - ,conn); - try { - assertEquals(expected_, obtained); - logger.info("Finished running line #72"); - } catch (Throwable ae) { - logger.error("Whoops, got exception on line #72:" + ae.toString()); - if(obtained instanceof Throwable) { - ae.addSuppressed((Throwable) obtained); - } - throw ae; - } - } - - { - // datum/object.yaml line #78 - /* err("ReqlQueryLogicError","Expected type STRING but found NUMBER.",[]) */ - Err expected_ = err("ReqlQueryLogicError", "Expected type STRING but found NUMBER.", r.array()); - /* r.object(1, 1) */ - logger.info("About to run line #78: r.object(1L, 1L)"); - Object obtained = runOrCatch(r.object(1L, 1L), - new OptArgs() - ,conn); - try { - assertEquals(expected_, obtained); - logger.info("Finished running line #78"); - } catch (Throwable ae) { - logger.error("Whoops, got exception on line #78:" + ae.toString()); - if(obtained instanceof Throwable) { - ae.addSuppressed((Throwable) obtained); - } - throw ae; - } - } - - { - // datum/object.yaml line #81 - /* err("ReqlQueryLogicError","Duplicate key \"e\" in object. (got 4 and 5 as values)",[]) */ - Err expected_ = err("ReqlQueryLogicError", "Duplicate key \"e\" in object. (got 4 and 5 as values)", r.array()); - /* r.object('e', 4, 'e', 5) */ - logger.info("About to run line #81: r.object('e', 4L, 'e', 5L)"); - Object obtained = runOrCatch(r.object("e", 4L, "e", 5L), - new OptArgs() - ,conn); - try { - assertEquals(expected_, obtained); - logger.info("Finished running line #81"); - } catch (Throwable ae) { - logger.error("Whoops, got exception on line #81:" + ae.toString()); - if(obtained instanceof Throwable) { - ae.addSuppressed((Throwable) obtained); - } - throw ae; - } - } - - { - // datum/object.yaml line #84 - /* err("ReqlQueryLogicError","Expected type DATUM but found DATABASE:",[]) */ - Err expected_ = err("ReqlQueryLogicError", "Expected type DATUM but found DATABASE:", r.array()); - /* r.object('g', r.db('test')) */ - logger.info("About to run line #84: r.object('g', r.db('test'))"); - Object obtained = runOrCatch(r.object("g", r.db("test")), - new OptArgs() - ,conn); - try { - assertEquals(expected_, obtained); - logger.info("Finished running line #84"); - } catch (Throwable ae) { - logger.error("Whoops, got exception on line #84:" + ae.toString()); - if(obtained instanceof Throwable) { - ae.addSuppressed((Throwable) obtained); - } - throw ae; - } - } - } -} diff --git a/drivers/java/src/test/java/com/rethinkdb/gen/DatumString.java b/drivers/java/src/test/java/com/rethinkdb/gen/DatumString.java deleted file mode 100644 index 1cf300e010e..00000000000 --- a/drivers/java/src/test/java/com/rethinkdb/gen/DatumString.java +++ /dev/null @@ -1,2415 +0,0 @@ -// Autogenerated by convert_tests.py and process_polyglot.py. -// Do not edit this file directly. -// The template for this file is located at: -// ../../../../../../../templates/Test.java -package com.rethinkdb.gen; - -import com.rethinkdb.RethinkDB; -import com.rethinkdb.gen.exc.*; -import com.rethinkdb.gen.ast.*; -import com.rethinkdb.ast.ReqlAst; -import com.rethinkdb.model.MapObject; -import com.rethinkdb.model.OptArgs; -import com.rethinkdb.net.Connection; -import com.rethinkdb.net.Cursor; -import junit.framework.TestCase; -import static org.junit.Assert.assertEquals; -import static org.junit.Assert.assertArrayEquals; -import org.slf4j.Logger; -import org.slf4j.LoggerFactory; - -import org.junit.*; -import org.junit.rules.ExpectedException; - -import java.util.Arrays; -import java.util.ArrayList; -import java.util.List; -import java.util.Map; -import java.util.Set; -import java.time.OffsetDateTime; -import java.time.ZoneOffset; -import java.time.Instant; -import java.util.stream.LongStream; -import java.util.stream.Collectors; -import java.util.stream.Stream; -import java.util.concurrent.TimeoutException; -import java.util.regex.Pattern; -import java.util.Collections; -import java.nio.charset.StandardCharsets; - -import static com.rethinkdb.TestingCommon.*; -import com.rethinkdb.TestingFramework; - -public class DatumString { - // Tests of converstion to and from the RQL string type - Logger logger = LoggerFactory.getLogger(DatumString.class); - public static final RethinkDB r = RethinkDB.r; - - Connection conn; - - @Before - public void setUp() throws Exception { - logger.info("Setting up."); - conn = TestingFramework.createConnection(); - try { - r.dbCreate("test").run(conn); - r.db("test").wait_().run(conn); - }catch (Exception e){} - } - - @After - public void tearDown() throws Exception { - logger.info("Tearing down."); - r.db("rethinkdb").table("_debug_scratch").delete().run(conn); - if(!conn.isOpen()){ - conn.close(); - conn = TestingFramework.createConnection(); - } - r.dbDrop("test").run(conn); - conn.close(false); - } - - // Autogenerated tests below - - @Test(timeout=120000) - public void test() throws Exception { - - // datum/string.yaml line #7 - // japanese_hello = u'こんにちは' - logger.info("Possibly executing: String japanese_hello = (String) ('こんにちは');"); - String japanese_hello = (String) ("こんにちは"); - - { - // datum/string.yaml line #16 - /* "str" */ - String expected_ = "str"; - /* r.expr('str') */ - logger.info("About to run line #16: r.expr('str')"); - Object obtained = runOrCatch(r.expr("str"), - new OptArgs() - ,conn); - try { - assertEquals(expected_, obtained); - logger.info("Finished running line #16"); - } catch (Throwable ae) { - logger.error("Whoops, got exception on line #16:" + ae.toString()); - if(obtained instanceof Throwable) { - ae.addSuppressed((Throwable) obtained); - } - throw ae; - } - } - - { - // datum/string.yaml line #21 - /* "str" */ - String expected_ = "str"; - /* r.expr("str") */ - logger.info("About to run line #21: r.expr('str')"); - Object obtained = runOrCatch(r.expr("str"), - new OptArgs() - ,conn); - try { - assertEquals(expected_, obtained); - logger.info("Finished running line #21"); - } catch (Throwable ae) { - logger.error("Whoops, got exception on line #21:" + ae.toString()); - if(obtained instanceof Throwable) { - ae.addSuppressed((Throwable) obtained); - } - throw ae; - } - } - - { - // datum/string.yaml line #28 - /* 'str' */ - String expected_ = "str"; - /* r.expr(u'str') */ - logger.info("About to run line #28: r.expr('str')"); - Object obtained = runOrCatch(r.expr("str"), - new OptArgs() - ,conn); - try { - assertEquals(expected_, obtained); - logger.info("Finished running line #28"); - } catch (Throwable ae) { - logger.error("Whoops, got exception on line #28:" + ae.toString()); - if(obtained instanceof Throwable) { - ae.addSuppressed((Throwable) obtained); - } - throw ae; - } - } - - { - // datum/string.yaml line #35 - /* u'こんにちは' */ - String expected_ = "こんにちは"; - /* r.expr(japanese_hello) */ - logger.info("About to run line #35: r.expr(japanese_hello)"); - Object obtained = runOrCatch(r.expr(japanese_hello), - new OptArgs() - ,conn); - try { - assertEquals(expected_, obtained); - logger.info("Finished running line #35"); - } catch (Throwable ae) { - logger.error("Whoops, got exception on line #35:" + ae.toString()); - if(obtained instanceof Throwable) { - ae.addSuppressed((Throwable) obtained); - } - throw ae; - } - } - - { - // datum/string.yaml line #43 - /* 'STRING' */ - String expected_ = "STRING"; - /* r.expr('foo').type_of() */ - logger.info("About to run line #43: r.expr('foo').typeOf()"); - Object obtained = runOrCatch(r.expr("foo").typeOf(), - new OptArgs() - ,conn); - try { - assertEquals(expected_, obtained); - logger.info("Finished running line #43"); - } catch (Throwable ae) { - logger.error("Whoops, got exception on line #43:" + ae.toString()); - if(obtained instanceof Throwable) { - ae.addSuppressed((Throwable) obtained); - } - throw ae; - } - } - - { - // datum/string.yaml line #47 - /* 'foo' */ - String expected_ = "foo"; - /* r.expr('foo').coerce_to('string') */ - logger.info("About to run line #47: r.expr('foo').coerceTo('string')"); - Object obtained = runOrCatch(r.expr("foo").coerceTo("string"), - new OptArgs() - ,conn); - try { - assertEquals(expected_, obtained); - logger.info("Finished running line #47"); - } catch (Throwable ae) { - logger.error("Whoops, got exception on line #47:" + ae.toString()); - if(obtained instanceof Throwable) { - ae.addSuppressed((Throwable) obtained); - } - throw ae; - } - } - - { - // datum/string.yaml line #49 - /* -1.2 */ - Double expected_ = -1.2; - /* r.expr('-1.2').coerce_to('NUMBER') */ - logger.info("About to run line #49: r.expr('-1.2').coerceTo('NUMBER')"); - Object obtained = runOrCatch(r.expr("-1.2").coerceTo("NUMBER"), - new OptArgs() - ,conn); - try { - assertEquals((double) expected_, - ((Number) obtained).doubleValue(), - 0.00000000001); - logger.info("Finished running line #49"); - } catch (Throwable ae) { - logger.error("Whoops, got exception on line #49:" + ae.toString()); - if(obtained instanceof Throwable) { - ae.addSuppressed((Throwable) obtained); - } - throw ae; - } - } - - { - // datum/string.yaml line #51 - /* err("ReqlQueryLogicError", "Could not coerce `--1.2` to NUMBER.", []) */ - Err expected_ = err("ReqlQueryLogicError", "Could not coerce `--1.2` to NUMBER.", r.array()); - /* r.expr('--1.2').coerce_to('NUMBER') */ - logger.info("About to run line #51: r.expr('--1.2').coerceTo('NUMBER')"); - Object obtained = runOrCatch(r.expr("--1.2").coerceTo("NUMBER"), - new OptArgs() - ,conn); - try { - assertEquals(expected_, obtained); - logger.info("Finished running line #51"); - } catch (Throwable ae) { - logger.error("Whoops, got exception on line #51:" + ae.toString()); - if(obtained instanceof Throwable) { - ae.addSuppressed((Throwable) obtained); - } - throw ae; - } - } - - { - // datum/string.yaml line #53 - /* err("ReqlQueryLogicError", "Could not coerce `-1.2-` to NUMBER.", []) */ - Err expected_ = err("ReqlQueryLogicError", "Could not coerce `-1.2-` to NUMBER.", r.array()); - /* r.expr('-1.2-').coerce_to('NUMBER') */ - logger.info("About to run line #53: r.expr('-1.2-').coerceTo('NUMBER')"); - Object obtained = runOrCatch(r.expr("-1.2-").coerceTo("NUMBER"), - new OptArgs() - ,conn); - try { - assertEquals(expected_, obtained); - logger.info("Finished running line #53"); - } catch (Throwable ae) { - logger.error("Whoops, got exception on line #53:" + ae.toString()); - if(obtained instanceof Throwable) { - ae.addSuppressed((Throwable) obtained); - } - throw ae; - } - } - - { - // datum/string.yaml line #55 - /* 10 */ - Long expected_ = 10L; - /* r.expr('0xa').coerce_to('NUMBER') */ - logger.info("About to run line #55: r.expr('0xa').coerceTo('NUMBER')"); - Object obtained = runOrCatch(r.expr("0xa").coerceTo("NUMBER"), - new OptArgs() - ,conn); - try { - assertEquals(expected_, obtained); - logger.info("Finished running line #55"); - } catch (Throwable ae) { - logger.error("Whoops, got exception on line #55:" + ae.toString()); - if(obtained instanceof Throwable) { - ae.addSuppressed((Throwable) obtained); - } - throw ae; - } - } - - { - // datum/string.yaml line #57 - /* err("ReqlQueryLogicError", "Non-finite number: inf", []) */ - Err expected_ = err("ReqlQueryLogicError", "Non-finite number: inf", r.array()); - /* r.expr('inf').coerce_to('NUMBER') */ - logger.info("About to run line #57: r.expr('inf').coerceTo('NUMBER')"); - Object obtained = runOrCatch(r.expr("inf").coerceTo("NUMBER"), - new OptArgs() - ,conn); - try { - assertEquals(expected_, obtained); - logger.info("Finished running line #57"); - } catch (Throwable ae) { - logger.error("Whoops, got exception on line #57:" + ae.toString()); - if(obtained instanceof Throwable) { - ae.addSuppressed((Throwable) obtained); - } - throw ae; - } - } - - { - // datum/string.yaml line #61 - /* 13 */ - Long expected_ = 13L; - /* r.expr('hello, world!').count() */ - logger.info("About to run line #61: r.expr('hello, world!').count()"); - Object obtained = runOrCatch(r.expr("hello, world!").count(), - new OptArgs() - ,conn); - try { - assertEquals(expected_, obtained); - logger.info("Finished running line #61"); - } catch (Throwable ae) { - logger.error("Whoops, got exception on line #61:" + ae.toString()); - if(obtained instanceof Throwable) { - ae.addSuppressed((Throwable) obtained); - } - throw ae; - } - } - - { - // datum/string.yaml line #63 - /* 5 */ - Long expected_ = 5L; - /* r.expr(japanese_hello).count() */ - logger.info("About to run line #63: r.expr(japanese_hello).count()"); - Object obtained = runOrCatch(r.expr(japanese_hello).count(), - new OptArgs() - ,conn); - try { - assertEquals(expected_, obtained); - logger.info("Finished running line #63"); - } catch (Throwable ae) { - logger.error("Whoops, got exception on line #63:" + ae.toString()); - if(obtained instanceof Throwable) { - ae.addSuppressed((Throwable) obtained); - } - throw ae; - } - } - - { - // datum/string.yaml line #67 - /* 'ello' */ - String expected_ = "ello"; - /* r.expr('hello').slice(1) */ - logger.info("About to run line #67: r.expr('hello').slice(1L)"); - Object obtained = runOrCatch(r.expr("hello").slice(1L), - new OptArgs() - ,conn); - try { - assertEquals(expected_, obtained); - logger.info("Finished running line #67"); - } catch (Throwable ae) { - logger.error("Whoops, got exception on line #67:" + ae.toString()); - if(obtained instanceof Throwable) { - ae.addSuppressed((Throwable) obtained); - } - throw ae; - } - } - - { - // datum/string.yaml line #69 - /* 'o' */ - String expected_ = "o"; - /* r.expr('hello').slice(-1) */ - logger.info("About to run line #69: r.expr('hello').slice(-1L)"); - Object obtained = runOrCatch(r.expr("hello").slice(-1L), - new OptArgs() - ,conn); - try { - assertEquals(expected_, obtained); - logger.info("Finished running line #69"); - } catch (Throwable ae) { - logger.error("Whoops, got exception on line #69:" + ae.toString()); - if(obtained instanceof Throwable) { - ae.addSuppressed((Throwable) obtained); - } - throw ae; - } - } - - { - // datum/string.yaml line #71 - /* 'el' */ - String expected_ = "el"; - /* r.expr('hello').slice(-4,3) */ - logger.info("About to run line #71: r.expr('hello').slice(-4L, 3L)"); - Object obtained = runOrCatch(r.expr("hello").slice(-4L, 3L), - new OptArgs() - ,conn); - try { - assertEquals(expected_, obtained); - logger.info("Finished running line #71"); - } catch (Throwable ae) { - logger.error("Whoops, got exception on line #71:" + ae.toString()); - if(obtained instanceof Throwable) { - ae.addSuppressed((Throwable) obtained); - } - throw ae; - } - } - - { - // datum/string.yaml line #73 - /* 'hello' */ - String expected_ = "hello"; - /* r.expr('hello').slice(-99) */ - logger.info("About to run line #73: r.expr('hello').slice(-99L)"); - Object obtained = runOrCatch(r.expr("hello").slice(-99L), - new OptArgs() - ,conn); - try { - assertEquals(expected_, obtained); - logger.info("Finished running line #73"); - } catch (Throwable ae) { - logger.error("Whoops, got exception on line #73:" + ae.toString()); - if(obtained instanceof Throwable) { - ae.addSuppressed((Throwable) obtained); - } - throw ae; - } - } - - { - // datum/string.yaml line #75 - /* 'hello' */ - String expected_ = "hello"; - /* r.expr('hello').slice(0) */ - logger.info("About to run line #75: r.expr('hello').slice(0L)"); - Object obtained = runOrCatch(r.expr("hello").slice(0L), - new OptArgs() - ,conn); - try { - assertEquals(expected_, obtained); - logger.info("Finished running line #75"); - } catch (Throwable ae) { - logger.error("Whoops, got exception on line #75:" + ae.toString()); - if(obtained instanceof Throwable) { - ae.addSuppressed((Throwable) obtained); - } - throw ae; - } - } - - { - // datum/string.yaml line #77 - /* u'んにちは' */ - String expected_ = "んにちは"; - /* r.expr(japanese_hello).slice(1) */ - logger.info("About to run line #77: r.expr(japanese_hello).slice(1L)"); - Object obtained = runOrCatch(r.expr(japanese_hello).slice(1L), - new OptArgs() - ,conn); - try { - assertEquals(expected_, obtained); - logger.info("Finished running line #77"); - } catch (Throwable ae) { - logger.error("Whoops, got exception on line #77:" + ae.toString()); - if(obtained instanceof Throwable) { - ae.addSuppressed((Throwable) obtained); - } - throw ae; - } - } - - { - // datum/string.yaml line #84 - /* u'ん' */ - String expected_ = "ん"; - /* r.expr(japanese_hello).slice(1,2) */ - logger.info("About to run line #84: r.expr(japanese_hello).slice(1L, 2L)"); - Object obtained = runOrCatch(r.expr(japanese_hello).slice(1L, 2L), - new OptArgs() - ,conn); - try { - assertEquals(expected_, obtained); - logger.info("Finished running line #84"); - } catch (Throwable ae) { - logger.error("Whoops, got exception on line #84:" + ae.toString()); - if(obtained instanceof Throwable) { - ae.addSuppressed((Throwable) obtained); - } - throw ae; - } - } - - { - // datum/string.yaml line #91 - /* u'にちは' */ - String expected_ = "にちは"; - /* r.expr(japanese_hello).slice(-3) */ - logger.info("About to run line #91: r.expr(japanese_hello).slice(-3L)"); - Object obtained = runOrCatch(r.expr(japanese_hello).slice(-3L), - new OptArgs() - ,conn); - try { - assertEquals(expected_, obtained); - logger.info("Finished running line #91"); - } catch (Throwable ae) { - logger.error("Whoops, got exception on line #91:" + ae.toString()); - if(obtained instanceof Throwable) { - ae.addSuppressed((Throwable) obtained); - } - throw ae; - } - } - - { - // datum/string.yaml line #100 - /* [] */ - List expected_ = r.array(); - /* r.expr('').split() */ - logger.info("About to run line #100: r.expr('').split()"); - Object obtained = runOrCatch(r.expr("").split(), - new OptArgs() - ,conn); - try { - assertEquals(expected_, obtained); - logger.info("Finished running line #100"); - } catch (Throwable ae) { - logger.error("Whoops, got exception on line #100:" + ae.toString()); - if(obtained instanceof Throwable) { - ae.addSuppressed((Throwable) obtained); - } - throw ae; - } - } - - { - // datum/string.yaml line #102 - /* [] */ - List expected_ = r.array(); - /* r.expr('').split(null) */ - logger.info("About to run line #102: r.expr('').split((ReqlExpr) null)"); - Object obtained = runOrCatch(r.expr("").split((ReqlExpr) null), - new OptArgs() - ,conn); - try { - assertEquals(expected_, obtained); - logger.info("Finished running line #102"); - } catch (Throwable ae) { - logger.error("Whoops, got exception on line #102:" + ae.toString()); - if(obtained instanceof Throwable) { - ae.addSuppressed((Throwable) obtained); - } - throw ae; - } - } - - { - // datum/string.yaml line #104 - /* [''] */ - List expected_ = r.array(""); - /* r.expr('').split(' ') */ - logger.info("About to run line #104: r.expr('').split(' ')"); - Object obtained = runOrCatch(r.expr("").split(" "), - new OptArgs() - ,conn); - try { - assertEquals(expected_, obtained); - logger.info("Finished running line #104"); - } catch (Throwable ae) { - logger.error("Whoops, got exception on line #104:" + ae.toString()); - if(obtained instanceof Throwable) { - ae.addSuppressed((Throwable) obtained); - } - throw ae; - } - } - - { - // datum/string.yaml line #106 - /* [] */ - List expected_ = r.array(); - /* r.expr('').split('') */ - logger.info("About to run line #106: r.expr('').split('')"); - Object obtained = runOrCatch(r.expr("").split(""), - new OptArgs() - ,conn); - try { - assertEquals(expected_, obtained); - logger.info("Finished running line #106"); - } catch (Throwable ae) { - logger.error("Whoops, got exception on line #106:" + ae.toString()); - if(obtained instanceof Throwable) { - ae.addSuppressed((Throwable) obtained); - } - throw ae; - } - } - - { - // datum/string.yaml line #108 - /* [] */ - List expected_ = r.array(); - /* r.expr('').split(null, 5) */ - logger.info("About to run line #108: r.expr('').split((ReqlExpr) null, 5L)"); - Object obtained = runOrCatch(r.expr("").split((ReqlExpr) null, 5L), - new OptArgs() - ,conn); - try { - assertEquals(expected_, obtained); - logger.info("Finished running line #108"); - } catch (Throwable ae) { - logger.error("Whoops, got exception on line #108:" + ae.toString()); - if(obtained instanceof Throwable) { - ae.addSuppressed((Throwable) obtained); - } - throw ae; - } - } - - { - // datum/string.yaml line #110 - /* [''] */ - List expected_ = r.array(""); - /* r.expr('').split(' ', 5) */ - logger.info("About to run line #110: r.expr('').split(' ', 5L)"); - Object obtained = runOrCatch(r.expr("").split(" ", 5L), - new OptArgs() - ,conn); - try { - assertEquals(expected_, obtained); - logger.info("Finished running line #110"); - } catch (Throwable ae) { - logger.error("Whoops, got exception on line #110:" + ae.toString()); - if(obtained instanceof Throwable) { - ae.addSuppressed((Throwable) obtained); - } - throw ae; - } - } - - { - // datum/string.yaml line #112 - /* [] */ - List expected_ = r.array(); - /* r.expr('').split('', 5) */ - logger.info("About to run line #112: r.expr('').split('', 5L)"); - Object obtained = runOrCatch(r.expr("").split("", 5L), - new OptArgs() - ,conn); - try { - assertEquals(expected_, obtained); - logger.info("Finished running line #112"); - } catch (Throwable ae) { - logger.error("Whoops, got exception on line #112:" + ae.toString()); - if(obtained instanceof Throwable) { - ae.addSuppressed((Throwable) obtained); - } - throw ae; - } - } - - { - // datum/string.yaml line #115 - /* ['aaaa', 'bbbb', 'cccc'] */ - List expected_ = r.array("aaaa", "bbbb", "cccc"); - /* r.expr('aaaa bbbb cccc ').split() */ - logger.info("About to run line #115: r.expr('aaaa bbbb cccc ').split()"); - Object obtained = runOrCatch(r.expr("aaaa bbbb cccc ").split(), - new OptArgs() - ,conn); - try { - assertEquals(expected_, obtained); - logger.info("Finished running line #115"); - } catch (Throwable ae) { - logger.error("Whoops, got exception on line #115:" + ae.toString()); - if(obtained instanceof Throwable) { - ae.addSuppressed((Throwable) obtained); - } - throw ae; - } - } - - { - // datum/string.yaml line #117 - /* ['aaaa', 'bbbb', 'cccc'] */ - List expected_ = r.array("aaaa", "bbbb", "cccc"); - /* r.expr('aaaa bbbb cccc ').split(null) */ - logger.info("About to run line #117: r.expr('aaaa bbbb cccc ').split((ReqlExpr) null)"); - Object obtained = runOrCatch(r.expr("aaaa bbbb cccc ").split((ReqlExpr) null), - new OptArgs() - ,conn); - try { - assertEquals(expected_, obtained); - logger.info("Finished running line #117"); - } catch (Throwable ae) { - logger.error("Whoops, got exception on line #117:" + ae.toString()); - if(obtained instanceof Throwable) { - ae.addSuppressed((Throwable) obtained); - } - throw ae; - } - } - - { - // datum/string.yaml line #119 - /* ['aaaa', 'bbbb', '', 'cccc', ''] */ - List expected_ = r.array("aaaa", "bbbb", "", "cccc", ""); - /* r.expr('aaaa bbbb cccc ').split(' ') */ - logger.info("About to run line #119: r.expr('aaaa bbbb cccc ').split(' ')"); - Object obtained = runOrCatch(r.expr("aaaa bbbb cccc ").split(" "), - new OptArgs() - ,conn); - try { - assertEquals(expected_, obtained); - logger.info("Finished running line #119"); - } catch (Throwable ae) { - logger.error("Whoops, got exception on line #119:" + ae.toString()); - if(obtained instanceof Throwable) { - ae.addSuppressed((Throwable) obtained); - } - throw ae; - } - } - - { - // datum/string.yaml line #121 - /* ['a', 'a', 'a', 'a', ' ', 'b', 'b', 'b', 'b', ' ', ' ', 'c', 'c', 'c', 'c', ' '] */ - List expected_ = r.array("a", "a", "a", "a", " ", "b", "b", "b", "b", " ", " ", "c", "c", "c", "c", " "); - /* r.expr('aaaa bbbb cccc ').split('') */ - logger.info("About to run line #121: r.expr('aaaa bbbb cccc ').split('')"); - Object obtained = runOrCatch(r.expr("aaaa bbbb cccc ").split(""), - new OptArgs() - ,conn); - try { - assertEquals(expected_, obtained); - logger.info("Finished running line #121"); - } catch (Throwable ae) { - logger.error("Whoops, got exception on line #121:" + ae.toString()); - if(obtained instanceof Throwable) { - ae.addSuppressed((Throwable) obtained); - } - throw ae; - } - } - - { - // datum/string.yaml line #123 - /* ['aaaa ', '', '', '', ' cccc '] */ - List expected_ = r.array("aaaa ", "", "", "", " cccc "); - /* r.expr('aaaa bbbb cccc ').split('b') */ - logger.info("About to run line #123: r.expr('aaaa bbbb cccc ').split('b')"); - Object obtained = runOrCatch(r.expr("aaaa bbbb cccc ").split("b"), - new OptArgs() - ,conn); - try { - assertEquals(expected_, obtained); - logger.info("Finished running line #123"); - } catch (Throwable ae) { - logger.error("Whoops, got exception on line #123:" + ae.toString()); - if(obtained instanceof Throwable) { - ae.addSuppressed((Throwable) obtained); - } - throw ae; - } - } - - { - // datum/string.yaml line #125 - /* ['aaaa ', '', ' cccc '] */ - List expected_ = r.array("aaaa ", "", " cccc "); - /* r.expr('aaaa bbbb cccc ').split('bb') */ - logger.info("About to run line #125: r.expr('aaaa bbbb cccc ').split('bb')"); - Object obtained = runOrCatch(r.expr("aaaa bbbb cccc ").split("bb"), - new OptArgs() - ,conn); - try { - assertEquals(expected_, obtained); - logger.info("Finished running line #125"); - } catch (Throwable ae) { - logger.error("Whoops, got exception on line #125:" + ae.toString()); - if(obtained instanceof Throwable) { - ae.addSuppressed((Throwable) obtained); - } - throw ae; - } - } - - { - // datum/string.yaml line #127 - /* ['aaaa', 'cccc '] */ - List expected_ = r.array("aaaa", "cccc "); - /* r.expr('aaaa bbbb cccc ').split(' bbbb ') */ - logger.info("About to run line #127: r.expr('aaaa bbbb cccc ').split(' bbbb ')"); - Object obtained = runOrCatch(r.expr("aaaa bbbb cccc ").split(" bbbb "), - new OptArgs() - ,conn); - try { - assertEquals(expected_, obtained); - logger.info("Finished running line #127"); - } catch (Throwable ae) { - logger.error("Whoops, got exception on line #127:" + ae.toString()); - if(obtained instanceof Throwable) { - ae.addSuppressed((Throwable) obtained); - } - throw ae; - } - } - - { - // datum/string.yaml line #129 - /* ['aaaa ', '', ' cccc b d ', ' e ', '', ' f'] */ - List expected_ = r.array("aaaa ", "", " cccc b d ", " e ", "", " f"); - /* r.expr('aaaa bbbb cccc b d bb e bbbb f').split('bb') */ - logger.info("About to run line #129: r.expr('aaaa bbbb cccc b d bb e bbbb f').split('bb')"); - Object obtained = runOrCatch(r.expr("aaaa bbbb cccc b d bb e bbbb f").split("bb"), - new OptArgs() - ,conn); - try { - assertEquals(expected_, obtained); - logger.info("Finished running line #129"); - } catch (Throwable ae) { - logger.error("Whoops, got exception on line #129:" + ae.toString()); - if(obtained instanceof Throwable) { - ae.addSuppressed((Throwable) obtained); - } - throw ae; - } - } - - { - // datum/string.yaml line #131 - /* ['aaaa', 'cccc b d bb e bbbb f'] */ - List expected_ = r.array("aaaa", "cccc b d bb e bbbb f"); - /* r.expr('aaaa bbbb cccc b d bb e bbbb f').split(' bbbb ') */ - logger.info("About to run line #131: r.expr('aaaa bbbb cccc b d bb e bbbb f').split(' bbbb ')"); - Object obtained = runOrCatch(r.expr("aaaa bbbb cccc b d bb e bbbb f").split(" bbbb "), - new OptArgs() - ,conn); - try { - assertEquals(expected_, obtained); - logger.info("Finished running line #131"); - } catch (Throwable ae) { - logger.error("Whoops, got exception on line #131:" + ae.toString()); - if(obtained instanceof Throwable) { - ae.addSuppressed((Throwable) obtained); - } - throw ae; - } - } - - { - // datum/string.yaml line #133 - /* ['aaaa', 'cccc b d bb e', 'f'] */ - List expected_ = r.array("aaaa", "cccc b d bb e", "f"); - /* r.expr('aaaa bbbb cccc b d bb e bbbb f').split(' bbbb ') */ - logger.info("About to run line #133: r.expr('aaaa bbbb cccc b d bb e bbbb f').split(' bbbb ')"); - Object obtained = runOrCatch(r.expr("aaaa bbbb cccc b d bb e bbbb f").split(" bbbb "), - new OptArgs() - ,conn); - try { - assertEquals(expected_, obtained); - logger.info("Finished running line #133"); - } catch (Throwable ae) { - logger.error("Whoops, got exception on line #133:" + ae.toString()); - if(obtained instanceof Throwable) { - ae.addSuppressed((Throwable) obtained); - } - throw ae; - } - } - - { - // datum/string.yaml line #136 - /* ['aaaa', 'bbbb', 'cccc'] */ - List expected_ = r.array("aaaa", "bbbb", "cccc"); - /* r.expr('aaaa bbbb cccc ').split(null, 3) */ - logger.info("About to run line #136: r.expr('aaaa bbbb cccc ').split((ReqlExpr) null, 3L)"); - Object obtained = runOrCatch(r.expr("aaaa bbbb cccc ").split((ReqlExpr) null, 3L), - new OptArgs() - ,conn); - try { - assertEquals(expected_, obtained); - logger.info("Finished running line #136"); - } catch (Throwable ae) { - logger.error("Whoops, got exception on line #136:" + ae.toString()); - if(obtained instanceof Throwable) { - ae.addSuppressed((Throwable) obtained); - } - throw ae; - } - } - - { - // datum/string.yaml line #138 - /* ['aaaa', 'bbbb', '', 'cccc', ''] */ - List expected_ = r.array("aaaa", "bbbb", "", "cccc", ""); - /* r.expr('aaaa bbbb cccc ').split(' ', 5) */ - logger.info("About to run line #138: r.expr('aaaa bbbb cccc ').split(' ', 5L)"); - Object obtained = runOrCatch(r.expr("aaaa bbbb cccc ").split(" ", 5L), - new OptArgs() - ,conn); - try { - assertEquals(expected_, obtained); - logger.info("Finished running line #138"); - } catch (Throwable ae) { - logger.error("Whoops, got exception on line #138:" + ae.toString()); - if(obtained instanceof Throwable) { - ae.addSuppressed((Throwable) obtained); - } - throw ae; - } - } - - { - // datum/string.yaml line #140 - /* ['a', 'a', 'a', 'a', ' ', 'bbbb cccc '] */ - List expected_ = r.array("a", "a", "a", "a", " ", "bbbb cccc "); - /* r.expr('aaaa bbbb cccc ').split('', 5) */ - logger.info("About to run line #140: r.expr('aaaa bbbb cccc ').split('', 5L)"); - Object obtained = runOrCatch(r.expr("aaaa bbbb cccc ").split("", 5L), - new OptArgs() - ,conn); - try { - assertEquals(expected_, obtained); - logger.info("Finished running line #140"); - } catch (Throwable ae) { - logger.error("Whoops, got exception on line #140:" + ae.toString()); - if(obtained instanceof Throwable) { - ae.addSuppressed((Throwable) obtained); - } - throw ae; - } - } - - { - // datum/string.yaml line #142 - /* ['aaaa ', '', '', '', ' cccc '] */ - List expected_ = r.array("aaaa ", "", "", "", " cccc "); - /* r.expr('aaaa bbbb cccc ').split('b', 5) */ - logger.info("About to run line #142: r.expr('aaaa bbbb cccc ').split('b', 5L)"); - Object obtained = runOrCatch(r.expr("aaaa bbbb cccc ").split("b", 5L), - new OptArgs() - ,conn); - try { - assertEquals(expected_, obtained); - logger.info("Finished running line #142"); - } catch (Throwable ae) { - logger.error("Whoops, got exception on line #142:" + ae.toString()); - if(obtained instanceof Throwable) { - ae.addSuppressed((Throwable) obtained); - } - throw ae; - } - } - - { - // datum/string.yaml line #144 - /* ['aaaa ', '', ' cccc '] */ - List expected_ = r.array("aaaa ", "", " cccc "); - /* r.expr('aaaa bbbb cccc ').split('bb', 3) */ - logger.info("About to run line #144: r.expr('aaaa bbbb cccc ').split('bb', 3L)"); - Object obtained = runOrCatch(r.expr("aaaa bbbb cccc ").split("bb", 3L), - new OptArgs() - ,conn); - try { - assertEquals(expected_, obtained); - logger.info("Finished running line #144"); - } catch (Throwable ae) { - logger.error("Whoops, got exception on line #144:" + ae.toString()); - if(obtained instanceof Throwable) { - ae.addSuppressed((Throwable) obtained); - } - throw ae; - } - } - - { - // datum/string.yaml line #146 - /* ['aaaa', 'cccc '] */ - List expected_ = r.array("aaaa", "cccc "); - /* r.expr('aaaa bbbb cccc ').split(' bbbb ', 2) */ - logger.info("About to run line #146: r.expr('aaaa bbbb cccc ').split(' bbbb ', 2L)"); - Object obtained = runOrCatch(r.expr("aaaa bbbb cccc ").split(" bbbb ", 2L), - new OptArgs() - ,conn); - try { - assertEquals(expected_, obtained); - logger.info("Finished running line #146"); - } catch (Throwable ae) { - logger.error("Whoops, got exception on line #146:" + ae.toString()); - if(obtained instanceof Throwable) { - ae.addSuppressed((Throwable) obtained); - } - throw ae; - } - } - - { - // datum/string.yaml line #148 - /* ['aaaa ', '', ' cccc b d ', ' e ', '', ' f'] */ - List expected_ = r.array("aaaa ", "", " cccc b d ", " e ", "", " f"); - /* r.expr('aaaa bbbb cccc b d bb e bbbb f').split('bb', 6) */ - logger.info("About to run line #148: r.expr('aaaa bbbb cccc b d bb e bbbb f').split('bb', 6L)"); - Object obtained = runOrCatch(r.expr("aaaa bbbb cccc b d bb e bbbb f").split("bb", 6L), - new OptArgs() - ,conn); - try { - assertEquals(expected_, obtained); - logger.info("Finished running line #148"); - } catch (Throwable ae) { - logger.error("Whoops, got exception on line #148:" + ae.toString()); - if(obtained instanceof Throwable) { - ae.addSuppressed((Throwable) obtained); - } - throw ae; - } - } - - { - // datum/string.yaml line #150 - /* ['aaaa', 'cccc b d bb e bbbb f'] */ - List expected_ = r.array("aaaa", "cccc b d bb e bbbb f"); - /* r.expr('aaaa bbbb cccc b d bb e bbbb f').split(' bbbb ', 2) */ - logger.info("About to run line #150: r.expr('aaaa bbbb cccc b d bb e bbbb f').split(' bbbb ', 2L)"); - Object obtained = runOrCatch(r.expr("aaaa bbbb cccc b d bb e bbbb f").split(" bbbb ", 2L), - new OptArgs() - ,conn); - try { - assertEquals(expected_, obtained); - logger.info("Finished running line #150"); - } catch (Throwable ae) { - logger.error("Whoops, got exception on line #150:" + ae.toString()); - if(obtained instanceof Throwable) { - ae.addSuppressed((Throwable) obtained); - } - throw ae; - } - } - - { - // datum/string.yaml line #152 - /* ['aaaa', 'cccc b d bb e', 'f'] */ - List expected_ = r.array("aaaa", "cccc b d bb e", "f"); - /* r.expr('aaaa bbbb cccc b d bb e bbbb f').split(' bbbb ', 3) */ - logger.info("About to run line #152: r.expr('aaaa bbbb cccc b d bb e bbbb f').split(' bbbb ', 3L)"); - Object obtained = runOrCatch(r.expr("aaaa bbbb cccc b d bb e bbbb f").split(" bbbb ", 3L), - new OptArgs() - ,conn); - try { - assertEquals(expected_, obtained); - logger.info("Finished running line #152"); - } catch (Throwable ae) { - logger.error("Whoops, got exception on line #152:" + ae.toString()); - if(obtained instanceof Throwable) { - ae.addSuppressed((Throwable) obtained); - } - throw ae; - } - } - - { - // datum/string.yaml line #155 - /* ['aaaa', 'bbbb', 'cccc '] */ - List expected_ = r.array("aaaa", "bbbb", "cccc "); - /* r.expr('aaaa bbbb cccc ').split(null, 2) */ - logger.info("About to run line #155: r.expr('aaaa bbbb cccc ').split((ReqlExpr) null, 2L)"); - Object obtained = runOrCatch(r.expr("aaaa bbbb cccc ").split((ReqlExpr) null, 2L), - new OptArgs() - ,conn); - try { - assertEquals(expected_, obtained); - logger.info("Finished running line #155"); - } catch (Throwable ae) { - logger.error("Whoops, got exception on line #155:" + ae.toString()); - if(obtained instanceof Throwable) { - ae.addSuppressed((Throwable) obtained); - } - throw ae; - } - } - - { - // datum/string.yaml line #157 - /* ["a", "b"] */ - List expected_ = r.array("a", "b"); - /* r.expr("a b ").split(null, 2) */ - logger.info("About to run line #157: r.expr('a b ').split((ReqlExpr) null, 2L)"); - Object obtained = runOrCatch(r.expr("a b ").split((ReqlExpr) null, 2L), - new OptArgs() - ,conn); - try { - assertEquals(expected_, obtained); - logger.info("Finished running line #157"); - } catch (Throwable ae) { - logger.error("Whoops, got exception on line #157:" + ae.toString()); - if(obtained instanceof Throwable) { - ae.addSuppressed((Throwable) obtained); - } - throw ae; - } - } - - { - // datum/string.yaml line #159 - /* ['aaaa', 'bbbb', '', 'cccc', ''] */ - List expected_ = r.array("aaaa", "bbbb", "", "cccc", ""); - /* r.expr('aaaa bbbb cccc ').split(' ', 4) */ - logger.info("About to run line #159: r.expr('aaaa bbbb cccc ').split(' ', 4L)"); - Object obtained = runOrCatch(r.expr("aaaa bbbb cccc ").split(" ", 4L), - new OptArgs() - ,conn); - try { - assertEquals(expected_, obtained); - logger.info("Finished running line #159"); - } catch (Throwable ae) { - logger.error("Whoops, got exception on line #159:" + ae.toString()); - if(obtained instanceof Throwable) { - ae.addSuppressed((Throwable) obtained); - } - throw ae; - } - } - - { - // datum/string.yaml line #161 - /* ['a', 'a', 'a', 'a', ' bbbb cccc '] */ - List expected_ = r.array("a", "a", "a", "a", " bbbb cccc "); - /* r.expr('aaaa bbbb cccc ').split('', 4) */ - logger.info("About to run line #161: r.expr('aaaa bbbb cccc ').split('', 4L)"); - Object obtained = runOrCatch(r.expr("aaaa bbbb cccc ").split("", 4L), - new OptArgs() - ,conn); - try { - assertEquals(expected_, obtained); - logger.info("Finished running line #161"); - } catch (Throwable ae) { - logger.error("Whoops, got exception on line #161:" + ae.toString()); - if(obtained instanceof Throwable) { - ae.addSuppressed((Throwable) obtained); - } - throw ae; - } - } - - { - // datum/string.yaml line #163 - /* ['aaaa ', '', '', '', ' cccc '] */ - List expected_ = r.array("aaaa ", "", "", "", " cccc "); - /* r.expr('aaaa bbbb cccc ').split('b', 4) */ - logger.info("About to run line #163: r.expr('aaaa bbbb cccc ').split('b', 4L)"); - Object obtained = runOrCatch(r.expr("aaaa bbbb cccc ").split("b", 4L), - new OptArgs() - ,conn); - try { - assertEquals(expected_, obtained); - logger.info("Finished running line #163"); - } catch (Throwable ae) { - logger.error("Whoops, got exception on line #163:" + ae.toString()); - if(obtained instanceof Throwable) { - ae.addSuppressed((Throwable) obtained); - } - throw ae; - } - } - - { - // datum/string.yaml line #165 - /* ['aaaa ', '', ' cccc '] */ - List expected_ = r.array("aaaa ", "", " cccc "); - /* r.expr('aaaa bbbb cccc ').split('bb', 2) */ - logger.info("About to run line #165: r.expr('aaaa bbbb cccc ').split('bb', 2L)"); - Object obtained = runOrCatch(r.expr("aaaa bbbb cccc ").split("bb", 2L), - new OptArgs() - ,conn); - try { - assertEquals(expected_, obtained); - logger.info("Finished running line #165"); - } catch (Throwable ae) { - logger.error("Whoops, got exception on line #165:" + ae.toString()); - if(obtained instanceof Throwable) { - ae.addSuppressed((Throwable) obtained); - } - throw ae; - } - } - - { - // datum/string.yaml line #167 - /* ['aaaa', 'cccc '] */ - List expected_ = r.array("aaaa", "cccc "); - /* r.expr('aaaa bbbb cccc ').split(' bbbb ', 1) */ - logger.info("About to run line #167: r.expr('aaaa bbbb cccc ').split(' bbbb ', 1L)"); - Object obtained = runOrCatch(r.expr("aaaa bbbb cccc ").split(" bbbb ", 1L), - new OptArgs() - ,conn); - try { - assertEquals(expected_, obtained); - logger.info("Finished running line #167"); - } catch (Throwable ae) { - logger.error("Whoops, got exception on line #167:" + ae.toString()); - if(obtained instanceof Throwable) { - ae.addSuppressed((Throwable) obtained); - } - throw ae; - } - } - - { - // datum/string.yaml line #169 - /* ['aaaa ', '', ' cccc b d ', ' e ', '', ' f'] */ - List expected_ = r.array("aaaa ", "", " cccc b d ", " e ", "", " f"); - /* r.expr('aaaa bbbb cccc b d bb e bbbb f').split('bb', 5) */ - logger.info("About to run line #169: r.expr('aaaa bbbb cccc b d bb e bbbb f').split('bb', 5L)"); - Object obtained = runOrCatch(r.expr("aaaa bbbb cccc b d bb e bbbb f").split("bb", 5L), - new OptArgs() - ,conn); - try { - assertEquals(expected_, obtained); - logger.info("Finished running line #169"); - } catch (Throwable ae) { - logger.error("Whoops, got exception on line #169:" + ae.toString()); - if(obtained instanceof Throwable) { - ae.addSuppressed((Throwable) obtained); - } - throw ae; - } - } - - { - // datum/string.yaml line #171 - /* ['aaaa', 'cccc b d bb e bbbb f'] */ - List expected_ = r.array("aaaa", "cccc b d bb e bbbb f"); - /* r.expr('aaaa bbbb cccc b d bb e bbbb f').split(' bbbb ', 1) */ - logger.info("About to run line #171: r.expr('aaaa bbbb cccc b d bb e bbbb f').split(' bbbb ', 1L)"); - Object obtained = runOrCatch(r.expr("aaaa bbbb cccc b d bb e bbbb f").split(" bbbb ", 1L), - new OptArgs() - ,conn); - try { - assertEquals(expected_, obtained); - logger.info("Finished running line #171"); - } catch (Throwable ae) { - logger.error("Whoops, got exception on line #171:" + ae.toString()); - if(obtained instanceof Throwable) { - ae.addSuppressed((Throwable) obtained); - } - throw ae; - } - } - - { - // datum/string.yaml line #173 - /* ['aaaa', 'cccc b d bb e', 'f'] */ - List expected_ = r.array("aaaa", "cccc b d bb e", "f"); - /* r.expr('aaaa bbbb cccc b d bb e bbbb f').split(' bbbb ', 2) */ - logger.info("About to run line #173: r.expr('aaaa bbbb cccc b d bb e bbbb f').split(' bbbb ', 2L)"); - Object obtained = runOrCatch(r.expr("aaaa bbbb cccc b d bb e bbbb f").split(" bbbb ", 2L), - new OptArgs() - ,conn); - try { - assertEquals(expected_, obtained); - logger.info("Finished running line #173"); - } catch (Throwable ae) { - logger.error("Whoops, got exception on line #173:" + ae.toString()); - if(obtained instanceof Throwable) { - ae.addSuppressed((Throwable) obtained); - } - throw ae; - } - } - - { - // datum/string.yaml line #176 - /* ['aaaa', 'bbbb cccc '] */ - List expected_ = r.array("aaaa", "bbbb cccc "); - /* r.expr('aaaa bbbb cccc ').split(null, 1) */ - logger.info("About to run line #176: r.expr('aaaa bbbb cccc ').split((ReqlExpr) null, 1L)"); - Object obtained = runOrCatch(r.expr("aaaa bbbb cccc ").split((ReqlExpr) null, 1L), - new OptArgs() - ,conn); - try { - assertEquals(expected_, obtained); - logger.info("Finished running line #176"); - } catch (Throwable ae) { - logger.error("Whoops, got exception on line #176:" + ae.toString()); - if(obtained instanceof Throwable) { - ae.addSuppressed((Throwable) obtained); - } - throw ae; - } - } - - { - // datum/string.yaml line #178 - /* ['aaaa', 'bbbb', ' cccc '] */ - List expected_ = r.array("aaaa", "bbbb", " cccc "); - /* r.expr('aaaa bbbb cccc ').split(' ', 2) */ - logger.info("About to run line #178: r.expr('aaaa bbbb cccc ').split(' ', 2L)"); - Object obtained = runOrCatch(r.expr("aaaa bbbb cccc ").split(" ", 2L), - new OptArgs() - ,conn); - try { - assertEquals(expected_, obtained); - logger.info("Finished running line #178"); - } catch (Throwable ae) { - logger.error("Whoops, got exception on line #178:" + ae.toString()); - if(obtained instanceof Throwable) { - ae.addSuppressed((Throwable) obtained); - } - throw ae; - } - } - - { - // datum/string.yaml line #180 - /* ['a', 'a', 'aa bbbb cccc '] */ - List expected_ = r.array("a", "a", "aa bbbb cccc "); - /* r.expr('aaaa bbbb cccc ').split('', 2) */ - logger.info("About to run line #180: r.expr('aaaa bbbb cccc ').split('', 2L)"); - Object obtained = runOrCatch(r.expr("aaaa bbbb cccc ").split("", 2L), - new OptArgs() - ,conn); - try { - assertEquals(expected_, obtained); - logger.info("Finished running line #180"); - } catch (Throwable ae) { - logger.error("Whoops, got exception on line #180:" + ae.toString()); - if(obtained instanceof Throwable) { - ae.addSuppressed((Throwable) obtained); - } - throw ae; - } - } - - { - // datum/string.yaml line #182 - /* ['aaaa ', '', 'bb cccc '] */ - List expected_ = r.array("aaaa ", "", "bb cccc "); - /* r.expr('aaaa bbbb cccc ').split('b', 2) */ - logger.info("About to run line #182: r.expr('aaaa bbbb cccc ').split('b', 2L)"); - Object obtained = runOrCatch(r.expr("aaaa bbbb cccc ").split("b", 2L), - new OptArgs() - ,conn); - try { - assertEquals(expected_, obtained); - logger.info("Finished running line #182"); - } catch (Throwable ae) { - logger.error("Whoops, got exception on line #182:" + ae.toString()); - if(obtained instanceof Throwable) { - ae.addSuppressed((Throwable) obtained); - } - throw ae; - } - } - - { - // datum/string.yaml line #184 - /* ['aaaa ', '', ' cccc '] */ - List expected_ = r.array("aaaa ", "", " cccc "); - /* r.expr('aaaa bbbb cccc ').split('bb', 2) */ - logger.info("About to run line #184: r.expr('aaaa bbbb cccc ').split('bb', 2L)"); - Object obtained = runOrCatch(r.expr("aaaa bbbb cccc ").split("bb", 2L), - new OptArgs() - ,conn); - try { - assertEquals(expected_, obtained); - logger.info("Finished running line #184"); - } catch (Throwable ae) { - logger.error("Whoops, got exception on line #184:" + ae.toString()); - if(obtained instanceof Throwable) { - ae.addSuppressed((Throwable) obtained); - } - throw ae; - } - } - - { - // datum/string.yaml line #186 - /* ['aaaa', 'cccc '] */ - List expected_ = r.array("aaaa", "cccc "); - /* r.expr('aaaa bbbb cccc ').split(' bbbb ', 2) */ - logger.info("About to run line #186: r.expr('aaaa bbbb cccc ').split(' bbbb ', 2L)"); - Object obtained = runOrCatch(r.expr("aaaa bbbb cccc ").split(" bbbb ", 2L), - new OptArgs() - ,conn); - try { - assertEquals(expected_, obtained); - logger.info("Finished running line #186"); - } catch (Throwable ae) { - logger.error("Whoops, got exception on line #186:" + ae.toString()); - if(obtained instanceof Throwable) { - ae.addSuppressed((Throwable) obtained); - } - throw ae; - } - } - - { - // datum/string.yaml line #188 - /* ['aaaa ', '', ' cccc b d bb e bbbb f'] */ - List expected_ = r.array("aaaa ", "", " cccc b d bb e bbbb f"); - /* r.expr('aaaa bbbb cccc b d bb e bbbb f').split('bb', 2) */ - logger.info("About to run line #188: r.expr('aaaa bbbb cccc b d bb e bbbb f').split('bb', 2L)"); - Object obtained = runOrCatch(r.expr("aaaa bbbb cccc b d bb e bbbb f").split("bb", 2L), - new OptArgs() - ,conn); - try { - assertEquals(expected_, obtained); - logger.info("Finished running line #188"); - } catch (Throwable ae) { - logger.error("Whoops, got exception on line #188:" + ae.toString()); - if(obtained instanceof Throwable) { - ae.addSuppressed((Throwable) obtained); - } - throw ae; - } - } - - { - // datum/string.yaml line #190 - /* ['aaaa', 'cccc b d bb e bbbb f'] */ - List expected_ = r.array("aaaa", "cccc b d bb e bbbb f"); - /* r.expr('aaaa bbbb cccc b d bb e bbbb f').split(' bbbb ', 2) */ - logger.info("About to run line #190: r.expr('aaaa bbbb cccc b d bb e bbbb f').split(' bbbb ', 2L)"); - Object obtained = runOrCatch(r.expr("aaaa bbbb cccc b d bb e bbbb f").split(" bbbb ", 2L), - new OptArgs() - ,conn); - try { - assertEquals(expected_, obtained); - logger.info("Finished running line #190"); - } catch (Throwable ae) { - logger.error("Whoops, got exception on line #190:" + ae.toString()); - if(obtained instanceof Throwable) { - ae.addSuppressed((Throwable) obtained); - } - throw ae; - } - } - - { - // datum/string.yaml line #192 - /* ['aaaa', 'cccc b d bb e', 'f'] */ - List expected_ = r.array("aaaa", "cccc b d bb e", "f"); - /* r.expr('aaaa bbbb cccc b d bb e bbbb f').split(' bbbb ', 2) */ - logger.info("About to run line #192: r.expr('aaaa bbbb cccc b d bb e bbbb f').split(' bbbb ', 2L)"); - Object obtained = runOrCatch(r.expr("aaaa bbbb cccc b d bb e bbbb f").split(" bbbb ", 2L), - new OptArgs() - ,conn); - try { - assertEquals(expected_, obtained); - logger.info("Finished running line #192"); - } catch (Throwable ae) { - logger.error("Whoops, got exception on line #192:" + ae.toString()); - if(obtained instanceof Throwable) { - ae.addSuppressed((Throwable) obtained); - } - throw ae; - } - } - - { - // datum/string.yaml line #195 - /* [] */ - List expected_ = r.array(); - /* r.expr(' ').split() */ - logger.info("About to run line #195: r.expr(' ').split()"); - Object obtained = runOrCatch(r.expr(" ").split(), - new OptArgs() - ,conn); - try { - assertEquals(expected_, obtained); - logger.info("Finished running line #195"); - } catch (Throwable ae) { - logger.error("Whoops, got exception on line #195:" + ae.toString()); - if(obtained instanceof Throwable) { - ae.addSuppressed((Throwable) obtained); - } - throw ae; - } - } - - { - // datum/string.yaml line #197 - /* [] */ - List expected_ = r.array(); - /* r.expr(' ').split(null) */ - logger.info("About to run line #197: r.expr(' ').split((ReqlExpr) null)"); - Object obtained = runOrCatch(r.expr(" ").split((ReqlExpr) null), - new OptArgs() - ,conn); - try { - assertEquals(expected_, obtained); - logger.info("Finished running line #197"); - } catch (Throwable ae) { - logger.error("Whoops, got exception on line #197:" + ae.toString()); - if(obtained instanceof Throwable) { - ae.addSuppressed((Throwable) obtained); - } - throw ae; - } - } - - { - // datum/string.yaml line #199 - /* ['', '', ''] */ - List expected_ = r.array("", "", ""); - /* r.expr(' ').split(' ') */ - logger.info("About to run line #199: r.expr(' ').split(' ')"); - Object obtained = runOrCatch(r.expr(" ").split(" "), - new OptArgs() - ,conn); - try { - assertEquals(expected_, obtained); - logger.info("Finished running line #199"); - } catch (Throwable ae) { - logger.error("Whoops, got exception on line #199:" + ae.toString()); - if(obtained instanceof Throwable) { - ae.addSuppressed((Throwable) obtained); - } - throw ae; - } - } - - { - // datum/string.yaml line #201 - /* [] */ - List expected_ = r.array(); - /* r.expr(' ').split(null, 5) */ - logger.info("About to run line #201: r.expr(' ').split((ReqlExpr) null, 5L)"); - Object obtained = runOrCatch(r.expr(" ").split((ReqlExpr) null, 5L), - new OptArgs() - ,conn); - try { - assertEquals(expected_, obtained); - logger.info("Finished running line #201"); - } catch (Throwable ae) { - logger.error("Whoops, got exception on line #201:" + ae.toString()); - if(obtained instanceof Throwable) { - ae.addSuppressed((Throwable) obtained); - } - throw ae; - } - } - - { - // datum/string.yaml line #203 - /* ['', '', ''] */ - List expected_ = r.array("", "", ""); - /* r.expr(' ').split(' ', 5) */ - logger.info("About to run line #203: r.expr(' ').split(' ', 5L)"); - Object obtained = runOrCatch(r.expr(" ").split(" ", 5L), - new OptArgs() - ,conn); - try { - assertEquals(expected_, obtained); - logger.info("Finished running line #203"); - } catch (Throwable ae) { - logger.error("Whoops, got exception on line #203:" + ae.toString()); - if(obtained instanceof Throwable) { - ae.addSuppressed((Throwable) obtained); - } - throw ae; - } - } - - { - // datum/string.yaml line #206 - /* ['aaaa', 'bbbb', 'cccc'] */ - List expected_ = r.array("aaaa", "bbbb", "cccc"); - /* r.expr(' aaaa bbbb cccc ').split() */ - logger.info("About to run line #206: r.expr(' aaaa bbbb cccc ').split()"); - Object obtained = runOrCatch(r.expr(" aaaa bbbb cccc ").split(), - new OptArgs() - ,conn); - try { - assertEquals(expected_, obtained); - logger.info("Finished running line #206"); - } catch (Throwable ae) { - logger.error("Whoops, got exception on line #206:" + ae.toString()); - if(obtained instanceof Throwable) { - ae.addSuppressed((Throwable) obtained); - } - throw ae; - } - } - - { - // datum/string.yaml line #208 - /* ['aaaa', 'bbbb', 'cccc'] */ - List expected_ = r.array("aaaa", "bbbb", "cccc"); - /* r.expr(' aaaa bbbb cccc ').split(null) */ - logger.info("About to run line #208: r.expr(' aaaa bbbb cccc ').split((ReqlExpr) null)"); - Object obtained = runOrCatch(r.expr(" aaaa bbbb cccc ").split((ReqlExpr) null), - new OptArgs() - ,conn); - try { - assertEquals(expected_, obtained); - logger.info("Finished running line #208"); - } catch (Throwable ae) { - logger.error("Whoops, got exception on line #208:" + ae.toString()); - if(obtained instanceof Throwable) { - ae.addSuppressed((Throwable) obtained); - } - throw ae; - } - } - - { - // datum/string.yaml line #210 - /* ['', '', 'aaaa', 'bbbb', '', 'cccc', ''] */ - List expected_ = r.array("", "", "aaaa", "bbbb", "", "cccc", ""); - /* r.expr(' aaaa bbbb cccc ').split(' ') */ - logger.info("About to run line #210: r.expr(' aaaa bbbb cccc ').split(' ')"); - Object obtained = runOrCatch(r.expr(" aaaa bbbb cccc ").split(" "), - new OptArgs() - ,conn); - try { - assertEquals(expected_, obtained); - logger.info("Finished running line #210"); - } catch (Throwable ae) { - logger.error("Whoops, got exception on line #210:" + ae.toString()); - if(obtained instanceof Throwable) { - ae.addSuppressed((Throwable) obtained); - } - throw ae; - } - } - - { - // datum/string.yaml line #212 - /* [' aaaa ', '', '', '', ' cccc '] */ - List expected_ = r.array(" aaaa ", "", "", "", " cccc "); - /* r.expr(' aaaa bbbb cccc ').split('b') */ - logger.info("About to run line #212: r.expr(' aaaa bbbb cccc ').split('b')"); - Object obtained = runOrCatch(r.expr(" aaaa bbbb cccc ").split("b"), - new OptArgs() - ,conn); - try { - assertEquals(expected_, obtained); - logger.info("Finished running line #212"); - } catch (Throwable ae) { - logger.error("Whoops, got exception on line #212:" + ae.toString()); - if(obtained instanceof Throwable) { - ae.addSuppressed((Throwable) obtained); - } - throw ae; - } - } - - { - // datum/string.yaml line #214 - /* [' aaaa ', '', ' cccc '] */ - List expected_ = r.array(" aaaa ", "", " cccc "); - /* r.expr(' aaaa bbbb cccc ').split('bb') */ - logger.info("About to run line #214: r.expr(' aaaa bbbb cccc ').split('bb')"); - Object obtained = runOrCatch(r.expr(" aaaa bbbb cccc ").split("bb"), - new OptArgs() - ,conn); - try { - assertEquals(expected_, obtained); - logger.info("Finished running line #214"); - } catch (Throwable ae) { - logger.error("Whoops, got exception on line #214:" + ae.toString()); - if(obtained instanceof Throwable) { - ae.addSuppressed((Throwable) obtained); - } - throw ae; - } - } - - { - // datum/string.yaml line #216 - /* [' aaaa', 'cccc '] */ - List expected_ = r.array(" aaaa", "cccc "); - /* r.expr(' aaaa bbbb cccc ').split(' bbbb ') */ - logger.info("About to run line #216: r.expr(' aaaa bbbb cccc ').split(' bbbb ')"); - Object obtained = runOrCatch(r.expr(" aaaa bbbb cccc ").split(" bbbb "), - new OptArgs() - ,conn); - try { - assertEquals(expected_, obtained); - logger.info("Finished running line #216"); - } catch (Throwable ae) { - logger.error("Whoops, got exception on line #216:" + ae.toString()); - if(obtained instanceof Throwable) { - ae.addSuppressed((Throwable) obtained); - } - throw ae; - } - } - - { - // datum/string.yaml line #218 - /* [' aaaa ', '', ' cccc b d ', ' e ', '', ' f'] */ - List expected_ = r.array(" aaaa ", "", " cccc b d ", " e ", "", " f"); - /* r.expr(' aaaa bbbb cccc b d bb e bbbb f').split('bb') */ - logger.info("About to run line #218: r.expr(' aaaa bbbb cccc b d bb e bbbb f').split('bb')"); - Object obtained = runOrCatch(r.expr(" aaaa bbbb cccc b d bb e bbbb f").split("bb"), - new OptArgs() - ,conn); - try { - assertEquals(expected_, obtained); - logger.info("Finished running line #218"); - } catch (Throwable ae) { - logger.error("Whoops, got exception on line #218:" + ae.toString()); - if(obtained instanceof Throwable) { - ae.addSuppressed((Throwable) obtained); - } - throw ae; - } - } - - { - // datum/string.yaml line #220 - /* [' aaaa', 'cccc b d bb e bbbb f'] */ - List expected_ = r.array(" aaaa", "cccc b d bb e bbbb f"); - /* r.expr(' aaaa bbbb cccc b d bb e bbbb f').split(' bbbb ') */ - logger.info("About to run line #220: r.expr(' aaaa bbbb cccc b d bb e bbbb f').split(' bbbb ')"); - Object obtained = runOrCatch(r.expr(" aaaa bbbb cccc b d bb e bbbb f").split(" bbbb "), - new OptArgs() - ,conn); - try { - assertEquals(expected_, obtained); - logger.info("Finished running line #220"); - } catch (Throwable ae) { - logger.error("Whoops, got exception on line #220:" + ae.toString()); - if(obtained instanceof Throwable) { - ae.addSuppressed((Throwable) obtained); - } - throw ae; - } - } - - { - // datum/string.yaml line #222 - /* [' aaaa', 'cccc b d bb e', 'f'] */ - List expected_ = r.array(" aaaa", "cccc b d bb e", "f"); - /* r.expr(' aaaa bbbb cccc b d bb e bbbb f').split(' bbbb ') */ - logger.info("About to run line #222: r.expr(' aaaa bbbb cccc b d bb e bbbb f').split(' bbbb ')"); - Object obtained = runOrCatch(r.expr(" aaaa bbbb cccc b d bb e bbbb f").split(" bbbb "), - new OptArgs() - ,conn); - try { - assertEquals(expected_, obtained); - logger.info("Finished running line #222"); - } catch (Throwable ae) { - logger.error("Whoops, got exception on line #222:" + ae.toString()); - if(obtained instanceof Throwable) { - ae.addSuppressed((Throwable) obtained); - } - throw ae; - } - } - - { - // datum/string.yaml line #225 - /* ['aaaa', 'bbbb', 'cccc'] */ - List expected_ = r.array("aaaa", "bbbb", "cccc"); - /* r.expr(' aaaa bbbb cccc ').split(null, 3) */ - logger.info("About to run line #225: r.expr(' aaaa bbbb cccc ').split((ReqlExpr) null, 3L)"); - Object obtained = runOrCatch(r.expr(" aaaa bbbb cccc ").split((ReqlExpr) null, 3L), - new OptArgs() - ,conn); - try { - assertEquals(expected_, obtained); - logger.info("Finished running line #225"); - } catch (Throwable ae) { - logger.error("Whoops, got exception on line #225:" + ae.toString()); - if(obtained instanceof Throwable) { - ae.addSuppressed((Throwable) obtained); - } - throw ae; - } - } - - { - // datum/string.yaml line #227 - /* ['', '', 'aaaa', 'bbbb', '', 'cccc '] */ - List expected_ = r.array("", "", "aaaa", "bbbb", "", "cccc "); - /* r.expr(' aaaa bbbb cccc ').split(' ', 5) */ - logger.info("About to run line #227: r.expr(' aaaa bbbb cccc ').split(' ', 5L)"); - Object obtained = runOrCatch(r.expr(" aaaa bbbb cccc ").split(" ", 5L), - new OptArgs() - ,conn); - try { - assertEquals(expected_, obtained); - logger.info("Finished running line #227"); - } catch (Throwable ae) { - logger.error("Whoops, got exception on line #227:" + ae.toString()); - if(obtained instanceof Throwable) { - ae.addSuppressed((Throwable) obtained); - } - throw ae; - } - } - - { - // datum/string.yaml line #229 - /* [' aaaa ', '', '', '', ' cccc '] */ - List expected_ = r.array(" aaaa ", "", "", "", " cccc "); - /* r.expr(' aaaa bbbb cccc ').split('b', 5) */ - logger.info("About to run line #229: r.expr(' aaaa bbbb cccc ').split('b', 5L)"); - Object obtained = runOrCatch(r.expr(" aaaa bbbb cccc ").split("b", 5L), - new OptArgs() - ,conn); - try { - assertEquals(expected_, obtained); - logger.info("Finished running line #229"); - } catch (Throwable ae) { - logger.error("Whoops, got exception on line #229:" + ae.toString()); - if(obtained instanceof Throwable) { - ae.addSuppressed((Throwable) obtained); - } - throw ae; - } - } - - { - // datum/string.yaml line #231 - /* [' aaaa ', '', ' cccc '] */ - List expected_ = r.array(" aaaa ", "", " cccc "); - /* r.expr(' aaaa bbbb cccc ').split('bb', 3) */ - logger.info("About to run line #231: r.expr(' aaaa bbbb cccc ').split('bb', 3L)"); - Object obtained = runOrCatch(r.expr(" aaaa bbbb cccc ").split("bb", 3L), - new OptArgs() - ,conn); - try { - assertEquals(expected_, obtained); - logger.info("Finished running line #231"); - } catch (Throwable ae) { - logger.error("Whoops, got exception on line #231:" + ae.toString()); - if(obtained instanceof Throwable) { - ae.addSuppressed((Throwable) obtained); - } - throw ae; - } - } - - { - // datum/string.yaml line #233 - /* [' aaaa', 'cccc '] */ - List expected_ = r.array(" aaaa", "cccc "); - /* r.expr(' aaaa bbbb cccc ').split(' bbbb ', 2) */ - logger.info("About to run line #233: r.expr(' aaaa bbbb cccc ').split(' bbbb ', 2L)"); - Object obtained = runOrCatch(r.expr(" aaaa bbbb cccc ").split(" bbbb ", 2L), - new OptArgs() - ,conn); - try { - assertEquals(expected_, obtained); - logger.info("Finished running line #233"); - } catch (Throwable ae) { - logger.error("Whoops, got exception on line #233:" + ae.toString()); - if(obtained instanceof Throwable) { - ae.addSuppressed((Throwable) obtained); - } - throw ae; - } - } - - { - // datum/string.yaml line #235 - /* [' aaaa ', '', ' cccc b d ', ' e ', '', ' f'] */ - List expected_ = r.array(" aaaa ", "", " cccc b d ", " e ", "", " f"); - /* r.expr(' aaaa bbbb cccc b d bb e bbbb f').split('bb', 6) */ - logger.info("About to run line #235: r.expr(' aaaa bbbb cccc b d bb e bbbb f').split('bb', 6L)"); - Object obtained = runOrCatch(r.expr(" aaaa bbbb cccc b d bb e bbbb f").split("bb", 6L), - new OptArgs() - ,conn); - try { - assertEquals(expected_, obtained); - logger.info("Finished running line #235"); - } catch (Throwable ae) { - logger.error("Whoops, got exception on line #235:" + ae.toString()); - if(obtained instanceof Throwable) { - ae.addSuppressed((Throwable) obtained); - } - throw ae; - } - } - - { - // datum/string.yaml line #237 - /* [' aaaa', 'cccc b d bb e bbbb f'] */ - List expected_ = r.array(" aaaa", "cccc b d bb e bbbb f"); - /* r.expr(' aaaa bbbb cccc b d bb e bbbb f').split(' bbbb ', 2) */ - logger.info("About to run line #237: r.expr(' aaaa bbbb cccc b d bb e bbbb f').split(' bbbb ', 2L)"); - Object obtained = runOrCatch(r.expr(" aaaa bbbb cccc b d bb e bbbb f").split(" bbbb ", 2L), - new OptArgs() - ,conn); - try { - assertEquals(expected_, obtained); - logger.info("Finished running line #237"); - } catch (Throwable ae) { - logger.error("Whoops, got exception on line #237:" + ae.toString()); - if(obtained instanceof Throwable) { - ae.addSuppressed((Throwable) obtained); - } - throw ae; - } - } - - { - // datum/string.yaml line #239 - /* [' aaaa', 'cccc b d bb e', 'f'] */ - List expected_ = r.array(" aaaa", "cccc b d bb e", "f"); - /* r.expr(' aaaa bbbb cccc b d bb e bbbb f').split(' bbbb ', 3) */ - logger.info("About to run line #239: r.expr(' aaaa bbbb cccc b d bb e bbbb f').split(' bbbb ', 3L)"); - Object obtained = runOrCatch(r.expr(" aaaa bbbb cccc b d bb e bbbb f").split(" bbbb ", 3L), - new OptArgs() - ,conn); - try { - assertEquals(expected_, obtained); - logger.info("Finished running line #239"); - } catch (Throwable ae) { - logger.error("Whoops, got exception on line #239:" + ae.toString()); - if(obtained instanceof Throwable) { - ae.addSuppressed((Throwable) obtained); - } - throw ae; - } - } - - { - // datum/string.yaml line #242 - /* ['aaaa', 'bbbb', 'cccc '] */ - List expected_ = r.array("aaaa", "bbbb", "cccc "); - /* r.expr(' aaaa bbbb cccc ').split(null, 2) */ - logger.info("About to run line #242: r.expr(' aaaa bbbb cccc ').split((ReqlExpr) null, 2L)"); - Object obtained = runOrCatch(r.expr(" aaaa bbbb cccc ").split((ReqlExpr) null, 2L), - new OptArgs() - ,conn); - try { - assertEquals(expected_, obtained); - logger.info("Finished running line #242"); - } catch (Throwable ae) { - logger.error("Whoops, got exception on line #242:" + ae.toString()); - if(obtained instanceof Throwable) { - ae.addSuppressed((Throwable) obtained); - } - throw ae; - } - } - - { - // datum/string.yaml line #244 - /* ["a", "b"] */ - List expected_ = r.array("a", "b"); - /* r.expr("a b ").split(null, 2) */ - logger.info("About to run line #244: r.expr('a b ').split((ReqlExpr) null, 2L)"); - Object obtained = runOrCatch(r.expr("a b ").split((ReqlExpr) null, 2L), - new OptArgs() - ,conn); - try { - assertEquals(expected_, obtained); - logger.info("Finished running line #244"); - } catch (Throwable ae) { - logger.error("Whoops, got exception on line #244:" + ae.toString()); - if(obtained instanceof Throwable) { - ae.addSuppressed((Throwable) obtained); - } - throw ae; - } - } - - { - // datum/string.yaml line #246 - /* ['', '', 'aaaa', 'bbbb', ' cccc '] */ - List expected_ = r.array("", "", "aaaa", "bbbb", " cccc "); - /* r.expr(' aaaa bbbb cccc ').split(' ', 4) */ - logger.info("About to run line #246: r.expr(' aaaa bbbb cccc ').split(' ', 4L)"); - Object obtained = runOrCatch(r.expr(" aaaa bbbb cccc ").split(" ", 4L), - new OptArgs() - ,conn); - try { - assertEquals(expected_, obtained); - logger.info("Finished running line #246"); - } catch (Throwable ae) { - logger.error("Whoops, got exception on line #246:" + ae.toString()); - if(obtained instanceof Throwable) { - ae.addSuppressed((Throwable) obtained); - } - throw ae; - } - } - - { - // datum/string.yaml line #248 - /* [' aaaa ', '', '', '', ' cccc '] */ - List expected_ = r.array(" aaaa ", "", "", "", " cccc "); - /* r.expr(' aaaa bbbb cccc ').split('b', 4) */ - logger.info("About to run line #248: r.expr(' aaaa bbbb cccc ').split('b', 4L)"); - Object obtained = runOrCatch(r.expr(" aaaa bbbb cccc ").split("b", 4L), - new OptArgs() - ,conn); - try { - assertEquals(expected_, obtained); - logger.info("Finished running line #248"); - } catch (Throwable ae) { - logger.error("Whoops, got exception on line #248:" + ae.toString()); - if(obtained instanceof Throwable) { - ae.addSuppressed((Throwable) obtained); - } - throw ae; - } - } - - { - // datum/string.yaml line #250 - /* [' aaaa ', '', ' cccc '] */ - List expected_ = r.array(" aaaa ", "", " cccc "); - /* r.expr(' aaaa bbbb cccc ').split('bb', 2) */ - logger.info("About to run line #250: r.expr(' aaaa bbbb cccc ').split('bb', 2L)"); - Object obtained = runOrCatch(r.expr(" aaaa bbbb cccc ").split("bb", 2L), - new OptArgs() - ,conn); - try { - assertEquals(expected_, obtained); - logger.info("Finished running line #250"); - } catch (Throwable ae) { - logger.error("Whoops, got exception on line #250:" + ae.toString()); - if(obtained instanceof Throwable) { - ae.addSuppressed((Throwable) obtained); - } - throw ae; - } - } - - { - // datum/string.yaml line #252 - /* [' aaaa', 'cccc '] */ - List expected_ = r.array(" aaaa", "cccc "); - /* r.expr(' aaaa bbbb cccc ').split(' bbbb ', 1) */ - logger.info("About to run line #252: r.expr(' aaaa bbbb cccc ').split(' bbbb ', 1L)"); - Object obtained = runOrCatch(r.expr(" aaaa bbbb cccc ").split(" bbbb ", 1L), - new OptArgs() - ,conn); - try { - assertEquals(expected_, obtained); - logger.info("Finished running line #252"); - } catch (Throwable ae) { - logger.error("Whoops, got exception on line #252:" + ae.toString()); - if(obtained instanceof Throwable) { - ae.addSuppressed((Throwable) obtained); - } - throw ae; - } - } - - { - // datum/string.yaml line #254 - /* [' aaaa ', '', ' cccc b d ', ' e ', '', ' f'] */ - List expected_ = r.array(" aaaa ", "", " cccc b d ", " e ", "", " f"); - /* r.expr(' aaaa bbbb cccc b d bb e bbbb f').split('bb', 5) */ - logger.info("About to run line #254: r.expr(' aaaa bbbb cccc b d bb e bbbb f').split('bb', 5L)"); - Object obtained = runOrCatch(r.expr(" aaaa bbbb cccc b d bb e bbbb f").split("bb", 5L), - new OptArgs() - ,conn); - try { - assertEquals(expected_, obtained); - logger.info("Finished running line #254"); - } catch (Throwable ae) { - logger.error("Whoops, got exception on line #254:" + ae.toString()); - if(obtained instanceof Throwable) { - ae.addSuppressed((Throwable) obtained); - } - throw ae; - } - } - - { - // datum/string.yaml line #256 - /* [' aaaa', 'cccc b d bb e bbbb f'] */ - List expected_ = r.array(" aaaa", "cccc b d bb e bbbb f"); - /* r.expr(' aaaa bbbb cccc b d bb e bbbb f').split(' bbbb ', 1) */ - logger.info("About to run line #256: r.expr(' aaaa bbbb cccc b d bb e bbbb f').split(' bbbb ', 1L)"); - Object obtained = runOrCatch(r.expr(" aaaa bbbb cccc b d bb e bbbb f").split(" bbbb ", 1L), - new OptArgs() - ,conn); - try { - assertEquals(expected_, obtained); - logger.info("Finished running line #256"); - } catch (Throwable ae) { - logger.error("Whoops, got exception on line #256:" + ae.toString()); - if(obtained instanceof Throwable) { - ae.addSuppressed((Throwable) obtained); - } - throw ae; - } - } - - { - // datum/string.yaml line #258 - /* [' aaaa', 'cccc b d bb e', 'f'] */ - List expected_ = r.array(" aaaa", "cccc b d bb e", "f"); - /* r.expr(' aaaa bbbb cccc b d bb e bbbb f').split(' bbbb ', 2) */ - logger.info("About to run line #258: r.expr(' aaaa bbbb cccc b d bb e bbbb f').split(' bbbb ', 2L)"); - Object obtained = runOrCatch(r.expr(" aaaa bbbb cccc b d bb e bbbb f").split(" bbbb ", 2L), - new OptArgs() - ,conn); - try { - assertEquals(expected_, obtained); - logger.info("Finished running line #258"); - } catch (Throwable ae) { - logger.error("Whoops, got exception on line #258:" + ae.toString()); - if(obtained instanceof Throwable) { - ae.addSuppressed((Throwable) obtained); - } - throw ae; - } - } - - { - // datum/string.yaml line #261 - /* ['aaaa', 'bbbb cccc '] */ - List expected_ = r.array("aaaa", "bbbb cccc "); - /* r.expr(' aaaa bbbb cccc ').split(null, 1) */ - logger.info("About to run line #261: r.expr(' aaaa bbbb cccc ').split((ReqlExpr) null, 1L)"); - Object obtained = runOrCatch(r.expr(" aaaa bbbb cccc ").split((ReqlExpr) null, 1L), - new OptArgs() - ,conn); - try { - assertEquals(expected_, obtained); - logger.info("Finished running line #261"); - } catch (Throwable ae) { - logger.error("Whoops, got exception on line #261:" + ae.toString()); - if(obtained instanceof Throwable) { - ae.addSuppressed((Throwable) obtained); - } - throw ae; - } - } - - { - // datum/string.yaml line #263 - /* ['', '', 'aaaa bbbb cccc '] */ - List expected_ = r.array("", "", "aaaa bbbb cccc "); - /* r.expr(' aaaa bbbb cccc ').split(' ', 2) */ - logger.info("About to run line #263: r.expr(' aaaa bbbb cccc ').split(' ', 2L)"); - Object obtained = runOrCatch(r.expr(" aaaa bbbb cccc ").split(" ", 2L), - new OptArgs() - ,conn); - try { - assertEquals(expected_, obtained); - logger.info("Finished running line #263"); - } catch (Throwable ae) { - logger.error("Whoops, got exception on line #263:" + ae.toString()); - if(obtained instanceof Throwable) { - ae.addSuppressed((Throwable) obtained); - } - throw ae; - } - } - - { - // datum/string.yaml line #265 - /* [' aaaa ', '', 'bb cccc '] */ - List expected_ = r.array(" aaaa ", "", "bb cccc "); - /* r.expr(' aaaa bbbb cccc ').split('b', 2) */ - logger.info("About to run line #265: r.expr(' aaaa bbbb cccc ').split('b', 2L)"); - Object obtained = runOrCatch(r.expr(" aaaa bbbb cccc ").split("b", 2L), - new OptArgs() - ,conn); - try { - assertEquals(expected_, obtained); - logger.info("Finished running line #265"); - } catch (Throwable ae) { - logger.error("Whoops, got exception on line #265:" + ae.toString()); - if(obtained instanceof Throwable) { - ae.addSuppressed((Throwable) obtained); - } - throw ae; - } - } - - { - // datum/string.yaml line #267 - /* [' aaaa ', '', ' cccc '] */ - List expected_ = r.array(" aaaa ", "", " cccc "); - /* r.expr(' aaaa bbbb cccc ').split('bb', 2) */ - logger.info("About to run line #267: r.expr(' aaaa bbbb cccc ').split('bb', 2L)"); - Object obtained = runOrCatch(r.expr(" aaaa bbbb cccc ").split("bb", 2L), - new OptArgs() - ,conn); - try { - assertEquals(expected_, obtained); - logger.info("Finished running line #267"); - } catch (Throwable ae) { - logger.error("Whoops, got exception on line #267:" + ae.toString()); - if(obtained instanceof Throwable) { - ae.addSuppressed((Throwable) obtained); - } - throw ae; - } - } - - { - // datum/string.yaml line #269 - /* [' aaaa', 'cccc '] */ - List expected_ = r.array(" aaaa", "cccc "); - /* r.expr(' aaaa bbbb cccc ').split(' bbbb ', 2) */ - logger.info("About to run line #269: r.expr(' aaaa bbbb cccc ').split(' bbbb ', 2L)"); - Object obtained = runOrCatch(r.expr(" aaaa bbbb cccc ").split(" bbbb ", 2L), - new OptArgs() - ,conn); - try { - assertEquals(expected_, obtained); - logger.info("Finished running line #269"); - } catch (Throwable ae) { - logger.error("Whoops, got exception on line #269:" + ae.toString()); - if(obtained instanceof Throwable) { - ae.addSuppressed((Throwable) obtained); - } - throw ae; - } - } - - { - // datum/string.yaml line #271 - /* [' aaaa ', '', ' cccc b d bb e bbbb f'] */ - List expected_ = r.array(" aaaa ", "", " cccc b d bb e bbbb f"); - /* r.expr(' aaaa bbbb cccc b d bb e bbbb f').split('bb', 2) */ - logger.info("About to run line #271: r.expr(' aaaa bbbb cccc b d bb e bbbb f').split('bb', 2L)"); - Object obtained = runOrCatch(r.expr(" aaaa bbbb cccc b d bb e bbbb f").split("bb", 2L), - new OptArgs() - ,conn); - try { - assertEquals(expected_, obtained); - logger.info("Finished running line #271"); - } catch (Throwable ae) { - logger.error("Whoops, got exception on line #271:" + ae.toString()); - if(obtained instanceof Throwable) { - ae.addSuppressed((Throwable) obtained); - } - throw ae; - } - } - - { - // datum/string.yaml line #273 - /* [' aaaa', 'cccc b d bb e bbbb f'] */ - List expected_ = r.array(" aaaa", "cccc b d bb e bbbb f"); - /* r.expr(' aaaa bbbb cccc b d bb e bbbb f').split(' bbbb ', 2) */ - logger.info("About to run line #273: r.expr(' aaaa bbbb cccc b d bb e bbbb f').split(' bbbb ', 2L)"); - Object obtained = runOrCatch(r.expr(" aaaa bbbb cccc b d bb e bbbb f").split(" bbbb ", 2L), - new OptArgs() - ,conn); - try { - assertEquals(expected_, obtained); - logger.info("Finished running line #273"); - } catch (Throwable ae) { - logger.error("Whoops, got exception on line #273:" + ae.toString()); - if(obtained instanceof Throwable) { - ae.addSuppressed((Throwable) obtained); - } - throw ae; - } - } - - { - // datum/string.yaml line #275 - /* [' aaaa', 'cccc b d bb e', 'f'] */ - List expected_ = r.array(" aaaa", "cccc b d bb e", "f"); - /* r.expr(' aaaa bbbb cccc b d bb e bbbb f').split(' bbbb ', 2) */ - logger.info("About to run line #275: r.expr(' aaaa bbbb cccc b d bb e bbbb f').split(' bbbb ', 2L)"); - Object obtained = runOrCatch(r.expr(" aaaa bbbb cccc b d bb e bbbb f").split(" bbbb ", 2L), - new OptArgs() - ,conn); - try { - assertEquals(expected_, obtained); - logger.info("Finished running line #275"); - } catch (Throwable ae) { - logger.error("Whoops, got exception on line #275:" + ae.toString()); - if(obtained instanceof Throwable) { - ae.addSuppressed((Throwable) obtained); - } - throw ae; - } - } - - { - // datum/string.yaml line #278 - /* "ABC-DEF-GHJ" */ - String expected_ = "ABC-DEF-GHJ"; - /* r.expr("abc-dEf-GHJ").upcase() */ - logger.info("About to run line #278: r.expr('abc-dEf-GHJ').upcase()"); - Object obtained = runOrCatch(r.expr("abc-dEf-GHJ").upcase(), - new OptArgs() - ,conn); - try { - assertEquals(expected_, obtained); - logger.info("Finished running line #278"); - } catch (Throwable ae) { - logger.error("Whoops, got exception on line #278:" + ae.toString()); - if(obtained instanceof Throwable) { - ae.addSuppressed((Throwable) obtained); - } - throw ae; - } - } - - { - // datum/string.yaml line #280 - /* "abc-def-ghj" */ - String expected_ = "abc-def-ghj"; - /* r.expr("abc-dEf-GHJ").downcase() */ - logger.info("About to run line #280: r.expr('abc-dEf-GHJ').downcase()"); - Object obtained = runOrCatch(r.expr("abc-dEf-GHJ").downcase(), - new OptArgs() - ,conn); - try { - assertEquals(expected_, obtained); - logger.info("Finished running line #280"); - } catch (Throwable ae) { - logger.error("Whoops, got exception on line #280:" + ae.toString()); - if(obtained instanceof Throwable) { - ae.addSuppressed((Throwable) obtained); - } - throw ae; - } - } - - { - // datum/string.yaml line #285 - /* ["f", "\u00e9", "o", "o"] */ - List expected_ = r.array("f", "é", "o", "o"); - /* r.expr(u"f\u00e9oo").split("") */ - logger.info("About to run line #285: r.expr('féoo').split('')"); - Object obtained = runOrCatch(r.expr("féoo").split(""), - new OptArgs() - ,conn); - try { - assertEquals(expected_, obtained); - logger.info("Finished running line #285"); - } catch (Throwable ae) { - logger.error("Whoops, got exception on line #285:" + ae.toString()); - if(obtained instanceof Throwable) { - ae.addSuppressed((Throwable) obtained); - } - throw ae; - } - } - - { - // datum/string.yaml line #294 - /* ["f", "e\u0301", "o", "o"] */ - List expected_ = r.array("f", "é", "o", "o"); - /* r.expr(u"fe\u0301oo").split("") */ - logger.info("About to run line #294: r.expr('féoo').split('')"); - Object obtained = runOrCatch(r.expr("féoo").split(""), - new OptArgs() - ,conn); - try { - assertEquals(expected_, obtained); - logger.info("Finished running line #294"); - } catch (Throwable ae) { - logger.error("Whoops, got exception on line #294:" + ae.toString()); - if(obtained instanceof Throwable) { - ae.addSuppressed((Throwable) obtained); - } - throw ae; - } - } - - { - // datum/string.yaml line #307 - /* ["foo", "bar", "baz", "quux", "fred", "barney", "wilma"] */ - List expected_ = r.array("foo", "bar", "baz", "quux", "fred", "barney", "wilma"); - /* r.expr(u"foo bar\tbaz\nquux\rfred\u000bbarney\u000cwilma").split() */ - logger.info("About to run line #307: r.expr('foo bar\\tbaz\\nquux\\rfred\\u000bbarney\\u000cwilma').split()"); - Object obtained = runOrCatch(r.expr("foo bar\tbaz\nquux\rfred\u000bbarney\u000cwilma").split(), - new OptArgs() - ,conn); - try { - assertEquals(expected_, obtained); - logger.info("Finished running line #307"); - } catch (Throwable ae) { - logger.error("Whoops, got exception on line #307:" + ae.toString()); - if(obtained instanceof Throwable) { - ae.addSuppressed((Throwable) obtained); - } - throw ae; - } - } - - { - // datum/string.yaml line #323 - /* ["foo", "bar", "baz\u2060quux", "fred", "barney", "wilma", "betty\u200b"] */ - List expected_ = r.array("foo", "bar", "baz\u2060quux", "fred", "barney", "wilma", "betty\u200b"); - /* r.expr(u"foo\u00a0bar\u2001baz\u2060quux\u2028fred\u2028barney\u2029wilma\u0085betty\u200b").split() */ - logger.info("About to run line #323: r.expr('foo\\u00a0bar\\u2001baz\\u2060quux\\u2028fred\\u2028barney\\u2029wilma\\u0085betty\\u200b').split()"); - Object obtained = runOrCatch(r.expr("foo\u00a0bar\u2001baz\u2060quux\u2028fred\u2028barney\u2029wilma\u0085betty\u200b").split(), - new OptArgs() - ,conn); - try { - assertEquals(expected_, obtained); - logger.info("Finished running line #323"); - } catch (Throwable ae) { - logger.error("Whoops, got exception on line #323:" + ae.toString()); - if(obtained instanceof Throwable) { - ae.addSuppressed((Throwable) obtained); - } - throw ae; - } - } - } -} diff --git a/drivers/java/src/test/java/com/rethinkdb/gen/DatumTypeof.java b/drivers/java/src/test/java/com/rethinkdb/gen/DatumTypeof.java deleted file mode 100644 index f4e63297b2d..00000000000 --- a/drivers/java/src/test/java/com/rethinkdb/gen/DatumTypeof.java +++ /dev/null @@ -1,119 +0,0 @@ -// Autogenerated by convert_tests.py and process_polyglot.py. -// Do not edit this file directly. -// The template for this file is located at: -// ../../../../../../../templates/Test.java -package com.rethinkdb.gen; - -import com.rethinkdb.RethinkDB; -import com.rethinkdb.gen.exc.*; -import com.rethinkdb.gen.ast.*; -import com.rethinkdb.ast.ReqlAst; -import com.rethinkdb.model.MapObject; -import com.rethinkdb.model.OptArgs; -import com.rethinkdb.net.Connection; -import com.rethinkdb.net.Cursor; -import junit.framework.TestCase; -import static org.junit.Assert.assertEquals; -import static org.junit.Assert.assertArrayEquals; -import org.slf4j.Logger; -import org.slf4j.LoggerFactory; - -import org.junit.*; -import org.junit.rules.ExpectedException; - -import java.util.Arrays; -import java.util.ArrayList; -import java.util.List; -import java.util.Map; -import java.util.Set; -import java.time.OffsetDateTime; -import java.time.ZoneOffset; -import java.time.Instant; -import java.util.stream.LongStream; -import java.util.stream.Collectors; -import java.util.stream.Stream; -import java.util.concurrent.TimeoutException; -import java.util.regex.Pattern; -import java.util.Collections; -import java.nio.charset.StandardCharsets; - -import static com.rethinkdb.TestingCommon.*; -import com.rethinkdb.TestingFramework; - -public class DatumTypeof { - // These tests test the type of command - Logger logger = LoggerFactory.getLogger(DatumTypeof.class); - public static final RethinkDB r = RethinkDB.r; - - Connection conn; - - @Before - public void setUp() throws Exception { - logger.info("Setting up."); - conn = TestingFramework.createConnection(); - try { - r.dbCreate("test").run(conn); - r.db("test").wait_().run(conn); - }catch (Exception e){} - } - - @After - public void tearDown() throws Exception { - logger.info("Tearing down."); - r.db("rethinkdb").table("_debug_scratch").delete().run(conn); - if(!conn.isOpen()){ - conn.close(); - conn = TestingFramework.createConnection(); - } - r.dbDrop("test").run(conn); - conn.close(false); - } - - // Autogenerated tests below - - @Test(timeout=120000) - public void test() throws Exception { - - { - // datum/typeof.yaml line #5 - /* 'NULL' */ - String expected_ = "NULL"; - /* r.expr(null).type_of() */ - logger.info("About to run line #5: r.expr((ReqlExpr) null).typeOf()"); - Object obtained = runOrCatch(r.expr((ReqlExpr) null).typeOf(), - new OptArgs() - ,conn); - try { - assertEquals(expected_, obtained); - logger.info("Finished running line #5"); - } catch (Throwable ae) { - logger.error("Whoops, got exception on line #5:" + ae.toString()); - if(obtained instanceof Throwable) { - ae.addSuppressed((Throwable) obtained); - } - throw ae; - } - } - - { - // datum/typeof.yaml line #9 - /* 'NULL' */ - String expected_ = "NULL"; - /* r.type_of(null) */ - logger.info("About to run line #9: r.typeOf((ReqlExpr) null)"); - Object obtained = runOrCatch(r.typeOf((ReqlExpr) null), - new OptArgs() - ,conn); - try { - assertEquals(expected_, obtained); - logger.info("Finished running line #9"); - } catch (Throwable ae) { - logger.error("Whoops, got exception on line #9:" + ae.toString()); - if(obtained instanceof Throwable) { - ae.addSuppressed((Throwable) obtained); - } - throw ae; - } - } - } -} diff --git a/drivers/java/src/test/java/com/rethinkdb/gen/DatumUuid.java b/drivers/java/src/test/java/com/rethinkdb/gen/DatumUuid.java deleted file mode 100644 index eca40ad18fe..00000000000 --- a/drivers/java/src/test/java/com/rethinkdb/gen/DatumUuid.java +++ /dev/null @@ -1,245 +0,0 @@ -// Autogenerated by convert_tests.py and process_polyglot.py. -// Do not edit this file directly. -// The template for this file is located at: -// ../../../../../../../templates/Test.java -package com.rethinkdb.gen; - -import com.rethinkdb.RethinkDB; -import com.rethinkdb.gen.exc.*; -import com.rethinkdb.gen.ast.*; -import com.rethinkdb.ast.ReqlAst; -import com.rethinkdb.model.MapObject; -import com.rethinkdb.model.OptArgs; -import com.rethinkdb.net.Connection; -import com.rethinkdb.net.Cursor; -import junit.framework.TestCase; -import static org.junit.Assert.assertEquals; -import static org.junit.Assert.assertArrayEquals; -import org.slf4j.Logger; -import org.slf4j.LoggerFactory; - -import org.junit.*; -import org.junit.rules.ExpectedException; - -import java.util.Arrays; -import java.util.ArrayList; -import java.util.List; -import java.util.Map; -import java.util.Set; -import java.time.OffsetDateTime; -import java.time.ZoneOffset; -import java.time.Instant; -import java.util.stream.LongStream; -import java.util.stream.Collectors; -import java.util.stream.Stream; -import java.util.concurrent.TimeoutException; -import java.util.regex.Pattern; -import java.util.Collections; -import java.nio.charset.StandardCharsets; - -import static com.rethinkdb.TestingCommon.*; -import com.rethinkdb.TestingFramework; - -public class DatumUuid { - // Test that UUIDs work - Logger logger = LoggerFactory.getLogger(DatumUuid.class); - public static final RethinkDB r = RethinkDB.r; - - Connection conn; - - @Before - public void setUp() throws Exception { - logger.info("Setting up."); - conn = TestingFramework.createConnection(); - try { - r.dbCreate("test").run(conn); - r.db("test").wait_().run(conn); - }catch (Exception e){} - } - - @After - public void tearDown() throws Exception { - logger.info("Tearing down."); - r.db("rethinkdb").table("_debug_scratch").delete().run(conn); - if(!conn.isOpen()){ - conn.close(); - conn = TestingFramework.createConnection(); - } - r.dbDrop("test").run(conn); - conn.close(false); - } - - // Autogenerated tests below - - @Test(timeout=120000) - public void test() throws Exception { - - { - // datum/uuid.yaml line #3 - /* uuid() */ - UUIDMatch expected_ = uuid(); - /* r.uuid() */ - logger.info("About to run line #3: r.uuid()"); - Object obtained = runOrCatch(r.uuid(), - new OptArgs() - ,conn); - try { - assertEquals(expected_, obtained); - logger.info("Finished running line #3"); - } catch (Throwable ae) { - logger.error("Whoops, got exception on line #3:" + ae.toString()); - if(obtained instanceof Throwable) { - ae.addSuppressed((Throwable) obtained); - } - throw ae; - } - } - - { - // datum/uuid.yaml line #5 - /* uuid() */ - UUIDMatch expected_ = uuid(); - /* r.expr(r.uuid()) */ - logger.info("About to run line #5: r.expr(r.uuid())"); - Object obtained = runOrCatch(r.expr(r.uuid()), - new OptArgs() - ,conn); - try { - assertEquals(expected_, obtained); - logger.info("Finished running line #5"); - } catch (Throwable ae) { - logger.error("Whoops, got exception on line #5:" + ae.toString()); - if(obtained instanceof Throwable) { - ae.addSuppressed((Throwable) obtained); - } - throw ae; - } - } - - { - // datum/uuid.yaml line #7 - /* 'STRING' */ - String expected_ = "STRING"; - /* r.type_of(r.uuid()) */ - logger.info("About to run line #7: r.typeOf(r.uuid())"); - Object obtained = runOrCatch(r.typeOf(r.uuid()), - new OptArgs() - ,conn); - try { - assertEquals(expected_, obtained); - logger.info("Finished running line #7"); - } catch (Throwable ae) { - logger.error("Whoops, got exception on line #7:" + ae.toString()); - if(obtained instanceof Throwable) { - ae.addSuppressed((Throwable) obtained); - } - throw ae; - } - } - - { - // datum/uuid.yaml line #9 - /* true */ - Boolean expected_ = true; - /* r.uuid().ne(r.uuid()) */ - logger.info("About to run line #9: r.uuid().ne(r.uuid())"); - Object obtained = runOrCatch(r.uuid().ne(r.uuid()), - new OptArgs() - ,conn); - try { - assertEquals(expected_, obtained); - logger.info("Finished running line #9"); - } catch (Throwable ae) { - logger.error("Whoops, got exception on line #9:" + ae.toString()); - if(obtained instanceof Throwable) { - ae.addSuppressed((Throwable) obtained); - } - throw ae; - } - } - - { - // datum/uuid.yaml line #11 - /* ('97dd10a5-4fc4-554f-86c5-0d2c2e3d5330') */ - String expected_ = "97dd10a5-4fc4-554f-86c5-0d2c2e3d5330"; - /* r.uuid('magic') */ - logger.info("About to run line #11: r.uuid('magic')"); - Object obtained = runOrCatch(r.uuid("magic"), - new OptArgs() - ,conn); - try { - assertEquals(expected_, obtained); - logger.info("Finished running line #11"); - } catch (Throwable ae) { - logger.error("Whoops, got exception on line #11:" + ae.toString()); - if(obtained instanceof Throwable) { - ae.addSuppressed((Throwable) obtained); - } - throw ae; - } - } - - { - // datum/uuid.yaml line #13 - /* true */ - Boolean expected_ = true; - /* r.uuid('magic').eq(r.uuid('magic')) */ - logger.info("About to run line #13: r.uuid('magic').eq(r.uuid('magic'))"); - Object obtained = runOrCatch(r.uuid("magic").eq(r.uuid("magic")), - new OptArgs() - ,conn); - try { - assertEquals(expected_, obtained); - logger.info("Finished running line #13"); - } catch (Throwable ae) { - logger.error("Whoops, got exception on line #13:" + ae.toString()); - if(obtained instanceof Throwable) { - ae.addSuppressed((Throwable) obtained); - } - throw ae; - } - } - - { - // datum/uuid.yaml line #15 - /* true */ - Boolean expected_ = true; - /* r.uuid('magic').ne(r.uuid('beans')) */ - logger.info("About to run line #15: r.uuid('magic').ne(r.uuid('beans'))"); - Object obtained = runOrCatch(r.uuid("magic").ne(r.uuid("beans")), - new OptArgs() - ,conn); - try { - assertEquals(expected_, obtained); - logger.info("Finished running line #15"); - } catch (Throwable ae) { - logger.error("Whoops, got exception on line #15:" + ae.toString()); - if(obtained instanceof Throwable) { - ae.addSuppressed((Throwable) obtained); - } - throw ae; - } - } - - { - // datum/uuid.yaml line #17 - /* 10 */ - Long expected_ = 10L; - /* r.expr([1,2,3,4,5,6,7,8,9,10]).map(lambda u:r.uuid()).distinct().count() */ - logger.info("About to run line #17: r.expr(r.array(1L, 2L, 3L, 4L, 5L, 6L, 7L, 8L, 9L, 10L)).map(u -> r.uuid()).distinct().count()"); - Object obtained = runOrCatch(r.expr(r.array(1L, 2L, 3L, 4L, 5L, 6L, 7L, 8L, 9L, 10L)).map(u -> r.uuid()).distinct().count(), - new OptArgs() - ,conn); - try { - assertEquals(expected_, obtained); - logger.info("Finished running line #17"); - } catch (Throwable ae) { - logger.error("Whoops, got exception on line #17:" + ae.toString()); - if(obtained instanceof Throwable) { - ae.addSuppressed((Throwable) obtained); - } - throw ae; - } - } - } -} diff --git a/drivers/java/src/test/java/com/rethinkdb/gen/Default.java b/drivers/java/src/test/java/com/rethinkdb/gen/Default.java deleted file mode 100644 index 84634c8af87..00000000000 --- a/drivers/java/src/test/java/com/rethinkdb/gen/Default.java +++ /dev/null @@ -1,1515 +0,0 @@ -// Autogenerated by convert_tests.py and process_polyglot.py. -// Do not edit this file directly. -// The template for this file is located at: -// ../../../../../../../templates/Test.java -package com.rethinkdb.gen; - -import com.rethinkdb.RethinkDB; -import com.rethinkdb.gen.exc.*; -import com.rethinkdb.gen.ast.*; -import com.rethinkdb.ast.ReqlAst; -import com.rethinkdb.model.MapObject; -import com.rethinkdb.model.OptArgs; -import com.rethinkdb.net.Connection; -import com.rethinkdb.net.Cursor; -import junit.framework.TestCase; -import static org.junit.Assert.assertEquals; -import static org.junit.Assert.assertArrayEquals; -import org.slf4j.Logger; -import org.slf4j.LoggerFactory; - -import org.junit.*; -import org.junit.rules.ExpectedException; - -import java.util.Arrays; -import java.util.ArrayList; -import java.util.List; -import java.util.Map; -import java.util.Set; -import java.time.OffsetDateTime; -import java.time.ZoneOffset; -import java.time.Instant; -import java.util.stream.LongStream; -import java.util.stream.Collectors; -import java.util.stream.Stream; -import java.util.concurrent.TimeoutException; -import java.util.regex.Pattern; -import java.util.Collections; -import java.nio.charset.StandardCharsets; - -import static com.rethinkdb.TestingCommon.*; -import com.rethinkdb.TestingFramework; - -public class Default { - // Tests r.default - Logger logger = LoggerFactory.getLogger(Default.class); - public static final RethinkDB r = RethinkDB.r; - - Connection conn; - - @Before - public void setUp() throws Exception { - logger.info("Setting up."); - conn = TestingFramework.createConnection(); - try { - r.dbCreate("test").run(conn); - r.db("test").wait_().run(conn); - }catch (Exception e){} - } - - @After - public void tearDown() throws Exception { - logger.info("Tearing down."); - r.db("rethinkdb").table("_debug_scratch").delete().run(conn); - if(!conn.isOpen()){ - conn.close(); - conn = TestingFramework.createConnection(); - } - r.dbDrop("test").run(conn); - conn.close(false); - } - - // Autogenerated tests below - - @Test(timeout=120000) - public void test() throws Exception { - - { - // default.yaml line #3 - /* 1 */ - Long expected_ = 1L; - /* r.expr(1).default(2) */ - logger.info("About to run line #3: r.expr(1L).default_(2L)"); - Object obtained = runOrCatch(r.expr(1L).default_(2L), - new OptArgs() - ,conn); - try { - assertEquals(expected_, obtained); - logger.info("Finished running line #3"); - } catch (Throwable ae) { - logger.error("Whoops, got exception on line #3:" + ae.toString()); - if(obtained instanceof Throwable) { - ae.addSuppressed((Throwable) obtained); - } - throw ae; - } - } - - { - // default.yaml line #5 - /* 2 */ - Long expected_ = 2L; - /* r.expr(null).default(2) */ - logger.info("About to run line #5: r.expr((ReqlExpr) null).default_(2L)"); - Object obtained = runOrCatch(r.expr((ReqlExpr) null).default_(2L), - new OptArgs() - ,conn); - try { - assertEquals(expected_, obtained); - logger.info("Finished running line #5"); - } catch (Throwable ae) { - logger.error("Whoops, got exception on line #5:" + ae.toString()); - if(obtained instanceof Throwable) { - ae.addSuppressed((Throwable) obtained); - } - throw ae; - } - } - - { - // default.yaml line #7 - /* 2 */ - Long expected_ = 2L; - /* r.expr({})['b'].default(2) */ - logger.info("About to run line #7: r.expr(r.hashMap()).bracket('b').default_(2L)"); - Object obtained = runOrCatch(r.expr(r.hashMap()).bracket("b").default_(2L), - new OptArgs() - ,conn); - try { - assertEquals(expected_, obtained); - logger.info("Finished running line #7"); - } catch (Throwable ae) { - logger.error("Whoops, got exception on line #7:" + ae.toString()); - if(obtained instanceof Throwable) { - ae.addSuppressed((Throwable) obtained); - } - throw ae; - } - } - - { - // default.yaml line #10 - /* err("ReqlQueryLogicError", "Cannot perform bracket on a non-object non-sequence `\"a\"`.", []) */ - Err expected_ = err("ReqlQueryLogicError", "Cannot perform bracket on a non-object non-sequence `\"a\"`.", r.array()); - /* r.expr(r.expr('a')['b']).default(2) */ - logger.info("About to run line #10: r.expr(r.expr('a').bracket('b')).default_(2L)"); - Object obtained = runOrCatch(r.expr(r.expr("a").bracket("b")).default_(2L), - new OptArgs() - ,conn); - try { - assertEquals(expected_, obtained); - logger.info("Finished running line #10"); - } catch (Throwable ae) { - logger.error("Whoops, got exception on line #10:" + ae.toString()); - if(obtained instanceof Throwable) { - ae.addSuppressed((Throwable) obtained); - } - throw ae; - } - } - - { - // default.yaml line #14 - /* 2 */ - Long expected_ = 2L; - /* r.expr([]).reduce(lambda a,b:a+b).default(2) */ - logger.info("About to run line #14: r.expr(r.array()).reduce((a, b) -> r.add(a, b)).default_(2L)"); - Object obtained = runOrCatch(r.expr(r.array()).reduce((a, b) -> r.add(a, b)).default_(2L), - new OptArgs() - ,conn); - try { - assertEquals(expected_, obtained); - logger.info("Finished running line #14"); - } catch (Throwable ae) { - logger.error("Whoops, got exception on line #14:" + ae.toString()); - if(obtained instanceof Throwable) { - ae.addSuppressed((Throwable) obtained); - } - throw ae; - } - } - - { - // default.yaml line #18 - /* 2 */ - Long expected_ = 2L; - /* r.expr([]).union([]).reduce(lambda a,b:a+b).default(2) */ - logger.info("About to run line #18: r.expr(r.array()).union(r.array()).reduce((a, b) -> r.add(a, b)).default_(2L)"); - Object obtained = runOrCatch(r.expr(r.array()).union(r.array()).reduce((a, b) -> r.add(a, b)).default_(2L), - new OptArgs() - ,conn); - try { - assertEquals(expected_, obtained); - logger.info("Finished running line #18"); - } catch (Throwable ae) { - logger.error("Whoops, got exception on line #18:" + ae.toString()); - if(obtained instanceof Throwable) { - ae.addSuppressed((Throwable) obtained); - } - throw ae; - } - } - - { - // default.yaml line #22 - /* err("ReqlQueryLogicError", "Cannot convert STRING to SEQUENCE", []) */ - Err expected_ = err("ReqlQueryLogicError", "Cannot convert STRING to SEQUENCE", r.array()); - /* r.expr('a').reduce(lambda a,b:a+b).default(2) */ - logger.info("About to run line #22: r.expr('a').reduce((a, b) -> r.add(a, b)).default_(2L)"); - Object obtained = runOrCatch(r.expr("a").reduce((a, b) -> r.add(a, b)).default_(2L), - new OptArgs() - ,conn); - try { - assertEquals(expected_, obtained); - logger.info("Finished running line #22"); - } catch (Throwable ae) { - logger.error("Whoops, got exception on line #22:" + ae.toString()); - if(obtained instanceof Throwable) { - ae.addSuppressed((Throwable) obtained); - } - throw ae; - } - } - - { - // default.yaml line #25 - /* 2 */ - Long expected_ = 2L; - /* (r.expr(null) + 5).default(2) */ - logger.info("About to run line #25: r.expr((ReqlExpr) null).add(5L).default_(2L)"); - Object obtained = runOrCatch(r.expr((ReqlExpr) null).add(5L).default_(2L), - new OptArgs() - ,conn); - try { - assertEquals(expected_, obtained); - logger.info("Finished running line #25"); - } catch (Throwable ae) { - logger.error("Whoops, got exception on line #25:" + ae.toString()); - if(obtained instanceof Throwable) { - ae.addSuppressed((Throwable) obtained); - } - throw ae; - } - } - - { - // default.yaml line #28 - /* 2 */ - Long expected_ = 2L; - /* (5 + r.expr(null)).default(2) */ - logger.info("About to run line #28: r.add(5L, r.expr((ReqlExpr) null)).default_(2L)"); - Object obtained = runOrCatch(r.add(5L, r.expr((ReqlExpr) null)).default_(2L), - new OptArgs() - ,conn); - try { - assertEquals(expected_, obtained); - logger.info("Finished running line #28"); - } catch (Throwable ae) { - logger.error("Whoops, got exception on line #28:" + ae.toString()); - if(obtained instanceof Throwable) { - ae.addSuppressed((Throwable) obtained); - } - throw ae; - } - } - - { - // default.yaml line #31 - /* 2 */ - Long expected_ = 2L; - /* (5 - r.expr(null)).default(2) */ - logger.info("About to run line #31: r.sub(5L, r.expr((ReqlExpr) null)).default_(2L)"); - Object obtained = runOrCatch(r.sub(5L, r.expr((ReqlExpr) null)).default_(2L), - new OptArgs() - ,conn); - try { - assertEquals(expected_, obtained); - logger.info("Finished running line #31"); - } catch (Throwable ae) { - logger.error("Whoops, got exception on line #31:" + ae.toString()); - if(obtained instanceof Throwable) { - ae.addSuppressed((Throwable) obtained); - } - throw ae; - } - } - - { - // default.yaml line #34 - /* 2 */ - Long expected_ = 2L; - /* (r.expr(null) - 5).default(2) */ - logger.info("About to run line #34: r.expr((ReqlExpr) null).sub(5L).default_(2L)"); - Object obtained = runOrCatch(r.expr((ReqlExpr) null).sub(5L).default_(2L), - new OptArgs() - ,conn); - try { - assertEquals(expected_, obtained); - logger.info("Finished running line #34"); - } catch (Throwable ae) { - logger.error("Whoops, got exception on line #34:" + ae.toString()); - if(obtained instanceof Throwable) { - ae.addSuppressed((Throwable) obtained); - } - throw ae; - } - } - - { - // default.yaml line #37 - /* err("ReqlQueryLogicError", "Expected type STRING but found NUMBER.", []) */ - Err expected_ = err("ReqlQueryLogicError", "Expected type STRING but found NUMBER.", r.array()); - /* (r.expr('a') + 5).default(2) */ - logger.info("About to run line #37: r.expr('a').add(5L).default_(2L)"); - Object obtained = runOrCatch(r.expr("a").add(5L).default_(2L), - new OptArgs() - ,conn); - try { - assertEquals(expected_, obtained); - logger.info("Finished running line #37"); - } catch (Throwable ae) { - logger.error("Whoops, got exception on line #37:" + ae.toString()); - if(obtained instanceof Throwable) { - ae.addSuppressed((Throwable) obtained); - } - throw ae; - } - } - - { - // default.yaml line #40 - /* err("ReqlQueryLogicError", "Expected type NUMBER but found STRING.", []) */ - Err expected_ = err("ReqlQueryLogicError", "Expected type NUMBER but found STRING.", r.array()); - /* (5 + r.expr('a')).default(2) */ - logger.info("About to run line #40: r.add(5L, r.expr('a')).default_(2L)"); - Object obtained = runOrCatch(r.add(5L, r.expr("a")).default_(2L), - new OptArgs() - ,conn); - try { - assertEquals(expected_, obtained); - logger.info("Finished running line #40"); - } catch (Throwable ae) { - logger.error("Whoops, got exception on line #40:" + ae.toString()); - if(obtained instanceof Throwable) { - ae.addSuppressed((Throwable) obtained); - } - throw ae; - } - } - - { - // default.yaml line #43 - /* err("ReqlQueryLogicError", "Expected type NUMBER but found STRING.", []) */ - Err expected_ = err("ReqlQueryLogicError", "Expected type NUMBER but found STRING.", r.array()); - /* (r.expr('a') - 5).default(2) */ - logger.info("About to run line #43: r.expr('a').sub(5L).default_(2L)"); - Object obtained = runOrCatch(r.expr("a").sub(5L).default_(2L), - new OptArgs() - ,conn); - try { - assertEquals(expected_, obtained); - logger.info("Finished running line #43"); - } catch (Throwable ae) { - logger.error("Whoops, got exception on line #43:" + ae.toString()); - if(obtained instanceof Throwable) { - ae.addSuppressed((Throwable) obtained); - } - throw ae; - } - } - - { - // default.yaml line #46 - /* err("ReqlQueryLogicError", "Expected type NUMBER but found STRING.", []) */ - Err expected_ = err("ReqlQueryLogicError", "Expected type NUMBER but found STRING.", r.array()); - /* (5 - r.expr('a')).default(2) */ - logger.info("About to run line #46: r.sub(5L, r.expr('a')).default_(2L)"); - Object obtained = runOrCatch(r.sub(5L, r.expr("a")).default_(2L), - new OptArgs() - ,conn); - try { - assertEquals(expected_, obtained); - logger.info("Finished running line #46"); - } catch (Throwable ae) { - logger.error("Whoops, got exception on line #46:" + ae.toString()); - if(obtained instanceof Throwable) { - ae.addSuppressed((Throwable) obtained); - } - throw ae; - } - } - - { - // default.yaml line #50 - /* 1 */ - Long expected_ = 1L; - /* r.expr(1).default(r.error()) */ - logger.info("About to run line #50: r.expr(1L).default_(r.error())"); - Object obtained = runOrCatch(r.expr(1L).default_(r.error()), - new OptArgs() - ,conn); - try { - assertEquals(expected_, obtained); - logger.info("Finished running line #50"); - } catch (Throwable ae) { - logger.error("Whoops, got exception on line #50:" + ae.toString()); - if(obtained instanceof Throwable) { - ae.addSuppressed((Throwable) obtained); - } - throw ae; - } - } - - { - // default.yaml line #52 - /* (null) */ - Object expected_ = null; - /* r.expr(null).default(r.error()) */ - logger.info("About to run line #52: r.expr((ReqlExpr) null).default_(r.error())"); - Object obtained = runOrCatch(r.expr((ReqlExpr) null).default_(r.error()), - new OptArgs() - ,conn); - try { - assertEquals(expected_, obtained); - logger.info("Finished running line #52"); - } catch (Throwable ae) { - logger.error("Whoops, got exception on line #52:" + ae.toString()); - if(obtained instanceof Throwable) { - ae.addSuppressed((Throwable) obtained); - } - throw ae; - } - } - - { - // default.yaml line #54 - /* err("ReqlNonExistenceError", "No attribute `b` in object:", []) */ - Err expected_ = err("ReqlNonExistenceError", "No attribute `b` in object:", r.array()); - /* r.expr({})['b'].default(r.error()) */ - logger.info("About to run line #54: r.expr(r.hashMap()).bracket('b').default_(r.error())"); - Object obtained = runOrCatch(r.expr(r.hashMap()).bracket("b").default_(r.error()), - new OptArgs() - ,conn); - try { - assertEquals(expected_, obtained); - logger.info("Finished running line #54"); - } catch (Throwable ae) { - logger.error("Whoops, got exception on line #54:" + ae.toString()); - if(obtained instanceof Throwable) { - ae.addSuppressed((Throwable) obtained); - } - throw ae; - } - } - - { - // default.yaml line #58 - /* err("ReqlNonExistenceError", "Cannot reduce over an empty stream.", []) */ - Err expected_ = err("ReqlNonExistenceError", "Cannot reduce over an empty stream.", r.array()); - /* r.expr([]).reduce(lambda a,b:a+b).default(r.error) */ - logger.info("About to run line #58: r.expr(r.array()).reduce((a, b) -> r.add(a, b)).default_(r.error())"); - Object obtained = runOrCatch(r.expr(r.array()).reduce((a, b) -> r.add(a, b)).default_(r.error()), - new OptArgs() - ,conn); - try { - assertEquals(expected_, obtained); - logger.info("Finished running line #58"); - } catch (Throwable ae) { - logger.error("Whoops, got exception on line #58:" + ae.toString()); - if(obtained instanceof Throwable) { - ae.addSuppressed((Throwable) obtained); - } - throw ae; - } - } - - { - // default.yaml line #62 - /* err("ReqlNonExistenceError", "Cannot reduce over an empty stream.", []) */ - Err expected_ = err("ReqlNonExistenceError", "Cannot reduce over an empty stream.", r.array()); - /* r.expr([]).union([]).reduce(lambda a,b:a+b).default(r.error) */ - logger.info("About to run line #62: r.expr(r.array()).union(r.array()).reduce((a, b) -> r.add(a, b)).default_(r.error())"); - Object obtained = runOrCatch(r.expr(r.array()).union(r.array()).reduce((a, b) -> r.add(a, b)).default_(r.error()), - new OptArgs() - ,conn); - try { - assertEquals(expected_, obtained); - logger.info("Finished running line #62"); - } catch (Throwable ae) { - logger.error("Whoops, got exception on line #62:" + ae.toString()); - if(obtained instanceof Throwable) { - ae.addSuppressed((Throwable) obtained); - } - throw ae; - } - } - - { - // default.yaml line #65 - /* err("ReqlNonExistenceError", "Expected type NUMBER but found NULL.", []) */ - Err expected_ = err("ReqlNonExistenceError", "Expected type NUMBER but found NULL.", r.array()); - /* (r.expr(null) + 5).default(r.error) */ - logger.info("About to run line #65: r.expr((ReqlExpr) null).add(5L).default_(r.error())"); - Object obtained = runOrCatch(r.expr((ReqlExpr) null).add(5L).default_(r.error()), - new OptArgs() - ,conn); - try { - assertEquals(expected_, obtained); - logger.info("Finished running line #65"); - } catch (Throwable ae) { - logger.error("Whoops, got exception on line #65:" + ae.toString()); - if(obtained instanceof Throwable) { - ae.addSuppressed((Throwable) obtained); - } - throw ae; - } - } - - { - // default.yaml line #68 - /* err("ReqlNonExistenceError", "Expected type NUMBER but found NULL.", []) */ - Err expected_ = err("ReqlNonExistenceError", "Expected type NUMBER but found NULL.", r.array()); - /* (5 + r.expr(null)).default(r.error) */ - logger.info("About to run line #68: r.add(5L, r.expr((ReqlExpr) null)).default_(r.error())"); - Object obtained = runOrCatch(r.add(5L, r.expr((ReqlExpr) null)).default_(r.error()), - new OptArgs() - ,conn); - try { - assertEquals(expected_, obtained); - logger.info("Finished running line #68"); - } catch (Throwable ae) { - logger.error("Whoops, got exception on line #68:" + ae.toString()); - if(obtained instanceof Throwable) { - ae.addSuppressed((Throwable) obtained); - } - throw ae; - } - } - - { - // default.yaml line #71 - /* err("ReqlNonExistenceError", "Expected type NUMBER but found NULL.", []) */ - Err expected_ = err("ReqlNonExistenceError", "Expected type NUMBER but found NULL.", r.array()); - /* (5 - r.expr(null)).default(r.error) */ - logger.info("About to run line #71: r.sub(5L, r.expr((ReqlExpr) null)).default_(r.error())"); - Object obtained = runOrCatch(r.sub(5L, r.expr((ReqlExpr) null)).default_(r.error()), - new OptArgs() - ,conn); - try { - assertEquals(expected_, obtained); - logger.info("Finished running line #71"); - } catch (Throwable ae) { - logger.error("Whoops, got exception on line #71:" + ae.toString()); - if(obtained instanceof Throwable) { - ae.addSuppressed((Throwable) obtained); - } - throw ae; - } - } - - { - // default.yaml line #74 - /* err("ReqlNonExistenceError", "Expected type NUMBER but found NULL.", []) */ - Err expected_ = err("ReqlNonExistenceError", "Expected type NUMBER but found NULL.", r.array()); - /* (r.expr(null) - 5).default(r.error) */ - logger.info("About to run line #74: r.expr((ReqlExpr) null).sub(5L).default_(r.error())"); - Object obtained = runOrCatch(r.expr((ReqlExpr) null).sub(5L).default_(r.error()), - new OptArgs() - ,conn); - try { - assertEquals(expected_, obtained); - logger.info("Finished running line #74"); - } catch (Throwable ae) { - logger.error("Whoops, got exception on line #74:" + ae.toString()); - if(obtained instanceof Throwable) { - ae.addSuppressed((Throwable) obtained); - } - throw ae; - } - } - - { - // default.yaml line #79 - /* 1 */ - Long expected_ = 1L; - /* r.expr(1).default(lambda e:e) */ - logger.info("About to run line #79: r.expr(1L).default_(e -> e)"); - Object obtained = runOrCatch(r.expr(1L).default_(e -> e), - new OptArgs() - ,conn); - try { - assertEquals(expected_, obtained); - logger.info("Finished running line #79"); - } catch (Throwable ae) { - logger.error("Whoops, got exception on line #79:" + ae.toString()); - if(obtained instanceof Throwable) { - ae.addSuppressed((Throwable) obtained); - } - throw ae; - } - } - - { - // default.yaml line #83 - /* (null) */ - Object expected_ = null; - /* r.expr(null).default(lambda e:e) */ - logger.info("About to run line #83: r.expr((ReqlExpr) null).default_(e -> e)"); - Object obtained = runOrCatch(r.expr((ReqlExpr) null).default_(e -> e), - new OptArgs() - ,conn); - try { - assertEquals(expected_, obtained); - logger.info("Finished running line #83"); - } catch (Throwable ae) { - logger.error("Whoops, got exception on line #83:" + ae.toString()); - if(obtained instanceof Throwable) { - ae.addSuppressed((Throwable) obtained); - } - throw ae; - } - } - - { - // default.yaml line #87 - /* "No attribute `b` in object:\n{}" */ - String expected_ = "No attribute `b` in object:\n{}"; - /* r.expr({})['b'].default(lambda e:e) */ - logger.info("About to run line #87: r.expr(r.hashMap()).bracket('b').default_(e -> e)"); - Object obtained = runOrCatch(r.expr(r.hashMap()).bracket("b").default_(e -> e), - new OptArgs() - ,conn); - try { - assertEquals(expected_, obtained); - logger.info("Finished running line #87"); - } catch (Throwable ae) { - logger.error("Whoops, got exception on line #87:" + ae.toString()); - if(obtained instanceof Throwable) { - ae.addSuppressed((Throwable) obtained); - } - throw ae; - } - } - - { - // default.yaml line #91 - /* ("Cannot reduce over an empty stream.") */ - String expected_ = "Cannot reduce over an empty stream."; - /* r.expr([]).reduce(lambda a,b:a+b).default(lambda e:e) */ - logger.info("About to run line #91: r.expr(r.array()).reduce((a, b) -> r.add(a, b)).default_(e -> e)"); - Object obtained = runOrCatch(r.expr(r.array()).reduce((a, b) -> r.add(a, b)).default_(e -> e), - new OptArgs() - ,conn); - try { - assertEquals(expected_, obtained); - logger.info("Finished running line #91"); - } catch (Throwable ae) { - logger.error("Whoops, got exception on line #91:" + ae.toString()); - if(obtained instanceof Throwable) { - ae.addSuppressed((Throwable) obtained); - } - throw ae; - } - } - - { - // default.yaml line #95 - /* ("Cannot reduce over an empty stream.") */ - String expected_ = "Cannot reduce over an empty stream."; - /* r.expr([]).union([]).reduce(lambda a,b:a+b).default(lambda e:e) */ - logger.info("About to run line #95: r.expr(r.array()).union(r.array()).reduce((a, b) -> r.add(a, b)).default_(e -> e)"); - Object obtained = runOrCatch(r.expr(r.array()).union(r.array()).reduce((a, b) -> r.add(a, b)).default_(e -> e), - new OptArgs() - ,conn); - try { - assertEquals(expected_, obtained); - logger.info("Finished running line #95"); - } catch (Throwable ae) { - logger.error("Whoops, got exception on line #95:" + ae.toString()); - if(obtained instanceof Throwable) { - ae.addSuppressed((Throwable) obtained); - } - throw ae; - } - } - - { - // default.yaml line #99 - /* ("Expected type NUMBER but found NULL.") */ - String expected_ = "Expected type NUMBER but found NULL."; - /* (r.expr(null) + 5).default(lambda e:e) */ - logger.info("About to run line #99: r.expr((ReqlExpr) null).add(5L).default_(e -> e)"); - Object obtained = runOrCatch(r.expr((ReqlExpr) null).add(5L).default_(e -> e), - new OptArgs() - ,conn); - try { - assertEquals(expected_, obtained); - logger.info("Finished running line #99"); - } catch (Throwable ae) { - logger.error("Whoops, got exception on line #99:" + ae.toString()); - if(obtained instanceof Throwable) { - ae.addSuppressed((Throwable) obtained); - } - throw ae; - } - } - - { - // default.yaml line #103 - /* ("Expected type NUMBER but found NULL.") */ - String expected_ = "Expected type NUMBER but found NULL."; - /* (5 + r.expr(null)).default(lambda e:e) */ - logger.info("About to run line #103: r.add(5L, r.expr((ReqlExpr) null)).default_(e -> e)"); - Object obtained = runOrCatch(r.add(5L, r.expr((ReqlExpr) null)).default_(e -> e), - new OptArgs() - ,conn); - try { - assertEquals(expected_, obtained); - logger.info("Finished running line #103"); - } catch (Throwable ae) { - logger.error("Whoops, got exception on line #103:" + ae.toString()); - if(obtained instanceof Throwable) { - ae.addSuppressed((Throwable) obtained); - } - throw ae; - } - } - - { - // default.yaml line #107 - /* ("Expected type NUMBER but found NULL.") */ - String expected_ = "Expected type NUMBER but found NULL."; - /* (5 - r.expr(null)).default(lambda e:e) */ - logger.info("About to run line #107: r.sub(5L, r.expr((ReqlExpr) null)).default_(e -> e)"); - Object obtained = runOrCatch(r.sub(5L, r.expr((ReqlExpr) null)).default_(e -> e), - new OptArgs() - ,conn); - try { - assertEquals(expected_, obtained); - logger.info("Finished running line #107"); - } catch (Throwable ae) { - logger.error("Whoops, got exception on line #107:" + ae.toString()); - if(obtained instanceof Throwable) { - ae.addSuppressed((Throwable) obtained); - } - throw ae; - } - } - - { - // default.yaml line #111 - /* ("Expected type NUMBER but found NULL.") */ - String expected_ = "Expected type NUMBER but found NULL."; - /* (r.expr(null) - 5).default(lambda e:e) */ - logger.info("About to run line #111: r.expr((ReqlExpr) null).sub(5L).default_(e -> e)"); - Object obtained = runOrCatch(r.expr((ReqlExpr) null).sub(5L).default_(e -> e), - new OptArgs() - ,conn); - try { - assertEquals(expected_, obtained); - logger.info("Finished running line #111"); - } catch (Throwable ae) { - logger.error("Whoops, got exception on line #111:" + ae.toString()); - if(obtained instanceof Throwable) { - ae.addSuppressed((Throwable) obtained); - } - throw ae; - } - } - - // default.yaml line #115 - // arr = r.expr([{'a':1},{'a':null},{}]).order_by('a') - logger.info("Possibly executing: OrderBy arr = (OrderBy) (r.expr(r.array(r.hashMap('a', 1L), r.hashMap('a', null), r.hashMap())).orderBy('a'));"); - OrderBy arr = (OrderBy) (r.expr(r.array(r.hashMap("a", 1L), r.hashMap("a", null), r.hashMap())).orderBy("a")); - - { - // default.yaml line #118 - /* [{'a':1}] */ - List expected_ = r.array(r.hashMap("a", 1L)); - /* arr.filter(lambda x:x['a'].eq(1)) */ - logger.info("About to run line #118: arr.filter(x -> x.bracket('a').eq(1L))"); - Object obtained = runOrCatch(arr.filter(x -> x.bracket("a").eq(1L)), - new OptArgs() - ,conn); - try { - assertEquals(expected_, obtained); - logger.info("Finished running line #118"); - } catch (Throwable ae) { - logger.error("Whoops, got exception on line #118:" + ae.toString()); - if(obtained instanceof Throwable) { - ae.addSuppressed((Throwable) obtained); - } - throw ae; - } - } - - { - // default.yaml line #122 - /* [{'a':1}] */ - List expected_ = r.array(r.hashMap("a", 1L)); - /* arr.filter(lambda x:x['a'].eq(1), default=False) */ - logger.info("About to run line #122: arr.filter(x -> x.bracket('a').eq(1L)).optArg('default', false)"); - Object obtained = runOrCatch(arr.filter(x -> x.bracket("a").eq(1L)).optArg("default", false), - new OptArgs() - ,conn); - try { - assertEquals(expected_, obtained); - logger.info("Finished running line #122"); - } catch (Throwable ae) { - logger.error("Whoops, got exception on line #122:" + ae.toString()); - if(obtained instanceof Throwable) { - ae.addSuppressed((Throwable) obtained); - } - throw ae; - } - } - - { - // default.yaml line #126 - /* [{}, {'a':1}] */ - List expected_ = r.array(r.hashMap(), r.hashMap("a", 1L)); - /* arr.filter(lambda x:x['a'].eq(1), default=True) */ - logger.info("About to run line #126: arr.filter(x -> x.bracket('a').eq(1L)).optArg('default', true)"); - Object obtained = runOrCatch(arr.filter(x -> x.bracket("a").eq(1L)).optArg("default", true), - new OptArgs() - ,conn); - try { - assertEquals(expected_, obtained); - logger.info("Finished running line #126"); - } catch (Throwable ae) { - logger.error("Whoops, got exception on line #126:" + ae.toString()); - if(obtained instanceof Throwable) { - ae.addSuppressed((Throwable) obtained); - } - throw ae; - } - } - - { - // default.yaml line #131 - /* [{}, {'a':1}] */ - List expected_ = r.array(r.hashMap(), r.hashMap("a", 1L)); - /* arr.filter(lambda x:x['a'].eq(1), default=r.js('true')) */ - logger.info("About to run line #131: arr.filter(x -> x.bracket('a').eq(1L)).optArg('default', r.js('true'))"); - Object obtained = runOrCatch(arr.filter(x -> x.bracket("a").eq(1L)).optArg("default", r.js("true")), - new OptArgs() - ,conn); - try { - assertEquals(expected_, obtained); - logger.info("Finished running line #131"); - } catch (Throwable ae) { - logger.error("Whoops, got exception on line #131:" + ae.toString()); - if(obtained instanceof Throwable) { - ae.addSuppressed((Throwable) obtained); - } - throw ae; - } - } - - { - // default.yaml line #135 - /* [{'a':1}] */ - List expected_ = r.array(r.hashMap("a", 1L)); - /* arr.filter(lambda x:x['a'].eq(1), default=r.js('false')) */ - logger.info("About to run line #135: arr.filter(x -> x.bracket('a').eq(1L)).optArg('default', r.js('false'))"); - Object obtained = runOrCatch(arr.filter(x -> x.bracket("a").eq(1L)).optArg("default", r.js("false")), - new OptArgs() - ,conn); - try { - assertEquals(expected_, obtained); - logger.info("Finished running line #135"); - } catch (Throwable ae) { - logger.error("Whoops, got exception on line #135:" + ae.toString()); - if(obtained instanceof Throwable) { - ae.addSuppressed((Throwable) obtained); - } - throw ae; - } - } - - { - // default.yaml line #139 - /* err("ReqlNonExistenceError", "No attribute `a` in object:", []) */ - Err expected_ = err("ReqlNonExistenceError", "No attribute `a` in object:", r.array()); - /* arr.filter(lambda x:x['a'].eq(1), default=r.error()) */ - logger.info("About to run line #139: arr.filter(x -> x.bracket('a').eq(1L)).optArg('default', r.error())"); - Object obtained = runOrCatch(arr.filter(x -> x.bracket("a").eq(1L)).optArg("default", r.error()), - new OptArgs() - ,conn); - try { - assertEquals(expected_, obtained); - logger.info("Finished running line #139"); - } catch (Throwable ae) { - logger.error("Whoops, got exception on line #139:" + ae.toString()); - if(obtained instanceof Throwable) { - ae.addSuppressed((Throwable) obtained); - } - throw ae; - } - } - - { - // default.yaml line #144 - /* [{'a':1}] */ - List expected_ = r.array(r.hashMap("a", 1L)); - /* r.expr(False).do(lambda d:arr.filter(lambda x:x['a'].eq(1), default=d)) */ - logger.info("About to run line #144: r.expr(false).do_(d -> arr.filter(x -> x.bracket('a').eq(1L)).optArg('default', d))"); - Object obtained = runOrCatch(r.expr(false).do_(d -> arr.filter(x -> x.bracket("a").eq(1L)).optArg("default", d)), - new OptArgs() - ,conn); - try { - assertEquals(expected_, obtained); - logger.info("Finished running line #144"); - } catch (Throwable ae) { - logger.error("Whoops, got exception on line #144:" + ae.toString()); - if(obtained instanceof Throwable) { - ae.addSuppressed((Throwable) obtained); - } - throw ae; - } - } - - { - // default.yaml line #148 - /* [{}, {'a':1}] */ - List expected_ = r.array(r.hashMap(), r.hashMap("a", 1L)); - /* r.expr(True).do(lambda d:arr.filter(lambda x:x['a'].eq(1), default=d)).order_by('a') */ - logger.info("About to run line #148: r.expr(true).do_(d -> arr.filter(x -> x.bracket('a').eq(1L)).optArg('default', d)).orderBy('a')"); - Object obtained = runOrCatch(r.expr(true).do_(d -> arr.filter(x -> x.bracket("a").eq(1L)).optArg("default", d)).orderBy("a"), - new OptArgs() - ,conn); - try { - assertEquals(expected_, obtained); - logger.info("Finished running line #148"); - } catch (Throwable ae) { - logger.error("Whoops, got exception on line #148:" + ae.toString()); - if(obtained instanceof Throwable) { - ae.addSuppressed((Throwable) obtained); - } - throw ae; - } - } - - { - // default.yaml line #154 - /* [{'a':1}] */ - List expected_ = r.array(r.hashMap("a", 1L)); - /* arr.filter(lambda x:x['a'].default(0).eq(1)) */ - logger.info("About to run line #154: arr.filter(x -> x.bracket('a').default_(0L).eq(1L))"); - Object obtained = runOrCatch(arr.filter(x -> x.bracket("a").default_(0L).eq(1L)), - new OptArgs() - ,conn); - try { - assertEquals(expected_, obtained); - logger.info("Finished running line #154"); - } catch (Throwable ae) { - logger.error("Whoops, got exception on line #154:" + ae.toString()); - if(obtained instanceof Throwable) { - ae.addSuppressed((Throwable) obtained); - } - throw ae; - } - } - - { - // default.yaml line #158 - /* ([{}, {'a':null}, {'a':1}]) */ - List expected_ = r.array(r.hashMap(), r.hashMap("a", null), r.hashMap("a", 1L)); - /* arr.filter(lambda x:x['a'].default(1).eq(1)).order_by('a') */ - logger.info("About to run line #158: arr.filter(x -> x.bracket('a').default_(1L).eq(1L)).orderBy('a')"); - Object obtained = runOrCatch(arr.filter(x -> x.bracket("a").default_(1L).eq(1L)).orderBy("a"), - new OptArgs() - ,conn); - try { - assertEquals(expected_, obtained); - logger.info("Finished running line #158"); - } catch (Throwable ae) { - logger.error("Whoops, got exception on line #158:" + ae.toString()); - if(obtained instanceof Throwable) { - ae.addSuppressed((Throwable) obtained); - } - throw ae; - } - } - - { - // default.yaml line #162 - /* [{'a':1}] */ - List expected_ = r.array(r.hashMap("a", 1L)); - /* arr.filter(lambda x:x['a'].default(r.error()).eq(1)) */ - logger.info("About to run line #162: arr.filter(x -> x.bracket('a').default_(r.error()).eq(1L))"); - Object obtained = runOrCatch(arr.filter(x -> x.bracket("a").default_(r.error()).eq(1L)), - new OptArgs() - ,conn); - try { - assertEquals(expected_, obtained); - logger.info("Finished running line #162"); - } catch (Throwable ae) { - logger.error("Whoops, got exception on line #162:" + ae.toString()); - if(obtained instanceof Throwable) { - ae.addSuppressed((Throwable) obtained); - } - throw ae; - } - } - - { - // default.yaml line #168 - /* [{'a':1}] */ - List expected_ = r.array(r.hashMap("a", 1L)); - /* r.expr(0).do(lambda i:arr.filter(lambda x:x['a'].default(i).eq(1))) */ - logger.info("About to run line #168: r.expr(0L).do_(i -> arr.filter(x -> x.bracket('a').default_(i).eq(1L)))"); - Object obtained = runOrCatch(r.expr(0L).do_(i -> arr.filter(x -> x.bracket("a").default_(i).eq(1L))), - new OptArgs() - ,conn); - try { - assertEquals(expected_, obtained); - logger.info("Finished running line #168"); - } catch (Throwable ae) { - logger.error("Whoops, got exception on line #168:" + ae.toString()); - if(obtained instanceof Throwable) { - ae.addSuppressed((Throwable) obtained); - } - throw ae; - } - } - - { - // default.yaml line #172 - /* ([{},{'a':null},{'a':1}]) */ - List expected_ = r.array(r.hashMap(), r.hashMap("a", null), r.hashMap("a", 1L)); - /* r.expr(1).do(lambda i:arr.filter(lambda x:x['a'].default(i).eq(1))).order_by('a') */ - logger.info("About to run line #172: r.expr(1L).do_(i -> arr.filter(x -> x.bracket('a').default_(i).eq(1L))).orderBy('a')"); - Object obtained = runOrCatch(r.expr(1L).do_(i -> arr.filter(x -> x.bracket("a").default_(i).eq(1L))).orderBy("a"), - new OptArgs() - ,conn); - try { - assertEquals(expected_, obtained); - logger.info("Finished running line #172"); - } catch (Throwable ae) { - logger.error("Whoops, got exception on line #172:" + ae.toString()); - if(obtained instanceof Throwable) { - ae.addSuppressed((Throwable) obtained); - } - throw ae; - } - } - - { - // default.yaml line #177 - /* [{'a':1}] */ - List expected_ = r.array(r.hashMap("a", 1L)); - /* arr.filter(lambda x:r.or_(x['a'].eq(1), x['a']['b'].eq(2))) */ - logger.info("About to run line #177: arr.filter(x -> r.or(x.bracket('a').eq(1L), x.bracket('a').bracket('b').eq(2L)))"); - Object obtained = runOrCatch(arr.filter(x -> r.or(x.bracket("a").eq(1L), x.bracket("a").bracket("b").eq(2L))), - new OptArgs() - ,conn); - try { - assertEquals(expected_, obtained); - logger.info("Finished running line #177"); - } catch (Throwable ae) { - logger.error("Whoops, got exception on line #177:" + ae.toString()); - if(obtained instanceof Throwable) { - ae.addSuppressed((Throwable) obtained); - } - throw ae; - } - } - - { - // default.yaml line #181 - /* [{'a':1}] */ - List expected_ = r.array(r.hashMap("a", 1L)); - /* arr.filter(lambda x:r.or_(x['a'].eq(1), x['a']['b'].eq(2)), default=False) */ - logger.info("About to run line #181: arr.filter(x -> r.or(x.bracket('a').eq(1L), x.bracket('a').bracket('b').eq(2L))).optArg('default', false)"); - Object obtained = runOrCatch(arr.filter(x -> r.or(x.bracket("a").eq(1L), x.bracket("a").bracket("b").eq(2L))).optArg("default", false), - new OptArgs() - ,conn); - try { - assertEquals(expected_, obtained); - logger.info("Finished running line #181"); - } catch (Throwable ae) { - logger.error("Whoops, got exception on line #181:" + ae.toString()); - if(obtained instanceof Throwable) { - ae.addSuppressed((Throwable) obtained); - } - throw ae; - } - } - - { - // default.yaml line #185 - /* ([{}, {'a':null}, {'a':1}]) */ - List expected_ = r.array(r.hashMap(), r.hashMap("a", null), r.hashMap("a", 1L)); - /* arr.filter(lambda x:r.or_(x['a'].eq(1), x['a']['b'].eq(2)), default=True).order_by('a') */ - logger.info("About to run line #185: arr.filter(x -> r.or(x.bracket('a').eq(1L), x.bracket('a').bracket('b').eq(2L))).optArg('default', true).orderBy('a')"); - Object obtained = runOrCatch(arr.filter(x -> r.or(x.bracket("a").eq(1L), x.bracket("a").bracket("b").eq(2L))).optArg("default", true).orderBy("a"), - new OptArgs() - ,conn); - try { - assertEquals(expected_, obtained); - logger.info("Finished running line #185"); - } catch (Throwable ae) { - logger.error("Whoops, got exception on line #185:" + ae.toString()); - if(obtained instanceof Throwable) { - ae.addSuppressed((Throwable) obtained); - } - throw ae; - } - } - - { - // default.yaml line #189 - /* err("ReqlNonExistenceError", "No attribute `a` in object:", []) */ - Err expected_ = err("ReqlNonExistenceError", "No attribute `a` in object:", r.array()); - /* arr.filter(lambda x:r.or_(x['a'].eq(1), x['a']['b'].eq(2)), default=r.error()) */ - logger.info("About to run line #189: arr.filter(x -> r.or(x.bracket('a').eq(1L), x.bracket('a').bracket('b').eq(2L))).optArg('default', r.error())"); - Object obtained = runOrCatch(arr.filter(x -> r.or(x.bracket("a").eq(1L), x.bracket("a").bracket("b").eq(2L))).optArg("default", r.error()), - new OptArgs() - ,conn); - try { - assertEquals(expected_, obtained); - logger.info("Finished running line #189"); - } catch (Throwable ae) { - logger.error("Whoops, got exception on line #189:" + ae.toString()); - if(obtained instanceof Throwable) { - ae.addSuppressed((Throwable) obtained); - } - throw ae; - } - } - - { - // default.yaml line #193 - /* partial({'tables_created':1}) */ - Partial expected_ = partial(r.hashMap("tables_created", 1L)); - /* r.table_create('default_test') */ - logger.info("About to run line #193: r.tableCreate('default_test')"); - Object obtained = runOrCatch(r.tableCreate("default_test"), - new OptArgs() - ,conn); - try { - assertEquals(expected_, obtained); - logger.info("Finished running line #193"); - } catch (Throwable ae) { - logger.error("Whoops, got exception on line #193:" + ae.toString()); - if(obtained instanceof Throwable) { - ae.addSuppressed((Throwable) obtained); - } - throw ae; - } - } - - { - // default.yaml line #196 - /* ({'deleted':0,'replaced':0,'generated_keys':arrlen(3,uuid()),'unchanged':0,'errors':0,'skipped':0,'inserted':3}) */ - Map expected_ = r.hashMap("deleted", 0L).with("replaced", 0L).with("generated_keys", arrlen(3L, uuid())).with("unchanged", 0L).with("errors", 0L).with("skipped", 0L).with("inserted", 3L); - /* r.table('default_test').insert(arr) */ - logger.info("About to run line #196: r.table('default_test').insert(arr)"); - Object obtained = runOrCatch(r.table("default_test").insert(arr), - new OptArgs() - ,conn); - try { - assertEquals(expected_, obtained); - logger.info("Finished running line #196"); - } catch (Throwable ae) { - logger.error("Whoops, got exception on line #196:" + ae.toString()); - if(obtained instanceof Throwable) { - ae.addSuppressed((Throwable) obtained); - } - throw ae; - } - } - - // default.yaml line #199 - // tbl = r.table('default_test').order_by('a').pluck('a') - logger.info("Possibly executing: Pluck tbl = (Pluck) (r.table('default_test').orderBy('a').pluck('a'));"); - Pluck tbl = (Pluck) (r.table("default_test").orderBy("a").pluck("a")); - - { - // default.yaml line #202 - /* [{'a':1}] */ - List expected_ = r.array(r.hashMap("a", 1L)); - /* tbl.filter(lambda x:x['a'].eq(1)) */ - logger.info("About to run line #202: tbl.filter(x -> x.bracket('a').eq(1L))"); - Object obtained = runOrCatch(tbl.filter(x -> x.bracket("a").eq(1L)), - new OptArgs() - ,conn); - try { - assertEquals(expected_, obtained); - logger.info("Finished running line #202"); - } catch (Throwable ae) { - logger.error("Whoops, got exception on line #202:" + ae.toString()); - if(obtained instanceof Throwable) { - ae.addSuppressed((Throwable) obtained); - } - throw ae; - } - } - - { - // default.yaml line #206 - /* [{'a':1}] */ - List expected_ = r.array(r.hashMap("a", 1L)); - /* tbl.filter(lambda x:x['a'].eq(1), default=False) */ - logger.info("About to run line #206: tbl.filter(x -> x.bracket('a').eq(1L)).optArg('default', false)"); - Object obtained = runOrCatch(tbl.filter(x -> x.bracket("a").eq(1L)).optArg("default", false), - new OptArgs() - ,conn); - try { - assertEquals(expected_, obtained); - logger.info("Finished running line #206"); - } catch (Throwable ae) { - logger.error("Whoops, got exception on line #206:" + ae.toString()); - if(obtained instanceof Throwable) { - ae.addSuppressed((Throwable) obtained); - } - throw ae; - } - } - - { - // default.yaml line #210 - /* [{}, {'a':1}] */ - List expected_ = r.array(r.hashMap(), r.hashMap("a", 1L)); - /* tbl.filter(lambda x:x['a'].eq(1), default=True) */ - logger.info("About to run line #210: tbl.filter(x -> x.bracket('a').eq(1L)).optArg('default', true)"); - Object obtained = runOrCatch(tbl.filter(x -> x.bracket("a").eq(1L)).optArg("default", true), - new OptArgs() - ,conn); - try { - assertEquals(expected_, obtained); - logger.info("Finished running line #210"); - } catch (Throwable ae) { - logger.error("Whoops, got exception on line #210:" + ae.toString()); - if(obtained instanceof Throwable) { - ae.addSuppressed((Throwable) obtained); - } - throw ae; - } - } - - { - // default.yaml line #215 - /* err("ReqlNonExistenceError", "No attribute `a` in object:", []) */ - Err expected_ = err("ReqlNonExistenceError", "No attribute `a` in object:", r.array()); - /* tbl.filter(lambda x:x['a'].eq(1), default=r.error()) */ - logger.info("About to run line #215: tbl.filter(x -> x.bracket('a').eq(1L)).optArg('default', r.error())"); - Object obtained = runOrCatch(tbl.filter(x -> x.bracket("a").eq(1L)).optArg("default", r.error()), - new OptArgs() - ,conn); - try { - assertEquals(expected_, obtained); - logger.info("Finished running line #215"); - } catch (Throwable ae) { - logger.error("Whoops, got exception on line #215:" + ae.toString()); - if(obtained instanceof Throwable) { - ae.addSuppressed((Throwable) obtained); - } - throw ae; - } - } - - { - // default.yaml line #220 - /* [{'a':1}] */ - List expected_ = r.array(r.hashMap("a", 1L)); - /* r.expr(False).do(lambda d:tbl.filter(lambda x:x['a'].eq(1), default=d)) */ - logger.info("About to run line #220: r.expr(false).do_(d -> tbl.filter(x -> x.bracket('a').eq(1L)).optArg('default', d))"); - Object obtained = runOrCatch(r.expr(false).do_(d -> tbl.filter(x -> x.bracket("a").eq(1L)).optArg("default", d)), - new OptArgs() - ,conn); - try { - assertEquals(expected_, obtained); - logger.info("Finished running line #220"); - } catch (Throwable ae) { - logger.error("Whoops, got exception on line #220:" + ae.toString()); - if(obtained instanceof Throwable) { - ae.addSuppressed((Throwable) obtained); - } - throw ae; - } - } - - { - // default.yaml line #224 - /* [{}, {'a':1}] */ - List expected_ = r.array(r.hashMap(), r.hashMap("a", 1L)); - /* r.expr(True).do(lambda d:tbl.filter(lambda x:x['a'].eq(1), default=d)).order_by('a') */ - logger.info("About to run line #224: r.expr(true).do_(d -> tbl.filter(x -> x.bracket('a').eq(1L)).optArg('default', d)).orderBy('a')"); - Object obtained = runOrCatch(r.expr(true).do_(d -> tbl.filter(x -> x.bracket("a").eq(1L)).optArg("default", d)).orderBy("a"), - new OptArgs() - ,conn); - try { - assertEquals(expected_, obtained); - logger.info("Finished running line #224"); - } catch (Throwable ae) { - logger.error("Whoops, got exception on line #224:" + ae.toString()); - if(obtained instanceof Throwable) { - ae.addSuppressed((Throwable) obtained); - } - throw ae; - } - } - - { - // default.yaml line #230 - /* [{'a':1}] */ - List expected_ = r.array(r.hashMap("a", 1L)); - /* tbl.filter(lambda x:x['a'].default(0).eq(1)) */ - logger.info("About to run line #230: tbl.filter(x -> x.bracket('a').default_(0L).eq(1L))"); - Object obtained = runOrCatch(tbl.filter(x -> x.bracket("a").default_(0L).eq(1L)), - new OptArgs() - ,conn); - try { - assertEquals(expected_, obtained); - logger.info("Finished running line #230"); - } catch (Throwable ae) { - logger.error("Whoops, got exception on line #230:" + ae.toString()); - if(obtained instanceof Throwable) { - ae.addSuppressed((Throwable) obtained); - } - throw ae; - } - } - - { - // default.yaml line #234 - /* ([{}, {'a':null}, {'a':1}]) */ - List expected_ = r.array(r.hashMap(), r.hashMap("a", null), r.hashMap("a", 1L)); - /* tbl.filter(lambda x:x['a'].default(1).eq(1)).order_by('a') */ - logger.info("About to run line #234: tbl.filter(x -> x.bracket('a').default_(1L).eq(1L)).orderBy('a')"); - Object obtained = runOrCatch(tbl.filter(x -> x.bracket("a").default_(1L).eq(1L)).orderBy("a"), - new OptArgs() - ,conn); - try { - assertEquals(expected_, obtained); - logger.info("Finished running line #234"); - } catch (Throwable ae) { - logger.error("Whoops, got exception on line #234:" + ae.toString()); - if(obtained instanceof Throwable) { - ae.addSuppressed((Throwable) obtained); - } - throw ae; - } - } - - { - // default.yaml line #238 - /* [{'a':1}] */ - List expected_ = r.array(r.hashMap("a", 1L)); - /* tbl.filter(lambda x:x['a'].default(r.error()).eq(1)) */ - logger.info("About to run line #238: tbl.filter(x -> x.bracket('a').default_(r.error()).eq(1L))"); - Object obtained = runOrCatch(tbl.filter(x -> x.bracket("a").default_(r.error()).eq(1L)), - new OptArgs() - ,conn); - try { - assertEquals(expected_, obtained); - logger.info("Finished running line #238"); - } catch (Throwable ae) { - logger.error("Whoops, got exception on line #238:" + ae.toString()); - if(obtained instanceof Throwable) { - ae.addSuppressed((Throwable) obtained); - } - throw ae; - } - } - - { - // default.yaml line #244 - /* [{'a':1}] */ - List expected_ = r.array(r.hashMap("a", 1L)); - /* r.expr(0).do(lambda i:tbl.filter(lambda x:x['a'].default(i).eq(1))) */ - logger.info("About to run line #244: r.expr(0L).do_(i -> tbl.filter(x -> x.bracket('a').default_(i).eq(1L)))"); - Object obtained = runOrCatch(r.expr(0L).do_(i -> tbl.filter(x -> x.bracket("a").default_(i).eq(1L))), - new OptArgs() - ,conn); - try { - assertEquals(expected_, obtained); - logger.info("Finished running line #244"); - } catch (Throwable ae) { - logger.error("Whoops, got exception on line #244:" + ae.toString()); - if(obtained instanceof Throwable) { - ae.addSuppressed((Throwable) obtained); - } - throw ae; - } - } - - { - // default.yaml line #248 - /* ([{},{'a':null},{'a':1}]) */ - List expected_ = r.array(r.hashMap(), r.hashMap("a", null), r.hashMap("a", 1L)); - /* r.expr(1).do(lambda i:tbl.filter(lambda x:x['a'].default(i).eq(1))).order_by('a') */ - logger.info("About to run line #248: r.expr(1L).do_(i -> tbl.filter(x -> x.bracket('a').default_(i).eq(1L))).orderBy('a')"); - Object obtained = runOrCatch(r.expr(1L).do_(i -> tbl.filter(x -> x.bracket("a").default_(i).eq(1L))).orderBy("a"), - new OptArgs() - ,conn); - try { - assertEquals(expected_, obtained); - logger.info("Finished running line #248"); - } catch (Throwable ae) { - logger.error("Whoops, got exception on line #248:" + ae.toString()); - if(obtained instanceof Throwable) { - ae.addSuppressed((Throwable) obtained); - } - throw ae; - } - } - - { - // default.yaml line #253 - /* [{'a':1}] */ - List expected_ = r.array(r.hashMap("a", 1L)); - /* tbl.filter(lambda x:r.or_(x['a'].eq(1), x['a']['b'].eq(2))) */ - logger.info("About to run line #253: tbl.filter(x -> r.or(x.bracket('a').eq(1L), x.bracket('a').bracket('b').eq(2L)))"); - Object obtained = runOrCatch(tbl.filter(x -> r.or(x.bracket("a").eq(1L), x.bracket("a").bracket("b").eq(2L))), - new OptArgs() - ,conn); - try { - assertEquals(expected_, obtained); - logger.info("Finished running line #253"); - } catch (Throwable ae) { - logger.error("Whoops, got exception on line #253:" + ae.toString()); - if(obtained instanceof Throwable) { - ae.addSuppressed((Throwable) obtained); - } - throw ae; - } - } - - { - // default.yaml line #257 - /* [{'a':1}] */ - List expected_ = r.array(r.hashMap("a", 1L)); - /* tbl.filter(lambda x:r.or_(x['a'].eq(1), x['a']['b'].eq(2)), default=False) */ - logger.info("About to run line #257: tbl.filter(x -> r.or(x.bracket('a').eq(1L), x.bracket('a').bracket('b').eq(2L))).optArg('default', false)"); - Object obtained = runOrCatch(tbl.filter(x -> r.or(x.bracket("a").eq(1L), x.bracket("a").bracket("b").eq(2L))).optArg("default", false), - new OptArgs() - ,conn); - try { - assertEquals(expected_, obtained); - logger.info("Finished running line #257"); - } catch (Throwable ae) { - logger.error("Whoops, got exception on line #257:" + ae.toString()); - if(obtained instanceof Throwable) { - ae.addSuppressed((Throwable) obtained); - } - throw ae; - } - } - - { - // default.yaml line #261 - /* ([{}, {'a':null}, {'a':1}]) */ - List expected_ = r.array(r.hashMap(), r.hashMap("a", null), r.hashMap("a", 1L)); - /* tbl.filter(lambda x:r.or_(x['a'].eq(1), x['a']['b'].eq(2)), default=True).order_by('a') */ - logger.info("About to run line #261: tbl.filter(x -> r.or(x.bracket('a').eq(1L), x.bracket('a').bracket('b').eq(2L))).optArg('default', true).orderBy('a')"); - Object obtained = runOrCatch(tbl.filter(x -> r.or(x.bracket("a").eq(1L), x.bracket("a").bracket("b").eq(2L))).optArg("default", true).orderBy("a"), - new OptArgs() - ,conn); - try { - assertEquals(expected_, obtained); - logger.info("Finished running line #261"); - } catch (Throwable ae) { - logger.error("Whoops, got exception on line #261:" + ae.toString()); - if(obtained instanceof Throwable) { - ae.addSuppressed((Throwable) obtained); - } - throw ae; - } - } - - { - // default.yaml line #265 - /* err("ReqlNonExistenceError", "No attribute `a` in object:", []) */ - Err expected_ = err("ReqlNonExistenceError", "No attribute `a` in object:", r.array()); - /* tbl.filter(lambda x:r.or_(x['a'].eq(1), x['a']['b'].eq(2)), default=r.error()) */ - logger.info("About to run line #265: tbl.filter(x -> r.or(x.bracket('a').eq(1L), x.bracket('a').bracket('b').eq(2L))).optArg('default', r.error())"); - Object obtained = runOrCatch(tbl.filter(x -> r.or(x.bracket("a").eq(1L), x.bracket("a").bracket("b").eq(2L))).optArg("default", r.error()), - new OptArgs() - ,conn); - try { - assertEquals(expected_, obtained); - logger.info("Finished running line #265"); - } catch (Throwable ae) { - logger.error("Whoops, got exception on line #265:" + ae.toString()); - if(obtained instanceof Throwable) { - ae.addSuppressed((Throwable) obtained); - } - throw ae; - } - } - - { - // default.yaml line #269 - /* partial({'tables_dropped':1}) */ - Partial expected_ = partial(r.hashMap("tables_dropped", 1L)); - /* r.table_drop('default_test') */ - logger.info("About to run line #269: r.tableDrop('default_test')"); - Object obtained = runOrCatch(r.tableDrop("default_test"), - new OptArgs() - ,conn); - try { - assertEquals(expected_, obtained); - logger.info("Finished running line #269"); - } catch (Throwable ae) { - logger.error("Whoops, got exception on line #269:" + ae.toString()); - if(obtained instanceof Throwable) { - ae.addSuppressed((Throwable) obtained); - } - throw ae; - } - } - } -} diff --git a/drivers/java/src/test/java/com/rethinkdb/gen/GeoConstructors.java b/drivers/java/src/test/java/com/rethinkdb/gen/GeoConstructors.java deleted file mode 100644 index 8b4fcff75d9..00000000000 --- a/drivers/java/src/test/java/com/rethinkdb/gen/GeoConstructors.java +++ /dev/null @@ -1,560 +0,0 @@ -// Autogenerated by convert_tests.py and process_polyglot.py. -// Do not edit this file directly. -// The template for this file is located at: -// ../../../../../../../templates/Test.java -package com.rethinkdb.gen; - -import com.rethinkdb.RethinkDB; -import com.rethinkdb.gen.exc.*; -import com.rethinkdb.gen.ast.*; -import com.rethinkdb.ast.ReqlAst; -import com.rethinkdb.model.MapObject; -import com.rethinkdb.model.OptArgs; -import com.rethinkdb.net.Connection; -import com.rethinkdb.net.Cursor; -import junit.framework.TestCase; -import static org.junit.Assert.assertEquals; -import static org.junit.Assert.assertArrayEquals; -import org.slf4j.Logger; -import org.slf4j.LoggerFactory; - -import org.junit.*; -import org.junit.rules.ExpectedException; - -import java.util.Arrays; -import java.util.ArrayList; -import java.util.List; -import java.util.Map; -import java.util.Set; -import java.time.OffsetDateTime; -import java.time.ZoneOffset; -import java.time.Instant; -import java.util.stream.LongStream; -import java.util.stream.Collectors; -import java.util.stream.Stream; -import java.util.concurrent.TimeoutException; -import java.util.regex.Pattern; -import java.util.Collections; -import java.nio.charset.StandardCharsets; - -import static com.rethinkdb.TestingCommon.*; -import com.rethinkdb.TestingFramework; - -public class GeoConstructors { - // Test geo constructors - Logger logger = LoggerFactory.getLogger(GeoConstructors.class); - public static final RethinkDB r = RethinkDB.r; - - Connection conn; - - @Before - public void setUp() throws Exception { - logger.info("Setting up."); - conn = TestingFramework.createConnection(); - try { - r.dbCreate("test").run(conn); - r.db("test").wait_().run(conn); - }catch (Exception e){} - } - - @After - public void tearDown() throws Exception { - logger.info("Tearing down."); - r.db("rethinkdb").table("_debug_scratch").delete().run(conn); - if(!conn.isOpen()){ - conn.close(); - conn = TestingFramework.createConnection(); - } - r.dbDrop("test").run(conn); - conn.close(false); - } - - // Autogenerated tests below - - @Test(timeout=120000) - public void test() throws Exception { - - { - // geo/constructors.yaml line #4 - /* ({'$reql_type$':'GEOMETRY', 'coordinates':[0, 0], 'type':'Point'}) */ - Map expected_ = r.hashMap("$reql_type$", "GEOMETRY").with("coordinates", r.array(0L, 0L)).with("type", "Point"); - /* r.point(0, 0) */ - logger.info("About to run line #4: r.point(0L, 0L)"); - Object obtained = runOrCatch(r.point(0L, 0L), - new OptArgs() - ,conn); - try { - assertEquals(expected_, obtained); - logger.info("Finished running line #4"); - } catch (Throwable ae) { - logger.error("Whoops, got exception on line #4:" + ae.toString()); - if(obtained instanceof Throwable) { - ae.addSuppressed((Throwable) obtained); - } - throw ae; - } - } - - { - // geo/constructors.yaml line #6 - /* ({'$reql_type$':'GEOMETRY', 'coordinates':[0, -90], 'type':'Point'}) */ - Map expected_ = r.hashMap("$reql_type$", "GEOMETRY").with("coordinates", r.array(0L, -90L)).with("type", "Point"); - /* r.point(0, -90) */ - logger.info("About to run line #6: r.point(0L, -90L)"); - Object obtained = runOrCatch(r.point(0L, -90L), - new OptArgs() - ,conn); - try { - assertEquals(expected_, obtained); - logger.info("Finished running line #6"); - } catch (Throwable ae) { - logger.error("Whoops, got exception on line #6:" + ae.toString()); - if(obtained instanceof Throwable) { - ae.addSuppressed((Throwable) obtained); - } - throw ae; - } - } - - { - // geo/constructors.yaml line #8 - /* ({'$reql_type$':'GEOMETRY', 'coordinates':[0, 90], 'type':'Point'}) */ - Map expected_ = r.hashMap("$reql_type$", "GEOMETRY").with("coordinates", r.array(0L, 90L)).with("type", "Point"); - /* r.point(0, 90) */ - logger.info("About to run line #8: r.point(0L, 90L)"); - Object obtained = runOrCatch(r.point(0L, 90L), - new OptArgs() - ,conn); - try { - assertEquals(expected_, obtained); - logger.info("Finished running line #8"); - } catch (Throwable ae) { - logger.error("Whoops, got exception on line #8:" + ae.toString()); - if(obtained instanceof Throwable) { - ae.addSuppressed((Throwable) obtained); - } - throw ae; - } - } - - { - // geo/constructors.yaml line #10 - /* ({'$reql_type$':'GEOMETRY', 'coordinates':[-180, 0], 'type':'Point'}) */ - Map expected_ = r.hashMap("$reql_type$", "GEOMETRY").with("coordinates", r.array(-180L, 0L)).with("type", "Point"); - /* r.point(-180, 0) */ - logger.info("About to run line #10: r.point(-180L, 0L)"); - Object obtained = runOrCatch(r.point(-180L, 0L), - new OptArgs() - ,conn); - try { - assertEquals(expected_, obtained); - logger.info("Finished running line #10"); - } catch (Throwable ae) { - logger.error("Whoops, got exception on line #10:" + ae.toString()); - if(obtained instanceof Throwable) { - ae.addSuppressed((Throwable) obtained); - } - throw ae; - } - } - - { - // geo/constructors.yaml line #12 - /* ({'$reql_type$':'GEOMETRY', 'coordinates':[180, 0], 'type':'Point'}) */ - Map expected_ = r.hashMap("$reql_type$", "GEOMETRY").with("coordinates", r.array(180L, 0L)).with("type", "Point"); - /* r.point(180, 0) */ - logger.info("About to run line #12: r.point(180L, 0L)"); - Object obtained = runOrCatch(r.point(180L, 0L), - new OptArgs() - ,conn); - try { - assertEquals(expected_, obtained); - logger.info("Finished running line #12"); - } catch (Throwable ae) { - logger.error("Whoops, got exception on line #12:" + ae.toString()); - if(obtained instanceof Throwable) { - ae.addSuppressed((Throwable) obtained); - } - throw ae; - } - } - - { - // geo/constructors.yaml line #14 - /* err('ReqlQueryLogicError', 'Latitude must be between -90 and 90. Got -91.', [0]) */ - Err expected_ = err("ReqlQueryLogicError", "Latitude must be between -90 and 90. Got -91.", r.array(0L)); - /* r.point(0, -91) */ - logger.info("About to run line #14: r.point(0L, -91L)"); - Object obtained = runOrCatch(r.point(0L, -91L), - new OptArgs() - ,conn); - try { - assertEquals(expected_, obtained); - logger.info("Finished running line #14"); - } catch (Throwable ae) { - logger.error("Whoops, got exception on line #14:" + ae.toString()); - if(obtained instanceof Throwable) { - ae.addSuppressed((Throwable) obtained); - } - throw ae; - } - } - - { - // geo/constructors.yaml line #16 - /* err('ReqlQueryLogicError', 'Latitude must be between -90 and 90. Got 91.', [0]) */ - Err expected_ = err("ReqlQueryLogicError", "Latitude must be between -90 and 90. Got 91.", r.array(0L)); - /* r.point(0, 91) */ - logger.info("About to run line #16: r.point(0L, 91L)"); - Object obtained = runOrCatch(r.point(0L, 91L), - new OptArgs() - ,conn); - try { - assertEquals(expected_, obtained); - logger.info("Finished running line #16"); - } catch (Throwable ae) { - logger.error("Whoops, got exception on line #16:" + ae.toString()); - if(obtained instanceof Throwable) { - ae.addSuppressed((Throwable) obtained); - } - throw ae; - } - } - - { - // geo/constructors.yaml line #18 - /* err('ReqlQueryLogicError', 'Longitude must be between -180 and 180. Got -181.', [0]) */ - Err expected_ = err("ReqlQueryLogicError", "Longitude must be between -180 and 180. Got -181.", r.array(0L)); - /* r.point(-181, 0) */ - logger.info("About to run line #18: r.point(-181L, 0L)"); - Object obtained = runOrCatch(r.point(-181L, 0L), - new OptArgs() - ,conn); - try { - assertEquals(expected_, obtained); - logger.info("Finished running line #18"); - } catch (Throwable ae) { - logger.error("Whoops, got exception on line #18:" + ae.toString()); - if(obtained instanceof Throwable) { - ae.addSuppressed((Throwable) obtained); - } - throw ae; - } - } - - { - // geo/constructors.yaml line #20 - /* err('ReqlQueryLogicError', 'Longitude must be between -180 and 180. Got 181.', [0]) */ - Err expected_ = err("ReqlQueryLogicError", "Longitude must be between -180 and 180. Got 181.", r.array(0L)); - /* r.point(181, 0) */ - logger.info("About to run line #20: r.point(181L, 0L)"); - Object obtained = runOrCatch(r.point(181L, 0L), - new OptArgs() - ,conn); - try { - assertEquals(expected_, obtained); - logger.info("Finished running line #20"); - } catch (Throwable ae) { - logger.error("Whoops, got exception on line #20:" + ae.toString()); - if(obtained instanceof Throwable) { - ae.addSuppressed((Throwable) obtained); - } - throw ae; - } - } - - { - // geo/constructors.yaml line #28 - /* err('ReqlQueryLogicError', 'Invalid LineString. Are there antipodal or duplicate vertices?', [0]) */ - Err expected_ = err("ReqlQueryLogicError", "Invalid LineString. Are there antipodal or duplicate vertices?", r.array(0L)); - /* r.line([0,0], [0,0]) */ - logger.info("About to run line #28: r.line(r.array(0L, 0L), r.array(0L, 0L))"); - Object obtained = runOrCatch(r.line(r.array(0L, 0L), r.array(0L, 0L)), - new OptArgs() - ,conn); - try { - assertEquals(expected_, obtained); - logger.info("Finished running line #28"); - } catch (Throwable ae) { - logger.error("Whoops, got exception on line #28:" + ae.toString()); - if(obtained instanceof Throwable) { - ae.addSuppressed((Throwable) obtained); - } - throw ae; - } - } - - { - // geo/constructors.yaml line #30 - /* ({'$reql_type$':'GEOMETRY', 'coordinates':[[0,0], [0,1]], 'type':'LineString'}) */ - Map expected_ = r.hashMap("$reql_type$", "GEOMETRY").with("coordinates", r.array(r.array(0L, 0L), r.array(0L, 1L))).with("type", "LineString"); - /* r.line([0,0], [0,1]) */ - logger.info("About to run line #30: r.line(r.array(0L, 0L), r.array(0L, 1L))"); - Object obtained = runOrCatch(r.line(r.array(0L, 0L), r.array(0L, 1L)), - new OptArgs() - ,conn); - try { - assertEquals(expected_, obtained); - logger.info("Finished running line #30"); - } catch (Throwable ae) { - logger.error("Whoops, got exception on line #30:" + ae.toString()); - if(obtained instanceof Throwable) { - ae.addSuppressed((Throwable) obtained); - } - throw ae; - } - } - - { - // geo/constructors.yaml line #32 - /* err('ReqlQueryLogicError', 'Expected point coordinate pair. Got 1 element array instead of a 2 element one.', [0]) */ - Err expected_ = err("ReqlQueryLogicError", "Expected point coordinate pair. Got 1 element array instead of a 2 element one.", r.array(0L)); - /* r.line([0,0], [1]) */ - logger.info("About to run line #32: r.line(r.array(0L, 0L), r.array(1L))"); - Object obtained = runOrCatch(r.line(r.array(0L, 0L), r.array(1L)), - new OptArgs() - ,conn); - try { - assertEquals(expected_, obtained); - logger.info("Finished running line #32"); - } catch (Throwable ae) { - logger.error("Whoops, got exception on line #32:" + ae.toString()); - if(obtained instanceof Throwable) { - ae.addSuppressed((Throwable) obtained); - } - throw ae; - } - } - - { - // geo/constructors.yaml line #34 - /* err('ReqlQueryLogicError', 'Expected point coordinate pair. Got 3 element array instead of a 2 element one.', [0]) */ - Err expected_ = err("ReqlQueryLogicError", "Expected point coordinate pair. Got 3 element array instead of a 2 element one.", r.array(0L)); - /* r.line([0,0], [1,0,0]) */ - logger.info("About to run line #34: r.line(r.array(0L, 0L), r.array(1L, 0L, 0L))"); - Object obtained = runOrCatch(r.line(r.array(0L, 0L), r.array(1L, 0L, 0L)), - new OptArgs() - ,conn); - try { - assertEquals(expected_, obtained); - logger.info("Finished running line #34"); - } catch (Throwable ae) { - logger.error("Whoops, got exception on line #34:" + ae.toString()); - if(obtained instanceof Throwable) { - ae.addSuppressed((Throwable) obtained); - } - throw ae; - } - } - - { - // geo/constructors.yaml line #36 - /* ({'$reql_type$':'GEOMETRY', 'coordinates':[[0,0], [0,1], [0,0]], 'type':'LineString'}) */ - Map expected_ = r.hashMap("$reql_type$", "GEOMETRY").with("coordinates", r.array(r.array(0L, 0L), r.array(0L, 1L), r.array(0L, 0L))).with("type", "LineString"); - /* r.line([0,0], [0,1], [0,0]) */ - logger.info("About to run line #36: r.line(r.array(0L, 0L), r.array(0L, 1L), r.array(0L, 0L))"); - Object obtained = runOrCatch(r.line(r.array(0L, 0L), r.array(0L, 1L), r.array(0L, 0L)), - new OptArgs() - ,conn); - try { - assertEquals(expected_, obtained); - logger.info("Finished running line #36"); - } catch (Throwable ae) { - logger.error("Whoops, got exception on line #36:" + ae.toString()); - if(obtained instanceof Throwable) { - ae.addSuppressed((Throwable) obtained); - } - throw ae; - } - } - - { - // geo/constructors.yaml line #38 - /* ({'$reql_type$':'GEOMETRY', 'coordinates':[[0,0], [0,1], [0,0]], 'type':'LineString'}) */ - Map expected_ = r.hashMap("$reql_type$", "GEOMETRY").with("coordinates", r.array(r.array(0L, 0L), r.array(0L, 1L), r.array(0L, 0L))).with("type", "LineString"); - /* r.line(r.point(0,0), r.point(0,1), r.point(0,0)) */ - logger.info("About to run line #38: r.line(r.point(0L, 0L), r.point(0L, 1L), r.point(0L, 0L))"); - Object obtained = runOrCatch(r.line(r.point(0L, 0L), r.point(0L, 1L), r.point(0L, 0L)), - new OptArgs() - ,conn); - try { - assertEquals(expected_, obtained); - logger.info("Finished running line #38"); - } catch (Throwable ae) { - logger.error("Whoops, got exception on line #38:" + ae.toString()); - if(obtained instanceof Throwable) { - ae.addSuppressed((Throwable) obtained); - } - throw ae; - } - } - - { - // geo/constructors.yaml line #40 - /* err('ReqlQueryLogicError', 'Expected geometry of type `Point` but found `LineString`.', [0]) */ - Err expected_ = err("ReqlQueryLogicError", "Expected geometry of type `Point` but found `LineString`.", r.array(0L)); - /* r.line(r.point(0,0), r.point(1,0), r.line([0,0], [1,0])) */ - logger.info("About to run line #40: r.line(r.point(0L, 0L), r.point(1L, 0L), r.line(r.array(0L, 0L), r.array(1L, 0L)))"); - Object obtained = runOrCatch(r.line(r.point(0L, 0L), r.point(1L, 0L), r.line(r.array(0L, 0L), r.array(1L, 0L))), - new OptArgs() - ,conn); - try { - assertEquals(expected_, obtained); - logger.info("Finished running line #40"); - } catch (Throwable ae) { - logger.error("Whoops, got exception on line #40:" + ae.toString()); - if(obtained instanceof Throwable) { - ae.addSuppressed((Throwable) obtained); - } - throw ae; - } - } - - { - // geo/constructors.yaml line #50 - /* err('ReqlQueryLogicError', 'Invalid LinearRing. Are there antipodal or duplicate vertices? Is it self-intersecting?', [0]) */ - Err expected_ = err("ReqlQueryLogicError", "Invalid LinearRing. Are there antipodal or duplicate vertices? Is it self-intersecting?", r.array(0L)); - /* r.polygon([0,0], [0,0], [0,0], [0,0]) */ - logger.info("About to run line #50: r.polygon(r.array(0L, 0L), r.array(0L, 0L), r.array(0L, 0L), r.array(0L, 0L))"); - Object obtained = runOrCatch(r.polygon(r.array(0L, 0L), r.array(0L, 0L), r.array(0L, 0L), r.array(0L, 0L)), - new OptArgs() - ,conn); - try { - assertEquals(expected_, obtained); - logger.info("Finished running line #50"); - } catch (Throwable ae) { - logger.error("Whoops, got exception on line #50:" + ae.toString()); - if(obtained instanceof Throwable) { - ae.addSuppressed((Throwable) obtained); - } - throw ae; - } - } - - { - // geo/constructors.yaml line #52 - /* ({'$reql_type$':'GEOMETRY', 'coordinates':[[[0,0], [0,1], [1,0], [0,0]]], 'type':'Polygon'}) */ - Map expected_ = r.hashMap("$reql_type$", "GEOMETRY").with("coordinates", r.array(r.array(r.array(0L, 0L), r.array(0L, 1L), r.array(1L, 0L), r.array(0L, 0L)))).with("type", "Polygon"); - /* r.polygon([0,0], [0,1], [1,0]) */ - logger.info("About to run line #52: r.polygon(r.array(0L, 0L), r.array(0L, 1L), r.array(1L, 0L))"); - Object obtained = runOrCatch(r.polygon(r.array(0L, 0L), r.array(0L, 1L), r.array(1L, 0L)), - new OptArgs() - ,conn); - try { - assertEquals(expected_, obtained); - logger.info("Finished running line #52"); - } catch (Throwable ae) { - logger.error("Whoops, got exception on line #52:" + ae.toString()); - if(obtained instanceof Throwable) { - ae.addSuppressed((Throwable) obtained); - } - throw ae; - } - } - - { - // geo/constructors.yaml line #54 - /* ({'$reql_type$':'GEOMETRY', 'coordinates':[[[0,0], [0,1], [1,0], [0,0]]], 'type':'Polygon'}) */ - Map expected_ = r.hashMap("$reql_type$", "GEOMETRY").with("coordinates", r.array(r.array(r.array(0L, 0L), r.array(0L, 1L), r.array(1L, 0L), r.array(0L, 0L)))).with("type", "Polygon"); - /* r.polygon([0,0], [0,1], [1,0], [0,0]) */ - logger.info("About to run line #54: r.polygon(r.array(0L, 0L), r.array(0L, 1L), r.array(1L, 0L), r.array(0L, 0L))"); - Object obtained = runOrCatch(r.polygon(r.array(0L, 0L), r.array(0L, 1L), r.array(1L, 0L), r.array(0L, 0L)), - new OptArgs() - ,conn); - try { - assertEquals(expected_, obtained); - logger.info("Finished running line #54"); - } catch (Throwable ae) { - logger.error("Whoops, got exception on line #54:" + ae.toString()); - if(obtained instanceof Throwable) { - ae.addSuppressed((Throwable) obtained); - } - throw ae; - } - } - - { - // geo/constructors.yaml line #56 - /* err('ReqlQueryLogicError', 'Invalid LinearRing. Are there antipodal or duplicate vertices? Is it self-intersecting?', [0]) */ - Err expected_ = err("ReqlQueryLogicError", "Invalid LinearRing. Are there antipodal or duplicate vertices? Is it self-intersecting?", r.array(0L)); - /* r.polygon([0,0], [0,1], [1,0], [-1,0.5]) */ - logger.info("About to run line #56: r.polygon(r.array(0L, 0L), r.array(0L, 1L), r.array(1L, 0L), r.array(-1L, 0.5))"); - Object obtained = runOrCatch(r.polygon(r.array(0L, 0L), r.array(0L, 1L), r.array(1L, 0L), r.array(-1L, 0.5)), - new OptArgs() - ,conn); - try { - assertEquals(expected_, obtained); - logger.info("Finished running line #56"); - } catch (Throwable ae) { - logger.error("Whoops, got exception on line #56:" + ae.toString()); - if(obtained instanceof Throwable) { - ae.addSuppressed((Throwable) obtained); - } - throw ae; - } - } - - { - // geo/constructors.yaml line #58 - /* err('ReqlQueryLogicError', 'Expected point coordinate pair. Got 1 element array instead of a 2 element one.', [0]) */ - Err expected_ = err("ReqlQueryLogicError", "Expected point coordinate pair. Got 1 element array instead of a 2 element one.", r.array(0L)); - /* r.polygon([0,0], [0,1], [0]) */ - logger.info("About to run line #58: r.polygon(r.array(0L, 0L), r.array(0L, 1L), r.array(0L))"); - Object obtained = runOrCatch(r.polygon(r.array(0L, 0L), r.array(0L, 1L), r.array(0L)), - new OptArgs() - ,conn); - try { - assertEquals(expected_, obtained); - logger.info("Finished running line #58"); - } catch (Throwable ae) { - logger.error("Whoops, got exception on line #58:" + ae.toString()); - if(obtained instanceof Throwable) { - ae.addSuppressed((Throwable) obtained); - } - throw ae; - } - } - - { - // geo/constructors.yaml line #60 - /* err('ReqlQueryLogicError', 'Expected point coordinate pair. Got 3 element array instead of a 2 element one.', [0]) */ - Err expected_ = err("ReqlQueryLogicError", "Expected point coordinate pair. Got 3 element array instead of a 2 element one.", r.array(0L)); - /* r.polygon([0,0], [0,1], [0,1,0]) */ - logger.info("About to run line #60: r.polygon(r.array(0L, 0L), r.array(0L, 1L), r.array(0L, 1L, 0L))"); - Object obtained = runOrCatch(r.polygon(r.array(0L, 0L), r.array(0L, 1L), r.array(0L, 1L, 0L)), - new OptArgs() - ,conn); - try { - assertEquals(expected_, obtained); - logger.info("Finished running line #60"); - } catch (Throwable ae) { - logger.error("Whoops, got exception on line #60:" + ae.toString()); - if(obtained instanceof Throwable) { - ae.addSuppressed((Throwable) obtained); - } - throw ae; - } - } - - { - // geo/constructors.yaml line #62 - /* err('ReqlQueryLogicError', 'Expected geometry of type `Point` but found `LineString`.', [0]) */ - Err expected_ = err("ReqlQueryLogicError", "Expected geometry of type `Point` but found `LineString`.", r.array(0L)); - /* r.polygon(r.point(0,0), r.point(0,1), r.line([0,0], [0,1])) */ - logger.info("About to run line #62: r.polygon(r.point(0L, 0L), r.point(0L, 1L), r.line(r.array(0L, 0L), r.array(0L, 1L)))"); - Object obtained = runOrCatch(r.polygon(r.point(0L, 0L), r.point(0L, 1L), r.line(r.array(0L, 0L), r.array(0L, 1L))), - new OptArgs() - ,conn); - try { - assertEquals(expected_, obtained); - logger.info("Finished running line #62"); - } catch (Throwable ae) { - logger.error("Whoops, got exception on line #62:" + ae.toString()); - if(obtained instanceof Throwable) { - ae.addSuppressed((Throwable) obtained); - } - throw ae; - } - } - } -} diff --git a/drivers/java/src/test/java/com/rethinkdb/gen/GeoGeojson.java b/drivers/java/src/test/java/com/rethinkdb/gen/GeoGeojson.java deleted file mode 100644 index 461f6ed2606..00000000000 --- a/drivers/java/src/test/java/com/rethinkdb/gen/GeoGeojson.java +++ /dev/null @@ -1,308 +0,0 @@ -// Autogenerated by convert_tests.py and process_polyglot.py. -// Do not edit this file directly. -// The template for this file is located at: -// ../../../../../../../templates/Test.java -package com.rethinkdb.gen; - -import com.rethinkdb.RethinkDB; -import com.rethinkdb.gen.exc.*; -import com.rethinkdb.gen.ast.*; -import com.rethinkdb.ast.ReqlAst; -import com.rethinkdb.model.MapObject; -import com.rethinkdb.model.OptArgs; -import com.rethinkdb.net.Connection; -import com.rethinkdb.net.Cursor; -import junit.framework.TestCase; -import static org.junit.Assert.assertEquals; -import static org.junit.Assert.assertArrayEquals; -import org.slf4j.Logger; -import org.slf4j.LoggerFactory; - -import org.junit.*; -import org.junit.rules.ExpectedException; - -import java.util.Arrays; -import java.util.ArrayList; -import java.util.List; -import java.util.Map; -import java.util.Set; -import java.time.OffsetDateTime; -import java.time.ZoneOffset; -import java.time.Instant; -import java.util.stream.LongStream; -import java.util.stream.Collectors; -import java.util.stream.Stream; -import java.util.concurrent.TimeoutException; -import java.util.regex.Pattern; -import java.util.Collections; -import java.nio.charset.StandardCharsets; - -import static com.rethinkdb.TestingCommon.*; -import com.rethinkdb.TestingFramework; - -public class GeoGeojson { - // Test geoJSON conversion - Logger logger = LoggerFactory.getLogger(GeoGeojson.class); - public static final RethinkDB r = RethinkDB.r; - - Connection conn; - - @Before - public void setUp() throws Exception { - logger.info("Setting up."); - conn = TestingFramework.createConnection(); - try { - r.dbCreate("test").run(conn); - r.db("test").wait_().run(conn); - }catch (Exception e){} - } - - @After - public void tearDown() throws Exception { - logger.info("Tearing down."); - r.db("rethinkdb").table("_debug_scratch").delete().run(conn); - if(!conn.isOpen()){ - conn.close(); - conn = TestingFramework.createConnection(); - } - r.dbDrop("test").run(conn); - conn.close(false); - } - - // Autogenerated tests below - - @Test(timeout=120000) - public void test() throws Exception { - - { - // geo/geojson.yaml line #4 - /* ({'$reql_type$':'GEOMETRY', 'coordinates':[0, 0], 'type':'Point'}) */ - Map expected_ = r.hashMap("$reql_type$", "GEOMETRY").with("coordinates", r.array(0L, 0L)).with("type", "Point"); - /* r.geojson({'coordinates':[0, 0], 'type':'Point'}) */ - logger.info("About to run line #4: r.geojson(r.hashMap('coordinates', r.array(0L, 0L)).with('type', 'Point'))"); - Object obtained = runOrCatch(r.geojson(r.hashMap("coordinates", r.array(0L, 0L)).with("type", "Point")), - new OptArgs() - ,conn); - try { - assertEquals(expected_, obtained); - logger.info("Finished running line #4"); - } catch (Throwable ae) { - logger.error("Whoops, got exception on line #4:" + ae.toString()); - if(obtained instanceof Throwable) { - ae.addSuppressed((Throwable) obtained); - } - throw ae; - } - } - - { - // geo/geojson.yaml line #6 - /* ({'$reql_type$':'GEOMETRY', 'coordinates':[[0,0], [0,1]], 'type':'LineString'}) */ - Map expected_ = r.hashMap("$reql_type$", "GEOMETRY").with("coordinates", r.array(r.array(0L, 0L), r.array(0L, 1L))).with("type", "LineString"); - /* r.geojson({'coordinates':[[0,0], [0,1]], 'type':'LineString'}) */ - logger.info("About to run line #6: r.geojson(r.hashMap('coordinates', r.array(r.array(0L, 0L), r.array(0L, 1L))).with('type', 'LineString'))"); - Object obtained = runOrCatch(r.geojson(r.hashMap("coordinates", r.array(r.array(0L, 0L), r.array(0L, 1L))).with("type", "LineString")), - new OptArgs() - ,conn); - try { - assertEquals(expected_, obtained); - logger.info("Finished running line #6"); - } catch (Throwable ae) { - logger.error("Whoops, got exception on line #6:" + ae.toString()); - if(obtained instanceof Throwable) { - ae.addSuppressed((Throwable) obtained); - } - throw ae; - } - } - - { - // geo/geojson.yaml line #8 - /* ({'$reql_type$':'GEOMETRY', 'coordinates':[[[0,0], [0,1], [1,0], [0,0]]], 'type':'Polygon'}) */ - Map expected_ = r.hashMap("$reql_type$", "GEOMETRY").with("coordinates", r.array(r.array(r.array(0L, 0L), r.array(0L, 1L), r.array(1L, 0L), r.array(0L, 0L)))).with("type", "Polygon"); - /* r.geojson({'coordinates':[[[0,0], [0,1], [1,0], [0,0]]], 'type':'Polygon'}) */ - logger.info("About to run line #8: r.geojson(r.hashMap('coordinates', r.array(r.array(r.array(0L, 0L), r.array(0L, 1L), r.array(1L, 0L), r.array(0L, 0L)))).with('type', 'Polygon'))"); - Object obtained = runOrCatch(r.geojson(r.hashMap("coordinates", r.array(r.array(r.array(0L, 0L), r.array(0L, 1L), r.array(1L, 0L), r.array(0L, 0L)))).with("type", "Polygon")), - new OptArgs() - ,conn); - try { - assertEquals(expected_, obtained); - logger.info("Finished running line #8"); - } catch (Throwable ae) { - logger.error("Whoops, got exception on line #8:" + ae.toString()); - if(obtained instanceof Throwable) { - ae.addSuppressed((Throwable) obtained); - } - throw ae; - } - } - - { - // geo/geojson.yaml line #12 - /* err('ReqlQueryLogicError', 'Expected type NUMBER but found ARRAY.', [0]) */ - Err expected_ = err("ReqlQueryLogicError", "Expected type NUMBER but found ARRAY.", r.array(0L)); - /* r.geojson({'coordinates':[[], 0], 'type':'Point'}) */ - logger.info("About to run line #12: r.geojson(r.hashMap('coordinates', r.array(r.array(), 0L)).with('type', 'Point'))"); - Object obtained = runOrCatch(r.geojson(r.hashMap("coordinates", r.array(r.array(), 0L)).with("type", "Point")), - new OptArgs() - ,conn); - try { - assertEquals(expected_, obtained); - logger.info("Finished running line #12"); - } catch (Throwable ae) { - logger.error("Whoops, got exception on line #12:" + ae.toString()); - if(obtained instanceof Throwable) { - ae.addSuppressed((Throwable) obtained); - } - throw ae; - } - } - - { - // geo/geojson.yaml line #14 - /* err('ReqlQueryLogicError', 'Expected type ARRAY but found BOOL.', [0]) */ - Err expected_ = err("ReqlQueryLogicError", "Expected type ARRAY but found BOOL.", r.array(0L)); - /* r.geojson({'coordinates':true, 'type':'Point'}) */ - logger.info("About to run line #14: r.geojson(r.hashMap('coordinates', true).with('type', 'Point'))"); - Object obtained = runOrCatch(r.geojson(r.hashMap("coordinates", true).with("type", "Point")), - new OptArgs() - ,conn); - try { - assertEquals(expected_, obtained); - logger.info("Finished running line #14"); - } catch (Throwable ae) { - logger.error("Whoops, got exception on line #14:" + ae.toString()); - if(obtained instanceof Throwable) { - ae.addSuppressed((Throwable) obtained); - } - throw ae; - } - } - - { - // geo/geojson.yaml line #16 - /* err('ReqlNonExistenceError', 'No attribute `coordinates` in object:', [0]) */ - Err expected_ = err("ReqlNonExistenceError", "No attribute `coordinates` in object:", r.array(0L)); - /* r.geojson({'type':'Point'}) */ - logger.info("About to run line #16: r.geojson(r.hashMap('type', 'Point'))"); - Object obtained = runOrCatch(r.geojson(r.hashMap("type", "Point")), - new OptArgs() - ,conn); - try { - assertEquals(expected_, obtained); - logger.info("Finished running line #16"); - } catch (Throwable ae) { - logger.error("Whoops, got exception on line #16:" + ae.toString()); - if(obtained instanceof Throwable) { - ae.addSuppressed((Throwable) obtained); - } - throw ae; - } - } - - { - // geo/geojson.yaml line #18 - /* err('ReqlNonExistenceError', 'No attribute `type` in object:', [0]) */ - Err expected_ = err("ReqlNonExistenceError", "No attribute `type` in object:", r.array(0L)); - /* r.geojson({'coordinates':[0, 0]}) */ - logger.info("About to run line #18: r.geojson(r.hashMap('coordinates', r.array(0L, 0L)))"); - Object obtained = runOrCatch(r.geojson(r.hashMap("coordinates", r.array(0L, 0L))), - new OptArgs() - ,conn); - try { - assertEquals(expected_, obtained); - logger.info("Finished running line #18"); - } catch (Throwable ae) { - logger.error("Whoops, got exception on line #18:" + ae.toString()); - if(obtained instanceof Throwable) { - ae.addSuppressed((Throwable) obtained); - } - throw ae; - } - } - - { - // geo/geojson.yaml line #20 - /* err('ReqlQueryLogicError', 'Unrecognized GeoJSON type `foo`.', [0]) */ - Err expected_ = err("ReqlQueryLogicError", "Unrecognized GeoJSON type `foo`.", r.array(0L)); - /* r.geojson({'coordinates':[0, 0], 'type':'foo'}) */ - logger.info("About to run line #20: r.geojson(r.hashMap('coordinates', r.array(0L, 0L)).with('type', 'foo'))"); - Object obtained = runOrCatch(r.geojson(r.hashMap("coordinates", r.array(0L, 0L)).with("type", "foo")), - new OptArgs() - ,conn); - try { - assertEquals(expected_, obtained); - logger.info("Finished running line #20"); - } catch (Throwable ae) { - logger.error("Whoops, got exception on line #20:" + ae.toString()); - if(obtained instanceof Throwable) { - ae.addSuppressed((Throwable) obtained); - } - throw ae; - } - } - - { - // geo/geojson.yaml line #22 - /* err('ReqlQueryLogicError', 'Unrecognized field `foo` found in geometry object.', [0]) */ - Err expected_ = err("ReqlQueryLogicError", "Unrecognized field `foo` found in geometry object.", r.array(0L)); - /* r.geojson({'coordinates':[0, 0], 'type':'Point', 'foo':'wrong'}) */ - logger.info("About to run line #22: r.geojson(r.hashMap('coordinates', r.array(0L, 0L)).with('type', 'Point').with('foo', 'wrong'))"); - Object obtained = runOrCatch(r.geojson(r.hashMap("coordinates", r.array(0L, 0L)).with("type", "Point").with("foo", "wrong")), - new OptArgs() - ,conn); - try { - assertEquals(expected_, obtained); - logger.info("Finished running line #22"); - } catch (Throwable ae) { - logger.error("Whoops, got exception on line #22:" + ae.toString()); - if(obtained instanceof Throwable) { - ae.addSuppressed((Throwable) obtained); - } - throw ae; - } - } - - { - // geo/geojson.yaml line #26 - /* ({'$reql_type$':'GEOMETRY', 'coordinates':[0, 0], 'type':'Point', 'crs':null}) */ - Map expected_ = r.hashMap("$reql_type$", "GEOMETRY").with("coordinates", r.array(0L, 0L)).with("type", "Point").with("crs", null); - /* r.geojson({'coordinates':[0, 0], 'type':'Point', 'crs':null}) */ - logger.info("About to run line #26: r.geojson(r.hashMap('coordinates', r.array(0L, 0L)).with('type', 'Point').with('crs', null))"); - Object obtained = runOrCatch(r.geojson(r.hashMap("coordinates", r.array(0L, 0L)).with("type", "Point").with("crs", null)), - new OptArgs() - ,conn); - try { - assertEquals(expected_, obtained); - logger.info("Finished running line #26"); - } catch (Throwable ae) { - logger.error("Whoops, got exception on line #26:" + ae.toString()); - if(obtained instanceof Throwable) { - ae.addSuppressed((Throwable) obtained); - } - throw ae; - } - } - - { - // geo/geojson.yaml line #30 - /* err('ReqlQueryLogicError', 'GeoJSON type `MultiPoint` is not supported.', [0]) */ - Err expected_ = err("ReqlQueryLogicError", "GeoJSON type `MultiPoint` is not supported.", r.array(0L)); - /* r.geojson({'coordinates':[0, 0], 'type':'MultiPoint'}) */ - logger.info("About to run line #30: r.geojson(r.hashMap('coordinates', r.array(0L, 0L)).with('type', 'MultiPoint'))"); - Object obtained = runOrCatch(r.geojson(r.hashMap("coordinates", r.array(0L, 0L)).with("type", "MultiPoint")), - new OptArgs() - ,conn); - try { - assertEquals(expected_, obtained); - logger.info("Finished running line #30"); - } catch (Throwable ae) { - logger.error("Whoops, got exception on line #30:" + ae.toString()); - if(obtained instanceof Throwable) { - ae.addSuppressed((Throwable) obtained); - } - throw ae; - } - } - } -} diff --git a/drivers/java/src/test/java/com/rethinkdb/gen/GeoIntersectionInclusion.java b/drivers/java/src/test/java/com/rethinkdb/gen/GeoIntersectionInclusion.java deleted file mode 100644 index 7a465a11eef..00000000000 --- a/drivers/java/src/test/java/com/rethinkdb/gen/GeoIntersectionInclusion.java +++ /dev/null @@ -1,1169 +0,0 @@ -// Autogenerated by convert_tests.py and process_polyglot.py. -// Do not edit this file directly. -// The template for this file is located at: -// ../../../../../../../templates/Test.java -package com.rethinkdb.gen; - -import com.rethinkdb.RethinkDB; -import com.rethinkdb.gen.exc.*; -import com.rethinkdb.gen.ast.*; -import com.rethinkdb.ast.ReqlAst; -import com.rethinkdb.model.MapObject; -import com.rethinkdb.model.OptArgs; -import com.rethinkdb.net.Connection; -import com.rethinkdb.net.Cursor; -import junit.framework.TestCase; -import static org.junit.Assert.assertEquals; -import static org.junit.Assert.assertArrayEquals; -import org.slf4j.Logger; -import org.slf4j.LoggerFactory; - -import org.junit.*; -import org.junit.rules.ExpectedException; - -import java.util.Arrays; -import java.util.ArrayList; -import java.util.List; -import java.util.Map; -import java.util.Set; -import java.time.OffsetDateTime; -import java.time.ZoneOffset; -import java.time.Instant; -import java.util.stream.LongStream; -import java.util.stream.Collectors; -import java.util.stream.Stream; -import java.util.concurrent.TimeoutException; -import java.util.regex.Pattern; -import java.util.Collections; -import java.nio.charset.StandardCharsets; - -import static com.rethinkdb.TestingCommon.*; -import com.rethinkdb.TestingFramework; - -public class GeoIntersectionInclusion { - // Test intersects and includes semantics - Logger logger = LoggerFactory.getLogger(GeoIntersectionInclusion.class); - public static final RethinkDB r = RethinkDB.r; - - Connection conn; - - @Before - public void setUp() throws Exception { - logger.info("Setting up."); - conn = TestingFramework.createConnection(); - try { - r.dbCreate("test").run(conn); - r.db("test").wait_().run(conn); - }catch (Exception e){} - } - - @After - public void tearDown() throws Exception { - logger.info("Tearing down."); - r.db("rethinkdb").table("_debug_scratch").delete().run(conn); - if(!conn.isOpen()){ - conn.close(); - conn = TestingFramework.createConnection(); - } - r.dbDrop("test").run(conn); - conn.close(false); - } - - // Autogenerated tests below - - @Test(timeout=120000) - public void test() throws Exception { - - { - // geo/intersection_inclusion.yaml line #4 - /* true */ - Boolean expected_ = true; - /* r.polygon([1,1], [2,1], [2,2], [1,2]).intersects(r.point(1.5,1.5)) */ - logger.info("About to run line #4: r.polygon(r.array(1L, 1L), r.array(2L, 1L), r.array(2L, 2L), r.array(1L, 2L)).intersects(r.point(1.5, 1.5))"); - Object obtained = runOrCatch(r.polygon(r.array(1L, 1L), r.array(2L, 1L), r.array(2L, 2L), r.array(1L, 2L)).intersects(r.point(1.5, 1.5)), - new OptArgs() - ,conn); - try { - assertEquals(expected_, obtained); - logger.info("Finished running line #4"); - } catch (Throwable ae) { - logger.error("Whoops, got exception on line #4:" + ae.toString()); - if(obtained instanceof Throwable) { - ae.addSuppressed((Throwable) obtained); - } - throw ae; - } - } - - { - // geo/intersection_inclusion.yaml line #6 - /* false */ - Boolean expected_ = false; - /* r.polygon([1,1], [2,1], [2,2], [1,2]).intersects(r.point(2.5,2.5)) */ - logger.info("About to run line #6: r.polygon(r.array(1L, 1L), r.array(2L, 1L), r.array(2L, 2L), r.array(1L, 2L)).intersects(r.point(2.5, 2.5))"); - Object obtained = runOrCatch(r.polygon(r.array(1L, 1L), r.array(2L, 1L), r.array(2L, 2L), r.array(1L, 2L)).intersects(r.point(2.5, 2.5)), - new OptArgs() - ,conn); - try { - assertEquals(expected_, obtained); - logger.info("Finished running line #6"); - } catch (Throwable ae) { - logger.error("Whoops, got exception on line #6:" + ae.toString()); - if(obtained instanceof Throwable) { - ae.addSuppressed((Throwable) obtained); - } - throw ae; - } - } - - { - // geo/intersection_inclusion.yaml line #8 - /* false */ - Boolean expected_ = false; - /* r.polygon([1,1], [2,1], [2,2], [1,2]).polygon_sub(r.polygon([1.1,1.1], [1.9,1.1], [1.9,1.9], [1.1,1.9])).intersects(r.point(1.5,1.5)) */ - logger.info("About to run line #8: r.polygon(r.array(1L, 1L), r.array(2L, 1L), r.array(2L, 2L), r.array(1L, 2L)).polygonSub(r.polygon(r.array(1.1, 1.1), r.array(1.9, 1.1), r.array(1.9, 1.9), r.array(1.1, 1.9))).intersects(r.point(1.5, 1.5))"); - Object obtained = runOrCatch(r.polygon(r.array(1L, 1L), r.array(2L, 1L), r.array(2L, 2L), r.array(1L, 2L)).polygonSub(r.polygon(r.array(1.1, 1.1), r.array(1.9, 1.1), r.array(1.9, 1.9), r.array(1.1, 1.9))).intersects(r.point(1.5, 1.5)), - new OptArgs() - ,conn); - try { - assertEquals(expected_, obtained); - logger.info("Finished running line #8"); - } catch (Throwable ae) { - logger.error("Whoops, got exception on line #8:" + ae.toString()); - if(obtained instanceof Throwable) { - ae.addSuppressed((Throwable) obtained); - } - throw ae; - } - } - - { - // geo/intersection_inclusion.yaml line #10 - /* true */ - Boolean expected_ = true; - /* r.polygon([1,1], [2,1], [2,2], [1,2]).polygon_sub(r.polygon([1.1,1.1], [1.9,1.1], [1.9,1.9], [1.1,1.9])).intersects(r.point(1.05,1.05)) */ - logger.info("About to run line #10: r.polygon(r.array(1L, 1L), r.array(2L, 1L), r.array(2L, 2L), r.array(1L, 2L)).polygonSub(r.polygon(r.array(1.1, 1.1), r.array(1.9, 1.1), r.array(1.9, 1.9), r.array(1.1, 1.9))).intersects(r.point(1.05, 1.05))"); - Object obtained = runOrCatch(r.polygon(r.array(1L, 1L), r.array(2L, 1L), r.array(2L, 2L), r.array(1L, 2L)).polygonSub(r.polygon(r.array(1.1, 1.1), r.array(1.9, 1.1), r.array(1.9, 1.9), r.array(1.1, 1.9))).intersects(r.point(1.05, 1.05)), - new OptArgs() - ,conn); - try { - assertEquals(expected_, obtained); - logger.info("Finished running line #10"); - } catch (Throwable ae) { - logger.error("Whoops, got exception on line #10:" + ae.toString()); - if(obtained instanceof Throwable) { - ae.addSuppressed((Throwable) obtained); - } - throw ae; - } - } - - { - // geo/intersection_inclusion.yaml line #13 - /* true */ - Boolean expected_ = true; - /* r.polygon([1,1], [2,1], [2,2], [1,2]).intersects(r.point(2,2)) */ - logger.info("About to run line #13: r.polygon(r.array(1L, 1L), r.array(2L, 1L), r.array(2L, 2L), r.array(1L, 2L)).intersects(r.point(2L, 2L))"); - Object obtained = runOrCatch(r.polygon(r.array(1L, 1L), r.array(2L, 1L), r.array(2L, 2L), r.array(1L, 2L)).intersects(r.point(2L, 2L)), - new OptArgs() - ,conn); - try { - assertEquals(expected_, obtained); - logger.info("Finished running line #13"); - } catch (Throwable ae) { - logger.error("Whoops, got exception on line #13:" + ae.toString()); - if(obtained instanceof Throwable) { - ae.addSuppressed((Throwable) obtained); - } - throw ae; - } - } - - { - // geo/intersection_inclusion.yaml line #15 - /* true */ - Boolean expected_ = true; - /* r.polygon([1,1], [2,1], [2,2], [1,2]).intersects(r.point(2,1.5)) */ - logger.info("About to run line #15: r.polygon(r.array(1L, 1L), r.array(2L, 1L), r.array(2L, 2L), r.array(1L, 2L)).intersects(r.point(2L, 1.5))"); - Object obtained = runOrCatch(r.polygon(r.array(1L, 1L), r.array(2L, 1L), r.array(2L, 2L), r.array(1L, 2L)).intersects(r.point(2L, 1.5)), - new OptArgs() - ,conn); - try { - assertEquals(expected_, obtained); - logger.info("Finished running line #15"); - } catch (Throwable ae) { - logger.error("Whoops, got exception on line #15:" + ae.toString()); - if(obtained instanceof Throwable) { - ae.addSuppressed((Throwable) obtained); - } - throw ae; - } - } - - { - // geo/intersection_inclusion.yaml line #17 - /* true */ - Boolean expected_ = true; - /* r.polygon([1,1], [2,1], [2,2], [1,2]).intersects(r.line([1.5,1.5], [2,2])) */ - logger.info("About to run line #17: r.polygon(r.array(1L, 1L), r.array(2L, 1L), r.array(2L, 2L), r.array(1L, 2L)).intersects(r.line(r.array(1.5, 1.5), r.array(2L, 2L)))"); - Object obtained = runOrCatch(r.polygon(r.array(1L, 1L), r.array(2L, 1L), r.array(2L, 2L), r.array(1L, 2L)).intersects(r.line(r.array(1.5, 1.5), r.array(2L, 2L))), - new OptArgs() - ,conn); - try { - assertEquals(expected_, obtained); - logger.info("Finished running line #17"); - } catch (Throwable ae) { - logger.error("Whoops, got exception on line #17:" + ae.toString()); - if(obtained instanceof Throwable) { - ae.addSuppressed((Throwable) obtained); - } - throw ae; - } - } - - { - // geo/intersection_inclusion.yaml line #19 - /* true */ - Boolean expected_ = true; - /* r.polygon([1,1], [2,1], [2,2], [1,2]).intersects(r.line([1.5,1.5], [2,1.5])) */ - logger.info("About to run line #19: r.polygon(r.array(1L, 1L), r.array(2L, 1L), r.array(2L, 2L), r.array(1L, 2L)).intersects(r.line(r.array(1.5, 1.5), r.array(2L, 1.5)))"); - Object obtained = runOrCatch(r.polygon(r.array(1L, 1L), r.array(2L, 1L), r.array(2L, 2L), r.array(1L, 2L)).intersects(r.line(r.array(1.5, 1.5), r.array(2L, 1.5))), - new OptArgs() - ,conn); - try { - assertEquals(expected_, obtained); - logger.info("Finished running line #19"); - } catch (Throwable ae) { - logger.error("Whoops, got exception on line #19:" + ae.toString()); - if(obtained instanceof Throwable) { - ae.addSuppressed((Throwable) obtained); - } - throw ae; - } - } - - { - // geo/intersection_inclusion.yaml line #22 - /* true */ - Boolean expected_ = true; - /* r.polygon([1,1], [2,1], [2,2], [1,2]).polygon_sub(r.polygon([1.1,1.1], [1.9,1.1], [1.9,1.9], [1.1,1.9])).intersects(r.point(1.1,1.1)) */ - logger.info("About to run line #22: r.polygon(r.array(1L, 1L), r.array(2L, 1L), r.array(2L, 2L), r.array(1L, 2L)).polygonSub(r.polygon(r.array(1.1, 1.1), r.array(1.9, 1.1), r.array(1.9, 1.9), r.array(1.1, 1.9))).intersects(r.point(1.1, 1.1))"); - Object obtained = runOrCatch(r.polygon(r.array(1L, 1L), r.array(2L, 1L), r.array(2L, 2L), r.array(1L, 2L)).polygonSub(r.polygon(r.array(1.1, 1.1), r.array(1.9, 1.1), r.array(1.9, 1.9), r.array(1.1, 1.9))).intersects(r.point(1.1, 1.1)), - new OptArgs() - ,conn); - try { - assertEquals(expected_, obtained); - logger.info("Finished running line #22"); - } catch (Throwable ae) { - logger.error("Whoops, got exception on line #22:" + ae.toString()); - if(obtained instanceof Throwable) { - ae.addSuppressed((Throwable) obtained); - } - throw ae; - } - } - - { - // geo/intersection_inclusion.yaml line #24 - /* true */ - Boolean expected_ = true; - /* r.polygon([1,1], [2,1], [2,2], [1,2]).polygon_sub(r.polygon([1.1,1.1], [1.9,1.1], [1.9,1.9], [1.1,1.9])).intersects(r.point(1.5,1.1)) */ - logger.info("About to run line #24: r.polygon(r.array(1L, 1L), r.array(2L, 1L), r.array(2L, 2L), r.array(1L, 2L)).polygonSub(r.polygon(r.array(1.1, 1.1), r.array(1.9, 1.1), r.array(1.9, 1.9), r.array(1.1, 1.9))).intersects(r.point(1.5, 1.1))"); - Object obtained = runOrCatch(r.polygon(r.array(1L, 1L), r.array(2L, 1L), r.array(2L, 2L), r.array(1L, 2L)).polygonSub(r.polygon(r.array(1.1, 1.1), r.array(1.9, 1.1), r.array(1.9, 1.9), r.array(1.1, 1.9))).intersects(r.point(1.5, 1.1)), - new OptArgs() - ,conn); - try { - assertEquals(expected_, obtained); - logger.info("Finished running line #24"); - } catch (Throwable ae) { - logger.error("Whoops, got exception on line #24:" + ae.toString()); - if(obtained instanceof Throwable) { - ae.addSuppressed((Throwable) obtained); - } - throw ae; - } - } - - { - // geo/intersection_inclusion.yaml line #27 - /* false */ - Boolean expected_ = false; - /* r.polygon([1,1], [2,1], [2,2], [1,2]).intersects(r.line([2,2], [3,3])) */ - logger.info("About to run line #27: r.polygon(r.array(1L, 1L), r.array(2L, 1L), r.array(2L, 2L), r.array(1L, 2L)).intersects(r.line(r.array(2L, 2L), r.array(3L, 3L)))"); - Object obtained = runOrCatch(r.polygon(r.array(1L, 1L), r.array(2L, 1L), r.array(2L, 2L), r.array(1L, 2L)).intersects(r.line(r.array(2L, 2L), r.array(3L, 3L))), - new OptArgs() - ,conn); - try { - assertEquals(expected_, obtained); - logger.info("Finished running line #27"); - } catch (Throwable ae) { - logger.error("Whoops, got exception on line #27:" + ae.toString()); - if(obtained instanceof Throwable) { - ae.addSuppressed((Throwable) obtained); - } - throw ae; - } - } - - { - // geo/intersection_inclusion.yaml line #29 - /* false */ - Boolean expected_ = false; - /* r.polygon([1,1], [2,1], [2,2], [1,2]).intersects(r.line([2,1.5], [3,3])) */ - logger.info("About to run line #29: r.polygon(r.array(1L, 1L), r.array(2L, 1L), r.array(2L, 2L), r.array(1L, 2L)).intersects(r.line(r.array(2L, 1.5), r.array(3L, 3L)))"); - Object obtained = runOrCatch(r.polygon(r.array(1L, 1L), r.array(2L, 1L), r.array(2L, 2L), r.array(1L, 2L)).intersects(r.line(r.array(2L, 1.5), r.array(3L, 3L))), - new OptArgs() - ,conn); - try { - assertEquals(expected_, obtained); - logger.info("Finished running line #29"); - } catch (Throwable ae) { - logger.error("Whoops, got exception on line #29:" + ae.toString()); - if(obtained instanceof Throwable) { - ae.addSuppressed((Throwable) obtained); - } - throw ae; - } - } - - { - // geo/intersection_inclusion.yaml line #31 - /* true */ - Boolean expected_ = true; - /* r.polygon([1,1], [2,1], [2,2], [1,2]).intersects(r.line([1.5,1.5], [3,3])) */ - logger.info("About to run line #31: r.polygon(r.array(1L, 1L), r.array(2L, 1L), r.array(2L, 2L), r.array(1L, 2L)).intersects(r.line(r.array(1.5, 1.5), r.array(3L, 3L)))"); - Object obtained = runOrCatch(r.polygon(r.array(1L, 1L), r.array(2L, 1L), r.array(2L, 2L), r.array(1L, 2L)).intersects(r.line(r.array(1.5, 1.5), r.array(3L, 3L))), - new OptArgs() - ,conn); - try { - assertEquals(expected_, obtained); - logger.info("Finished running line #31"); - } catch (Throwable ae) { - logger.error("Whoops, got exception on line #31:" + ae.toString()); - if(obtained instanceof Throwable) { - ae.addSuppressed((Throwable) obtained); - } - throw ae; - } - } - - { - // geo/intersection_inclusion.yaml line #33 - /* true */ - Boolean expected_ = true; - /* r.polygon([1,1], [2,1], [2,2], [1,2]).intersects(r.polygon([1.2,1.2], [1.8,1.2], [1.8,1.8], [1.2,1.8])) */ - logger.info("About to run line #33: r.polygon(r.array(1L, 1L), r.array(2L, 1L), r.array(2L, 2L), r.array(1L, 2L)).intersects(r.polygon(r.array(1.2, 1.2), r.array(1.8, 1.2), r.array(1.8, 1.8), r.array(1.2, 1.8)))"); - Object obtained = runOrCatch(r.polygon(r.array(1L, 1L), r.array(2L, 1L), r.array(2L, 2L), r.array(1L, 2L)).intersects(r.polygon(r.array(1.2, 1.2), r.array(1.8, 1.2), r.array(1.8, 1.8), r.array(1.2, 1.8))), - new OptArgs() - ,conn); - try { - assertEquals(expected_, obtained); - logger.info("Finished running line #33"); - } catch (Throwable ae) { - logger.error("Whoops, got exception on line #33:" + ae.toString()); - if(obtained instanceof Throwable) { - ae.addSuppressed((Throwable) obtained); - } - throw ae; - } - } - - { - // geo/intersection_inclusion.yaml line #35 - /* true */ - Boolean expected_ = true; - /* r.polygon([1,1], [2,1], [2,2], [1,2]).intersects(r.polygon([1.5,1.5], [2.5,1.5], [2.5,2.5], [1.5,2.5])) */ - logger.info("About to run line #35: r.polygon(r.array(1L, 1L), r.array(2L, 1L), r.array(2L, 2L), r.array(1L, 2L)).intersects(r.polygon(r.array(1.5, 1.5), r.array(2.5, 1.5), r.array(2.5, 2.5), r.array(1.5, 2.5)))"); - Object obtained = runOrCatch(r.polygon(r.array(1L, 1L), r.array(2L, 1L), r.array(2L, 2L), r.array(1L, 2L)).intersects(r.polygon(r.array(1.5, 1.5), r.array(2.5, 1.5), r.array(2.5, 2.5), r.array(1.5, 2.5))), - new OptArgs() - ,conn); - try { - assertEquals(expected_, obtained); - logger.info("Finished running line #35"); - } catch (Throwable ae) { - logger.error("Whoops, got exception on line #35:" + ae.toString()); - if(obtained instanceof Throwable) { - ae.addSuppressed((Throwable) obtained); - } - throw ae; - } - } - - { - // geo/intersection_inclusion.yaml line #37 - /* false */ - Boolean expected_ = false; - /* r.polygon([1,1], [2,1], [2,2], [1,2]).polygon_sub(r.polygon([1.1,1.1], [1.9,1.1], [1.9,1.9], [1.1,1.9])).intersects(r.polygon([1.2,1.2], [1.8,1.2], [1.8,1.8], [1.2,1.8])) */ - logger.info("About to run line #37: r.polygon(r.array(1L, 1L), r.array(2L, 1L), r.array(2L, 2L), r.array(1L, 2L)).polygonSub(r.polygon(r.array(1.1, 1.1), r.array(1.9, 1.1), r.array(1.9, 1.9), r.array(1.1, 1.9))).intersects(r.polygon(r.array(1.2, 1.2), r.array(1.8, 1.2), r.array(1.8, 1.8), r.array(1.2, 1.8)))"); - Object obtained = runOrCatch(r.polygon(r.array(1L, 1L), r.array(2L, 1L), r.array(2L, 2L), r.array(1L, 2L)).polygonSub(r.polygon(r.array(1.1, 1.1), r.array(1.9, 1.1), r.array(1.9, 1.9), r.array(1.1, 1.9))).intersects(r.polygon(r.array(1.2, 1.2), r.array(1.8, 1.2), r.array(1.8, 1.8), r.array(1.2, 1.8))), - new OptArgs() - ,conn); - try { - assertEquals(expected_, obtained); - logger.info("Finished running line #37"); - } catch (Throwable ae) { - logger.error("Whoops, got exception on line #37:" + ae.toString()); - if(obtained instanceof Throwable) { - ae.addSuppressed((Throwable) obtained); - } - throw ae; - } - } - - { - // geo/intersection_inclusion.yaml line #39 - /* false */ - Boolean expected_ = false; - /* r.polygon([1,1], [2,1], [2,2], [1,2]).polygon_sub(r.polygon([1.1,1.1], [1.9,1.1], [1.9,1.9], [1.1,1.9])).intersects(r.polygon([1.1,1.1], [1.9,1.1], [1.9,1.9], [1.1,1.9])) */ - logger.info("About to run line #39: r.polygon(r.array(1L, 1L), r.array(2L, 1L), r.array(2L, 2L), r.array(1L, 2L)).polygonSub(r.polygon(r.array(1.1, 1.1), r.array(1.9, 1.1), r.array(1.9, 1.9), r.array(1.1, 1.9))).intersects(r.polygon(r.array(1.1, 1.1), r.array(1.9, 1.1), r.array(1.9, 1.9), r.array(1.1, 1.9)))"); - Object obtained = runOrCatch(r.polygon(r.array(1L, 1L), r.array(2L, 1L), r.array(2L, 2L), r.array(1L, 2L)).polygonSub(r.polygon(r.array(1.1, 1.1), r.array(1.9, 1.1), r.array(1.9, 1.9), r.array(1.1, 1.9))).intersects(r.polygon(r.array(1.1, 1.1), r.array(1.9, 1.1), r.array(1.9, 1.9), r.array(1.1, 1.9))), - new OptArgs() - ,conn); - try { - assertEquals(expected_, obtained); - logger.info("Finished running line #39"); - } catch (Throwable ae) { - logger.error("Whoops, got exception on line #39:" + ae.toString()); - if(obtained instanceof Throwable) { - ae.addSuppressed((Throwable) obtained); - } - throw ae; - } - } - - { - // geo/intersection_inclusion.yaml line #42 - /* true */ - Boolean expected_ = true; - /* r.polygon([1,1], [2,1], [2,2], [1,2]).intersects(r.polygon([2,1.1], [3,1.1], [3,1.9], [2,1.9])) */ - logger.info("About to run line #42: r.polygon(r.array(1L, 1L), r.array(2L, 1L), r.array(2L, 2L), r.array(1L, 2L)).intersects(r.polygon(r.array(2L, 1.1), r.array(3L, 1.1), r.array(3L, 1.9), r.array(2L, 1.9)))"); - Object obtained = runOrCatch(r.polygon(r.array(1L, 1L), r.array(2L, 1L), r.array(2L, 2L), r.array(1L, 2L)).intersects(r.polygon(r.array(2L, 1.1), r.array(3L, 1.1), r.array(3L, 1.9), r.array(2L, 1.9))), - new OptArgs() - ,conn); - try { - assertEquals(expected_, obtained); - logger.info("Finished running line #42"); - } catch (Throwable ae) { - logger.error("Whoops, got exception on line #42:" + ae.toString()); - if(obtained instanceof Throwable) { - ae.addSuppressed((Throwable) obtained); - } - throw ae; - } - } - - { - // geo/intersection_inclusion.yaml line #44 - /* false */ - Boolean expected_ = false; - /* r.polygon([1,1], [2,1], [2,2], [1,2]).intersects(r.polygon([2,2], [3,2], [3,3], [2,3])) */ - logger.info("About to run line #44: r.polygon(r.array(1L, 1L), r.array(2L, 1L), r.array(2L, 2L), r.array(1L, 2L)).intersects(r.polygon(r.array(2L, 2L), r.array(3L, 2L), r.array(3L, 3L), r.array(2L, 3L)))"); - Object obtained = runOrCatch(r.polygon(r.array(1L, 1L), r.array(2L, 1L), r.array(2L, 2L), r.array(1L, 2L)).intersects(r.polygon(r.array(2L, 2L), r.array(3L, 2L), r.array(3L, 3L), r.array(2L, 3L))), - new OptArgs() - ,conn); - try { - assertEquals(expected_, obtained); - logger.info("Finished running line #44"); - } catch (Throwable ae) { - logger.error("Whoops, got exception on line #44:" + ae.toString()); - if(obtained instanceof Throwable) { - ae.addSuppressed((Throwable) obtained); - } - throw ae; - } - } - - { - // geo/intersection_inclusion.yaml line #46 - /* false */ - Boolean expected_ = false; - /* r.point(1,1).intersects(r.point(1.5,1.5)) */ - logger.info("About to run line #46: r.point(1L, 1L).intersects(r.point(1.5, 1.5))"); - Object obtained = runOrCatch(r.point(1L, 1L).intersects(r.point(1.5, 1.5)), - new OptArgs() - ,conn); - try { - assertEquals(expected_, obtained); - logger.info("Finished running line #46"); - } catch (Throwable ae) { - logger.error("Whoops, got exception on line #46:" + ae.toString()); - if(obtained instanceof Throwable) { - ae.addSuppressed((Throwable) obtained); - } - throw ae; - } - } - - { - // geo/intersection_inclusion.yaml line #48 - /* true */ - Boolean expected_ = true; - /* r.point(1,1).intersects(r.point(1,1)) */ - logger.info("About to run line #48: r.point(1L, 1L).intersects(r.point(1L, 1L))"); - Object obtained = runOrCatch(r.point(1L, 1L).intersects(r.point(1L, 1L)), - new OptArgs() - ,conn); - try { - assertEquals(expected_, obtained); - logger.info("Finished running line #48"); - } catch (Throwable ae) { - logger.error("Whoops, got exception on line #48:" + ae.toString()); - if(obtained instanceof Throwable) { - ae.addSuppressed((Throwable) obtained); - } - throw ae; - } - } - - { - // geo/intersection_inclusion.yaml line #50 - /* true */ - Boolean expected_ = true; - /* r.line([1,1], [2,1]).intersects(r.point(1,1)) */ - logger.info("About to run line #50: r.line(r.array(1L, 1L), r.array(2L, 1L)).intersects(r.point(1L, 1L))"); - Object obtained = runOrCatch(r.line(r.array(1L, 1L), r.array(2L, 1L)).intersects(r.point(1L, 1L)), - new OptArgs() - ,conn); - try { - assertEquals(expected_, obtained); - logger.info("Finished running line #50"); - } catch (Throwable ae) { - logger.error("Whoops, got exception on line #50:" + ae.toString()); - if(obtained instanceof Throwable) { - ae.addSuppressed((Throwable) obtained); - } - throw ae; - } - } - - { - // geo/intersection_inclusion.yaml line #55 - /* true */ - Boolean expected_ = true; - /* r.line([1,1], [1,2]).intersects(r.point(1,1.8)) */ - logger.info("About to run line #55: r.line(r.array(1L, 1L), r.array(1L, 2L)).intersects(r.point(1L, 1.8))"); - Object obtained = runOrCatch(r.line(r.array(1L, 1L), r.array(1L, 2L)).intersects(r.point(1L, 1.8)), - new OptArgs() - ,conn); - try { - assertEquals(expected_, obtained); - logger.info("Finished running line #55"); - } catch (Throwable ae) { - logger.error("Whoops, got exception on line #55:" + ae.toString()); - if(obtained instanceof Throwable) { - ae.addSuppressed((Throwable) obtained); - } - throw ae; - } - } - - { - // geo/intersection_inclusion.yaml line #57 - /* true */ - Boolean expected_ = true; - /* r.line([1,0], [2,0]).intersects(r.point(1.8,0)) */ - logger.info("About to run line #57: r.line(r.array(1L, 0L), r.array(2L, 0L)).intersects(r.point(1.8, 0L))"); - Object obtained = runOrCatch(r.line(r.array(1L, 0L), r.array(2L, 0L)).intersects(r.point(1.8, 0L)), - new OptArgs() - ,conn); - try { - assertEquals(expected_, obtained); - logger.info("Finished running line #57"); - } catch (Throwable ae) { - logger.error("Whoops, got exception on line #57:" + ae.toString()); - if(obtained instanceof Throwable) { - ae.addSuppressed((Throwable) obtained); - } - throw ae; - } - } - - { - // geo/intersection_inclusion.yaml line #59 - /* false */ - Boolean expected_ = false; - /* r.line([1,1], [2,1]).intersects(r.point(1.5,1.5)) */ - logger.info("About to run line #59: r.line(r.array(1L, 1L), r.array(2L, 1L)).intersects(r.point(1.5, 1.5))"); - Object obtained = runOrCatch(r.line(r.array(1L, 1L), r.array(2L, 1L)).intersects(r.point(1.5, 1.5)), - new OptArgs() - ,conn); - try { - assertEquals(expected_, obtained); - logger.info("Finished running line #59"); - } catch (Throwable ae) { - logger.error("Whoops, got exception on line #59:" + ae.toString()); - if(obtained instanceof Throwable) { - ae.addSuppressed((Throwable) obtained); - } - throw ae; - } - } - - { - // geo/intersection_inclusion.yaml line #61 - /* true */ - Boolean expected_ = true; - /* r.line([1,1], [2,1]).intersects(r.line([2,1], [3,1])) */ - logger.info("About to run line #61: r.line(r.array(1L, 1L), r.array(2L, 1L)).intersects(r.line(r.array(2L, 1L), r.array(3L, 1L)))"); - Object obtained = runOrCatch(r.line(r.array(1L, 1L), r.array(2L, 1L)).intersects(r.line(r.array(2L, 1L), r.array(3L, 1L))), - new OptArgs() - ,conn); - try { - assertEquals(expected_, obtained); - logger.info("Finished running line #61"); - } catch (Throwable ae) { - logger.error("Whoops, got exception on line #61:" + ae.toString()); - if(obtained instanceof Throwable) { - ae.addSuppressed((Throwable) obtained); - } - throw ae; - } - } - - { - // geo/intersection_inclusion.yaml line #64 - /* 2 */ - Long expected_ = 2L; - /* r.expr([r.point(1, 0), r.point(3,0), r.point(2, 0)]).intersects(r.line([0,0], [2, 0])).count() */ - logger.info("About to run line #64: r.expr(r.array(r.point(1L, 0L), r.point(3L, 0L), r.point(2L, 0L))).intersects(r.line(r.array(0L, 0L), r.array(2L, 0L))).count()"); - Object obtained = runOrCatch(r.expr(r.array(r.point(1L, 0L), r.point(3L, 0L), r.point(2L, 0L))).intersects(r.line(r.array(0L, 0L), r.array(2L, 0L))).count(), - new OptArgs() - ,conn); - try { - assertEquals(expected_, obtained); - logger.info("Finished running line #64"); - } catch (Throwable ae) { - logger.error("Whoops, got exception on line #64:" + ae.toString()); - if(obtained instanceof Throwable) { - ae.addSuppressed((Throwable) obtained); - } - throw ae; - } - } - - { - // geo/intersection_inclusion.yaml line #68 - /* true */ - Boolean expected_ = true; - /* r.polygon([1,1], [2,1], [2,2], [1,2]).includes(r.point(1.5,1.5)) */ - logger.info("About to run line #68: r.polygon(r.array(1L, 1L), r.array(2L, 1L), r.array(2L, 2L), r.array(1L, 2L)).includes(r.point(1.5, 1.5))"); - Object obtained = runOrCatch(r.polygon(r.array(1L, 1L), r.array(2L, 1L), r.array(2L, 2L), r.array(1L, 2L)).includes(r.point(1.5, 1.5)), - new OptArgs() - ,conn); - try { - assertEquals(expected_, obtained); - logger.info("Finished running line #68"); - } catch (Throwable ae) { - logger.error("Whoops, got exception on line #68:" + ae.toString()); - if(obtained instanceof Throwable) { - ae.addSuppressed((Throwable) obtained); - } - throw ae; - } - } - - { - // geo/intersection_inclusion.yaml line #70 - /* false */ - Boolean expected_ = false; - /* r.polygon([1,1], [2,1], [2,2], [1,2]).includes(r.point(2.5,2.5)) */ - logger.info("About to run line #70: r.polygon(r.array(1L, 1L), r.array(2L, 1L), r.array(2L, 2L), r.array(1L, 2L)).includes(r.point(2.5, 2.5))"); - Object obtained = runOrCatch(r.polygon(r.array(1L, 1L), r.array(2L, 1L), r.array(2L, 2L), r.array(1L, 2L)).includes(r.point(2.5, 2.5)), - new OptArgs() - ,conn); - try { - assertEquals(expected_, obtained); - logger.info("Finished running line #70"); - } catch (Throwable ae) { - logger.error("Whoops, got exception on line #70:" + ae.toString()); - if(obtained instanceof Throwable) { - ae.addSuppressed((Throwable) obtained); - } - throw ae; - } - } - - { - // geo/intersection_inclusion.yaml line #72 - /* false */ - Boolean expected_ = false; - /* r.polygon([1,1], [2,1], [2,2], [1,2]).polygon_sub(r.polygon([1.1,1.1], [1.9,1.1], [1.9,1.9], [1.1,1.9])).includes(r.point(1.5,1.5)) */ - logger.info("About to run line #72: r.polygon(r.array(1L, 1L), r.array(2L, 1L), r.array(2L, 2L), r.array(1L, 2L)).polygonSub(r.polygon(r.array(1.1, 1.1), r.array(1.9, 1.1), r.array(1.9, 1.9), r.array(1.1, 1.9))).includes(r.point(1.5, 1.5))"); - Object obtained = runOrCatch(r.polygon(r.array(1L, 1L), r.array(2L, 1L), r.array(2L, 2L), r.array(1L, 2L)).polygonSub(r.polygon(r.array(1.1, 1.1), r.array(1.9, 1.1), r.array(1.9, 1.9), r.array(1.1, 1.9))).includes(r.point(1.5, 1.5)), - new OptArgs() - ,conn); - try { - assertEquals(expected_, obtained); - logger.info("Finished running line #72"); - } catch (Throwable ae) { - logger.error("Whoops, got exception on line #72:" + ae.toString()); - if(obtained instanceof Throwable) { - ae.addSuppressed((Throwable) obtained); - } - throw ae; - } - } - - { - // geo/intersection_inclusion.yaml line #74 - /* true */ - Boolean expected_ = true; - /* r.polygon([1,1], [2,1], [2,2], [1,2]).polygon_sub(r.polygon([1.1,1.1], [1.9,1.1], [1.9,1.9], [1.1,1.9])).includes(r.point(1.05,1.05)) */ - logger.info("About to run line #74: r.polygon(r.array(1L, 1L), r.array(2L, 1L), r.array(2L, 2L), r.array(1L, 2L)).polygonSub(r.polygon(r.array(1.1, 1.1), r.array(1.9, 1.1), r.array(1.9, 1.9), r.array(1.1, 1.9))).includes(r.point(1.05, 1.05))"); - Object obtained = runOrCatch(r.polygon(r.array(1L, 1L), r.array(2L, 1L), r.array(2L, 2L), r.array(1L, 2L)).polygonSub(r.polygon(r.array(1.1, 1.1), r.array(1.9, 1.1), r.array(1.9, 1.9), r.array(1.1, 1.9))).includes(r.point(1.05, 1.05)), - new OptArgs() - ,conn); - try { - assertEquals(expected_, obtained); - logger.info("Finished running line #74"); - } catch (Throwable ae) { - logger.error("Whoops, got exception on line #74:" + ae.toString()); - if(obtained instanceof Throwable) { - ae.addSuppressed((Throwable) obtained); - } - throw ae; - } - } - - { - // geo/intersection_inclusion.yaml line #76 - /* true */ - Boolean expected_ = true; - /* r.polygon([1,1], [2,1], [2,2], [1,2]).includes(r.point(2,2)) */ - logger.info("About to run line #76: r.polygon(r.array(1L, 1L), r.array(2L, 1L), r.array(2L, 2L), r.array(1L, 2L)).includes(r.point(2L, 2L))"); - Object obtained = runOrCatch(r.polygon(r.array(1L, 1L), r.array(2L, 1L), r.array(2L, 2L), r.array(1L, 2L)).includes(r.point(2L, 2L)), - new OptArgs() - ,conn); - try { - assertEquals(expected_, obtained); - logger.info("Finished running line #76"); - } catch (Throwable ae) { - logger.error("Whoops, got exception on line #76:" + ae.toString()); - if(obtained instanceof Throwable) { - ae.addSuppressed((Throwable) obtained); - } - throw ae; - } - } - - { - // geo/intersection_inclusion.yaml line #78 - /* true */ - Boolean expected_ = true; - /* r.polygon([1,1], [2,1], [2,2], [1,2]).includes(r.point(2,1.5)) */ - logger.info("About to run line #78: r.polygon(r.array(1L, 1L), r.array(2L, 1L), r.array(2L, 2L), r.array(1L, 2L)).includes(r.point(2L, 1.5))"); - Object obtained = runOrCatch(r.polygon(r.array(1L, 1L), r.array(2L, 1L), r.array(2L, 2L), r.array(1L, 2L)).includes(r.point(2L, 1.5)), - new OptArgs() - ,conn); - try { - assertEquals(expected_, obtained); - logger.info("Finished running line #78"); - } catch (Throwable ae) { - logger.error("Whoops, got exception on line #78:" + ae.toString()); - if(obtained instanceof Throwable) { - ae.addSuppressed((Throwable) obtained); - } - throw ae; - } - } - - { - // geo/intersection_inclusion.yaml line #80 - /* true */ - Boolean expected_ = true; - /* r.polygon([1,1], [2,1], [2,2], [1,2]).includes(r.line([1.5,1.5], [2,2])) */ - logger.info("About to run line #80: r.polygon(r.array(1L, 1L), r.array(2L, 1L), r.array(2L, 2L), r.array(1L, 2L)).includes(r.line(r.array(1.5, 1.5), r.array(2L, 2L)))"); - Object obtained = runOrCatch(r.polygon(r.array(1L, 1L), r.array(2L, 1L), r.array(2L, 2L), r.array(1L, 2L)).includes(r.line(r.array(1.5, 1.5), r.array(2L, 2L))), - new OptArgs() - ,conn); - try { - assertEquals(expected_, obtained); - logger.info("Finished running line #80"); - } catch (Throwable ae) { - logger.error("Whoops, got exception on line #80:" + ae.toString()); - if(obtained instanceof Throwable) { - ae.addSuppressed((Throwable) obtained); - } - throw ae; - } - } - - { - // geo/intersection_inclusion.yaml line #82 - /* true */ - Boolean expected_ = true; - /* r.polygon([1,1], [2,1], [2,2], [1,2]).includes(r.line([1.5,1.5], [2,1.5])) */ - logger.info("About to run line #82: r.polygon(r.array(1L, 1L), r.array(2L, 1L), r.array(2L, 2L), r.array(1L, 2L)).includes(r.line(r.array(1.5, 1.5), r.array(2L, 1.5)))"); - Object obtained = runOrCatch(r.polygon(r.array(1L, 1L), r.array(2L, 1L), r.array(2L, 2L), r.array(1L, 2L)).includes(r.line(r.array(1.5, 1.5), r.array(2L, 1.5))), - new OptArgs() - ,conn); - try { - assertEquals(expected_, obtained); - logger.info("Finished running line #82"); - } catch (Throwable ae) { - logger.error("Whoops, got exception on line #82:" + ae.toString()); - if(obtained instanceof Throwable) { - ae.addSuppressed((Throwable) obtained); - } - throw ae; - } - } - - { - // geo/intersection_inclusion.yaml line #84 - /* true */ - Boolean expected_ = true; - /* r.polygon([1,1], [2,1], [2,2], [1,2]).polygon_sub(r.polygon([1.1,1.1], [1.9,1.1], [1.9,1.9], [1.1,1.9])).includes(r.point(1.1,1.1)) */ - logger.info("About to run line #84: r.polygon(r.array(1L, 1L), r.array(2L, 1L), r.array(2L, 2L), r.array(1L, 2L)).polygonSub(r.polygon(r.array(1.1, 1.1), r.array(1.9, 1.1), r.array(1.9, 1.9), r.array(1.1, 1.9))).includes(r.point(1.1, 1.1))"); - Object obtained = runOrCatch(r.polygon(r.array(1L, 1L), r.array(2L, 1L), r.array(2L, 2L), r.array(1L, 2L)).polygonSub(r.polygon(r.array(1.1, 1.1), r.array(1.9, 1.1), r.array(1.9, 1.9), r.array(1.1, 1.9))).includes(r.point(1.1, 1.1)), - new OptArgs() - ,conn); - try { - assertEquals(expected_, obtained); - logger.info("Finished running line #84"); - } catch (Throwable ae) { - logger.error("Whoops, got exception on line #84:" + ae.toString()); - if(obtained instanceof Throwable) { - ae.addSuppressed((Throwable) obtained); - } - throw ae; - } - } - - { - // geo/intersection_inclusion.yaml line #86 - /* true */ - Boolean expected_ = true; - /* r.polygon([1,1], [2,1], [2,2], [1,2]).polygon_sub(r.polygon([1.1,1.1], [1.9,1.1], [1.9,1.9], [1.1,1.9])).includes(r.point(1.5,1.1)) */ - logger.info("About to run line #86: r.polygon(r.array(1L, 1L), r.array(2L, 1L), r.array(2L, 2L), r.array(1L, 2L)).polygonSub(r.polygon(r.array(1.1, 1.1), r.array(1.9, 1.1), r.array(1.9, 1.9), r.array(1.1, 1.9))).includes(r.point(1.5, 1.1))"); - Object obtained = runOrCatch(r.polygon(r.array(1L, 1L), r.array(2L, 1L), r.array(2L, 2L), r.array(1L, 2L)).polygonSub(r.polygon(r.array(1.1, 1.1), r.array(1.9, 1.1), r.array(1.9, 1.9), r.array(1.1, 1.9))).includes(r.point(1.5, 1.1)), - new OptArgs() - ,conn); - try { - assertEquals(expected_, obtained); - logger.info("Finished running line #86"); - } catch (Throwable ae) { - logger.error("Whoops, got exception on line #86:" + ae.toString()); - if(obtained instanceof Throwable) { - ae.addSuppressed((Throwable) obtained); - } - throw ae; - } - } - - { - // geo/intersection_inclusion.yaml line #88 - /* false */ - Boolean expected_ = false; - /* r.polygon([1,1], [2,1], [2,2], [1,2]).includes(r.line([2,2], [3,3])) */ - logger.info("About to run line #88: r.polygon(r.array(1L, 1L), r.array(2L, 1L), r.array(2L, 2L), r.array(1L, 2L)).includes(r.line(r.array(2L, 2L), r.array(3L, 3L)))"); - Object obtained = runOrCatch(r.polygon(r.array(1L, 1L), r.array(2L, 1L), r.array(2L, 2L), r.array(1L, 2L)).includes(r.line(r.array(2L, 2L), r.array(3L, 3L))), - new OptArgs() - ,conn); - try { - assertEquals(expected_, obtained); - logger.info("Finished running line #88"); - } catch (Throwable ae) { - logger.error("Whoops, got exception on line #88:" + ae.toString()); - if(obtained instanceof Throwable) { - ae.addSuppressed((Throwable) obtained); - } - throw ae; - } - } - - { - // geo/intersection_inclusion.yaml line #90 - /* true */ - Boolean expected_ = true; - /* r.polygon([1,1], [2,1], [2,2], [1,2]).includes(r.line([2,1.5], [2,2])) */ - logger.info("About to run line #90: r.polygon(r.array(1L, 1L), r.array(2L, 1L), r.array(2L, 2L), r.array(1L, 2L)).includes(r.line(r.array(2L, 1.5), r.array(2L, 2L)))"); - Object obtained = runOrCatch(r.polygon(r.array(1L, 1L), r.array(2L, 1L), r.array(2L, 2L), r.array(1L, 2L)).includes(r.line(r.array(2L, 1.5), r.array(2L, 2L))), - new OptArgs() - ,conn); - try { - assertEquals(expected_, obtained); - logger.info("Finished running line #90"); - } catch (Throwable ae) { - logger.error("Whoops, got exception on line #90:" + ae.toString()); - if(obtained instanceof Throwable) { - ae.addSuppressed((Throwable) obtained); - } - throw ae; - } - } - - { - // geo/intersection_inclusion.yaml line #92 - /* true */ - Boolean expected_ = true; - /* r.polygon([1,1], [2,1], [2,2], [1,2]).includes(r.line([2,1], [2,2])) */ - logger.info("About to run line #92: r.polygon(r.array(1L, 1L), r.array(2L, 1L), r.array(2L, 2L), r.array(1L, 2L)).includes(r.line(r.array(2L, 1L), r.array(2L, 2L)))"); - Object obtained = runOrCatch(r.polygon(r.array(1L, 1L), r.array(2L, 1L), r.array(2L, 2L), r.array(1L, 2L)).includes(r.line(r.array(2L, 1L), r.array(2L, 2L))), - new OptArgs() - ,conn); - try { - assertEquals(expected_, obtained); - logger.info("Finished running line #92"); - } catch (Throwable ae) { - logger.error("Whoops, got exception on line #92:" + ae.toString()); - if(obtained instanceof Throwable) { - ae.addSuppressed((Throwable) obtained); - } - throw ae; - } - } - - { - // geo/intersection_inclusion.yaml line #94 - /* false */ - Boolean expected_ = false; - /* r.polygon([1,1], [2,1], [2,2], [1,2]).includes(r.line([1.5,1.5], [3,3])) */ - logger.info("About to run line #94: r.polygon(r.array(1L, 1L), r.array(2L, 1L), r.array(2L, 2L), r.array(1L, 2L)).includes(r.line(r.array(1.5, 1.5), r.array(3L, 3L)))"); - Object obtained = runOrCatch(r.polygon(r.array(1L, 1L), r.array(2L, 1L), r.array(2L, 2L), r.array(1L, 2L)).includes(r.line(r.array(1.5, 1.5), r.array(3L, 3L))), - new OptArgs() - ,conn); - try { - assertEquals(expected_, obtained); - logger.info("Finished running line #94"); - } catch (Throwable ae) { - logger.error("Whoops, got exception on line #94:" + ae.toString()); - if(obtained instanceof Throwable) { - ae.addSuppressed((Throwable) obtained); - } - throw ae; - } - } - - { - // geo/intersection_inclusion.yaml line #96 - /* true */ - Boolean expected_ = true; - /* r.polygon([1,1], [2,1], [2,2], [1,2]).includes(r.polygon([1,1], [2,1], [2,2], [1,2])) */ - logger.info("About to run line #96: r.polygon(r.array(1L, 1L), r.array(2L, 1L), r.array(2L, 2L), r.array(1L, 2L)).includes(r.polygon(r.array(1L, 1L), r.array(2L, 1L), r.array(2L, 2L), r.array(1L, 2L)))"); - Object obtained = runOrCatch(r.polygon(r.array(1L, 1L), r.array(2L, 1L), r.array(2L, 2L), r.array(1L, 2L)).includes(r.polygon(r.array(1L, 1L), r.array(2L, 1L), r.array(2L, 2L), r.array(1L, 2L))), - new OptArgs() - ,conn); - try { - assertEquals(expected_, obtained); - logger.info("Finished running line #96"); - } catch (Throwable ae) { - logger.error("Whoops, got exception on line #96:" + ae.toString()); - if(obtained instanceof Throwable) { - ae.addSuppressed((Throwable) obtained); - } - throw ae; - } - } - - { - // geo/intersection_inclusion.yaml line #98 - /* true */ - Boolean expected_ = true; - /* r.polygon([1,1], [2,1], [2,2], [1,2]).includes(r.polygon([1.2,1.2], [1.8,1.2], [1.8,1.8], [1.2,1.8])) */ - logger.info("About to run line #98: r.polygon(r.array(1L, 1L), r.array(2L, 1L), r.array(2L, 2L), r.array(1L, 2L)).includes(r.polygon(r.array(1.2, 1.2), r.array(1.8, 1.2), r.array(1.8, 1.8), r.array(1.2, 1.8)))"); - Object obtained = runOrCatch(r.polygon(r.array(1L, 1L), r.array(2L, 1L), r.array(2L, 2L), r.array(1L, 2L)).includes(r.polygon(r.array(1.2, 1.2), r.array(1.8, 1.2), r.array(1.8, 1.8), r.array(1.2, 1.8))), - new OptArgs() - ,conn); - try { - assertEquals(expected_, obtained); - logger.info("Finished running line #98"); - } catch (Throwable ae) { - logger.error("Whoops, got exception on line #98:" + ae.toString()); - if(obtained instanceof Throwable) { - ae.addSuppressed((Throwable) obtained); - } - throw ae; - } - } - - { - // geo/intersection_inclusion.yaml line #100 - /* true */ - Boolean expected_ = true; - /* r.polygon([1,1], [2,1], [2,2], [1,2]).includes(r.polygon([1.5,1.5], [2,1.5], [2,2], [1.5,2])) */ - logger.info("About to run line #100: r.polygon(r.array(1L, 1L), r.array(2L, 1L), r.array(2L, 2L), r.array(1L, 2L)).includes(r.polygon(r.array(1.5, 1.5), r.array(2L, 1.5), r.array(2L, 2L), r.array(1.5, 2L)))"); - Object obtained = runOrCatch(r.polygon(r.array(1L, 1L), r.array(2L, 1L), r.array(2L, 2L), r.array(1L, 2L)).includes(r.polygon(r.array(1.5, 1.5), r.array(2L, 1.5), r.array(2L, 2L), r.array(1.5, 2L))), - new OptArgs() - ,conn); - try { - assertEquals(expected_, obtained); - logger.info("Finished running line #100"); - } catch (Throwable ae) { - logger.error("Whoops, got exception on line #100:" + ae.toString()); - if(obtained instanceof Throwable) { - ae.addSuppressed((Throwable) obtained); - } - throw ae; - } - } - - { - // geo/intersection_inclusion.yaml line #102 - /* false */ - Boolean expected_ = false; - /* r.polygon([1,1], [2,1], [2,2], [1,2]).includes(r.polygon([1.5,1.5], [2.5,1.5], [2.5,2.5], [1.5,2.5])) */ - logger.info("About to run line #102: r.polygon(r.array(1L, 1L), r.array(2L, 1L), r.array(2L, 2L), r.array(1L, 2L)).includes(r.polygon(r.array(1.5, 1.5), r.array(2.5, 1.5), r.array(2.5, 2.5), r.array(1.5, 2.5)))"); - Object obtained = runOrCatch(r.polygon(r.array(1L, 1L), r.array(2L, 1L), r.array(2L, 2L), r.array(1L, 2L)).includes(r.polygon(r.array(1.5, 1.5), r.array(2.5, 1.5), r.array(2.5, 2.5), r.array(1.5, 2.5))), - new OptArgs() - ,conn); - try { - assertEquals(expected_, obtained); - logger.info("Finished running line #102"); - } catch (Throwable ae) { - logger.error("Whoops, got exception on line #102:" + ae.toString()); - if(obtained instanceof Throwable) { - ae.addSuppressed((Throwable) obtained); - } - throw ae; - } - } - - { - // geo/intersection_inclusion.yaml line #104 - /* false */ - Boolean expected_ = false; - /* r.polygon([1,1], [2,1], [2,2], [1,2]).polygon_sub(r.polygon([1.1,1.1], [1.9,1.1], [1.9,1.9], [1.1,1.9])).includes(r.polygon([1.2,1.2], [1.8,1.2], [1.8,1.8], [1.2,1.8])) */ - logger.info("About to run line #104: r.polygon(r.array(1L, 1L), r.array(2L, 1L), r.array(2L, 2L), r.array(1L, 2L)).polygonSub(r.polygon(r.array(1.1, 1.1), r.array(1.9, 1.1), r.array(1.9, 1.9), r.array(1.1, 1.9))).includes(r.polygon(r.array(1.2, 1.2), r.array(1.8, 1.2), r.array(1.8, 1.8), r.array(1.2, 1.8)))"); - Object obtained = runOrCatch(r.polygon(r.array(1L, 1L), r.array(2L, 1L), r.array(2L, 2L), r.array(1L, 2L)).polygonSub(r.polygon(r.array(1.1, 1.1), r.array(1.9, 1.1), r.array(1.9, 1.9), r.array(1.1, 1.9))).includes(r.polygon(r.array(1.2, 1.2), r.array(1.8, 1.2), r.array(1.8, 1.8), r.array(1.2, 1.8))), - new OptArgs() - ,conn); - try { - assertEquals(expected_, obtained); - logger.info("Finished running line #104"); - } catch (Throwable ae) { - logger.error("Whoops, got exception on line #104:" + ae.toString()); - if(obtained instanceof Throwable) { - ae.addSuppressed((Throwable) obtained); - } - throw ae; - } - } - - { - // geo/intersection_inclusion.yaml line #106 - /* false */ - Boolean expected_ = false; - /* r.polygon([1,1], [2,1], [2,2], [1,2]).polygon_sub(r.polygon([1.1,1.1], [1.9,1.1], [1.9,1.9], [1.1,1.9])).includes(r.polygon([1.1,1.1], [2,1.1], [2,2], [1.1,2])) */ - logger.info("About to run line #106: r.polygon(r.array(1L, 1L), r.array(2L, 1L), r.array(2L, 2L), r.array(1L, 2L)).polygonSub(r.polygon(r.array(1.1, 1.1), r.array(1.9, 1.1), r.array(1.9, 1.9), r.array(1.1, 1.9))).includes(r.polygon(r.array(1.1, 1.1), r.array(2L, 1.1), r.array(2L, 2L), r.array(1.1, 2L)))"); - Object obtained = runOrCatch(r.polygon(r.array(1L, 1L), r.array(2L, 1L), r.array(2L, 2L), r.array(1L, 2L)).polygonSub(r.polygon(r.array(1.1, 1.1), r.array(1.9, 1.1), r.array(1.9, 1.9), r.array(1.1, 1.9))).includes(r.polygon(r.array(1.1, 1.1), r.array(2L, 1.1), r.array(2L, 2L), r.array(1.1, 2L))), - new OptArgs() - ,conn); - try { - assertEquals(expected_, obtained); - logger.info("Finished running line #106"); - } catch (Throwable ae) { - logger.error("Whoops, got exception on line #106:" + ae.toString()); - if(obtained instanceof Throwable) { - ae.addSuppressed((Throwable) obtained); - } - throw ae; - } - } - - { - // geo/intersection_inclusion.yaml line #108 - /* false */ - Boolean expected_ = false; - /* r.polygon([1,1], [2,1], [2,2], [1,2]).includes(r.polygon([2,1.1], [3,1.1], [3,1.9], [2,1.9])) */ - logger.info("About to run line #108: r.polygon(r.array(1L, 1L), r.array(2L, 1L), r.array(2L, 2L), r.array(1L, 2L)).includes(r.polygon(r.array(2L, 1.1), r.array(3L, 1.1), r.array(3L, 1.9), r.array(2L, 1.9)))"); - Object obtained = runOrCatch(r.polygon(r.array(1L, 1L), r.array(2L, 1L), r.array(2L, 2L), r.array(1L, 2L)).includes(r.polygon(r.array(2L, 1.1), r.array(3L, 1.1), r.array(3L, 1.9), r.array(2L, 1.9))), - new OptArgs() - ,conn); - try { - assertEquals(expected_, obtained); - logger.info("Finished running line #108"); - } catch (Throwable ae) { - logger.error("Whoops, got exception on line #108:" + ae.toString()); - if(obtained instanceof Throwable) { - ae.addSuppressed((Throwable) obtained); - } - throw ae; - } - } - - { - // geo/intersection_inclusion.yaml line #110 - /* false */ - Boolean expected_ = false; - /* r.polygon([1,1], [2,1], [2,2], [1,2]).includes(r.polygon([2,2], [3,2], [3,3], [2,3])) */ - logger.info("About to run line #110: r.polygon(r.array(1L, 1L), r.array(2L, 1L), r.array(2L, 2L), r.array(1L, 2L)).includes(r.polygon(r.array(2L, 2L), r.array(3L, 2L), r.array(3L, 3L), r.array(2L, 3L)))"); - Object obtained = runOrCatch(r.polygon(r.array(1L, 1L), r.array(2L, 1L), r.array(2L, 2L), r.array(1L, 2L)).includes(r.polygon(r.array(2L, 2L), r.array(3L, 2L), r.array(3L, 3L), r.array(2L, 3L))), - new OptArgs() - ,conn); - try { - assertEquals(expected_, obtained); - logger.info("Finished running line #110"); - } catch (Throwable ae) { - logger.error("Whoops, got exception on line #110:" + ae.toString()); - if(obtained instanceof Throwable) { - ae.addSuppressed((Throwable) obtained); - } - throw ae; - } - } - - { - // geo/intersection_inclusion.yaml line #113 - /* 1 */ - Long expected_ = 1L; - /* r.expr([r.polygon([0,0], [1,1], [1,0]), r.polygon([0,1], [1,2], [1,1])]).includes(r.point(0,0)).count() */ - logger.info("About to run line #113: r.expr(r.array(r.polygon(r.array(0L, 0L), r.array(1L, 1L), r.array(1L, 0L)), r.polygon(r.array(0L, 1L), r.array(1L, 2L), r.array(1L, 1L)))).includes(r.point(0L, 0L)).count()"); - Object obtained = runOrCatch(r.expr(r.array(r.polygon(r.array(0L, 0L), r.array(1L, 1L), r.array(1L, 0L)), r.polygon(r.array(0L, 1L), r.array(1L, 2L), r.array(1L, 1L)))).includes(r.point(0L, 0L)).count(), - new OptArgs() - ,conn); - try { - assertEquals(expected_, obtained); - logger.info("Finished running line #113"); - } catch (Throwable ae) { - logger.error("Whoops, got exception on line #113:" + ae.toString()); - if(obtained instanceof Throwable) { - ae.addSuppressed((Throwable) obtained); - } - throw ae; - } - } - - { - // geo/intersection_inclusion.yaml line #116 - /* err('ReqlQueryLogicError', 'Expected geometry of type `Polygon` but found `Point`.') */ - Err expected_ = err("ReqlQueryLogicError", "Expected geometry of type `Polygon` but found `Point`."); - /* r.point(0,0).includes(r.point(0,0)) */ - logger.info("About to run line #116: r.point(0L, 0L).includes(r.point(0L, 0L))"); - Object obtained = runOrCatch(r.point(0L, 0L).includes(r.point(0L, 0L)), - new OptArgs() - ,conn); - try { - assertEquals(expected_, obtained); - logger.info("Finished running line #116"); - } catch (Throwable ae) { - logger.error("Whoops, got exception on line #116:" + ae.toString()); - if(obtained instanceof Throwable) { - ae.addSuppressed((Throwable) obtained); - } - throw ae; - } - } - - { - // geo/intersection_inclusion.yaml line #118 - /* err('ReqlQueryLogicError', 'Expected geometry of type `Polygon` but found `LineString`.') */ - Err expected_ = err("ReqlQueryLogicError", "Expected geometry of type `Polygon` but found `LineString`."); - /* r.line([0,0], [0,1]).includes(r.point(0,0)) */ - logger.info("About to run line #118: r.line(r.array(0L, 0L), r.array(0L, 1L)).includes(r.point(0L, 0L))"); - Object obtained = runOrCatch(r.line(r.array(0L, 0L), r.array(0L, 1L)).includes(r.point(0L, 0L)), - new OptArgs() - ,conn); - try { - assertEquals(expected_, obtained); - logger.info("Finished running line #118"); - } catch (Throwable ae) { - logger.error("Whoops, got exception on line #118:" + ae.toString()); - if(obtained instanceof Throwable) { - ae.addSuppressed((Throwable) obtained); - } - throw ae; - } - } - } -} diff --git a/drivers/java/src/test/java/com/rethinkdb/gen/GeoOperations.java b/drivers/java/src/test/java/com/rethinkdb/gen/GeoOperations.java deleted file mode 100644 index 3a2eb223583..00000000000 --- a/drivers/java/src/test/java/com/rethinkdb/gen/GeoOperations.java +++ /dev/null @@ -1,775 +0,0 @@ -// Autogenerated by convert_tests.py and process_polyglot.py. -// Do not edit this file directly. -// The template for this file is located at: -// ../../../../../../../templates/Test.java -package com.rethinkdb.gen; - -import com.rethinkdb.RethinkDB; -import com.rethinkdb.gen.exc.*; -import com.rethinkdb.gen.ast.*; -import com.rethinkdb.ast.ReqlAst; -import com.rethinkdb.model.MapObject; -import com.rethinkdb.model.OptArgs; -import com.rethinkdb.net.Connection; -import com.rethinkdb.net.Cursor; -import junit.framework.TestCase; -import static org.junit.Assert.assertEquals; -import static org.junit.Assert.assertArrayEquals; -import org.slf4j.Logger; -import org.slf4j.LoggerFactory; - -import org.junit.*; -import org.junit.rules.ExpectedException; - -import java.util.Arrays; -import java.util.ArrayList; -import java.util.List; -import java.util.Map; -import java.util.Set; -import java.time.OffsetDateTime; -import java.time.ZoneOffset; -import java.time.Instant; -import java.util.stream.LongStream; -import java.util.stream.Collectors; -import java.util.stream.Stream; -import java.util.concurrent.TimeoutException; -import java.util.regex.Pattern; -import java.util.Collections; -import java.nio.charset.StandardCharsets; - -import static com.rethinkdb.TestingCommon.*; -import com.rethinkdb.TestingFramework; - -public class GeoOperations { - // Test basic geometry operators - Logger logger = LoggerFactory.getLogger(GeoOperations.class); - public static final RethinkDB r = RethinkDB.r; - - Connection conn; - - @Before - public void setUp() throws Exception { - logger.info("Setting up."); - conn = TestingFramework.createConnection(); - try { - r.dbCreate("test").run(conn); - r.db("test").wait_().run(conn); - }catch (Exception e){} - } - - @After - public void tearDown() throws Exception { - logger.info("Tearing down."); - r.db("rethinkdb").table("_debug_scratch").delete().run(conn); - if(!conn.isOpen()){ - conn.close(); - conn = TestingFramework.createConnection(); - } - r.dbDrop("test").run(conn); - conn.close(false); - } - - // Autogenerated tests below - - @Test(timeout=120000) - public void test() throws Exception { - - { - // geo/operations.yaml line #5 - /* ("89011.26253835332") */ - String expected_ = "89011.26253835332"; - /* r.distance(r.point(-122, 37), r.point(-123, 37)).coerce_to('STRING') */ - logger.info("About to run line #5: r.distance(r.point(-122L, 37L), r.point(-123L, 37L)).coerceTo('STRING')"); - Object obtained = runOrCatch(r.distance(r.point(-122L, 37L), r.point(-123L, 37L)).coerceTo("STRING"), - new OptArgs() - ,conn); - try { - assertEquals(expected_, obtained); - logger.info("Finished running line #5"); - } catch (Throwable ae) { - logger.error("Whoops, got exception on line #5:" + ae.toString()); - if(obtained instanceof Throwable) { - ae.addSuppressed((Throwable) obtained); - } - throw ae; - } - } - - { - // geo/operations.yaml line #7 - /* ("110968.30443995494") */ - String expected_ = "110968.30443995494"; - /* r.distance(r.point(-122, 37), r.point(-122, 36)).coerce_to('STRING') */ - logger.info("About to run line #7: r.distance(r.point(-122L, 37L), r.point(-122L, 36L)).coerceTo('STRING')"); - Object obtained = runOrCatch(r.distance(r.point(-122L, 37L), r.point(-122L, 36L)).coerceTo("STRING"), - new OptArgs() - ,conn); - try { - assertEquals(expected_, obtained); - logger.info("Finished running line #7"); - } catch (Throwable ae) { - logger.error("Whoops, got exception on line #7:" + ae.toString()); - if(obtained instanceof Throwable) { - ae.addSuppressed((Throwable) obtained); - } - throw ae; - } - } - - { - // geo/operations.yaml line #9 - /* true */ - Boolean expected_ = true; - /* r.distance(r.point(-122, 37), r.point(-122, 36)).eq(r.distance(r.point(-122, 36), r.point(-122, 37))) */ - logger.info("About to run line #9: r.distance(r.point(-122L, 37L), r.point(-122L, 36L)).eq(r.distance(r.point(-122L, 36L), r.point(-122L, 37L)))"); - Object obtained = runOrCatch(r.distance(r.point(-122L, 37L), r.point(-122L, 36L)).eq(r.distance(r.point(-122L, 36L), r.point(-122L, 37L))), - new OptArgs() - ,conn); - try { - assertEquals(expected_, obtained); - logger.info("Finished running line #9"); - } catch (Throwable ae) { - logger.error("Whoops, got exception on line #9:" + ae.toString()); - if(obtained instanceof Throwable) { - ae.addSuppressed((Throwable) obtained); - } - throw ae; - } - } - - { - // geo/operations.yaml line #11 - /* ("89011.26253835332") */ - String expected_ = "89011.26253835332"; - /* r.point(-122, 37).distance(r.point(-123, 37)).coerce_to('STRING') */ - logger.info("About to run line #11: r.point(-122L, 37L).distance(r.point(-123L, 37L)).coerceTo('STRING')"); - Object obtained = runOrCatch(r.point(-122L, 37L).distance(r.point(-123L, 37L)).coerceTo("STRING"), - new OptArgs() - ,conn); - try { - assertEquals(expected_, obtained); - logger.info("Finished running line #11"); - } catch (Throwable ae) { - logger.error("Whoops, got exception on line #11:" + ae.toString()); - if(obtained instanceof Throwable) { - ae.addSuppressed((Throwable) obtained); - } - throw ae; - } - } - - // geo/operations.yaml line #13 - // someDist = r.distance(r.point(-122, 37), r.point(-123, 37)) - logger.info("Possibly executing: Distance someDist = (Distance) (r.distance(r.point(-122L, 37L), r.point(-123L, 37L)));"); - Distance someDist = (Distance) (r.distance(r.point(-122L, 37L), r.point(-123L, 37L))); - - { - // geo/operations.yaml line #15 - /* true */ - Boolean expected_ = true; - /* someDist.eq(r.distance(r.point(-122, 37), r.point(-123, 37), unit='m')) */ - logger.info("About to run line #15: someDist.eq(r.distance(r.point(-122L, 37L), r.point(-123L, 37L)).optArg('unit', 'm'))"); - Object obtained = runOrCatch(someDist.eq(r.distance(r.point(-122L, 37L), r.point(-123L, 37L)).optArg("unit", "m")), - new OptArgs() - ,conn); - try { - assertEquals(expected_, obtained); - logger.info("Finished running line #15"); - } catch (Throwable ae) { - logger.error("Whoops, got exception on line #15:" + ae.toString()); - if(obtained instanceof Throwable) { - ae.addSuppressed((Throwable) obtained); - } - throw ae; - } - } - - { - // geo/operations.yaml line #19 - /* true */ - Boolean expected_ = true; - /* someDist.mul(1.0/1000.0).eq(r.distance(r.point(-122, 37), r.point(-123, 37), unit='km')) */ - logger.info("About to run line #19: someDist.mul(r.div(1.0, 1000.0)).eq(r.distance(r.point(-122L, 37L), r.point(-123L, 37L)).optArg('unit', 'km'))"); - Object obtained = runOrCatch(someDist.mul(r.div(1.0, 1000.0)).eq(r.distance(r.point(-122L, 37L), r.point(-123L, 37L)).optArg("unit", "km")), - new OptArgs() - ,conn); - try { - assertEquals(expected_, obtained); - logger.info("Finished running line #19"); - } catch (Throwable ae) { - logger.error("Whoops, got exception on line #19:" + ae.toString()); - if(obtained instanceof Throwable) { - ae.addSuppressed((Throwable) obtained); - } - throw ae; - } - } - - { - // geo/operations.yaml line #23 - /* true */ - Boolean expected_ = true; - /* someDist.mul(1.0/1609.344).eq(r.distance(r.point(-122, 37), r.point(-123, 37), unit='mi')) */ - logger.info("About to run line #23: someDist.mul(r.div(1.0, 1609.344)).eq(r.distance(r.point(-122L, 37L), r.point(-123L, 37L)).optArg('unit', 'mi'))"); - Object obtained = runOrCatch(someDist.mul(r.div(1.0, 1609.344)).eq(r.distance(r.point(-122L, 37L), r.point(-123L, 37L)).optArg("unit", "mi")), - new OptArgs() - ,conn); - try { - assertEquals(expected_, obtained); - logger.info("Finished running line #23"); - } catch (Throwable ae) { - logger.error("Whoops, got exception on line #23:" + ae.toString()); - if(obtained instanceof Throwable) { - ae.addSuppressed((Throwable) obtained); - } - throw ae; - } - } - - { - // geo/operations.yaml line #27 - /* true */ - Boolean expected_ = true; - /* someDist.mul(1.0/0.3048).eq(r.distance(r.point(-122, 37), r.point(-123, 37), unit='ft')) */ - logger.info("About to run line #27: someDist.mul(r.div(1.0, 0.3048)).eq(r.distance(r.point(-122L, 37L), r.point(-123L, 37L)).optArg('unit', 'ft'))"); - Object obtained = runOrCatch(someDist.mul(r.div(1.0, 0.3048)).eq(r.distance(r.point(-122L, 37L), r.point(-123L, 37L)).optArg("unit", "ft")), - new OptArgs() - ,conn); - try { - assertEquals(expected_, obtained); - logger.info("Finished running line #27"); - } catch (Throwable ae) { - logger.error("Whoops, got exception on line #27:" + ae.toString()); - if(obtained instanceof Throwable) { - ae.addSuppressed((Throwable) obtained); - } - throw ae; - } - } - - { - // geo/operations.yaml line #31 - /* true */ - Boolean expected_ = true; - /* someDist.mul(1.0/1852.0).eq(r.distance(r.point(-122, 37), r.point(-123, 37), unit='nm')) */ - logger.info("About to run line #31: someDist.mul(r.div(1.0, 1852.0)).eq(r.distance(r.point(-122L, 37L), r.point(-123L, 37L)).optArg('unit', 'nm'))"); - Object obtained = runOrCatch(someDist.mul(r.div(1.0, 1852.0)).eq(r.distance(r.point(-122L, 37L), r.point(-123L, 37L)).optArg("unit", "nm")), - new OptArgs() - ,conn); - try { - assertEquals(expected_, obtained); - logger.info("Finished running line #31"); - } catch (Throwable ae) { - logger.error("Whoops, got exception on line #31:" + ae.toString()); - if(obtained instanceof Throwable) { - ae.addSuppressed((Throwable) obtained); - } - throw ae; - } - } - - { - // geo/operations.yaml line #35 - /* true */ - Boolean expected_ = true; - /* someDist.eq(r.distance(r.point(-122, 37), r.point(-123, 37), geo_system='WGS84')) */ - logger.info("About to run line #35: someDist.eq(r.distance(r.point(-122L, 37L), r.point(-123L, 37L)).optArg('geo_system', 'WGS84'))"); - Object obtained = runOrCatch(someDist.eq(r.distance(r.point(-122L, 37L), r.point(-123L, 37L)).optArg("geo_system", "WGS84")), - new OptArgs() - ,conn); - try { - assertEquals(expected_, obtained); - logger.info("Finished running line #35"); - } catch (Throwable ae) { - logger.error("Whoops, got exception on line #35:" + ae.toString()); - if(obtained instanceof Throwable) { - ae.addSuppressed((Throwable) obtained); - } - throw ae; - } - } - - { - // geo/operations.yaml line #40 - /* true */ - Boolean expected_ = true; - /* someDist.div(10).eq(r.distance(r.point(-122, 37), r.point(-123, 37), geo_system={'a':637813.7, 'f':(1.0/298.257223563)})) */ - logger.info("About to run line #40: someDist.div(10L).eq(r.distance(r.point(-122L, 37L), r.point(-123L, 37L)).optArg('geo_system', r.hashMap('a', 637813.7).with('f', r.div(1.0, 298.257223563))))"); - Object obtained = runOrCatch(someDist.div(10L).eq(r.distance(r.point(-122L, 37L), r.point(-123L, 37L)).optArg("geo_system", r.hashMap("a", 637813.7).with("f", r.div(1.0, 298.257223563)))), - new OptArgs() - ,conn); - try { - assertEquals(expected_, obtained); - logger.info("Finished running line #40"); - } catch (Throwable ae) { - logger.error("Whoops, got exception on line #40:" + ae.toString()); - if(obtained instanceof Throwable) { - ae.addSuppressed((Throwable) obtained); - } - throw ae; - } - } - - { - // geo/operations.yaml line #43 - /* ("0.01393875509649327") */ - String expected_ = "0.01393875509649327"; - /* r.distance(r.point(-122, 37), r.point(-123, 37), geo_system='unit_sphere').coerce_to('STRING') */ - logger.info("About to run line #43: r.distance(r.point(-122L, 37L), r.point(-123L, 37L)).optArg('geo_system', 'unit_sphere').coerceTo('STRING')"); - Object obtained = runOrCatch(r.distance(r.point(-122L, 37L), r.point(-123L, 37L)).optArg("geo_system", "unit_sphere").coerceTo("STRING"), - new OptArgs() - ,conn); - try { - assertEquals(expected_, obtained); - logger.info("Finished running line #43"); - } catch (Throwable ae) { - logger.error("Whoops, got exception on line #43:" + ae.toString()); - if(obtained instanceof Throwable) { - ae.addSuppressed((Throwable) obtained); - } - throw ae; - } - } - - { - // geo/operations.yaml line #47 - /* ("0") */ - String expected_ = "0"; - /* r.distance(r.point(0, 0), r.point(0, 0)).coerce_to('STRING') */ - logger.info("About to run line #47: r.distance(r.point(0L, 0L), r.point(0L, 0L)).coerceTo('STRING')"); - Object obtained = runOrCatch(r.distance(r.point(0L, 0L), r.point(0L, 0L)).coerceTo("STRING"), - new OptArgs() - ,conn); - try { - assertEquals(expected_, obtained); - logger.info("Finished running line #47"); - } catch (Throwable ae) { - logger.error("Whoops, got exception on line #47:" + ae.toString()); - if(obtained instanceof Throwable) { - ae.addSuppressed((Throwable) obtained); - } - throw ae; - } - } - - { - // geo/operations.yaml line #50 - /* ("40007862.917250897") */ - String expected_ = "40007862.917250897"; - /* r.distance(r.point(0, 0), r.point(180, 0)).mul(2).coerce_to('STRING') */ - logger.info("About to run line #50: r.distance(r.point(0L, 0L), r.point(180L, 0L)).mul(2L).coerceTo('STRING')"); - Object obtained = runOrCatch(r.distance(r.point(0L, 0L), r.point(180L, 0L)).mul(2L).coerceTo("STRING"), - new OptArgs() - ,conn); - try { - assertEquals(expected_, obtained); - logger.info("Finished running line #50"); - } catch (Throwable ae) { - logger.error("Whoops, got exception on line #50:" + ae.toString()); - if(obtained instanceof Throwable) { - ae.addSuppressed((Throwable) obtained); - } - throw ae; - } - } - - { - // geo/operations.yaml line #52 - /* ("40007862.917250897") */ - String expected_ = "40007862.917250897"; - /* r.distance(r.point(0, -90), r.point(0, 90)).mul(2).coerce_to('STRING') */ - logger.info("About to run line #52: r.distance(r.point(0L, -90L), r.point(0L, 90L)).mul(2L).coerceTo('STRING')"); - Object obtained = runOrCatch(r.distance(r.point(0L, -90L), r.point(0L, 90L)).mul(2L).coerceTo("STRING"), - new OptArgs() - ,conn); - try { - assertEquals(expected_, obtained); - logger.info("Finished running line #52"); - } catch (Throwable ae) { - logger.error("Whoops, got exception on line #52:" + ae.toString()); - if(obtained instanceof Throwable) { - ae.addSuppressed((Throwable) obtained); - } - throw ae; - } - } - - { - // geo/operations.yaml line #54 - /* ("0") */ - String expected_ = "0"; - /* r.distance(r.point(0, 0), r.line([0,0], [0,1])).coerce_to('STRING') */ - logger.info("About to run line #54: r.distance(r.point(0L, 0L), r.line(r.array(0L, 0L), r.array(0L, 1L))).coerceTo('STRING')"); - Object obtained = runOrCatch(r.distance(r.point(0L, 0L), r.line(r.array(0L, 0L), r.array(0L, 1L))).coerceTo("STRING"), - new OptArgs() - ,conn); - try { - assertEquals(expected_, obtained); - logger.info("Finished running line #54"); - } catch (Throwable ae) { - logger.error("Whoops, got exception on line #54:" + ae.toString()); - if(obtained instanceof Throwable) { - ae.addSuppressed((Throwable) obtained); - } - throw ae; - } - } - - { - // geo/operations.yaml line #56 - /* ("0") */ - String expected_ = "0"; - /* r.distance(r.line([0,0], [0,1]), r.point(0, 0)).coerce_to('STRING') */ - logger.info("About to run line #56: r.distance(r.line(r.array(0L, 0L), r.array(0L, 1L)), r.point(0L, 0L)).coerceTo('STRING')"); - Object obtained = runOrCatch(r.distance(r.line(r.array(0L, 0L), r.array(0L, 1L)), r.point(0L, 0L)).coerceTo("STRING"), - new OptArgs() - ,conn); - try { - assertEquals(expected_, obtained); - logger.info("Finished running line #56"); - } catch (Throwable ae) { - logger.error("Whoops, got exception on line #56:" + ae.toString()); - if(obtained instanceof Throwable) { - ae.addSuppressed((Throwable) obtained); - } - throw ae; - } - } - - { - // geo/operations.yaml line #58 - /* true */ - Boolean expected_ = true; - /* r.distance(r.point(0, 0), r.line([0.1,0], [1,0])).eq(r.distance(r.point(0, 0), r.point(0.1, 0))) */ - logger.info("About to run line #58: r.distance(r.point(0L, 0L), r.line(r.array(0.1, 0L), r.array(1L, 0L))).eq(r.distance(r.point(0L, 0L), r.point(0.1, 0L)))"); - Object obtained = runOrCatch(r.distance(r.point(0L, 0L), r.line(r.array(0.1, 0L), r.array(1L, 0L))).eq(r.distance(r.point(0L, 0L), r.point(0.1, 0L))), - new OptArgs() - ,conn); - try { - assertEquals(expected_, obtained); - logger.info("Finished running line #58"); - } catch (Throwable ae) { - logger.error("Whoops, got exception on line #58:" + ae.toString()); - if(obtained instanceof Throwable) { - ae.addSuppressed((Throwable) obtained); - } - throw ae; - } - } - - { - // geo/operations.yaml line #60 - /* ("492471.4990055255") */ - String expected_ = "492471.4990055255"; - /* r.distance(r.point(0, 0), r.line([5,-1], [4,2])).coerce_to('STRING') */ - logger.info("About to run line #60: r.distance(r.point(0L, 0L), r.line(r.array(5L, -1L), r.array(4L, 2L))).coerceTo('STRING')"); - Object obtained = runOrCatch(r.distance(r.point(0L, 0L), r.line(r.array(5L, -1L), r.array(4L, 2L))).coerceTo("STRING"), - new OptArgs() - ,conn); - try { - assertEquals(expected_, obtained); - logger.info("Finished running line #60"); - } catch (Throwable ae) { - logger.error("Whoops, got exception on line #60:" + ae.toString()); - if(obtained instanceof Throwable) { - ae.addSuppressed((Throwable) obtained); - } - throw ae; - } - } - - { - // geo/operations.yaml line #62 - /* ("492471.4990055255") */ - String expected_ = "492471.4990055255"; - /* r.distance(r.point(0, 0), r.polygon([5,-1], [4,2], [10,10])).coerce_to('STRING') */ - logger.info("About to run line #62: r.distance(r.point(0L, 0L), r.polygon(r.array(5L, -1L), r.array(4L, 2L), r.array(10L, 10L))).coerceTo('STRING')"); - Object obtained = runOrCatch(r.distance(r.point(0L, 0L), r.polygon(r.array(5L, -1L), r.array(4L, 2L), r.array(10L, 10L))).coerceTo("STRING"), - new OptArgs() - ,conn); - try { - assertEquals(expected_, obtained); - logger.info("Finished running line #62"); - } catch (Throwable ae) { - logger.error("Whoops, got exception on line #62:" + ae.toString()); - if(obtained instanceof Throwable) { - ae.addSuppressed((Throwable) obtained); - } - throw ae; - } - } - - { - // geo/operations.yaml line #64 - /* ("0") */ - String expected_ = "0"; - /* r.distance(r.point(0, 0), r.polygon([0,-1], [0,1], [10,10])).coerce_to('STRING') */ - logger.info("About to run line #64: r.distance(r.point(0L, 0L), r.polygon(r.array(0L, -1L), r.array(0L, 1L), r.array(10L, 10L))).coerceTo('STRING')"); - Object obtained = runOrCatch(r.distance(r.point(0L, 0L), r.polygon(r.array(0L, -1L), r.array(0L, 1L), r.array(10L, 10L))).coerceTo("STRING"), - new OptArgs() - ,conn); - try { - assertEquals(expected_, obtained); - logger.info("Finished running line #64"); - } catch (Throwable ae) { - logger.error("Whoops, got exception on line #64:" + ae.toString()); - if(obtained instanceof Throwable) { - ae.addSuppressed((Throwable) obtained); - } - throw ae; - } - } - - { - // geo/operations.yaml line #66 - /* ("0") */ - String expected_ = "0"; - /* r.distance(r.point(0.5, 0.5), r.polygon([0,-1], [0,1], [10,10])).coerce_to('STRING') */ - logger.info("About to run line #66: r.distance(r.point(0.5, 0.5), r.polygon(r.array(0L, -1L), r.array(0L, 1L), r.array(10L, 10L))).coerceTo('STRING')"); - Object obtained = runOrCatch(r.distance(r.point(0.5, 0.5), r.polygon(r.array(0L, -1L), r.array(0L, 1L), r.array(10L, 10L))).coerceTo("STRING"), - new OptArgs() - ,conn); - try { - assertEquals(expected_, obtained); - logger.info("Finished running line #66"); - } catch (Throwable ae) { - logger.error("Whoops, got exception on line #66:" + ae.toString()); - if(obtained instanceof Throwable) { - ae.addSuppressed((Throwable) obtained); - } - throw ae; - } - } - - { - // geo/operations.yaml line #71 - /* false */ - Boolean expected_ = false; - /* r.circle([0,0], 1, fill=false).eq(r.circle([0,0], 1, fill=true)) */ - logger.info("About to run line #71: r.circle(r.array(0L, 0L), 1L).optArg('fill', false).eq(r.circle(r.array(0L, 0L), 1L).optArg('fill', true))"); - Object obtained = runOrCatch(r.circle(r.array(0L, 0L), 1L).optArg("fill", false).eq(r.circle(r.array(0L, 0L), 1L).optArg("fill", true)), - new OptArgs() - ,conn); - try { - assertEquals(expected_, obtained); - logger.info("Finished running line #71"); - } catch (Throwable ae) { - logger.error("Whoops, got exception on line #71:" + ae.toString()); - if(obtained instanceof Throwable) { - ae.addSuppressed((Throwable) obtained); - } - throw ae; - } - } - - { - // geo/operations.yaml line #75 - /* true */ - Boolean expected_ = true; - /* r.circle([0,0], 1, fill=false).fill().eq(r.circle([0,0], 1, fill=true)) */ - logger.info("About to run line #75: r.circle(r.array(0L, 0L), 1L).optArg('fill', false).fill().eq(r.circle(r.array(0L, 0L), 1L).optArg('fill', true))"); - Object obtained = runOrCatch(r.circle(r.array(0L, 0L), 1L).optArg("fill", false).fill().eq(r.circle(r.array(0L, 0L), 1L).optArg("fill", true)), - new OptArgs() - ,conn); - try { - assertEquals(expected_, obtained); - logger.info("Finished running line #75"); - } catch (Throwable ae) { - logger.error("Whoops, got exception on line #75:" + ae.toString()); - if(obtained instanceof Throwable) { - ae.addSuppressed((Throwable) obtained); - } - throw ae; - } - } - - { - // geo/operations.yaml line #80 - /* ({'$reql_type$':'GEOMETRY', 'coordinates':[[[0,0],[1,0],[1,1],[0,1],[0,0]],[[0.1,0.1],[0.9,0.1],[0.9,0.9],[0.1,0.9],[0.1,0.1]]], 'type':'Polygon'}) */ - Map expected_ = r.hashMap("$reql_type$", "GEOMETRY").with("coordinates", r.array(r.array(r.array(0L, 0L), r.array(1L, 0L), r.array(1L, 1L), r.array(0L, 1L), r.array(0L, 0L)), r.array(r.array(0.1, 0.1), r.array(0.9, 0.1), r.array(0.9, 0.9), r.array(0.1, 0.9), r.array(0.1, 0.1)))).with("type", "Polygon"); - /* r.polygon([0,0], [1,0], [1,1], [0,1]).polygon_sub(r.polygon([0.1,0.1], [0.9,0.1], [0.9,0.9], [0.1,0.9])) */ - logger.info("About to run line #80: r.polygon(r.array(0L, 0L), r.array(1L, 0L), r.array(1L, 1L), r.array(0L, 1L)).polygonSub(r.polygon(r.array(0.1, 0.1), r.array(0.9, 0.1), r.array(0.9, 0.9), r.array(0.1, 0.9)))"); - Object obtained = runOrCatch(r.polygon(r.array(0L, 0L), r.array(1L, 0L), r.array(1L, 1L), r.array(0L, 1L)).polygonSub(r.polygon(r.array(0.1, 0.1), r.array(0.9, 0.1), r.array(0.9, 0.9), r.array(0.1, 0.9))), - new OptArgs() - ,conn); - try { - assertEquals(expected_, obtained); - logger.info("Finished running line #80"); - } catch (Throwable ae) { - logger.error("Whoops, got exception on line #80:" + ae.toString()); - if(obtained instanceof Throwable) { - ae.addSuppressed((Throwable) obtained); - } - throw ae; - } - } - - { - // geo/operations.yaml line #82 - /* err('ReqlQueryLogicError', 'The second argument to `polygon_sub` is not contained in the first one.', [0]) */ - Err expected_ = err("ReqlQueryLogicError", "The second argument to `polygon_sub` is not contained in the first one.", r.array(0L)); - /* r.polygon([0,0], [1,0], [1,1], [0,1]).polygon_sub(r.polygon([0.1,0.9], [0.9,0.0], [0.9,0.9], [0.1,0.9])) */ - logger.info("About to run line #82: r.polygon(r.array(0L, 0L), r.array(1L, 0L), r.array(1L, 1L), r.array(0L, 1L)).polygonSub(r.polygon(r.array(0.1, 0.9), r.array(0.9, 0.0), r.array(0.9, 0.9), r.array(0.1, 0.9)))"); - Object obtained = runOrCatch(r.polygon(r.array(0L, 0L), r.array(1L, 0L), r.array(1L, 1L), r.array(0L, 1L)).polygonSub(r.polygon(r.array(0.1, 0.9), r.array(0.9, 0.0), r.array(0.9, 0.9), r.array(0.1, 0.9))), - new OptArgs() - ,conn); - try { - assertEquals(expected_, obtained); - logger.info("Finished running line #82"); - } catch (Throwable ae) { - logger.error("Whoops, got exception on line #82:" + ae.toString()); - if(obtained instanceof Throwable) { - ae.addSuppressed((Throwable) obtained); - } - throw ae; - } - } - - { - // geo/operations.yaml line #84 - /* err('ReqlQueryLogicError', 'The second argument to `polygon_sub` is not contained in the first one.', [0]) */ - Err expected_ = err("ReqlQueryLogicError", "The second argument to `polygon_sub` is not contained in the first one.", r.array(0L)); - /* r.polygon([0,0], [1,0], [1,1], [0,1]).polygon_sub(r.polygon([0,0], [2,0], [2,2], [0,2])) */ - logger.info("About to run line #84: r.polygon(r.array(0L, 0L), r.array(1L, 0L), r.array(1L, 1L), r.array(0L, 1L)).polygonSub(r.polygon(r.array(0L, 0L), r.array(2L, 0L), r.array(2L, 2L), r.array(0L, 2L)))"); - Object obtained = runOrCatch(r.polygon(r.array(0L, 0L), r.array(1L, 0L), r.array(1L, 1L), r.array(0L, 1L)).polygonSub(r.polygon(r.array(0L, 0L), r.array(2L, 0L), r.array(2L, 2L), r.array(0L, 2L))), - new OptArgs() - ,conn); - try { - assertEquals(expected_, obtained); - logger.info("Finished running line #84"); - } catch (Throwable ae) { - logger.error("Whoops, got exception on line #84:" + ae.toString()); - if(obtained instanceof Throwable) { - ae.addSuppressed((Throwable) obtained); - } - throw ae; - } - } - - { - // geo/operations.yaml line #86 - /* err('ReqlQueryLogicError', 'The second argument to `polygon_sub` is not contained in the first one.', [0]) */ - Err expected_ = err("ReqlQueryLogicError", "The second argument to `polygon_sub` is not contained in the first one.", r.array(0L)); - /* r.polygon([0,0], [1,0], [1,1], [0,1]).polygon_sub(r.polygon([0,-2], [1,-2], [-1,1], [0,-1])) */ - logger.info("About to run line #86: r.polygon(r.array(0L, 0L), r.array(1L, 0L), r.array(1L, 1L), r.array(0L, 1L)).polygonSub(r.polygon(r.array(0L, -2L), r.array(1L, -2L), r.array(-1L, 1L), r.array(0L, -1L)))"); - Object obtained = runOrCatch(r.polygon(r.array(0L, 0L), r.array(1L, 0L), r.array(1L, 1L), r.array(0L, 1L)).polygonSub(r.polygon(r.array(0L, -2L), r.array(1L, -2L), r.array(-1L, 1L), r.array(0L, -1L))), - new OptArgs() - ,conn); - try { - assertEquals(expected_, obtained); - logger.info("Finished running line #86"); - } catch (Throwable ae) { - logger.error("Whoops, got exception on line #86:" + ae.toString()); - if(obtained instanceof Throwable) { - ae.addSuppressed((Throwable) obtained); - } - throw ae; - } - } - - { - // geo/operations.yaml line #88 - /* err('ReqlQueryLogicError', 'The second argument to `polygon_sub` is not contained in the first one.', [0]) */ - Err expected_ = err("ReqlQueryLogicError", "The second argument to `polygon_sub` is not contained in the first one.", r.array(0L)); - /* r.polygon([0,0], [1,0], [1,1], [0,1]).polygon_sub(r.polygon([0,-1], [1,-1], [1,0], [0,0])) */ - logger.info("About to run line #88: r.polygon(r.array(0L, 0L), r.array(1L, 0L), r.array(1L, 1L), r.array(0L, 1L)).polygonSub(r.polygon(r.array(0L, -1L), r.array(1L, -1L), r.array(1L, 0L), r.array(0L, 0L)))"); - Object obtained = runOrCatch(r.polygon(r.array(0L, 0L), r.array(1L, 0L), r.array(1L, 1L), r.array(0L, 1L)).polygonSub(r.polygon(r.array(0L, -1L), r.array(1L, -1L), r.array(1L, 0L), r.array(0L, 0L))), - new OptArgs() - ,conn); - try { - assertEquals(expected_, obtained); - logger.info("Finished running line #88"); - } catch (Throwable ae) { - logger.error("Whoops, got exception on line #88:" + ae.toString()); - if(obtained instanceof Throwable) { - ae.addSuppressed((Throwable) obtained); - } - throw ae; - } - } - - { - // geo/operations.yaml line #90 - /* err('ReqlQueryLogicError', 'The second argument to `polygon_sub` is not contained in the first one.', [0]) */ - Err expected_ = err("ReqlQueryLogicError", "The second argument to `polygon_sub` is not contained in the first one.", r.array(0L)); - /* r.polygon([0,0], [1,0], [1,1], [0,1]).polygon_sub(r.polygon([0.1,-1], [0.9,-1], [0.9,0.5], [0.1,0.5])) */ - logger.info("About to run line #90: r.polygon(r.array(0L, 0L), r.array(1L, 0L), r.array(1L, 1L), r.array(0L, 1L)).polygonSub(r.polygon(r.array(0.1, -1L), r.array(0.9, -1L), r.array(0.9, 0.5), r.array(0.1, 0.5)))"); - Object obtained = runOrCatch(r.polygon(r.array(0L, 0L), r.array(1L, 0L), r.array(1L, 1L), r.array(0L, 1L)).polygonSub(r.polygon(r.array(0.1, -1L), r.array(0.9, -1L), r.array(0.9, 0.5), r.array(0.1, 0.5))), - new OptArgs() - ,conn); - try { - assertEquals(expected_, obtained); - logger.info("Finished running line #90"); - } catch (Throwable ae) { - logger.error("Whoops, got exception on line #90:" + ae.toString()); - if(obtained instanceof Throwable) { - ae.addSuppressed((Throwable) obtained); - } - throw ae; - } - } - - { - // geo/operations.yaml line #92 - /* ({'$reql_type$':'GEOMETRY', 'coordinates':[[[0,0],[1,0],[1,1],[0,1],[0,0]],[[0,0],[0.1,0.9],[0.9,0.9],[0.9,0.1],[0,0]]], 'type':'Polygon'}) */ - Map expected_ = r.hashMap("$reql_type$", "GEOMETRY").with("coordinates", r.array(r.array(r.array(0L, 0L), r.array(1L, 0L), r.array(1L, 1L), r.array(0L, 1L), r.array(0L, 0L)), r.array(r.array(0L, 0L), r.array(0.1, 0.9), r.array(0.9, 0.9), r.array(0.9, 0.1), r.array(0L, 0L)))).with("type", "Polygon"); - /* r.polygon([0,0], [1,0], [1,1], [0,1]).polygon_sub(r.polygon([0,0],[0.1,0.9],[0.9,0.9],[0.9,0.1])) */ - logger.info("About to run line #92: r.polygon(r.array(0L, 0L), r.array(1L, 0L), r.array(1L, 1L), r.array(0L, 1L)).polygonSub(r.polygon(r.array(0L, 0L), r.array(0.1, 0.9), r.array(0.9, 0.9), r.array(0.9, 0.1)))"); - Object obtained = runOrCatch(r.polygon(r.array(0L, 0L), r.array(1L, 0L), r.array(1L, 1L), r.array(0L, 1L)).polygonSub(r.polygon(r.array(0L, 0L), r.array(0.1, 0.9), r.array(0.9, 0.9), r.array(0.9, 0.1))), - new OptArgs() - ,conn); - try { - assertEquals(expected_, obtained); - logger.info("Finished running line #92"); - } catch (Throwable ae) { - logger.error("Whoops, got exception on line #92:" + ae.toString()); - if(obtained instanceof Throwable) { - ae.addSuppressed((Throwable) obtained); - } - throw ae; - } - } - - { - // geo/operations.yaml line #94 - /* err('ReqlQueryLogicError', 'Expected a Polygon with only an outer shell. This one has holes.', [0]) */ - Err expected_ = err("ReqlQueryLogicError", "Expected a Polygon with only an outer shell. This one has holes.", r.array(0L)); - /* r.polygon([0,0], [1,0], [1,1], [0,1]).polygon_sub(r.polygon([0,0],[0.1,0.9],[0.9,0.9],[0.9,0.1]).polygon_sub(r.polygon([0.2,0.2],[0.5,0.8],[0.8,0.2]))) */ - logger.info("About to run line #94: r.polygon(r.array(0L, 0L), r.array(1L, 0L), r.array(1L, 1L), r.array(0L, 1L)).polygonSub(r.polygon(r.array(0L, 0L), r.array(0.1, 0.9), r.array(0.9, 0.9), r.array(0.9, 0.1)).polygonSub(r.polygon(r.array(0.2, 0.2), r.array(0.5, 0.8), r.array(0.8, 0.2))))"); - Object obtained = runOrCatch(r.polygon(r.array(0L, 0L), r.array(1L, 0L), r.array(1L, 1L), r.array(0L, 1L)).polygonSub(r.polygon(r.array(0L, 0L), r.array(0.1, 0.9), r.array(0.9, 0.9), r.array(0.9, 0.1)).polygonSub(r.polygon(r.array(0.2, 0.2), r.array(0.5, 0.8), r.array(0.8, 0.2)))), - new OptArgs() - ,conn); - try { - assertEquals(expected_, obtained); - logger.info("Finished running line #94"); - } catch (Throwable ae) { - logger.error("Whoops, got exception on line #94:" + ae.toString()); - if(obtained instanceof Throwable) { - ae.addSuppressed((Throwable) obtained); - } - throw ae; - } - } - - { - // geo/operations.yaml line #96 - /* err('ReqlQueryLogicError', 'Expected a Polygon but found a LineString.', []) */ - Err expected_ = err("ReqlQueryLogicError", "Expected a Polygon but found a LineString.", r.array()); - /* r.polygon([0,0], [1,0], [1,1], [0,1]).polygon_sub(r.line([0,0],[0.9,0.1],[0.9,0.9],[0.1,0.9])) */ - logger.info("About to run line #96: r.polygon(r.array(0L, 0L), r.array(1L, 0L), r.array(1L, 1L), r.array(0L, 1L)).polygonSub(r.line(r.array(0L, 0L), r.array(0.9, 0.1), r.array(0.9, 0.9), r.array(0.1, 0.9)))"); - Object obtained = runOrCatch(r.polygon(r.array(0L, 0L), r.array(1L, 0L), r.array(1L, 1L), r.array(0L, 1L)).polygonSub(r.line(r.array(0L, 0L), r.array(0.9, 0.1), r.array(0.9, 0.9), r.array(0.1, 0.9))), - new OptArgs() - ,conn); - try { - assertEquals(expected_, obtained); - logger.info("Finished running line #96"); - } catch (Throwable ae) { - logger.error("Whoops, got exception on line #96:" + ae.toString()); - if(obtained instanceof Throwable) { - ae.addSuppressed((Throwable) obtained); - } - throw ae; - } - } - } -} diff --git a/drivers/java/src/test/java/com/rethinkdb/gen/GeoPrimitives.java b/drivers/java/src/test/java/com/rethinkdb/gen/GeoPrimitives.java deleted file mode 100644 index c802d71fbe7..00000000000 --- a/drivers/java/src/test/java/com/rethinkdb/gen/GeoPrimitives.java +++ /dev/null @@ -1,266 +0,0 @@ -// Autogenerated by convert_tests.py and process_polyglot.py. -// Do not edit this file directly. -// The template for this file is located at: -// ../../../../../../../templates/Test.java -package com.rethinkdb.gen; - -import com.rethinkdb.RethinkDB; -import com.rethinkdb.gen.exc.*; -import com.rethinkdb.gen.ast.*; -import com.rethinkdb.ast.ReqlAst; -import com.rethinkdb.model.MapObject; -import com.rethinkdb.model.OptArgs; -import com.rethinkdb.net.Connection; -import com.rethinkdb.net.Cursor; -import junit.framework.TestCase; -import static org.junit.Assert.assertEquals; -import static org.junit.Assert.assertArrayEquals; -import org.slf4j.Logger; -import org.slf4j.LoggerFactory; - -import org.junit.*; -import org.junit.rules.ExpectedException; - -import java.util.Arrays; -import java.util.ArrayList; -import java.util.List; -import java.util.Map; -import java.util.Set; -import java.time.OffsetDateTime; -import java.time.ZoneOffset; -import java.time.Instant; -import java.util.stream.LongStream; -import java.util.stream.Collectors; -import java.util.stream.Stream; -import java.util.concurrent.TimeoutException; -import java.util.regex.Pattern; -import java.util.Collections; -import java.nio.charset.StandardCharsets; - -import static com.rethinkdb.TestingCommon.*; -import com.rethinkdb.TestingFramework; - -public class GeoPrimitives { - // Test geometric primitive constructors - Logger logger = LoggerFactory.getLogger(GeoPrimitives.class); - public static final RethinkDB r = RethinkDB.r; - - Connection conn; - - @Before - public void setUp() throws Exception { - logger.info("Setting up."); - conn = TestingFramework.createConnection(); - try { - r.dbCreate("test").run(conn); - r.db("test").wait_().run(conn); - }catch (Exception e){} - } - - @After - public void tearDown() throws Exception { - logger.info("Tearing down."); - r.db("rethinkdb").table("_debug_scratch").delete().run(conn); - if(!conn.isOpen()){ - conn.close(); - conn = TestingFramework.createConnection(); - } - r.dbDrop("test").run(conn); - conn.close(false); - } - - // Autogenerated tests below - - @Test(timeout=120000) - public void test() throws Exception { - - { - // geo/primitives.yaml line #5 - /* ({'$reql_type$':'GEOMETRY', 'coordinates':[[[0, -9.04369477050382e-06], [-7.779638566553426e-06, 4.5218473852518965e-06], [7.779638566553426e-06, 4.5218473852518965e-06], [0, -9.04369477050382e-06]]], 'type':'Polygon'}) */ - Map expected_ = r.hashMap("$reql_type$", "GEOMETRY").with("coordinates", r.array(r.array(r.array(0L, -9.04369477050382e-06), r.array(-7.779638566553426e-06, 4.5218473852518965e-06), r.array(7.779638566553426e-06, 4.5218473852518965e-06), r.array(0L, -9.04369477050382e-06)))).with("type", "Polygon"); - /* r.circle([0,0], 1, num_vertices=3) */ - logger.info("About to run line #5: r.circle(r.array(0L, 0L), 1L).optArg('num_vertices', 3L)"); - Object obtained = runOrCatch(r.circle(r.array(0L, 0L), 1L).optArg("num_vertices", 3L), - new OptArgs() - ,conn); - try { - assertEquals(expected_, obtained); - logger.info("Finished running line #5"); - } catch (Throwable ae) { - logger.error("Whoops, got exception on line #5:" + ae.toString()); - if(obtained instanceof Throwable) { - ae.addSuppressed((Throwable) obtained); - } - throw ae; - } - } - - { - // geo/primitives.yaml line #10 - /* ({'$reql_type$':'GEOMETRY', 'coordinates':[[[0, -9.04369477050382e-06], [-7.779638566553426e-06, 4.5218473852518965e-06], [7.779638566553426e-06, 4.5218473852518965e-06], [0, -9.04369477050382e-06]]], 'type':'Polygon'}) */ - Map expected_ = r.hashMap("$reql_type$", "GEOMETRY").with("coordinates", r.array(r.array(r.array(0L, -9.04369477050382e-06), r.array(-7.779638566553426e-06, 4.5218473852518965e-06), r.array(7.779638566553426e-06, 4.5218473852518965e-06), r.array(0L, -9.04369477050382e-06)))).with("type", "Polygon"); - /* r.circle(r.point(0,0), 1, num_vertices=3) */ - logger.info("About to run line #10: r.circle(r.point(0L, 0L), 1L).optArg('num_vertices', 3L)"); - Object obtained = runOrCatch(r.circle(r.point(0L, 0L), 1L).optArg("num_vertices", 3L), - new OptArgs() - ,conn); - try { - assertEquals(expected_, obtained); - logger.info("Finished running line #10"); - } catch (Throwable ae) { - logger.error("Whoops, got exception on line #10:" + ae.toString()); - if(obtained instanceof Throwable) { - ae.addSuppressed((Throwable) obtained); - } - throw ae; - } - } - - { - // geo/primitives.yaml line #15 - /* ({'$reql_type$':'GEOMETRY', 'coordinates':[[0, -9.04369477050382e-06], [-7.779638566553426e-06, 4.5218473852518965e-06], [7.779638566553426e-06, 4.5218473852518965e-06], [0, -9.04369477050382e-06]], 'type':'LineString'}) */ - Map expected_ = r.hashMap("$reql_type$", "GEOMETRY").with("coordinates", r.array(r.array(0L, -9.04369477050382e-06), r.array(-7.779638566553426e-06, 4.5218473852518965e-06), r.array(7.779638566553426e-06, 4.5218473852518965e-06), r.array(0L, -9.04369477050382e-06))).with("type", "LineString"); - /* r.circle([0,0], 1, num_vertices=3, fill=false) */ - logger.info("About to run line #15: r.circle(r.array(0L, 0L), 1L).optArg('num_vertices', 3L).optArg('fill', false)"); - Object obtained = runOrCatch(r.circle(r.array(0L, 0L), 1L).optArg("num_vertices", 3L).optArg("fill", false), - new OptArgs() - ,conn); - try { - assertEquals(expected_, obtained); - logger.info("Finished running line #15"); - } catch (Throwable ae) { - logger.error("Whoops, got exception on line #15:" + ae.toString()); - if(obtained instanceof Throwable) { - ae.addSuppressed((Throwable) obtained); - } - throw ae; - } - } - - { - // geo/primitives.yaml line #20 - /* err('ReqlQueryLogicError', 'Radius must be smaller than a quarter of the circumference along the minor axis of the reference ellipsoid. Got 14000000m, but must be smaller than 9985163.1855612862855m.', [0]) */ - Err expected_ = err("ReqlQueryLogicError", "Radius must be smaller than a quarter of the circumference along the minor axis of the reference ellipsoid. Got 14000000m, but must be smaller than 9985163.1855612862855m.", r.array(0L)); - /* r.circle([0,0], 14000000, num_vertices=3) */ - logger.info("About to run line #20: r.circle(r.array(0L, 0L), 14000000L).optArg('num_vertices', 3L)"); - Object obtained = runOrCatch(r.circle(r.array(0L, 0L), 14000000L).optArg("num_vertices", 3L), - new OptArgs() - ,conn); - try { - assertEquals(expected_, obtained); - logger.info("Finished running line #20"); - } catch (Throwable ae) { - logger.error("Whoops, got exception on line #20:" + ae.toString()); - if(obtained instanceof Throwable) { - ae.addSuppressed((Throwable) obtained); - } - throw ae; - } - } - - { - // geo/primitives.yaml line #25 - /* ({'$reql_type$':'GEOMETRY', 'coordinates':[[[0, -9.04369477050382e-06], [-7.779638566553426e-06, 4.5218473852518965e-06], [7.779638566553426e-06, 4.5218473852518965e-06], [0, -9.04369477050382e-06]]], 'type':'Polygon'}) */ - Map expected_ = r.hashMap("$reql_type$", "GEOMETRY").with("coordinates", r.array(r.array(r.array(0L, -9.04369477050382e-06), r.array(-7.779638566553426e-06, 4.5218473852518965e-06), r.array(7.779638566553426e-06, 4.5218473852518965e-06), r.array(0L, -9.04369477050382e-06)))).with("type", "Polygon"); - /* r.circle([0,0], 1, num_vertices=3, geo_system='WGS84') */ - logger.info("About to run line #25: r.circle(r.array(0L, 0L), 1L).optArg('num_vertices', 3L).optArg('geo_system', 'WGS84')"); - Object obtained = runOrCatch(r.circle(r.array(0L, 0L), 1L).optArg("num_vertices", 3L).optArg("geo_system", "WGS84"), - new OptArgs() - ,conn); - try { - assertEquals(expected_, obtained); - logger.info("Finished running line #25"); - } catch (Throwable ae) { - logger.error("Whoops, got exception on line #25:" + ae.toString()); - if(obtained instanceof Throwable) { - ae.addSuppressed((Throwable) obtained); - } - throw ae; - } - } - - { - // geo/primitives.yaml line #30 - /* err('ReqlQueryLogicError', 'Radius must be smaller than a quarter of the circumference along the minor axis of the reference ellipsoid. Got 2m, but must be smaller than 1.570796326794896558m.', [0]) */ - Err expected_ = err("ReqlQueryLogicError", "Radius must be smaller than a quarter of the circumference along the minor axis of the reference ellipsoid. Got 2m, but must be smaller than 1.570796326794896558m.", r.array(0L)); - /* r.circle([0,0], 2, num_vertices=3, geo_system='unit_sphere') */ - logger.info("About to run line #30: r.circle(r.array(0L, 0L), 2L).optArg('num_vertices', 3L).optArg('geo_system', 'unit_sphere')"); - Object obtained = runOrCatch(r.circle(r.array(0L, 0L), 2L).optArg("num_vertices", 3L).optArg("geo_system", "unit_sphere"), - new OptArgs() - ,conn); - try { - assertEquals(expected_, obtained); - logger.info("Finished running line #30"); - } catch (Throwable ae) { - logger.error("Whoops, got exception on line #30:" + ae.toString()); - if(obtained instanceof Throwable) { - ae.addSuppressed((Throwable) obtained); - } - throw ae; - } - } - - { - // geo/primitives.yaml line #35 - /* ({'$reql_type$':'GEOMETRY', 'coordinates':[[[0, -5.729577951308232], [-4.966092947444857, 2.861205754495701], [4.966092947444857, 2.861205754495701], [0, -5.729577951308232]]], 'type':'Polygon'}) */ - Map expected_ = r.hashMap("$reql_type$", "GEOMETRY").with("coordinates", r.array(r.array(r.array(0L, -5.729577951308232), r.array(-4.966092947444857, 2.861205754495701), r.array(4.966092947444857, 2.861205754495701), r.array(0L, -5.729577951308232)))).with("type", "Polygon"); - /* r.circle([0,0], 0.1, num_vertices=3, geo_system='unit_sphere') */ - logger.info("About to run line #35: r.circle(r.array(0L, 0L), 0.1).optArg('num_vertices', 3L).optArg('geo_system', 'unit_sphere')"); - Object obtained = runOrCatch(r.circle(r.array(0L, 0L), 0.1).optArg("num_vertices", 3L).optArg("geo_system", "unit_sphere"), - new OptArgs() - ,conn); - try { - assertEquals(expected_, obtained); - logger.info("Finished running line #35"); - } catch (Throwable ae) { - logger.error("Whoops, got exception on line #35:" + ae.toString()); - if(obtained instanceof Throwable) { - ae.addSuppressed((Throwable) obtained); - } - throw ae; - } - } - - { - // geo/primitives.yaml line #42 - /* ({'$reql_type$':'GEOMETRY', 'coordinates':[[[0, -9.04369477050382e-06], [-7.779638566553426e-06, 4.5218473852518965e-06], [7.779638566553426e-06, 4.5218473852518965e-06], [0, -9.04369477050382e-06]]], 'type':'Polygon'}) */ - Map expected_ = r.hashMap("$reql_type$", "GEOMETRY").with("coordinates", r.array(r.array(r.array(0L, -9.04369477050382e-06), r.array(-7.779638566553426e-06, 4.5218473852518965e-06), r.array(7.779638566553426e-06, 4.5218473852518965e-06), r.array(0L, -9.04369477050382e-06)))).with("type", "Polygon"); - /* r.circle([0,0], 1.0/1000.0, num_vertices=3, unit='km') */ - logger.info("About to run line #42: r.circle(r.array(0L, 0L), r.div(1.0, 1000.0)).optArg('num_vertices', 3L).optArg('unit', 'km')"); - Object obtained = runOrCatch(r.circle(r.array(0L, 0L), r.div(1.0, 1000.0)).optArg("num_vertices", 3L).optArg("unit", "km"), - new OptArgs() - ,conn); - try { - assertEquals(expected_, obtained); - logger.info("Finished running line #42"); - } catch (Throwable ae) { - logger.error("Whoops, got exception on line #42:" + ae.toString()); - if(obtained instanceof Throwable) { - ae.addSuppressed((Throwable) obtained); - } - throw ae; - } - } - - { - // geo/primitives.yaml line #47 - /* ({'$reql_type$':'GEOMETRY', 'coordinates':[[[0, -9.04369477050382e-06], [-7.779638566553426e-06, 4.5218473852518965e-06], [7.779638566553426e-06, 4.5218473852518965e-06], [0, -9.04369477050382e-06]]], 'type':'Polygon'}) */ - Map expected_ = r.hashMap("$reql_type$", "GEOMETRY").with("coordinates", r.array(r.array(r.array(0L, -9.04369477050382e-06), r.array(-7.779638566553426e-06, 4.5218473852518965e-06), r.array(7.779638566553426e-06, 4.5218473852518965e-06), r.array(0L, -9.04369477050382e-06)))).with("type", "Polygon"); - /* r.circle([0,0], 1.0/1609.344, num_vertices=3, unit='mi') */ - logger.info("About to run line #47: r.circle(r.array(0L, 0L), r.div(1.0, 1609.344)).optArg('num_vertices', 3L).optArg('unit', 'mi')"); - Object obtained = runOrCatch(r.circle(r.array(0L, 0L), r.div(1.0, 1609.344)).optArg("num_vertices", 3L).optArg("unit", "mi"), - new OptArgs() - ,conn); - try { - assertEquals(expected_, obtained); - logger.info("Finished running line #47"); - } catch (Throwable ae) { - logger.error("Whoops, got exception on line #47:" + ae.toString()); - if(obtained instanceof Throwable) { - ae.addSuppressed((Throwable) obtained); - } - throw ae; - } - } - } -} diff --git a/drivers/java/src/test/java/com/rethinkdb/gen/Json.java b/drivers/java/src/test/java/com/rethinkdb/gen/Json.java deleted file mode 100644 index 29c3981c316..00000000000 --- a/drivers/java/src/test/java/com/rethinkdb/gen/Json.java +++ /dev/null @@ -1,513 +0,0 @@ -// Autogenerated by convert_tests.py and process_polyglot.py. -// Do not edit this file directly. -// The template for this file is located at: -// ../../../../../../../templates/Test.java -package com.rethinkdb.gen; - -import com.rethinkdb.RethinkDB; -import com.rethinkdb.gen.exc.*; -import com.rethinkdb.gen.ast.*; -import com.rethinkdb.ast.ReqlAst; -import com.rethinkdb.model.MapObject; -import com.rethinkdb.model.OptArgs; -import com.rethinkdb.net.Connection; -import com.rethinkdb.net.Cursor; -import junit.framework.TestCase; -import static org.junit.Assert.assertEquals; -import static org.junit.Assert.assertArrayEquals; -import org.slf4j.Logger; -import org.slf4j.LoggerFactory; - -import org.junit.*; -import org.junit.rules.ExpectedException; - -import java.util.Arrays; -import java.util.ArrayList; -import java.util.List; -import java.util.Map; -import java.util.Set; -import java.time.OffsetDateTime; -import java.time.ZoneOffset; -import java.time.Instant; -import java.util.stream.LongStream; -import java.util.stream.Collectors; -import java.util.stream.Stream; -import java.util.concurrent.TimeoutException; -import java.util.regex.Pattern; -import java.util.Collections; -import java.nio.charset.StandardCharsets; - -import static com.rethinkdb.TestingCommon.*; -import com.rethinkdb.TestingFramework; - -public class Json { - // Tests RQL json parsing - Logger logger = LoggerFactory.getLogger(Json.class); - public static final RethinkDB r = RethinkDB.r; - - Connection conn; - - @Before - public void setUp() throws Exception { - logger.info("Setting up."); - conn = TestingFramework.createConnection(); - try { - r.dbCreate("test").run(conn); - r.db("test").wait_().run(conn); - }catch (Exception e){} - } - - @After - public void tearDown() throws Exception { - logger.info("Tearing down."); - r.db("rethinkdb").table("_debug_scratch").delete().run(conn); - if(!conn.isOpen()){ - conn.close(); - conn = TestingFramework.createConnection(); - } - r.dbDrop("test").run(conn); - conn.close(false); - } - - // Autogenerated tests below - - @Test(timeout=120000) - public void test() throws Exception { - - { - // json.yaml line #4 - /* [1,2,3] */ - List expected_ = r.array(1L, 2L, 3L); - /* r.json("[1,2,3]") */ - logger.info("About to run line #4: r.json('[1,2,3]')"); - Object obtained = runOrCatch(r.json("[1,2,3]"), - new OptArgs() - ,conn); - try { - assertEquals(expected_, obtained); - logger.info("Finished running line #4"); - } catch (Throwable ae) { - logger.error("Whoops, got exception on line #4:" + ae.toString()); - if(obtained instanceof Throwable) { - ae.addSuppressed((Throwable) obtained); - } - throw ae; - } - } - - { - // json.yaml line #7 - /* 1 */ - Long expected_ = 1L; - /* r.json("1") */ - logger.info("About to run line #7: r.json('1')"); - Object obtained = runOrCatch(r.json("1"), - new OptArgs() - ,conn); - try { - assertEquals(expected_, obtained); - logger.info("Finished running line #7"); - } catch (Throwable ae) { - logger.error("Whoops, got exception on line #7:" + ae.toString()); - if(obtained instanceof Throwable) { - ae.addSuppressed((Throwable) obtained); - } - throw ae; - } - } - - { - // json.yaml line #10 - /* {} */ - Map expected_ = r.hashMap(); - /* r.json("{}") */ - logger.info("About to run line #10: r.json('{}')"); - Object obtained = runOrCatch(r.json("{}"), - new OptArgs() - ,conn); - try { - assertEquals(expected_, obtained); - logger.info("Finished running line #10"); - } catch (Throwable ae) { - logger.error("Whoops, got exception on line #10:" + ae.toString()); - if(obtained instanceof Throwable) { - ae.addSuppressed((Throwable) obtained); - } - throw ae; - } - } - - { - // json.yaml line #13 - /* "foo" */ - String expected_ = "foo"; - /* r.json('"foo"') */ - logger.info("About to run line #13: r.json('\\'foo\\'')"); - Object obtained = runOrCatch(r.json("\"foo\""), - new OptArgs() - ,conn); - try { - assertEquals(expected_, obtained); - logger.info("Finished running line #13"); - } catch (Throwable ae) { - logger.error("Whoops, got exception on line #13:" + ae.toString()); - if(obtained instanceof Throwable) { - ae.addSuppressed((Throwable) obtained); - } - throw ae; - } - } - - { - // json.yaml line #16 - /* err("ReqlQueryLogicError", 'Failed to parse "[1,2" as JSON:' + ' Missing a comma or \']\' after an array element.', [0]) */ - Err expected_ = err("ReqlQueryLogicError", "Failed to parse \"[1,2\" as JSON:" + " Missing a comma or ']' after an array element.", r.array(0L)); - /* r.json("[1,2") */ - logger.info("About to run line #16: r.json('[1,2')"); - Object obtained = runOrCatch(r.json("[1,2"), - new OptArgs() - ,conn); - try { - assertEquals(expected_, obtained); - logger.info("Finished running line #16"); - } catch (Throwable ae) { - logger.error("Whoops, got exception on line #16:" + ae.toString()); - if(obtained instanceof Throwable) { - ae.addSuppressed((Throwable) obtained); - } - throw ae; - } - } - - { - // json.yaml line #19 - /* '[1,2,3]' */ - String expected_ = "[1,2,3]"; - /* r.json("[1,2,3]").to_json_string() */ - logger.info("About to run line #19: r.json('[1,2,3]').toJsonString()"); - Object obtained = runOrCatch(r.json("[1,2,3]").toJsonString(), - new OptArgs() - ,conn); - try { - assertEquals(expected_, obtained); - logger.info("Finished running line #19"); - } catch (Throwable ae) { - logger.error("Whoops, got exception on line #19:" + ae.toString()); - if(obtained instanceof Throwable) { - ae.addSuppressed((Throwable) obtained); - } - throw ae; - } - } - - { - // json.yaml line #23 - /* '[1,2,3]' */ - String expected_ = "[1,2,3]"; - /* r.json("[1,2,3]").to_json() */ - logger.info("About to run line #23: r.json('[1,2,3]').toJson()"); - Object obtained = runOrCatch(r.json("[1,2,3]").toJson(), - new OptArgs() - ,conn); - try { - assertEquals(expected_, obtained); - logger.info("Finished running line #23"); - } catch (Throwable ae) { - logger.error("Whoops, got exception on line #23:" + ae.toString()); - if(obtained instanceof Throwable) { - ae.addSuppressed((Throwable) obtained); - } - throw ae; - } - } - - { - // json.yaml line #26 - /* '{"foo":4}' */ - String expected_ = "{\"foo\":4}"; - /* r.json("{\"foo\":4}").to_json_string() */ - logger.info("About to run line #26: r.json('{\\'foo\\':4}').toJsonString()"); - Object obtained = runOrCatch(r.json("{\"foo\":4}").toJsonString(), - new OptArgs() - ,conn); - try { - assertEquals(expected_, obtained); - logger.info("Finished running line #26"); - } catch (Throwable ae) { - logger.error("Whoops, got exception on line #26:" + ae.toString()); - if(obtained instanceof Throwable) { - ae.addSuppressed((Throwable) obtained); - } - throw ae; - } - } - - { - // json.yaml line #30 - /* '{"foo":4}' */ - String expected_ = "{\"foo\":4}"; - /* r.json("{\"foo\":4}").to_json() */ - logger.info("About to run line #30: r.json('{\\'foo\\':4}').toJson()"); - Object obtained = runOrCatch(r.json("{\"foo\":4}").toJson(), - new OptArgs() - ,conn); - try { - assertEquals(expected_, obtained); - logger.info("Finished running line #30"); - } catch (Throwable ae) { - logger.error("Whoops, got exception on line #30:" + ae.toString()); - if(obtained instanceof Throwable) { - ae.addSuppressed((Throwable) obtained); - } - throw ae; - } - } - - // json.yaml line #34 - // text = '[{"id":1,"first_name":"Harry","last_name":"Riley","email":"hriley0@usgs.gov","country":"Andorra","ip_address":"221.25.65.136"},{"id":2,"first_name":"Bonnie","last_name":"Anderson","email":"banderson1@list-manage.com","country":"Tuvalu","ip_address":"116.162.43.150"},{"id":3,"first_name":"Marie","last_name":"Schmidt","email":"mschmidt2@diigo.com","country":"Iraq","ip_address":"181.105.59.57"},{"id":4,"first_name":"Phillip","last_name":"Willis","email":"pwillis3@com.com","country":"Montenegro","ip_address":"24.223.139.156"}]' - logger.info("Possibly executing: String text = (String) ('[{\\'id\\':1,\\'first_name\\':\\'Harry\\',\\'last_name\\':\\'Riley\\',\\'email\\':\\'hriley0@usgs.gov\\',\\'country\\':\\'Andorra\\',\\'ip_address\\':\\'221.25.65.136\\'},{\\'id\\':2,\\'first_name\\':\\'Bonnie\\',\\'last_name\\':\\'Anderson\\',\\'email\\':\\'banderson1@list-manage.com\\',\\'country\\':\\'Tuvalu\\',\\'ip_address\\':\\'116.162.43.150\\'},{\\'id\\':3,\\'first_name\\':\\'Marie\\',\\'last_name\\':\\'Schmidt\\',\\'email\\':\\'mschmidt2@diigo.com\\',\\'country\\':\\'Iraq\\',\\'ip_address\\':\\'181.105.59.57\\'},{\\'id\\':4,\\'first_name\\':\\'Phillip\\',\\'last_name\\':\\'Willis\\',\\'email\\':\\'pwillis3@com.com\\',\\'country\\':\\'Montenegro\\',\\'ip_address\\':\\'24.223.139.156\\'}]');"); - String text = (String) ("[{\"id\":1,\"first_name\":\"Harry\",\"last_name\":\"Riley\",\"email\":\"hriley0@usgs.gov\",\"country\":\"Andorra\",\"ip_address\":\"221.25.65.136\"},{\"id\":2,\"first_name\":\"Bonnie\",\"last_name\":\"Anderson\",\"email\":\"banderson1@list-manage.com\",\"country\":\"Tuvalu\",\"ip_address\":\"116.162.43.150\"},{\"id\":3,\"first_name\":\"Marie\",\"last_name\":\"Schmidt\",\"email\":\"mschmidt2@diigo.com\",\"country\":\"Iraq\",\"ip_address\":\"181.105.59.57\"},{\"id\":4,\"first_name\":\"Phillip\",\"last_name\":\"Willis\",\"email\":\"pwillis3@com.com\",\"country\":\"Montenegro\",\"ip_address\":\"24.223.139.156\"}]"); - - // json.yaml line #35 - // sorted = '[{"country":"Andorra","email":"hriley0@usgs.gov","first_name":"Harry","id":1,"ip_address":"221.25.65.136","last_name":"Riley"},{"country":"Tuvalu","email":"banderson1@list-manage.com","first_name":"Bonnie","id":2,"ip_address":"116.162.43.150","last_name":"Anderson"},{"country":"Iraq","email":"mschmidt2@diigo.com","first_name":"Marie","id":3,"ip_address":"181.105.59.57","last_name":"Schmidt"},{"country":"Montenegro","email":"pwillis3@com.com","first_name":"Phillip","id":4,"ip_address":"24.223.139.156","last_name":"Willis"}]' - logger.info("Possibly executing: String sorted = (String) ('[{\\'country\\':\\'Andorra\\',\\'email\\':\\'hriley0@usgs.gov\\',\\'first_name\\':\\'Harry\\',\\'id\\':1,\\'ip_address\\':\\'221.25.65.136\\',\\'last_name\\':\\'Riley\\'},{\\'country\\':\\'Tuvalu\\',\\'email\\':\\'banderson1@list-manage.com\\',\\'first_name\\':\\'Bonnie\\',\\'id\\':2,\\'ip_address\\':\\'116.162.43.150\\',\\'last_name\\':\\'Anderson\\'},{\\'country\\':\\'Iraq\\',\\'email\\':\\'mschmidt2@diigo.com\\',\\'first_name\\':\\'Marie\\',\\'id\\':3,\\'ip_address\\':\\'181.105.59.57\\',\\'last_name\\':\\'Schmidt\\'},{\\'country\\':\\'Montenegro\\',\\'email\\':\\'pwillis3@com.com\\',\\'first_name\\':\\'Phillip\\',\\'id\\':4,\\'ip_address\\':\\'24.223.139.156\\',\\'last_name\\':\\'Willis\\'}]');"); - String sorted = (String) ("[{\"country\":\"Andorra\",\"email\":\"hriley0@usgs.gov\",\"first_name\":\"Harry\",\"id\":1,\"ip_address\":\"221.25.65.136\",\"last_name\":\"Riley\"},{\"country\":\"Tuvalu\",\"email\":\"banderson1@list-manage.com\",\"first_name\":\"Bonnie\",\"id\":2,\"ip_address\":\"116.162.43.150\",\"last_name\":\"Anderson\"},{\"country\":\"Iraq\",\"email\":\"mschmidt2@diigo.com\",\"first_name\":\"Marie\",\"id\":3,\"ip_address\":\"181.105.59.57\",\"last_name\":\"Schmidt\"},{\"country\":\"Montenegro\",\"email\":\"pwillis3@com.com\",\"first_name\":\"Phillip\",\"id\":4,\"ip_address\":\"24.223.139.156\",\"last_name\":\"Willis\"}]"); - - { - // json.yaml line #37 - /* sorted */ - String expected_ = sorted; - /* r.json(text).to_json_string() */ - logger.info("About to run line #37: r.json(text).toJsonString()"); - Object obtained = runOrCatch(r.json(text).toJsonString(), - new OptArgs() - ,conn); - try { - assertEquals(expected_, obtained); - logger.info("Finished running line #37"); - } catch (Throwable ae) { - logger.error("Whoops, got exception on line #37:" + ae.toString()); - if(obtained instanceof Throwable) { - ae.addSuppressed((Throwable) obtained); - } - throw ae; - } - } - - { - // json.yaml line #40 - /* err('ReqlQueryLogicError', 'Cannot convert `r.minval` to JSON.') */ - Err expected_ = err("ReqlQueryLogicError", "Cannot convert `r.minval` to JSON."); - /* r.expr(r.minval).to_json_string() */ - logger.info("About to run line #40: r.expr(r.minval()).toJsonString()"); - Object obtained = runOrCatch(r.expr(r.minval()).toJsonString(), - new OptArgs() - ,conn); - try { - assertEquals(expected_, obtained); - logger.info("Finished running line #40"); - } catch (Throwable ae) { - logger.error("Whoops, got exception on line #40:" + ae.toString()); - if(obtained instanceof Throwable) { - ae.addSuppressed((Throwable) obtained); - } - throw ae; - } - } - - { - // json.yaml line #43 - /* err('ReqlQueryLogicError', 'Cannot convert `r.maxval` to JSON.') */ - Err expected_ = err("ReqlQueryLogicError", "Cannot convert `r.maxval` to JSON."); - /* r.expr(r.maxval).to_json_string() */ - logger.info("About to run line #43: r.expr(r.maxval()).toJsonString()"); - Object obtained = runOrCatch(r.expr(r.maxval()).toJsonString(), - new OptArgs() - ,conn); - try { - assertEquals(expected_, obtained); - logger.info("Finished running line #43"); - } catch (Throwable ae) { - logger.error("Whoops, got exception on line #43:" + ae.toString()); - if(obtained instanceof Throwable) { - ae.addSuppressed((Throwable) obtained); - } - throw ae; - } - } - - { - // json.yaml line #46 - /* err('ReqlQueryLogicError', 'Cannot convert `r.minval` to JSON.') */ - Err expected_ = err("ReqlQueryLogicError", "Cannot convert `r.minval` to JSON."); - /* r.expr(r.minval).coerce_to('string') */ - logger.info("About to run line #46: r.expr(r.minval()).coerceTo('string')"); - Object obtained = runOrCatch(r.expr(r.minval()).coerceTo("string"), - new OptArgs() - ,conn); - try { - assertEquals(expected_, obtained); - logger.info("Finished running line #46"); - } catch (Throwable ae) { - logger.error("Whoops, got exception on line #46:" + ae.toString()); - if(obtained instanceof Throwable) { - ae.addSuppressed((Throwable) obtained); - } - throw ae; - } - } - - { - // json.yaml line #49 - /* err('ReqlQueryLogicError', 'Cannot convert `r.maxval` to JSON.') */ - Err expected_ = err("ReqlQueryLogicError", "Cannot convert `r.maxval` to JSON."); - /* r.expr(r.maxval).coerce_to('string') */ - logger.info("About to run line #49: r.expr(r.maxval()).coerceTo('string')"); - Object obtained = runOrCatch(r.expr(r.maxval()).coerceTo("string"), - new OptArgs() - ,conn); - try { - assertEquals(expected_, obtained); - logger.info("Finished running line #49"); - } catch (Throwable ae) { - logger.error("Whoops, got exception on line #49:" + ae.toString()); - if(obtained instanceof Throwable) { - ae.addSuppressed((Throwable) obtained); - } - throw ae; - } - } - - { - // json.yaml line #52 - /* {'timezone':'+00:00','$reql_type$':'TIME','epoch_time':1410393600} */ - Map expected_ = r.hashMap("timezone", "+00:00").with("$reql_type$", "TIME").with("epoch_time", 1410393600L); - /* r.time(2014,9,11, 'Z') */ - logger.info("About to run line #52: r.time(2014L, 9L, 11L, 'Z')"); - Object obtained = runOrCatch(r.time(2014L, 9L, 11L, "Z"), - new OptArgs() - .with("time_format", "raw") - ,conn); - try { - assertEquals(expected_, obtained); - logger.info("Finished running line #52"); - } catch (Throwable ae) { - logger.error("Whoops, got exception on line #52:" + ae.toString()); - if(obtained instanceof Throwable) { - ae.addSuppressed((Throwable) obtained); - } - throw ae; - } - } - - { - // json.yaml line #57 - /* '{"$reql_type$":"TIME","epoch_time":1410393600,"timezone":"+00:00"}' */ - String expected_ = "{\"$reql_type$\":\"TIME\",\"epoch_time\":1410393600,\"timezone\":\"+00:00\"}"; - /* r.time(2014,9,11, 'Z').to_json_string() */ - logger.info("About to run line #57: r.time(2014L, 9L, 11L, 'Z').toJsonString()"); - Object obtained = runOrCatch(r.time(2014L, 9L, 11L, "Z").toJsonString(), - new OptArgs() - ,conn); - try { - assertEquals(expected_, obtained); - logger.info("Finished running line #57"); - } catch (Throwable ae) { - logger.error("Whoops, got exception on line #57:" + ae.toString()); - if(obtained instanceof Throwable) { - ae.addSuppressed((Throwable) obtained); - } - throw ae; - } - } - - { - // json.yaml line #60 - /* {'$reql_type$':'GEOMETRY','coordinates':[0,0],'type':'Point'} */ - Map expected_ = r.hashMap("$reql_type$", "GEOMETRY").with("coordinates", r.array(0L, 0L)).with("type", "Point"); - /* r.point(0,0) */ - logger.info("About to run line #60: r.point(0L, 0L)"); - Object obtained = runOrCatch(r.point(0L, 0L), - new OptArgs() - ,conn); - try { - assertEquals(expected_, obtained); - logger.info("Finished running line #60"); - } catch (Throwable ae) { - logger.error("Whoops, got exception on line #60:" + ae.toString()); - if(obtained instanceof Throwable) { - ae.addSuppressed((Throwable) obtained); - } - throw ae; - } - } - - { - // json.yaml line #63 - /* '{"$reql_type$":"GEOMETRY","coordinates":[0,0],"type":"Point"}' */ - String expected_ = "{\"$reql_type$\":\"GEOMETRY\",\"coordinates\":[0,0],\"type\":\"Point\"}"; - /* r.point(0,0).to_json_string() */ - logger.info("About to run line #63: r.point(0L, 0L).toJsonString()"); - Object obtained = runOrCatch(r.point(0L, 0L).toJsonString(), - new OptArgs() - ,conn); - try { - assertEquals(expected_, obtained); - logger.info("Finished running line #63"); - } catch (Throwable ae) { - logger.error("Whoops, got exception on line #63:" + ae.toString()); - if(obtained instanceof Throwable) { - ae.addSuppressed((Throwable) obtained); - } - throw ae; - } - } - - // json.yaml line #68 - // s = b'\x66\x6f\x6f' - logger.info("Possibly executing: byte[] s = (byte[]) (new byte[]{102, 111, 111});"); - byte[] s = (byte[]) (new byte[]{102, 111, 111}); - - { - // json.yaml line #70 - /* s */ - byte[] expected_ = s; - /* r.binary(s) */ - logger.info("About to run line #70: r.binary(s)"); - Object obtained = runOrCatch(r.binary(s), - new OptArgs() - ,conn); - try { - assertArrayEquals(expected_, (byte[]) obtained); - logger.info("Finished running line #70"); - } catch (Throwable ae) { - logger.error("Whoops, got exception on line #70:" + ae.toString()); - if(obtained instanceof Throwable) { - ae.addSuppressed((Throwable) obtained); - } - throw ae; - } - } - - { - // json.yaml line #73 - /* '{"$reql_type$":"BINARY","data":"Zm9v"}' */ - String expected_ = "{\"$reql_type$\":\"BINARY\",\"data\":\"Zm9v\"}"; - /* r.expr("foo").coerce_to("binary").to_json_string() */ - logger.info("About to run line #73: r.expr('foo').coerceTo('binary').toJsonString()"); - Object obtained = runOrCatch(r.expr("foo").coerceTo("binary").toJsonString(), - new OptArgs() - ,conn); - try { - assertEquals(expected_, obtained); - logger.info("Finished running line #73"); - } catch (Throwable ae) { - logger.error("Whoops, got exception on line #73:" + ae.toString()); - if(obtained instanceof Throwable) { - ae.addSuppressed((Throwable) obtained); - } - throw ae; - } - } - } -} diff --git a/drivers/java/src/test/java/com/rethinkdb/gen/Match.java b/drivers/java/src/test/java/com/rethinkdb/gen/Match.java deleted file mode 100644 index 730d131cca7..00000000000 --- a/drivers/java/src/test/java/com/rethinkdb/gen/Match.java +++ /dev/null @@ -1,293 +0,0 @@ -// Autogenerated by convert_tests.py and process_polyglot.py. -// Do not edit this file directly. -// The template for this file is located at: -// ../../../../../../../templates/Test.java -package com.rethinkdb.gen; - -import com.rethinkdb.RethinkDB; -import com.rethinkdb.gen.exc.*; -import com.rethinkdb.gen.ast.*; -import com.rethinkdb.ast.ReqlAst; -import com.rethinkdb.model.MapObject; -import com.rethinkdb.model.OptArgs; -import com.rethinkdb.net.Connection; -import com.rethinkdb.net.Cursor; -import junit.framework.TestCase; -import static org.junit.Assert.assertEquals; -import static org.junit.Assert.assertArrayEquals; -import org.slf4j.Logger; -import org.slf4j.LoggerFactory; - -import org.junit.*; -import org.junit.rules.ExpectedException; - -import java.util.Arrays; -import java.util.ArrayList; -import java.util.List; -import java.util.Map; -import java.util.Set; -import java.time.OffsetDateTime; -import java.time.ZoneOffset; -import java.time.Instant; -import java.util.stream.LongStream; -import java.util.stream.Collectors; -import java.util.stream.Stream; -import java.util.concurrent.TimeoutException; -import java.util.regex.Pattern; -import java.util.Collections; -import java.nio.charset.StandardCharsets; - -import static com.rethinkdb.TestingCommon.*; -import com.rethinkdb.TestingFramework; - -public class Match { - // Tests for match - Logger logger = LoggerFactory.getLogger(Match.class); - public static final RethinkDB r = RethinkDB.r; - public static final Table tbl = r.db("test").table("tbl"); - - Connection conn; - - @Before - public void setUp() throws Exception { - logger.info("Setting up."); - conn = TestingFramework.createConnection(); - try { - r.dbCreate("test").run(conn); - r.db("test").wait_().run(conn); - }catch (Exception e){} - try { - r.db("test").tableCreate("tbl").run(conn); - r.db("test").table(tbl).wait_().run(conn); - }catch (Exception e){} - } - - @After - public void tearDown() throws Exception { - logger.info("Tearing down."); - r.db("rethinkdb").table("_debug_scratch").delete().run(conn); - if(!conn.isOpen()){ - conn.close(); - conn = TestingFramework.createConnection(); - } - r.db("test").tableDrop("tbl").run(conn); - r.dbDrop("test").run(conn); - conn.close(false); - } - - // Autogenerated tests below - - @Test(timeout=120000) - public void test() throws Exception { - - { - // match.yaml line #4 - /* ({'str':'bcde','groups':[null,{'start':2,'str':'cde','end':5}],'start':1,'end':5}) */ - Map expected_ = r.hashMap("str", "bcde").with("groups", r.array(null, r.hashMap("start", 2L).with("str", "cde").with("end", 5L))).with("start", 1L).with("end", 5L); - /* r.expr("abcdefg").match("a(b.e)|b(c.e)") */ - logger.info("About to run line #4: r.expr('abcdefg').match('a(b.e)|b(c.e)')"); - Object obtained = runOrCatch(r.expr("abcdefg").match("a(b.e)|b(c.e)"), - new OptArgs() - ,conn); - try { - assertEquals(expected_, obtained); - logger.info("Finished running line #4"); - } catch (Throwable ae) { - logger.error("Whoops, got exception on line #4:" + ae.toString()); - if(obtained instanceof Throwable) { - ae.addSuppressed((Throwable) obtained); - } - throw ae; - } - } - - { - // match.yaml line #6 - /* (null) */ - Object expected_ = null; - /* r.expr("abcdefg").match("a(b.e)|B(c.e)") */ - logger.info("About to run line #6: r.expr('abcdefg').match('a(b.e)|B(c.e)')"); - Object obtained = runOrCatch(r.expr("abcdefg").match("a(b.e)|B(c.e)"), - new OptArgs() - ,conn); - try { - assertEquals(expected_, obtained); - logger.info("Finished running line #6"); - } catch (Throwable ae) { - logger.error("Whoops, got exception on line #6:" + ae.toString()); - if(obtained instanceof Throwable) { - ae.addSuppressed((Throwable) obtained); - } - throw ae; - } - } - - { - // match.yaml line #8 - /* ({'str':'bcde','groups':[null,{'start':2,'str':'cde','end':5}],'start':1,'end':5}) */ - Map expected_ = r.hashMap("str", "bcde").with("groups", r.array(null, r.hashMap("start", 2L).with("str", "cde").with("end", 5L))).with("start", 1L).with("end", 5L); - /* r.expr("abcdefg").match("(?i)a(b.e)|B(c.e)") */ - logger.info("About to run line #8: r.expr('abcdefg').match('(?i)a(b.e)|B(c.e)')"); - Object obtained = runOrCatch(r.expr("abcdefg").match("(?i)a(b.e)|B(c.e)"), - new OptArgs() - ,conn); - try { - assertEquals(expected_, obtained); - logger.info("Finished running line #8"); - } catch (Throwable ae) { - logger.error("Whoops, got exception on line #8:" + ae.toString()); - if(obtained instanceof Throwable) { - ae.addSuppressed((Throwable) obtained); - } - throw ae; - } - } - - { - // match.yaml line #12 - /* (["aca", "ada"]) */ - List expected_ = r.array("aca", "ada"); - /* r.expr(["aba", "aca", "ada", "aea"]).filter(lambda row:row.match("a(.)a")['groups'][0]['str'].match("[cd]")) */ - logger.info("About to run line #12: r.expr(r.array('aba', 'aca', 'ada', 'aea')).filter(row -> row.match('a(.)a').bracket('groups').bracket(0L).bracket('str').match('[cd]'))"); - Object obtained = runOrCatch(r.expr(r.array("aba", "aca", "ada", "aea")).filter(row -> row.match("a(.)a").bracket("groups").bracket(0L).bracket("str").match("[cd]")), - new OptArgs() - ,conn); - try { - assertEquals(expected_, obtained); - logger.info("Finished running line #12"); - } catch (Throwable ae) { - logger.error("Whoops, got exception on line #12:" + ae.toString()); - if(obtained instanceof Throwable) { - ae.addSuppressed((Throwable) obtained); - } - throw ae; - } - } - - { - // match.yaml line #16 - /* ({'deleted':0,'replaced':0,'unchanged':0,'errors':0,'skipped':0,'inserted':3}) */ - Map expected_ = r.hashMap("deleted", 0L).with("replaced", 0L).with("unchanged", 0L).with("errors", 0L).with("skipped", 0L).with("inserted", 3L); - /* tbl.insert([{'id':0,'a':'abc'},{'id':1,'a':'ab'},{'id':2,'a':'bc'}]) */ - logger.info("About to run line #16: tbl.insert(r.array(r.hashMap('id', 0L).with('a', 'abc'), r.hashMap('id', 1L).with('a', 'ab'), r.hashMap('id', 2L).with('a', 'bc')))"); - Object obtained = runOrCatch(tbl.insert(r.array(r.hashMap("id", 0L).with("a", "abc"), r.hashMap("id", 1L).with("a", "ab"), r.hashMap("id", 2L).with("a", "bc"))), - new OptArgs() - ,conn); - try { - assertEquals(expected_, obtained); - logger.info("Finished running line #16"); - } catch (Throwable ae) { - logger.error("Whoops, got exception on line #16:" + ae.toString()); - if(obtained instanceof Throwable) { - ae.addSuppressed((Throwable) obtained); - } - throw ae; - } - } - - { - // match.yaml line #20 - /* ([{'id':0,'a':'abc'},{'id':1,'a':'ab'},{'id':2,'a':'bc'}]) */ - List expected_ = r.array(r.hashMap("id", 0L).with("a", "abc"), r.hashMap("id", 1L).with("a", "ab"), r.hashMap("id", 2L).with("a", "bc")); - /* tbl.filter(lambda row:row['a'].match('b')).order_by('id') */ - logger.info("About to run line #20: tbl.filter(row -> row.bracket('a').match('b')).orderBy('id')"); - Object obtained = runOrCatch(tbl.filter(row -> row.bracket("a").match("b")).orderBy("id"), - new OptArgs() - ,conn); - try { - assertEquals(expected_, obtained); - logger.info("Finished running line #20"); - } catch (Throwable ae) { - logger.error("Whoops, got exception on line #20:" + ae.toString()); - if(obtained instanceof Throwable) { - ae.addSuppressed((Throwable) obtained); - } - throw ae; - } - } - - { - // match.yaml line #24 - /* ([{'id':0,'a':'abc'},{'id':1,'a':'ab'}]) */ - List expected_ = r.array(r.hashMap("id", 0L).with("a", "abc"), r.hashMap("id", 1L).with("a", "ab")); - /* tbl.filter(lambda row:row['a'].match('ab')).order_by('id') */ - logger.info("About to run line #24: tbl.filter(row -> row.bracket('a').match('ab')).orderBy('id')"); - Object obtained = runOrCatch(tbl.filter(row -> row.bracket("a").match("ab")).orderBy("id"), - new OptArgs() - ,conn); - try { - assertEquals(expected_, obtained); - logger.info("Finished running line #24"); - } catch (Throwable ae) { - logger.error("Whoops, got exception on line #24:" + ae.toString()); - if(obtained instanceof Throwable) { - ae.addSuppressed((Throwable) obtained); - } - throw ae; - } - } - - { - // match.yaml line #28 - /* ([{'id':1,'a':'ab'}]) */ - List expected_ = r.array(r.hashMap("id", 1L).with("a", "ab")); - /* tbl.filter(lambda row:row['a'].match('ab$')).order_by('id') */ - logger.info("About to run line #28: tbl.filter(row -> row.bracket('a').match('ab$')).orderBy('id')"); - Object obtained = runOrCatch(tbl.filter(row -> row.bracket("a").match("ab$")).orderBy("id"), - new OptArgs() - ,conn); - try { - assertEquals(expected_, obtained); - logger.info("Finished running line #28"); - } catch (Throwable ae) { - logger.error("Whoops, got exception on line #28:" + ae.toString()); - if(obtained instanceof Throwable) { - ae.addSuppressed((Throwable) obtained); - } - throw ae; - } - } - - { - // match.yaml line #32 - /* ([]) */ - List expected_ = r.array(); - /* tbl.filter(lambda row:row['a'].match('^b$')).order_by('id') */ - logger.info("About to run line #32: tbl.filter(row -> row.bracket('a').match('^b$')).orderBy('id')"); - Object obtained = runOrCatch(tbl.filter(row -> row.bracket("a").match("^b$")).orderBy("id"), - new OptArgs() - ,conn); - try { - assertEquals(expected_, obtained); - logger.info("Finished running line #32"); - } catch (Throwable ae) { - logger.error("Whoops, got exception on line #32:" + ae.toString()); - if(obtained instanceof Throwable) { - ae.addSuppressed((Throwable) obtained); - } - throw ae; - } - } - - { - // match.yaml line #36 - /* err("ReqlQueryLogicError", "Error in regexp `ab\\9` (portion `\\9`): invalid escape sequence: \\9", []) */ - Err expected_ = err("ReqlQueryLogicError", "Error in regexp `ab\\9` (portion `\\9`): invalid escape sequence: \\9", r.array()); - /* r.expr("").match("ab\\9") */ - logger.info("About to run line #36: r.expr('').match('ab\\\\9')"); - Object obtained = runOrCatch(r.expr("").match("ab\\9"), - new OptArgs() - ,conn); - try { - assertEquals(expected_, obtained); - logger.info("Finished running line #36"); - } catch (Throwable ae) { - logger.error("Whoops, got exception on line #36:" + ae.toString()); - if(obtained instanceof Throwable) { - ae.addSuppressed((Throwable) obtained); - } - throw ae; - } - } - } -} diff --git a/drivers/java/src/test/java/com/rethinkdb/gen/MathLogicAdd.java b/drivers/java/src/test/java/com/rethinkdb/gen/MathLogicAdd.java deleted file mode 100644 index a23bf873ecf..00000000000 --- a/drivers/java/src/test/java/com/rethinkdb/gen/MathLogicAdd.java +++ /dev/null @@ -1,331 +0,0 @@ -// Autogenerated by convert_tests.py and process_polyglot.py. -// Do not edit this file directly. -// The template for this file is located at: -// ../../../../../../../templates/Test.java -package com.rethinkdb.gen; - -import com.rethinkdb.RethinkDB; -import com.rethinkdb.gen.exc.*; -import com.rethinkdb.gen.ast.*; -import com.rethinkdb.ast.ReqlAst; -import com.rethinkdb.model.MapObject; -import com.rethinkdb.model.OptArgs; -import com.rethinkdb.net.Connection; -import com.rethinkdb.net.Cursor; -import junit.framework.TestCase; -import static org.junit.Assert.assertEquals; -import static org.junit.Assert.assertArrayEquals; -import org.slf4j.Logger; -import org.slf4j.LoggerFactory; - -import org.junit.*; -import org.junit.rules.ExpectedException; - -import java.util.Arrays; -import java.util.ArrayList; -import java.util.List; -import java.util.Map; -import java.util.Set; -import java.time.OffsetDateTime; -import java.time.ZoneOffset; -import java.time.Instant; -import java.util.stream.LongStream; -import java.util.stream.Collectors; -import java.util.stream.Stream; -import java.util.concurrent.TimeoutException; -import java.util.regex.Pattern; -import java.util.Collections; -import java.nio.charset.StandardCharsets; - -import static com.rethinkdb.TestingCommon.*; -import com.rethinkdb.TestingFramework; - -public class MathLogicAdd { - // Tests for basic usage of the add operation - Logger logger = LoggerFactory.getLogger(MathLogicAdd.class); - public static final RethinkDB r = RethinkDB.r; - - Connection conn; - - @Before - public void setUp() throws Exception { - logger.info("Setting up."); - conn = TestingFramework.createConnection(); - try { - r.dbCreate("test").run(conn); - r.db("test").wait_().run(conn); - }catch (Exception e){} - } - - @After - public void tearDown() throws Exception { - logger.info("Tearing down."); - r.db("rethinkdb").table("_debug_scratch").delete().run(conn); - if(!conn.isOpen()){ - conn.close(); - conn = TestingFramework.createConnection(); - } - r.dbDrop("test").run(conn); - conn.close(false); - } - - // Autogenerated tests below - - @Test(timeout=120000) - public void test() throws Exception { - - { - // math_logic/add.yaml line #3 - /* 2 */ - Long expected_ = 2L; - /* r.add(1, 1) */ - logger.info("About to run line #3: r.add(1L, 1L)"); - Object obtained = runOrCatch(r.add(1L, 1L), - new OptArgs() - ,conn); - try { - assertEquals(expected_, obtained); - logger.info("Finished running line #3"); - } catch (Throwable ae) { - logger.error("Whoops, got exception on line #3:" + ae.toString()); - if(obtained instanceof Throwable) { - ae.addSuppressed((Throwable) obtained); - } - throw ae; - } - } - - { - // math_logic/add.yaml line #8 - /* 2 */ - Long expected_ = 2L; - /* r.expr(1) + 1 */ - logger.info("About to run line #8: r.expr(1L).add(1L)"); - Object obtained = runOrCatch(r.expr(1L).add(1L), - new OptArgs() - ,conn); - try { - assertEquals(expected_, obtained); - logger.info("Finished running line #8"); - } catch (Throwable ae) { - logger.error("Whoops, got exception on line #8:" + ae.toString()); - if(obtained instanceof Throwable) { - ae.addSuppressed((Throwable) obtained); - } - throw ae; - } - } - - { - // math_logic/add.yaml line #9 - /* 2 */ - Long expected_ = 2L; - /* 1 + r.expr(1) */ - logger.info("About to run line #9: r.add(1L, r.expr(1L))"); - Object obtained = runOrCatch(r.add(1L, r.expr(1L)), - new OptArgs() - ,conn); - try { - assertEquals(expected_, obtained); - logger.info("Finished running line #9"); - } catch (Throwable ae) { - logger.error("Whoops, got exception on line #9:" + ae.toString()); - if(obtained instanceof Throwable) { - ae.addSuppressed((Throwable) obtained); - } - throw ae; - } - } - - { - // math_logic/add.yaml line #10 - /* 2 */ - Long expected_ = 2L; - /* r.expr(1).add(1) */ - logger.info("About to run line #10: r.expr(1L).add(1L)"); - Object obtained = runOrCatch(r.expr(1L).add(1L), - new OptArgs() - ,conn); - try { - assertEquals(expected_, obtained); - logger.info("Finished running line #10"); - } catch (Throwable ae) { - logger.error("Whoops, got exception on line #10:" + ae.toString()); - if(obtained instanceof Throwable) { - ae.addSuppressed((Throwable) obtained); - } - throw ae; - } - } - - { - // math_logic/add.yaml line #16 - /* 0 */ - Long expected_ = 0L; - /* r.expr(-1) + 1 */ - logger.info("About to run line #16: r.expr(-1L).add(1L)"); - Object obtained = runOrCatch(r.expr(-1L).add(1L), - new OptArgs() - ,conn); - try { - assertEquals(expected_, obtained); - logger.info("Finished running line #16"); - } catch (Throwable ae) { - logger.error("Whoops, got exception on line #16:" + ae.toString()); - if(obtained instanceof Throwable) { - ae.addSuppressed((Throwable) obtained); - } - throw ae; - } - } - - { - // math_logic/add.yaml line #21 - /* 10.25 */ - Double expected_ = 10.25; - /* r.expr(1.75) + 8.5 */ - logger.info("About to run line #21: r.expr(1.75).add(8.5)"); - Object obtained = runOrCatch(r.expr(1.75).add(8.5), - new OptArgs() - ,conn); - try { - assertEquals((double) expected_, - ((Number) obtained).doubleValue(), - 0.00000000001); - logger.info("Finished running line #21"); - } catch (Throwable ae) { - logger.error("Whoops, got exception on line #21:" + ae.toString()); - if(obtained instanceof Throwable) { - ae.addSuppressed((Throwable) obtained); - } - throw ae; - } - } - - { - // math_logic/add.yaml line #27 - /* '' */ - String expected_ = ""; - /* r.expr('') + '' */ - logger.info("About to run line #27: r.expr('').add('')"); - Object obtained = runOrCatch(r.expr("").add(""), - new OptArgs() - ,conn); - try { - assertEquals(expected_, obtained); - logger.info("Finished running line #27"); - } catch (Throwable ae) { - logger.error("Whoops, got exception on line #27:" + ae.toString()); - if(obtained instanceof Throwable) { - ae.addSuppressed((Throwable) obtained); - } - throw ae; - } - } - - { - // math_logic/add.yaml line #32 - /* 'abcdef' */ - String expected_ = "abcdef"; - /* r.expr('abc') + 'def' */ - logger.info("About to run line #32: r.expr('abc').add('def')"); - Object obtained = runOrCatch(r.expr("abc").add("def"), - new OptArgs() - ,conn); - try { - assertEquals(expected_, obtained); - logger.info("Finished running line #32"); - } catch (Throwable ae) { - logger.error("Whoops, got exception on line #32:" + ae.toString()); - if(obtained instanceof Throwable) { - ae.addSuppressed((Throwable) obtained); - } - throw ae; - } - } - - { - // math_logic/add.yaml line #38 - /* [1,2,3,4,5,6,7,8] */ - List expected_ = r.array(1L, 2L, 3L, 4L, 5L, 6L, 7L, 8L); - /* r.expr([1,2]) + [3] + [4,5] + [6,7,8] */ - logger.info("About to run line #38: r.expr(r.array(1L, 2L)).add(r.array(3L)).add(r.array(4L, 5L)).add(r.array(6L, 7L, 8L))"); - Object obtained = runOrCatch(r.expr(r.array(1L, 2L)).add(r.array(3L)).add(r.array(4L, 5L)).add(r.array(6L, 7L, 8L)), - new OptArgs() - ,conn); - try { - assertEquals(expected_, obtained); - logger.info("Finished running line #38"); - } catch (Throwable ae) { - logger.error("Whoops, got exception on line #38:" + ae.toString()); - if(obtained instanceof Throwable) { - ae.addSuppressed((Throwable) obtained); - } - throw ae; - } - } - - { - // math_logic/add.yaml line #52 - /* err("ReqlQueryLogicError", "Expected type NUMBER but found STRING.", [1]) */ - Err expected_ = err("ReqlQueryLogicError", "Expected type NUMBER but found STRING.", r.array(1L)); - /* r.expr(1) + 'a' */ - logger.info("About to run line #52: r.expr(1L).add('a')"); - Object obtained = runOrCatch(r.expr(1L).add("a"), - new OptArgs() - ,conn); - try { - assertEquals(expected_, obtained); - logger.info("Finished running line #52"); - } catch (Throwable ae) { - logger.error("Whoops, got exception on line #52:" + ae.toString()); - if(obtained instanceof Throwable) { - ae.addSuppressed((Throwable) obtained); - } - throw ae; - } - } - - { - // math_logic/add.yaml line #57 - /* err("ReqlQueryLogicError", "Expected type STRING but found NUMBER.", [1]) */ - Err expected_ = err("ReqlQueryLogicError", "Expected type STRING but found NUMBER.", r.array(1L)); - /* r.expr('a') + 1 */ - logger.info("About to run line #57: r.expr('a').add(1L)"); - Object obtained = runOrCatch(r.expr("a").add(1L), - new OptArgs() - ,conn); - try { - assertEquals(expected_, obtained); - logger.info("Finished running line #57"); - } catch (Throwable ae) { - logger.error("Whoops, got exception on line #57:" + ae.toString()); - if(obtained instanceof Throwable) { - ae.addSuppressed((Throwable) obtained); - } - throw ae; - } - } - - { - // math_logic/add.yaml line #62 - /* err("ReqlQueryLogicError", "Expected type ARRAY but found NUMBER.", [1]) */ - Err expected_ = err("ReqlQueryLogicError", "Expected type ARRAY but found NUMBER.", r.array(1L)); - /* r.expr([]) + 1 */ - logger.info("About to run line #62: r.expr(r.array()).add(1L)"); - Object obtained = runOrCatch(r.expr(r.array()).add(1L), - new OptArgs() - ,conn); - try { - assertEquals(expected_, obtained); - logger.info("Finished running line #62"); - } catch (Throwable ae) { - logger.error("Whoops, got exception on line #62:" + ae.toString()); - if(obtained instanceof Throwable) { - ae.addSuppressed((Throwable) obtained); - } - throw ae; - } - } - } -} diff --git a/drivers/java/src/test/java/com/rethinkdb/gen/MathLogicAliases.java b/drivers/java/src/test/java/com/rethinkdb/gen/MathLogicAliases.java deleted file mode 100644 index 0c213b37ff5..00000000000 --- a/drivers/java/src/test/java/com/rethinkdb/gen/MathLogicAliases.java +++ /dev/null @@ -1,665 +0,0 @@ -// Autogenerated by convert_tests.py and process_polyglot.py. -// Do not edit this file directly. -// The template for this file is located at: -// ../../../../../../../templates/Test.java -package com.rethinkdb.gen; - -import com.rethinkdb.RethinkDB; -import com.rethinkdb.gen.exc.*; -import com.rethinkdb.gen.ast.*; -import com.rethinkdb.ast.ReqlAst; -import com.rethinkdb.model.MapObject; -import com.rethinkdb.model.OptArgs; -import com.rethinkdb.net.Connection; -import com.rethinkdb.net.Cursor; -import junit.framework.TestCase; -import static org.junit.Assert.assertEquals; -import static org.junit.Assert.assertArrayEquals; -import org.slf4j.Logger; -import org.slf4j.LoggerFactory; - -import org.junit.*; -import org.junit.rules.ExpectedException; - -import java.util.Arrays; -import java.util.ArrayList; -import java.util.List; -import java.util.Map; -import java.util.Set; -import java.time.OffsetDateTime; -import java.time.ZoneOffset; -import java.time.Instant; -import java.util.stream.LongStream; -import java.util.stream.Collectors; -import java.util.stream.Stream; -import java.util.concurrent.TimeoutException; -import java.util.regex.Pattern; -import java.util.Collections; -import java.nio.charset.StandardCharsets; - -import static com.rethinkdb.TestingCommon.*; -import com.rethinkdb.TestingFramework; - -public class MathLogicAliases { - // Test named aliases for math and logic operators - Logger logger = LoggerFactory.getLogger(MathLogicAliases.class); - public static final RethinkDB r = RethinkDB.r; - - Connection conn; - - @Before - public void setUp() throws Exception { - logger.info("Setting up."); - conn = TestingFramework.createConnection(); - try { - r.dbCreate("test").run(conn); - r.db("test").wait_().run(conn); - }catch (Exception e){} - } - - @After - public void tearDown() throws Exception { - logger.info("Tearing down."); - r.db("rethinkdb").table("_debug_scratch").delete().run(conn); - if(!conn.isOpen()){ - conn.close(); - conn = TestingFramework.createConnection(); - } - r.dbDrop("test").run(conn); - conn.close(false); - } - - // Autogenerated tests below - - @Test(timeout=120000) - public void test() throws Exception { - - { - // math_logic/aliases.yaml line #5 - /* 1 */ - Long expected_ = 1L; - /* r.expr(0).add(1) */ - logger.info("About to run line #5: r.expr(0L).add(1L)"); - Object obtained = runOrCatch(r.expr(0L).add(1L), - new OptArgs() - ,conn); - try { - assertEquals(expected_, obtained); - logger.info("Finished running line #5"); - } catch (Throwable ae) { - logger.error("Whoops, got exception on line #5:" + ae.toString()); - if(obtained instanceof Throwable) { - ae.addSuppressed((Throwable) obtained); - } - throw ae; - } - } - - { - // math_logic/aliases.yaml line #6 - /* 1 */ - Long expected_ = 1L; - /* r.add(0, 1) */ - logger.info("About to run line #6: r.add(0L, 1L)"); - Object obtained = runOrCatch(r.add(0L, 1L), - new OptArgs() - ,conn); - try { - assertEquals(expected_, obtained); - logger.info("Finished running line #6"); - } catch (Throwable ae) { - logger.error("Whoops, got exception on line #6:" + ae.toString()); - if(obtained instanceof Throwable) { - ae.addSuppressed((Throwable) obtained); - } - throw ae; - } - } - - { - // math_logic/aliases.yaml line #7 - /* 1 */ - Long expected_ = 1L; - /* r.expr(2).sub(1) */ - logger.info("About to run line #7: r.expr(2L).sub(1L)"); - Object obtained = runOrCatch(r.expr(2L).sub(1L), - new OptArgs() - ,conn); - try { - assertEquals(expected_, obtained); - logger.info("Finished running line #7"); - } catch (Throwable ae) { - logger.error("Whoops, got exception on line #7:" + ae.toString()); - if(obtained instanceof Throwable) { - ae.addSuppressed((Throwable) obtained); - } - throw ae; - } - } - - { - // math_logic/aliases.yaml line #8 - /* 1 */ - Long expected_ = 1L; - /* r.sub(2, 1) */ - logger.info("About to run line #8: r.sub(2L, 1L)"); - Object obtained = runOrCatch(r.sub(2L, 1L), - new OptArgs() - ,conn); - try { - assertEquals(expected_, obtained); - logger.info("Finished running line #8"); - } catch (Throwable ae) { - logger.error("Whoops, got exception on line #8:" + ae.toString()); - if(obtained instanceof Throwable) { - ae.addSuppressed((Throwable) obtained); - } - throw ae; - } - } - - { - // math_logic/aliases.yaml line #9 - /* 1 */ - Long expected_ = 1L; - /* r.expr(2).div(2) */ - logger.info("About to run line #9: r.expr(2L).div(2L)"); - Object obtained = runOrCatch(r.expr(2L).div(2L), - new OptArgs() - ,conn); - try { - assertEquals(expected_, obtained); - logger.info("Finished running line #9"); - } catch (Throwable ae) { - logger.error("Whoops, got exception on line #9:" + ae.toString()); - if(obtained instanceof Throwable) { - ae.addSuppressed((Throwable) obtained); - } - throw ae; - } - } - - { - // math_logic/aliases.yaml line #10 - /* 1 */ - Long expected_ = 1L; - /* r.div(2, 2) */ - logger.info("About to run line #10: r.div(2L, 2L)"); - Object obtained = runOrCatch(r.div(2L, 2L), - new OptArgs() - ,conn); - try { - assertEquals(expected_, obtained); - logger.info("Finished running line #10"); - } catch (Throwable ae) { - logger.error("Whoops, got exception on line #10:" + ae.toString()); - if(obtained instanceof Throwable) { - ae.addSuppressed((Throwable) obtained); - } - throw ae; - } - } - - { - // math_logic/aliases.yaml line #11 - /* 1 */ - Long expected_ = 1L; - /* r.expr(1).mul(1) */ - logger.info("About to run line #11: r.expr(1L).mul(1L)"); - Object obtained = runOrCatch(r.expr(1L).mul(1L), - new OptArgs() - ,conn); - try { - assertEquals(expected_, obtained); - logger.info("Finished running line #11"); - } catch (Throwable ae) { - logger.error("Whoops, got exception on line #11:" + ae.toString()); - if(obtained instanceof Throwable) { - ae.addSuppressed((Throwable) obtained); - } - throw ae; - } - } - - { - // math_logic/aliases.yaml line #12 - /* 1 */ - Long expected_ = 1L; - /* r.mul(1, 1) */ - logger.info("About to run line #12: r.mul(1L, 1L)"); - Object obtained = runOrCatch(r.mul(1L, 1L), - new OptArgs() - ,conn); - try { - assertEquals(expected_, obtained); - logger.info("Finished running line #12"); - } catch (Throwable ae) { - logger.error("Whoops, got exception on line #12:" + ae.toString()); - if(obtained instanceof Throwable) { - ae.addSuppressed((Throwable) obtained); - } - throw ae; - } - } - - { - // math_logic/aliases.yaml line #13 - /* 1 */ - Long expected_ = 1L; - /* r.expr(1).mod(2) */ - logger.info("About to run line #13: r.expr(1L).mod(2L)"); - Object obtained = runOrCatch(r.expr(1L).mod(2L), - new OptArgs() - ,conn); - try { - assertEquals(expected_, obtained); - logger.info("Finished running line #13"); - } catch (Throwable ae) { - logger.error("Whoops, got exception on line #13:" + ae.toString()); - if(obtained instanceof Throwable) { - ae.addSuppressed((Throwable) obtained); - } - throw ae; - } - } - - { - // math_logic/aliases.yaml line #14 - /* 1 */ - Long expected_ = 1L; - /* r.mod(1, 2) */ - logger.info("About to run line #14: r.mod(1L, 2L)"); - Object obtained = runOrCatch(r.mod(1L, 2L), - new OptArgs() - ,conn); - try { - assertEquals(expected_, obtained); - logger.info("Finished running line #14"); - } catch (Throwable ae) { - logger.error("Whoops, got exception on line #14:" + ae.toString()); - if(obtained instanceof Throwable) { - ae.addSuppressed((Throwable) obtained); - } - throw ae; - } - } - - { - // math_logic/aliases.yaml line #25 - /* True */ - Boolean expected_ = true; - /* r.expr(True).and_(True) */ - logger.info("About to run line #25: r.expr(true).and(true)"); - Object obtained = runOrCatch(r.expr(true).and(true), - new OptArgs() - ,conn); - try { - assertEquals(expected_, obtained); - logger.info("Finished running line #25"); - } catch (Throwable ae) { - logger.error("Whoops, got exception on line #25:" + ae.toString()); - if(obtained instanceof Throwable) { - ae.addSuppressed((Throwable) obtained); - } - throw ae; - } - } - - { - // math_logic/aliases.yaml line #26 - /* True */ - Boolean expected_ = true; - /* r.expr(True).or_(True) */ - logger.info("About to run line #26: r.expr(true).or(true)"); - Object obtained = runOrCatch(r.expr(true).or(true), - new OptArgs() - ,conn); - try { - assertEquals(expected_, obtained); - logger.info("Finished running line #26"); - } catch (Throwable ae) { - logger.error("Whoops, got exception on line #26:" + ae.toString()); - if(obtained instanceof Throwable) { - ae.addSuppressed((Throwable) obtained); - } - throw ae; - } - } - - { - // math_logic/aliases.yaml line #27 - /* True */ - Boolean expected_ = true; - /* r.and_(True, True) */ - logger.info("About to run line #27: r.and(true, true)"); - Object obtained = runOrCatch(r.and(true, true), - new OptArgs() - ,conn); - try { - assertEquals(expected_, obtained); - logger.info("Finished running line #27"); - } catch (Throwable ae) { - logger.error("Whoops, got exception on line #27:" + ae.toString()); - if(obtained instanceof Throwable) { - ae.addSuppressed((Throwable) obtained); - } - throw ae; - } - } - - { - // math_logic/aliases.yaml line #28 - /* True */ - Boolean expected_ = true; - /* r.or_(True, True) */ - logger.info("About to run line #28: r.or(true, true)"); - Object obtained = runOrCatch(r.or(true, true), - new OptArgs() - ,conn); - try { - assertEquals(expected_, obtained); - logger.info("Finished running line #28"); - } catch (Throwable ae) { - logger.error("Whoops, got exception on line #28:" + ae.toString()); - if(obtained instanceof Throwable) { - ae.addSuppressed((Throwable) obtained); - } - throw ae; - } - } - - { - // math_logic/aliases.yaml line #29 - /* True */ - Boolean expected_ = true; - /* r.expr(False).not_() */ - logger.info("About to run line #29: r.expr(false).not()"); - Object obtained = runOrCatch(r.expr(false).not(), - new OptArgs() - ,conn); - try { - assertEquals(expected_, obtained); - logger.info("Finished running line #29"); - } catch (Throwable ae) { - logger.error("Whoops, got exception on line #29:" + ae.toString()); - if(obtained instanceof Throwable) { - ae.addSuppressed((Throwable) obtained); - } - throw ae; - } - } - - { - // math_logic/aliases.yaml line #30 - /* True */ - Boolean expected_ = true; - /* r.not_(False) */ - logger.info("About to run line #30: r.not(false)"); - Object obtained = runOrCatch(r.not(false), - new OptArgs() - ,conn); - try { - assertEquals(expected_, obtained); - logger.info("Finished running line #30"); - } catch (Throwable ae) { - logger.error("Whoops, got exception on line #30:" + ae.toString()); - if(obtained instanceof Throwable) { - ae.addSuppressed((Throwable) obtained); - } - throw ae; - } - } - - { - // math_logic/aliases.yaml line #34 - /* True */ - Boolean expected_ = true; - /* r.expr(1).eq(1) */ - logger.info("About to run line #34: r.expr(1L).eq(1L)"); - Object obtained = runOrCatch(r.expr(1L).eq(1L), - new OptArgs() - ,conn); - try { - assertEquals(expected_, obtained); - logger.info("Finished running line #34"); - } catch (Throwable ae) { - logger.error("Whoops, got exception on line #34:" + ae.toString()); - if(obtained instanceof Throwable) { - ae.addSuppressed((Throwable) obtained); - } - throw ae; - } - } - - { - // math_logic/aliases.yaml line #35 - /* True */ - Boolean expected_ = true; - /* r.expr(1).ne(2) */ - logger.info("About to run line #35: r.expr(1L).ne(2L)"); - Object obtained = runOrCatch(r.expr(1L).ne(2L), - new OptArgs() - ,conn); - try { - assertEquals(expected_, obtained); - logger.info("Finished running line #35"); - } catch (Throwable ae) { - logger.error("Whoops, got exception on line #35:" + ae.toString()); - if(obtained instanceof Throwable) { - ae.addSuppressed((Throwable) obtained); - } - throw ae; - } - } - - { - // math_logic/aliases.yaml line #36 - /* True */ - Boolean expected_ = true; - /* r.expr(1).lt(2) */ - logger.info("About to run line #36: r.expr(1L).lt(2L)"); - Object obtained = runOrCatch(r.expr(1L).lt(2L), - new OptArgs() - ,conn); - try { - assertEquals(expected_, obtained); - logger.info("Finished running line #36"); - } catch (Throwable ae) { - logger.error("Whoops, got exception on line #36:" + ae.toString()); - if(obtained instanceof Throwable) { - ae.addSuppressed((Throwable) obtained); - } - throw ae; - } - } - - { - // math_logic/aliases.yaml line #37 - /* True */ - Boolean expected_ = true; - /* r.expr(1).gt(0) */ - logger.info("About to run line #37: r.expr(1L).gt(0L)"); - Object obtained = runOrCatch(r.expr(1L).gt(0L), - new OptArgs() - ,conn); - try { - assertEquals(expected_, obtained); - logger.info("Finished running line #37"); - } catch (Throwable ae) { - logger.error("Whoops, got exception on line #37:" + ae.toString()); - if(obtained instanceof Throwable) { - ae.addSuppressed((Throwable) obtained); - } - throw ae; - } - } - - { - // math_logic/aliases.yaml line #38 - /* True */ - Boolean expected_ = true; - /* r.expr(1).le(1) */ - logger.info("About to run line #38: r.expr(1L).le(1L)"); - Object obtained = runOrCatch(r.expr(1L).le(1L), - new OptArgs() - ,conn); - try { - assertEquals(expected_, obtained); - logger.info("Finished running line #38"); - } catch (Throwable ae) { - logger.error("Whoops, got exception on line #38:" + ae.toString()); - if(obtained instanceof Throwable) { - ae.addSuppressed((Throwable) obtained); - } - throw ae; - } - } - - { - // math_logic/aliases.yaml line #39 - /* True */ - Boolean expected_ = true; - /* r.expr(1).ge(1) */ - logger.info("About to run line #39: r.expr(1L).ge(1L)"); - Object obtained = runOrCatch(r.expr(1L).ge(1L), - new OptArgs() - ,conn); - try { - assertEquals(expected_, obtained); - logger.info("Finished running line #39"); - } catch (Throwable ae) { - logger.error("Whoops, got exception on line #39:" + ae.toString()); - if(obtained instanceof Throwable) { - ae.addSuppressed((Throwable) obtained); - } - throw ae; - } - } - - { - // math_logic/aliases.yaml line #40 - /* True */ - Boolean expected_ = true; - /* r.eq(1, 1) */ - logger.info("About to run line #40: r.eq(1L, 1L)"); - Object obtained = runOrCatch(r.eq(1L, 1L), - new OptArgs() - ,conn); - try { - assertEquals(expected_, obtained); - logger.info("Finished running line #40"); - } catch (Throwable ae) { - logger.error("Whoops, got exception on line #40:" + ae.toString()); - if(obtained instanceof Throwable) { - ae.addSuppressed((Throwable) obtained); - } - throw ae; - } - } - - { - // math_logic/aliases.yaml line #41 - /* True */ - Boolean expected_ = true; - /* r.ne(1, 2) */ - logger.info("About to run line #41: r.ne(1L, 2L)"); - Object obtained = runOrCatch(r.ne(1L, 2L), - new OptArgs() - ,conn); - try { - assertEquals(expected_, obtained); - logger.info("Finished running line #41"); - } catch (Throwable ae) { - logger.error("Whoops, got exception on line #41:" + ae.toString()); - if(obtained instanceof Throwable) { - ae.addSuppressed((Throwable) obtained); - } - throw ae; - } - } - - { - // math_logic/aliases.yaml line #42 - /* True */ - Boolean expected_ = true; - /* r.lt(1, 2) */ - logger.info("About to run line #42: r.lt(1L, 2L)"); - Object obtained = runOrCatch(r.lt(1L, 2L), - new OptArgs() - ,conn); - try { - assertEquals(expected_, obtained); - logger.info("Finished running line #42"); - } catch (Throwable ae) { - logger.error("Whoops, got exception on line #42:" + ae.toString()); - if(obtained instanceof Throwable) { - ae.addSuppressed((Throwable) obtained); - } - throw ae; - } - } - - { - // math_logic/aliases.yaml line #43 - /* True */ - Boolean expected_ = true; - /* r.gt(1, 0) */ - logger.info("About to run line #43: r.gt(1L, 0L)"); - Object obtained = runOrCatch(r.gt(1L, 0L), - new OptArgs() - ,conn); - try { - assertEquals(expected_, obtained); - logger.info("Finished running line #43"); - } catch (Throwable ae) { - logger.error("Whoops, got exception on line #43:" + ae.toString()); - if(obtained instanceof Throwable) { - ae.addSuppressed((Throwable) obtained); - } - throw ae; - } - } - - { - // math_logic/aliases.yaml line #44 - /* True */ - Boolean expected_ = true; - /* r.le(1, 1) */ - logger.info("About to run line #44: r.le(1L, 1L)"); - Object obtained = runOrCatch(r.le(1L, 1L), - new OptArgs() - ,conn); - try { - assertEquals(expected_, obtained); - logger.info("Finished running line #44"); - } catch (Throwable ae) { - logger.error("Whoops, got exception on line #44:" + ae.toString()); - if(obtained instanceof Throwable) { - ae.addSuppressed((Throwable) obtained); - } - throw ae; - } - } - - { - // math_logic/aliases.yaml line #45 - /* True */ - Boolean expected_ = true; - /* r.ge(1, 1) */ - logger.info("About to run line #45: r.ge(1L, 1L)"); - Object obtained = runOrCatch(r.ge(1L, 1L), - new OptArgs() - ,conn); - try { - assertEquals(expected_, obtained); - logger.info("Finished running line #45"); - } catch (Throwable ae) { - logger.error("Whoops, got exception on line #45:" + ae.toString()); - if(obtained instanceof Throwable) { - ae.addSuppressed((Throwable) obtained); - } - throw ae; - } - } - } -} diff --git a/drivers/java/src/test/java/com/rethinkdb/gen/MathLogicDiv.java b/drivers/java/src/test/java/com/rethinkdb/gen/MathLogicDiv.java deleted file mode 100644 index c8b0fbdc2cf..00000000000 --- a/drivers/java/src/test/java/com/rethinkdb/gen/MathLogicDiv.java +++ /dev/null @@ -1,377 +0,0 @@ -// Autogenerated by convert_tests.py and process_polyglot.py. -// Do not edit this file directly. -// The template for this file is located at: -// ../../../../../../../templates/Test.java -package com.rethinkdb.gen; - -import com.rethinkdb.RethinkDB; -import com.rethinkdb.gen.exc.*; -import com.rethinkdb.gen.ast.*; -import com.rethinkdb.ast.ReqlAst; -import com.rethinkdb.model.MapObject; -import com.rethinkdb.model.OptArgs; -import com.rethinkdb.net.Connection; -import com.rethinkdb.net.Cursor; -import junit.framework.TestCase; -import static org.junit.Assert.assertEquals; -import static org.junit.Assert.assertArrayEquals; -import org.slf4j.Logger; -import org.slf4j.LoggerFactory; - -import org.junit.*; -import org.junit.rules.ExpectedException; - -import java.util.Arrays; -import java.util.ArrayList; -import java.util.List; -import java.util.Map; -import java.util.Set; -import java.time.OffsetDateTime; -import java.time.ZoneOffset; -import java.time.Instant; -import java.util.stream.LongStream; -import java.util.stream.Collectors; -import java.util.stream.Stream; -import java.util.concurrent.TimeoutException; -import java.util.regex.Pattern; -import java.util.Collections; -import java.nio.charset.StandardCharsets; - -import static com.rethinkdb.TestingCommon.*; -import com.rethinkdb.TestingFramework; - -public class MathLogicDiv { - // Tests for the basic usage of the division operation - Logger logger = LoggerFactory.getLogger(MathLogicDiv.class); - public static final RethinkDB r = RethinkDB.r; - - Connection conn; - - @Before - public void setUp() throws Exception { - logger.info("Setting up."); - conn = TestingFramework.createConnection(); - try { - r.dbCreate("test").run(conn); - r.db("test").wait_().run(conn); - }catch (Exception e){} - } - - @After - public void tearDown() throws Exception { - logger.info("Tearing down."); - r.db("rethinkdb").table("_debug_scratch").delete().run(conn); - if(!conn.isOpen()){ - conn.close(); - conn = TestingFramework.createConnection(); - } - r.dbDrop("test").run(conn); - conn.close(false); - } - - // Autogenerated tests below - - @Test(timeout=120000) - public void test() throws Exception { - - { - // math_logic/div.yaml line #6 - /* 2 */ - Long expected_ = 2L; - /* r.expr(4) / 2 */ - logger.info("About to run line #6: r.expr(4L).div(2L)"); - Object obtained = runOrCatch(r.expr(4L).div(2L), - new OptArgs() - ,conn); - try { - assertEquals(expected_, obtained); - logger.info("Finished running line #6"); - } catch (Throwable ae) { - logger.error("Whoops, got exception on line #6:" + ae.toString()); - if(obtained instanceof Throwable) { - ae.addSuppressed((Throwable) obtained); - } - throw ae; - } - } - - { - // math_logic/div.yaml line #7 - /* 2 */ - Long expected_ = 2L; - /* 4 / r.expr(2) */ - logger.info("About to run line #7: r.div(4L, r.expr(2L))"); - Object obtained = runOrCatch(r.div(4L, r.expr(2L)), - new OptArgs() - ,conn); - try { - assertEquals(expected_, obtained); - logger.info("Finished running line #7"); - } catch (Throwable ae) { - logger.error("Whoops, got exception on line #7:" + ae.toString()); - if(obtained instanceof Throwable) { - ae.addSuppressed((Throwable) obtained); - } - throw ae; - } - } - - { - // math_logic/div.yaml line #8 - /* 2 */ - Long expected_ = 2L; - /* r.expr(4).div(2) */ - logger.info("About to run line #8: r.expr(4L).div(2L)"); - Object obtained = runOrCatch(r.expr(4L).div(2L), - new OptArgs() - ,conn); - try { - assertEquals(expected_, obtained); - logger.info("Finished running line #8"); - } catch (Throwable ae) { - logger.error("Whoops, got exception on line #8:" + ae.toString()); - if(obtained instanceof Throwable) { - ae.addSuppressed((Throwable) obtained); - } - throw ae; - } - } - - { - // math_logic/div.yaml line #15 - /* 0.5 */ - Double expected_ = 0.5; - /* r.expr(-1) / -2 */ - logger.info("About to run line #15: r.expr(-1L).div(-2L)"); - Object obtained = runOrCatch(r.expr(-1L).div(-2L), - new OptArgs() - ,conn); - try { - assertEquals((double) expected_, - ((Number) obtained).doubleValue(), - 0.00000000001); - logger.info("Finished running line #15"); - } catch (Throwable ae) { - logger.error("Whoops, got exception on line #15:" + ae.toString()); - if(obtained instanceof Throwable) { - ae.addSuppressed((Throwable) obtained); - } - throw ae; - } - } - - { - // math_logic/div.yaml line #20 - /* 4.9 / 0.7 */ - Double expected_ = 4.9 / 0.7; - /* r.expr(4.9) / 0.7 */ - logger.info("About to run line #20: r.expr(4.9).div(0.7)"); - Object obtained = runOrCatch(r.expr(4.9).div(0.7), - new OptArgs() - ,conn); - try { - assertEquals((double) expected_, - ((Number) obtained).doubleValue(), - 0.00000000001); - logger.info("Finished running line #20"); - } catch (Throwable ae) { - logger.error("Whoops, got exception on line #20:" + ae.toString()); - if(obtained instanceof Throwable) { - ae.addSuppressed((Throwable) obtained); - } - throw ae; - } - } - - { - // math_logic/div.yaml line #25 - /* 1.0/120 */ - Double expected_ = 1.0 / 120L; - /* r.expr(1).div(2,3,4,5) */ - logger.info("About to run line #25: r.expr(1L).div(2L, 3L, 4L, 5L)"); - Object obtained = runOrCatch(r.expr(1L).div(2L, 3L, 4L, 5L), - new OptArgs() - ,conn); - try { - assertEquals((double) expected_, - ((Number) obtained).doubleValue(), - 0.00000000001); - logger.info("Finished running line #25"); - } catch (Throwable ae) { - logger.error("Whoops, got exception on line #25:" + ae.toString()); - if(obtained instanceof Throwable) { - ae.addSuppressed((Throwable) obtained); - } - throw ae; - } - } - - { - // math_logic/div.yaml line #37 - /* err('ReqlQueryLogicError', 'Cannot divide by zero.', [1]) */ - Err expected_ = err("ReqlQueryLogicError", "Cannot divide by zero.", r.array(1L)); - /* r.expr(1) / 0 */ - logger.info("About to run line #37: r.expr(1L).div(0L)"); - Object obtained = runOrCatch(r.expr(1L).div(0L), - new OptArgs() - ,conn); - try { - assertEquals(expected_, obtained); - logger.info("Finished running line #37"); - } catch (Throwable ae) { - logger.error("Whoops, got exception on line #37:" + ae.toString()); - if(obtained instanceof Throwable) { - ae.addSuppressed((Throwable) obtained); - } - throw ae; - } - } - - { - // math_logic/div.yaml line #38 - /* err('ReqlQueryLogicError', 'Cannot divide by zero.', [1]) */ - Err expected_ = err("ReqlQueryLogicError", "Cannot divide by zero.", r.array(1L)); - /* r.expr(2.0) / 0 */ - logger.info("About to run line #38: r.expr(2.0).div(0L)"); - Object obtained = runOrCatch(r.expr(2.0).div(0L), - new OptArgs() - ,conn); - try { - assertEquals(expected_, obtained); - logger.info("Finished running line #38"); - } catch (Throwable ae) { - logger.error("Whoops, got exception on line #38:" + ae.toString()); - if(obtained instanceof Throwable) { - ae.addSuppressed((Throwable) obtained); - } - throw ae; - } - } - - { - // math_logic/div.yaml line #39 - /* err('ReqlQueryLogicError', 'Cannot divide by zero.', [1]) */ - Err expected_ = err("ReqlQueryLogicError", "Cannot divide by zero.", r.array(1L)); - /* r.expr(3) / 0.0 */ - logger.info("About to run line #39: r.expr(3L).div(0.0)"); - Object obtained = runOrCatch(r.expr(3L).div(0.0), - new OptArgs() - ,conn); - try { - assertEquals(expected_, obtained); - logger.info("Finished running line #39"); - } catch (Throwable ae) { - logger.error("Whoops, got exception on line #39:" + ae.toString()); - if(obtained instanceof Throwable) { - ae.addSuppressed((Throwable) obtained); - } - throw ae; - } - } - - { - // math_logic/div.yaml line #40 - /* err('ReqlQueryLogicError', 'Cannot divide by zero.', [1]) */ - Err expected_ = err("ReqlQueryLogicError", "Cannot divide by zero.", r.array(1L)); - /* r.expr(4.0) / 0.0 */ - logger.info("About to run line #40: r.expr(4.0).div(0.0)"); - Object obtained = runOrCatch(r.expr(4.0).div(0.0), - new OptArgs() - ,conn); - try { - assertEquals(expected_, obtained); - logger.info("Finished running line #40"); - } catch (Throwable ae) { - logger.error("Whoops, got exception on line #40:" + ae.toString()); - if(obtained instanceof Throwable) { - ae.addSuppressed((Throwable) obtained); - } - throw ae; - } - } - - { - // math_logic/div.yaml line #41 - /* err('ReqlQueryLogicError', 'Cannot divide by zero.', [1]) */ - Err expected_ = err("ReqlQueryLogicError", "Cannot divide by zero.", r.array(1L)); - /* r.expr(0) / 0 */ - logger.info("About to run line #41: r.expr(0L).div(0L)"); - Object obtained = runOrCatch(r.expr(0L).div(0L), - new OptArgs() - ,conn); - try { - assertEquals(expected_, obtained); - logger.info("Finished running line #41"); - } catch (Throwable ae) { - logger.error("Whoops, got exception on line #41:" + ae.toString()); - if(obtained instanceof Throwable) { - ae.addSuppressed((Throwable) obtained); - } - throw ae; - } - } - - { - // math_logic/div.yaml line #42 - /* err('ReqlQueryLogicError', 'Cannot divide by zero.', [1]) */ - Err expected_ = err("ReqlQueryLogicError", "Cannot divide by zero.", r.array(1L)); - /* r.expr(0.0) / 0.0 */ - logger.info("About to run line #42: r.expr(0.0).div(0.0)"); - Object obtained = runOrCatch(r.expr(0.0).div(0.0), - new OptArgs() - ,conn); - try { - assertEquals(expected_, obtained); - logger.info("Finished running line #42"); - } catch (Throwable ae) { - logger.error("Whoops, got exception on line #42:" + ae.toString()); - if(obtained instanceof Throwable) { - ae.addSuppressed((Throwable) obtained); - } - throw ae; - } - } - - { - // math_logic/div.yaml line #46 - /* err('ReqlQueryLogicError', 'Expected type NUMBER but found STRING.', [0]) */ - Err expected_ = err("ReqlQueryLogicError", "Expected type NUMBER but found STRING.", r.array(0L)); - /* r.expr('a') / 0.8 */ - logger.info("About to run line #46: r.expr('a').div(0.8)"); - Object obtained = runOrCatch(r.expr("a").div(0.8), - new OptArgs() - ,conn); - try { - assertEquals(expected_, obtained); - logger.info("Finished running line #46"); - } catch (Throwable ae) { - logger.error("Whoops, got exception on line #46:" + ae.toString()); - if(obtained instanceof Throwable) { - ae.addSuppressed((Throwable) obtained); - } - throw ae; - } - } - - { - // math_logic/div.yaml line #50 - /* err('ReqlQueryLogicError', 'Expected type NUMBER but found STRING.', [1]) */ - Err expected_ = err("ReqlQueryLogicError", "Expected type NUMBER but found STRING.", r.array(1L)); - /* r.expr(1) / 'a' */ - logger.info("About to run line #50: r.expr(1L).div('a')"); - Object obtained = runOrCatch(r.expr(1L).div("a"), - new OptArgs() - ,conn); - try { - assertEquals(expected_, obtained); - logger.info("Finished running line #50"); - } catch (Throwable ae) { - logger.error("Whoops, got exception on line #50:" + ae.toString()); - if(obtained instanceof Throwable) { - ae.addSuppressed((Throwable) obtained); - } - throw ae; - } - } - } -} diff --git a/drivers/java/src/test/java/com/rethinkdb/gen/MathLogicFloorCeilRound.java b/drivers/java/src/test/java/com/rethinkdb/gen/MathLogicFloorCeilRound.java deleted file mode 100644 index b8c8c1daef8..00000000000 --- a/drivers/java/src/test/java/com/rethinkdb/gen/MathLogicFloorCeilRound.java +++ /dev/null @@ -1,1169 +0,0 @@ -// Autogenerated by convert_tests.py and process_polyglot.py. -// Do not edit this file directly. -// The template for this file is located at: -// ../../../../../../../templates/Test.java -package com.rethinkdb.gen; - -import com.rethinkdb.RethinkDB; -import com.rethinkdb.gen.exc.*; -import com.rethinkdb.gen.ast.*; -import com.rethinkdb.ast.ReqlAst; -import com.rethinkdb.model.MapObject; -import com.rethinkdb.model.OptArgs; -import com.rethinkdb.net.Connection; -import com.rethinkdb.net.Cursor; -import junit.framework.TestCase; -import static org.junit.Assert.assertEquals; -import static org.junit.Assert.assertArrayEquals; -import org.slf4j.Logger; -import org.slf4j.LoggerFactory; - -import org.junit.*; -import org.junit.rules.ExpectedException; - -import java.util.Arrays; -import java.util.ArrayList; -import java.util.List; -import java.util.Map; -import java.util.Set; -import java.time.OffsetDateTime; -import java.time.ZoneOffset; -import java.time.Instant; -import java.util.stream.LongStream; -import java.util.stream.Collectors; -import java.util.stream.Stream; -import java.util.concurrent.TimeoutException; -import java.util.regex.Pattern; -import java.util.Collections; -import java.nio.charset.StandardCharsets; - -import static com.rethinkdb.TestingCommon.*; -import com.rethinkdb.TestingFramework; - -public class MathLogicFloorCeilRound { - // tests for `floor`, `ceil`, and `round`, tests inspired by the Python test suite - Logger logger = LoggerFactory.getLogger(MathLogicFloorCeilRound.class); - public static final RethinkDB r = RethinkDB.r; - - Connection conn; - - @Before - public void setUp() throws Exception { - logger.info("Setting up."); - conn = TestingFramework.createConnection(); - try { - r.dbCreate("test").run(conn); - r.db("test").wait_().run(conn); - }catch (Exception e){} - } - - @After - public void tearDown() throws Exception { - logger.info("Tearing down."); - r.db("rethinkdb").table("_debug_scratch").delete().run(conn); - if(!conn.isOpen()){ - conn.close(); - conn = TestingFramework.createConnection(); - } - r.dbDrop("test").run(conn); - conn.close(false); - } - - // Autogenerated tests below - - @Test(timeout=120000) - public void test() throws Exception { - - { - // math_logic/floor_ceil_round.yaml line #3 - /* "NUMBER" */ - String expected_ = "NUMBER"; - /* r.floor(1.0).type_of() */ - logger.info("About to run line #3: r.floor(1.0).typeOf()"); - Object obtained = runOrCatch(r.floor(1.0).typeOf(), - new OptArgs() - ,conn); - try { - assertEquals(expected_, obtained); - logger.info("Finished running line #3"); - } catch (Throwable ae) { - logger.error("Whoops, got exception on line #3:" + ae.toString()); - if(obtained instanceof Throwable) { - ae.addSuppressed((Throwable) obtained); - } - throw ae; - } - } - - { - // math_logic/floor_ceil_round.yaml line #5 - /* 1.0 */ - Double expected_ = 1.0; - /* r.floor(1.0) */ - logger.info("About to run line #5: r.floor(1.0)"); - Object obtained = runOrCatch(r.floor(1.0), - new OptArgs() - ,conn); - try { - assertEquals((double) expected_, - ((Number) obtained).doubleValue(), - 0.00000000001); - logger.info("Finished running line #5"); - } catch (Throwable ae) { - logger.error("Whoops, got exception on line #5:" + ae.toString()); - if(obtained instanceof Throwable) { - ae.addSuppressed((Throwable) obtained); - } - throw ae; - } - } - - { - // math_logic/floor_ceil_round.yaml line #7 - /* 1.0 */ - Double expected_ = 1.0; - /* r.expr(1.0).floor() */ - logger.info("About to run line #7: r.expr(1.0).floor()"); - Object obtained = runOrCatch(r.expr(1.0).floor(), - new OptArgs() - ,conn); - try { - assertEquals((double) expected_, - ((Number) obtained).doubleValue(), - 0.00000000001); - logger.info("Finished running line #7"); - } catch (Throwable ae) { - logger.error("Whoops, got exception on line #7:" + ae.toString()); - if(obtained instanceof Throwable) { - ae.addSuppressed((Throwable) obtained); - } - throw ae; - } - } - - { - // math_logic/floor_ceil_round.yaml line #10 - /* 0.0 */ - Double expected_ = 0.0; - /* r.floor(0.5) */ - logger.info("About to run line #10: r.floor(0.5)"); - Object obtained = runOrCatch(r.floor(0.5), - new OptArgs() - ,conn); - try { - assertEquals((double) expected_, - ((Number) obtained).doubleValue(), - 0.00000000001); - logger.info("Finished running line #10"); - } catch (Throwable ae) { - logger.error("Whoops, got exception on line #10:" + ae.toString()); - if(obtained instanceof Throwable) { - ae.addSuppressed((Throwable) obtained); - } - throw ae; - } - } - - { - // math_logic/floor_ceil_round.yaml line #12 - /* 1.0 */ - Double expected_ = 1.0; - /* r.floor(1.0) */ - logger.info("About to run line #12: r.floor(1.0)"); - Object obtained = runOrCatch(r.floor(1.0), - new OptArgs() - ,conn); - try { - assertEquals((double) expected_, - ((Number) obtained).doubleValue(), - 0.00000000001); - logger.info("Finished running line #12"); - } catch (Throwable ae) { - logger.error("Whoops, got exception on line #12:" + ae.toString()); - if(obtained instanceof Throwable) { - ae.addSuppressed((Throwable) obtained); - } - throw ae; - } - } - - { - // math_logic/floor_ceil_round.yaml line #14 - /* 1.0 */ - Double expected_ = 1.0; - /* r.floor(1.5) */ - logger.info("About to run line #14: r.floor(1.5)"); - Object obtained = runOrCatch(r.floor(1.5), - new OptArgs() - ,conn); - try { - assertEquals((double) expected_, - ((Number) obtained).doubleValue(), - 0.00000000001); - logger.info("Finished running line #14"); - } catch (Throwable ae) { - logger.error("Whoops, got exception on line #14:" + ae.toString()); - if(obtained instanceof Throwable) { - ae.addSuppressed((Throwable) obtained); - } - throw ae; - } - } - - { - // math_logic/floor_ceil_round.yaml line #16 - /* -1.0 */ - Double expected_ = -1.0; - /* r.floor(-0.5) */ - logger.info("About to run line #16: r.floor(-0.5)"); - Object obtained = runOrCatch(r.floor(-0.5), - new OptArgs() - ,conn); - try { - assertEquals((double) expected_, - ((Number) obtained).doubleValue(), - 0.00000000001); - logger.info("Finished running line #16"); - } catch (Throwable ae) { - logger.error("Whoops, got exception on line #16:" + ae.toString()); - if(obtained instanceof Throwable) { - ae.addSuppressed((Throwable) obtained); - } - throw ae; - } - } - - { - // math_logic/floor_ceil_round.yaml line #18 - /* -1.0 */ - Double expected_ = -1.0; - /* r.floor(-1.0) */ - logger.info("About to run line #18: r.floor(-1.0)"); - Object obtained = runOrCatch(r.floor(-1.0), - new OptArgs() - ,conn); - try { - assertEquals((double) expected_, - ((Number) obtained).doubleValue(), - 0.00000000001); - logger.info("Finished running line #18"); - } catch (Throwable ae) { - logger.error("Whoops, got exception on line #18:" + ae.toString()); - if(obtained instanceof Throwable) { - ae.addSuppressed((Throwable) obtained); - } - throw ae; - } - } - - { - // math_logic/floor_ceil_round.yaml line #20 - /* -2.0 */ - Double expected_ = -2.0; - /* r.floor(-1.5) */ - logger.info("About to run line #20: r.floor(-1.5)"); - Object obtained = runOrCatch(r.floor(-1.5), - new OptArgs() - ,conn); - try { - assertEquals((double) expected_, - ((Number) obtained).doubleValue(), - 0.00000000001); - logger.info("Finished running line #20"); - } catch (Throwable ae) { - logger.error("Whoops, got exception on line #20:" + ae.toString()); - if(obtained instanceof Throwable) { - ae.addSuppressed((Throwable) obtained); - } - throw ae; - } - } - - { - // math_logic/floor_ceil_round.yaml line #23 - /* err("ReqlQueryLogicError", "Expected type NUMBER but found STRING.", []) */ - Err expected_ = err("ReqlQueryLogicError", "Expected type NUMBER but found STRING.", r.array()); - /* r.expr('X').floor() */ - logger.info("About to run line #23: r.expr('X').floor()"); - Object obtained = runOrCatch(r.expr("X").floor(), - new OptArgs() - ,conn); - try { - assertEquals(expected_, obtained); - logger.info("Finished running line #23"); - } catch (Throwable ae) { - logger.error("Whoops, got exception on line #23:" + ae.toString()); - if(obtained instanceof Throwable) { - ae.addSuppressed((Throwable) obtained); - } - throw ae; - } - } - - { - // math_logic/floor_ceil_round.yaml line #27 - /* "NUMBER" */ - String expected_ = "NUMBER"; - /* r.ceil(1.0).type_of() */ - logger.info("About to run line #27: r.ceil(1.0).typeOf()"); - Object obtained = runOrCatch(r.ceil(1.0).typeOf(), - new OptArgs() - ,conn); - try { - assertEquals(expected_, obtained); - logger.info("Finished running line #27"); - } catch (Throwable ae) { - logger.error("Whoops, got exception on line #27:" + ae.toString()); - if(obtained instanceof Throwable) { - ae.addSuppressed((Throwable) obtained); - } - throw ae; - } - } - - { - // math_logic/floor_ceil_round.yaml line #29 - /* 1.0 */ - Double expected_ = 1.0; - /* r.ceil(1.0) */ - logger.info("About to run line #29: r.ceil(1.0)"); - Object obtained = runOrCatch(r.ceil(1.0), - new OptArgs() - ,conn); - try { - assertEquals((double) expected_, - ((Number) obtained).doubleValue(), - 0.00000000001); - logger.info("Finished running line #29"); - } catch (Throwable ae) { - logger.error("Whoops, got exception on line #29:" + ae.toString()); - if(obtained instanceof Throwable) { - ae.addSuppressed((Throwable) obtained); - } - throw ae; - } - } - - { - // math_logic/floor_ceil_round.yaml line #31 - /* 1.0 */ - Double expected_ = 1.0; - /* r.expr(1.0).ceil() */ - logger.info("About to run line #31: r.expr(1.0).ceil()"); - Object obtained = runOrCatch(r.expr(1.0).ceil(), - new OptArgs() - ,conn); - try { - assertEquals((double) expected_, - ((Number) obtained).doubleValue(), - 0.00000000001); - logger.info("Finished running line #31"); - } catch (Throwable ae) { - logger.error("Whoops, got exception on line #31:" + ae.toString()); - if(obtained instanceof Throwable) { - ae.addSuppressed((Throwable) obtained); - } - throw ae; - } - } - - { - // math_logic/floor_ceil_round.yaml line #34 - /* 1.0 */ - Double expected_ = 1.0; - /* r.ceil(0.5) */ - logger.info("About to run line #34: r.ceil(0.5)"); - Object obtained = runOrCatch(r.ceil(0.5), - new OptArgs() - ,conn); - try { - assertEquals((double) expected_, - ((Number) obtained).doubleValue(), - 0.00000000001); - logger.info("Finished running line #34"); - } catch (Throwable ae) { - logger.error("Whoops, got exception on line #34:" + ae.toString()); - if(obtained instanceof Throwable) { - ae.addSuppressed((Throwable) obtained); - } - throw ae; - } - } - - { - // math_logic/floor_ceil_round.yaml line #36 - /* 1.0 */ - Double expected_ = 1.0; - /* r.ceil(1.0) */ - logger.info("About to run line #36: r.ceil(1.0)"); - Object obtained = runOrCatch(r.ceil(1.0), - new OptArgs() - ,conn); - try { - assertEquals((double) expected_, - ((Number) obtained).doubleValue(), - 0.00000000001); - logger.info("Finished running line #36"); - } catch (Throwable ae) { - logger.error("Whoops, got exception on line #36:" + ae.toString()); - if(obtained instanceof Throwable) { - ae.addSuppressed((Throwable) obtained); - } - throw ae; - } - } - - { - // math_logic/floor_ceil_round.yaml line #38 - /* 2.0 */ - Double expected_ = 2.0; - /* r.ceil(1.5) */ - logger.info("About to run line #38: r.ceil(1.5)"); - Object obtained = runOrCatch(r.ceil(1.5), - new OptArgs() - ,conn); - try { - assertEquals((double) expected_, - ((Number) obtained).doubleValue(), - 0.00000000001); - logger.info("Finished running line #38"); - } catch (Throwable ae) { - logger.error("Whoops, got exception on line #38:" + ae.toString()); - if(obtained instanceof Throwable) { - ae.addSuppressed((Throwable) obtained); - } - throw ae; - } - } - - { - // math_logic/floor_ceil_round.yaml line #40 - /* 0.0 */ - Double expected_ = 0.0; - /* r.ceil(-0.5) */ - logger.info("About to run line #40: r.ceil(-0.5)"); - Object obtained = runOrCatch(r.ceil(-0.5), - new OptArgs() - ,conn); - try { - assertEquals((double) expected_, - ((Number) obtained).doubleValue(), - 0.00000000001); - logger.info("Finished running line #40"); - } catch (Throwable ae) { - logger.error("Whoops, got exception on line #40:" + ae.toString()); - if(obtained instanceof Throwable) { - ae.addSuppressed((Throwable) obtained); - } - throw ae; - } - } - - { - // math_logic/floor_ceil_round.yaml line #42 - /* -1.0 */ - Double expected_ = -1.0; - /* r.ceil(-1.0) */ - logger.info("About to run line #42: r.ceil(-1.0)"); - Object obtained = runOrCatch(r.ceil(-1.0), - new OptArgs() - ,conn); - try { - assertEquals((double) expected_, - ((Number) obtained).doubleValue(), - 0.00000000001); - logger.info("Finished running line #42"); - } catch (Throwable ae) { - logger.error("Whoops, got exception on line #42:" + ae.toString()); - if(obtained instanceof Throwable) { - ae.addSuppressed((Throwable) obtained); - } - throw ae; - } - } - - { - // math_logic/floor_ceil_round.yaml line #44 - /* -1.0 */ - Double expected_ = -1.0; - /* r.ceil(-1.5) */ - logger.info("About to run line #44: r.ceil(-1.5)"); - Object obtained = runOrCatch(r.ceil(-1.5), - new OptArgs() - ,conn); - try { - assertEquals((double) expected_, - ((Number) obtained).doubleValue(), - 0.00000000001); - logger.info("Finished running line #44"); - } catch (Throwable ae) { - logger.error("Whoops, got exception on line #44:" + ae.toString()); - if(obtained instanceof Throwable) { - ae.addSuppressed((Throwable) obtained); - } - throw ae; - } - } - - { - // math_logic/floor_ceil_round.yaml line #47 - /* err("ReqlQueryLogicError", "Expected type NUMBER but found STRING.", []) */ - Err expected_ = err("ReqlQueryLogicError", "Expected type NUMBER but found STRING.", r.array()); - /* r.expr('X').ceil() */ - logger.info("About to run line #47: r.expr('X').ceil()"); - Object obtained = runOrCatch(r.expr("X").ceil(), - new OptArgs() - ,conn); - try { - assertEquals(expected_, obtained); - logger.info("Finished running line #47"); - } catch (Throwable ae) { - logger.error("Whoops, got exception on line #47:" + ae.toString()); - if(obtained instanceof Throwable) { - ae.addSuppressed((Throwable) obtained); - } - throw ae; - } - } - - { - // math_logic/floor_ceil_round.yaml line #51 - /* "NUMBER" */ - String expected_ = "NUMBER"; - /* r.round(1.0).type_of() */ - logger.info("About to run line #51: r.round(1.0).typeOf()"); - Object obtained = runOrCatch(r.round(1.0).typeOf(), - new OptArgs() - ,conn); - try { - assertEquals(expected_, obtained); - logger.info("Finished running line #51"); - } catch (Throwable ae) { - logger.error("Whoops, got exception on line #51:" + ae.toString()); - if(obtained instanceof Throwable) { - ae.addSuppressed((Throwable) obtained); - } - throw ae; - } - } - - { - // math_logic/floor_ceil_round.yaml line #53 - /* 1.0 */ - Double expected_ = 1.0; - /* r.round(1.0) */ - logger.info("About to run line #53: r.round(1.0)"); - Object obtained = runOrCatch(r.round(1.0), - new OptArgs() - ,conn); - try { - assertEquals((double) expected_, - ((Number) obtained).doubleValue(), - 0.00000000001); - logger.info("Finished running line #53"); - } catch (Throwable ae) { - logger.error("Whoops, got exception on line #53:" + ae.toString()); - if(obtained instanceof Throwable) { - ae.addSuppressed((Throwable) obtained); - } - throw ae; - } - } - - { - // math_logic/floor_ceil_round.yaml line #55 - /* 1.0 */ - Double expected_ = 1.0; - /* r.expr(1.0).round() */ - logger.info("About to run line #55: r.expr(1.0).round()"); - Object obtained = runOrCatch(r.expr(1.0).round(), - new OptArgs() - ,conn); - try { - assertEquals((double) expected_, - ((Number) obtained).doubleValue(), - 0.00000000001); - logger.info("Finished running line #55"); - } catch (Throwable ae) { - logger.error("Whoops, got exception on line #55:" + ae.toString()); - if(obtained instanceof Throwable) { - ae.addSuppressed((Throwable) obtained); - } - throw ae; - } - } - - { - // math_logic/floor_ceil_round.yaml line #58 - /* 1.0 */ - Double expected_ = 1.0; - /* r.round(0.5) */ - logger.info("About to run line #58: r.round(0.5)"); - Object obtained = runOrCatch(r.round(0.5), - new OptArgs() - ,conn); - try { - assertEquals((double) expected_, - ((Number) obtained).doubleValue(), - 0.00000000001); - logger.info("Finished running line #58"); - } catch (Throwable ae) { - logger.error("Whoops, got exception on line #58:" + ae.toString()); - if(obtained instanceof Throwable) { - ae.addSuppressed((Throwable) obtained); - } - throw ae; - } - } - - { - // math_logic/floor_ceil_round.yaml line #60 - /* -1.0 */ - Double expected_ = -1.0; - /* r.round(-0.5) */ - logger.info("About to run line #60: r.round(-0.5)"); - Object obtained = runOrCatch(r.round(-0.5), - new OptArgs() - ,conn); - try { - assertEquals((double) expected_, - ((Number) obtained).doubleValue(), - 0.00000000001); - logger.info("Finished running line #60"); - } catch (Throwable ae) { - logger.error("Whoops, got exception on line #60:" + ae.toString()); - if(obtained instanceof Throwable) { - ae.addSuppressed((Throwable) obtained); - } - throw ae; - } - } - - { - // math_logic/floor_ceil_round.yaml line #63 - /* 0.0 */ - Double expected_ = 0.0; - /* r.round(0.0) */ - logger.info("About to run line #63: r.round(0.0)"); - Object obtained = runOrCatch(r.round(0.0), - new OptArgs() - ,conn); - try { - assertEquals((double) expected_, - ((Number) obtained).doubleValue(), - 0.00000000001); - logger.info("Finished running line #63"); - } catch (Throwable ae) { - logger.error("Whoops, got exception on line #63:" + ae.toString()); - if(obtained instanceof Throwable) { - ae.addSuppressed((Throwable) obtained); - } - throw ae; - } - } - - { - // math_logic/floor_ceil_round.yaml line #65 - /* 1.0 */ - Double expected_ = 1.0; - /* r.round(1.0) */ - logger.info("About to run line #65: r.round(1.0)"); - Object obtained = runOrCatch(r.round(1.0), - new OptArgs() - ,conn); - try { - assertEquals((double) expected_, - ((Number) obtained).doubleValue(), - 0.00000000001); - logger.info("Finished running line #65"); - } catch (Throwable ae) { - logger.error("Whoops, got exception on line #65:" + ae.toString()); - if(obtained instanceof Throwable) { - ae.addSuppressed((Throwable) obtained); - } - throw ae; - } - } - - { - // math_logic/floor_ceil_round.yaml line #67 - /* 10.0 */ - Double expected_ = 10.0; - /* r.round(10.0) */ - logger.info("About to run line #67: r.round(10.0)"); - Object obtained = runOrCatch(r.round(10.0), - new OptArgs() - ,conn); - try { - assertEquals((double) expected_, - ((Number) obtained).doubleValue(), - 0.00000000001); - logger.info("Finished running line #67"); - } catch (Throwable ae) { - logger.error("Whoops, got exception on line #67:" + ae.toString()); - if(obtained instanceof Throwable) { - ae.addSuppressed((Throwable) obtained); - } - throw ae; - } - } - - { - // math_logic/floor_ceil_round.yaml line #69 - /* 1000000000.0 */ - Double expected_ = 1000000000.0; - /* r.round(1000000000.0) */ - logger.info("About to run line #69: r.round(1000000000.0)"); - Object obtained = runOrCatch(r.round(1000000000.0), - new OptArgs() - ,conn); - try { - assertEquals((double) expected_, - ((Number) obtained).doubleValue(), - 0.00000000001); - logger.info("Finished running line #69"); - } catch (Throwable ae) { - logger.error("Whoops, got exception on line #69:" + ae.toString()); - if(obtained instanceof Throwable) { - ae.addSuppressed((Throwable) obtained); - } - throw ae; - } - } - - { - // math_logic/floor_ceil_round.yaml line #71 - /* 1e20 */ - Double expected_ = 1e+20; - /* r.round(1e20) */ - logger.info("About to run line #71: r.round(1e+20)"); - Object obtained = runOrCatch(r.round(1e+20), - new OptArgs() - ,conn); - try { - assertEquals((double) expected_, - ((Number) obtained).doubleValue(), - 0.00000000001); - logger.info("Finished running line #71"); - } catch (Throwable ae) { - logger.error("Whoops, got exception on line #71:" + ae.toString()); - if(obtained instanceof Throwable) { - ae.addSuppressed((Throwable) obtained); - } - throw ae; - } - } - - { - // math_logic/floor_ceil_round.yaml line #74 - /* -1.0 */ - Double expected_ = -1.0; - /* r.round(-1.0) */ - logger.info("About to run line #74: r.round(-1.0)"); - Object obtained = runOrCatch(r.round(-1.0), - new OptArgs() - ,conn); - try { - assertEquals((double) expected_, - ((Number) obtained).doubleValue(), - 0.00000000001); - logger.info("Finished running line #74"); - } catch (Throwable ae) { - logger.error("Whoops, got exception on line #74:" + ae.toString()); - if(obtained instanceof Throwable) { - ae.addSuppressed((Throwable) obtained); - } - throw ae; - } - } - - { - // math_logic/floor_ceil_round.yaml line #76 - /* -10.0 */ - Double expected_ = -10.0; - /* r.round(-10.0) */ - logger.info("About to run line #76: r.round(-10.0)"); - Object obtained = runOrCatch(r.round(-10.0), - new OptArgs() - ,conn); - try { - assertEquals((double) expected_, - ((Number) obtained).doubleValue(), - 0.00000000001); - logger.info("Finished running line #76"); - } catch (Throwable ae) { - logger.error("Whoops, got exception on line #76:" + ae.toString()); - if(obtained instanceof Throwable) { - ae.addSuppressed((Throwable) obtained); - } - throw ae; - } - } - - { - // math_logic/floor_ceil_round.yaml line #78 - /* -1000000000.0 */ - Double expected_ = -1000000000.0; - /* r.round(-1000000000.0) */ - logger.info("About to run line #78: r.round(-1000000000.0)"); - Object obtained = runOrCatch(r.round(-1000000000.0), - new OptArgs() - ,conn); - try { - assertEquals((double) expected_, - ((Number) obtained).doubleValue(), - 0.00000000001); - logger.info("Finished running line #78"); - } catch (Throwable ae) { - logger.error("Whoops, got exception on line #78:" + ae.toString()); - if(obtained instanceof Throwable) { - ae.addSuppressed((Throwable) obtained); - } - throw ae; - } - } - - { - // math_logic/floor_ceil_round.yaml line #80 - /* -1e20 */ - Double expected_ = -1e+20; - /* r.round(-1e20) */ - logger.info("About to run line #80: r.round(-1e+20)"); - Object obtained = runOrCatch(r.round(-1e+20), - new OptArgs() - ,conn); - try { - assertEquals((double) expected_, - ((Number) obtained).doubleValue(), - 0.00000000001); - logger.info("Finished running line #80"); - } catch (Throwable ae) { - logger.error("Whoops, got exception on line #80:" + ae.toString()); - if(obtained instanceof Throwable) { - ae.addSuppressed((Throwable) obtained); - } - throw ae; - } - } - - { - // math_logic/floor_ceil_round.yaml line #83 - /* 0.0 */ - Double expected_ = 0.0; - /* r.round(0.1) */ - logger.info("About to run line #83: r.round(0.1)"); - Object obtained = runOrCatch(r.round(0.1), - new OptArgs() - ,conn); - try { - assertEquals((double) expected_, - ((Number) obtained).doubleValue(), - 0.00000000001); - logger.info("Finished running line #83"); - } catch (Throwable ae) { - logger.error("Whoops, got exception on line #83:" + ae.toString()); - if(obtained instanceof Throwable) { - ae.addSuppressed((Throwable) obtained); - } - throw ae; - } - } - - { - // math_logic/floor_ceil_round.yaml line #85 - /* 1.0 */ - Double expected_ = 1.0; - /* r.round(1.1) */ - logger.info("About to run line #85: r.round(1.1)"); - Object obtained = runOrCatch(r.round(1.1), - new OptArgs() - ,conn); - try { - assertEquals((double) expected_, - ((Number) obtained).doubleValue(), - 0.00000000001); - logger.info("Finished running line #85"); - } catch (Throwable ae) { - logger.error("Whoops, got exception on line #85:" + ae.toString()); - if(obtained instanceof Throwable) { - ae.addSuppressed((Throwable) obtained); - } - throw ae; - } - } - - { - // math_logic/floor_ceil_round.yaml line #87 - /* 10.0 */ - Double expected_ = 10.0; - /* r.round(10.1) */ - logger.info("About to run line #87: r.round(10.1)"); - Object obtained = runOrCatch(r.round(10.1), - new OptArgs() - ,conn); - try { - assertEquals((double) expected_, - ((Number) obtained).doubleValue(), - 0.00000000001); - logger.info("Finished running line #87"); - } catch (Throwable ae) { - logger.error("Whoops, got exception on line #87:" + ae.toString()); - if(obtained instanceof Throwable) { - ae.addSuppressed((Throwable) obtained); - } - throw ae; - } - } - - { - // math_logic/floor_ceil_round.yaml line #89 - /* 1000000000.0 */ - Double expected_ = 1000000000.0; - /* r.round(1000000000.1) */ - logger.info("About to run line #89: r.round(1000000000.1)"); - Object obtained = runOrCatch(r.round(1000000000.1), - new OptArgs() - ,conn); - try { - assertEquals((double) expected_, - ((Number) obtained).doubleValue(), - 0.00000000001); - logger.info("Finished running line #89"); - } catch (Throwable ae) { - logger.error("Whoops, got exception on line #89:" + ae.toString()); - if(obtained instanceof Throwable) { - ae.addSuppressed((Throwable) obtained); - } - throw ae; - } - } - - { - // math_logic/floor_ceil_round.yaml line #92 - /* -1.0 */ - Double expected_ = -1.0; - /* r.round(-1.1) */ - logger.info("About to run line #92: r.round(-1.1)"); - Object obtained = runOrCatch(r.round(-1.1), - new OptArgs() - ,conn); - try { - assertEquals((double) expected_, - ((Number) obtained).doubleValue(), - 0.00000000001); - logger.info("Finished running line #92"); - } catch (Throwable ae) { - logger.error("Whoops, got exception on line #92:" + ae.toString()); - if(obtained instanceof Throwable) { - ae.addSuppressed((Throwable) obtained); - } - throw ae; - } - } - - { - // math_logic/floor_ceil_round.yaml line #94 - /* -10.0 */ - Double expected_ = -10.0; - /* r.round(-10.1) */ - logger.info("About to run line #94: r.round(-10.1)"); - Object obtained = runOrCatch(r.round(-10.1), - new OptArgs() - ,conn); - try { - assertEquals((double) expected_, - ((Number) obtained).doubleValue(), - 0.00000000001); - logger.info("Finished running line #94"); - } catch (Throwable ae) { - logger.error("Whoops, got exception on line #94:" + ae.toString()); - if(obtained instanceof Throwable) { - ae.addSuppressed((Throwable) obtained); - } - throw ae; - } - } - - { - // math_logic/floor_ceil_round.yaml line #96 - /* -1000000000.0 */ - Double expected_ = -1000000000.0; - /* r.round(-1000000000.1) */ - logger.info("About to run line #96: r.round(-1000000000.1)"); - Object obtained = runOrCatch(r.round(-1000000000.1), - new OptArgs() - ,conn); - try { - assertEquals((double) expected_, - ((Number) obtained).doubleValue(), - 0.00000000001); - logger.info("Finished running line #96"); - } catch (Throwable ae) { - logger.error("Whoops, got exception on line #96:" + ae.toString()); - if(obtained instanceof Throwable) { - ae.addSuppressed((Throwable) obtained); - } - throw ae; - } - } - - { - // math_logic/floor_ceil_round.yaml line #99 - /* 1.0 */ - Double expected_ = 1.0; - /* r.round(0.9) */ - logger.info("About to run line #99: r.round(0.9)"); - Object obtained = runOrCatch(r.round(0.9), - new OptArgs() - ,conn); - try { - assertEquals((double) expected_, - ((Number) obtained).doubleValue(), - 0.00000000001); - logger.info("Finished running line #99"); - } catch (Throwable ae) { - logger.error("Whoops, got exception on line #99:" + ae.toString()); - if(obtained instanceof Throwable) { - ae.addSuppressed((Throwable) obtained); - } - throw ae; - } - } - - { - // math_logic/floor_ceil_round.yaml line #101 - /* 10.0 */ - Double expected_ = 10.0; - /* r.round(9.9) */ - logger.info("About to run line #101: r.round(9.9)"); - Object obtained = runOrCatch(r.round(9.9), - new OptArgs() - ,conn); - try { - assertEquals((double) expected_, - ((Number) obtained).doubleValue(), - 0.00000000001); - logger.info("Finished running line #101"); - } catch (Throwable ae) { - logger.error("Whoops, got exception on line #101:" + ae.toString()); - if(obtained instanceof Throwable) { - ae.addSuppressed((Throwable) obtained); - } - throw ae; - } - } - - { - // math_logic/floor_ceil_round.yaml line #103 - /* 1000000000.0 */ - Double expected_ = 1000000000.0; - /* r.round(999999999.9) */ - logger.info("About to run line #103: r.round(999999999.9)"); - Object obtained = runOrCatch(r.round(999999999.9), - new OptArgs() - ,conn); - try { - assertEquals((double) expected_, - ((Number) obtained).doubleValue(), - 0.00000000001); - logger.info("Finished running line #103"); - } catch (Throwable ae) { - logger.error("Whoops, got exception on line #103:" + ae.toString()); - if(obtained instanceof Throwable) { - ae.addSuppressed((Throwable) obtained); - } - throw ae; - } - } - - { - // math_logic/floor_ceil_round.yaml line #106 - /* -1.0 */ - Double expected_ = -1.0; - /* r.round(-0.9) */ - logger.info("About to run line #106: r.round(-0.9)"); - Object obtained = runOrCatch(r.round(-0.9), - new OptArgs() - ,conn); - try { - assertEquals((double) expected_, - ((Number) obtained).doubleValue(), - 0.00000000001); - logger.info("Finished running line #106"); - } catch (Throwable ae) { - logger.error("Whoops, got exception on line #106:" + ae.toString()); - if(obtained instanceof Throwable) { - ae.addSuppressed((Throwable) obtained); - } - throw ae; - } - } - - { - // math_logic/floor_ceil_round.yaml line #108 - /* -10.0 */ - Double expected_ = -10.0; - /* r.round(-9.9) */ - logger.info("About to run line #108: r.round(-9.9)"); - Object obtained = runOrCatch(r.round(-9.9), - new OptArgs() - ,conn); - try { - assertEquals((double) expected_, - ((Number) obtained).doubleValue(), - 0.00000000001); - logger.info("Finished running line #108"); - } catch (Throwable ae) { - logger.error("Whoops, got exception on line #108:" + ae.toString()); - if(obtained instanceof Throwable) { - ae.addSuppressed((Throwable) obtained); - } - throw ae; - } - } - - { - // math_logic/floor_ceil_round.yaml line #110 - /* -1000000000.0 */ - Double expected_ = -1000000000.0; - /* r.round(-999999999.9) */ - logger.info("About to run line #110: r.round(-999999999.9)"); - Object obtained = runOrCatch(r.round(-999999999.9), - new OptArgs() - ,conn); - try { - assertEquals((double) expected_, - ((Number) obtained).doubleValue(), - 0.00000000001); - logger.info("Finished running line #110"); - } catch (Throwable ae) { - logger.error("Whoops, got exception on line #110:" + ae.toString()); - if(obtained instanceof Throwable) { - ae.addSuppressed((Throwable) obtained); - } - throw ae; - } - } - - { - // math_logic/floor_ceil_round.yaml line #113 - /* err("ReqlQueryLogicError", "Expected type NUMBER but found STRING.", []) */ - Err expected_ = err("ReqlQueryLogicError", "Expected type NUMBER but found STRING.", r.array()); - /* r.expr('X').round() */ - logger.info("About to run line #113: r.expr('X').round()"); - Object obtained = runOrCatch(r.expr("X").round(), - new OptArgs() - ,conn); - try { - assertEquals(expected_, obtained); - logger.info("Finished running line #113"); - } catch (Throwable ae) { - logger.error("Whoops, got exception on line #113:" + ae.toString()); - if(obtained instanceof Throwable) { - ae.addSuppressed((Throwable) obtained); - } - throw ae; - } - } - } -} diff --git a/drivers/java/src/test/java/com/rethinkdb/gen/MathLogicLogic.java b/drivers/java/src/test/java/com/rethinkdb/gen/MathLogicLogic.java deleted file mode 100644 index c6cf51ba114..00000000000 --- a/drivers/java/src/test/java/com/rethinkdb/gen/MathLogicLogic.java +++ /dev/null @@ -1,1064 +0,0 @@ -// Autogenerated by convert_tests.py and process_polyglot.py. -// Do not edit this file directly. -// The template for this file is located at: -// ../../../../../../../templates/Test.java -package com.rethinkdb.gen; - -import com.rethinkdb.RethinkDB; -import com.rethinkdb.gen.exc.*; -import com.rethinkdb.gen.ast.*; -import com.rethinkdb.ast.ReqlAst; -import com.rethinkdb.model.MapObject; -import com.rethinkdb.model.OptArgs; -import com.rethinkdb.net.Connection; -import com.rethinkdb.net.Cursor; -import junit.framework.TestCase; -import static org.junit.Assert.assertEquals; -import static org.junit.Assert.assertArrayEquals; -import org.slf4j.Logger; -import org.slf4j.LoggerFactory; - -import org.junit.*; -import org.junit.rules.ExpectedException; - -import java.util.Arrays; -import java.util.ArrayList; -import java.util.List; -import java.util.Map; -import java.util.Set; -import java.time.OffsetDateTime; -import java.time.ZoneOffset; -import java.time.Instant; -import java.util.stream.LongStream; -import java.util.stream.Collectors; -import java.util.stream.Stream; -import java.util.concurrent.TimeoutException; -import java.util.regex.Pattern; -import java.util.Collections; -import java.nio.charset.StandardCharsets; - -import static com.rethinkdb.TestingCommon.*; -import com.rethinkdb.TestingFramework; - -public class MathLogicLogic { - // These tests are aimed at &&, ||, and ! - Logger logger = LoggerFactory.getLogger(MathLogicLogic.class); - public static final RethinkDB r = RethinkDB.r; - - Connection conn; - - @Before - public void setUp() throws Exception { - logger.info("Setting up."); - conn = TestingFramework.createConnection(); - try { - r.dbCreate("test").run(conn); - r.db("test").wait_().run(conn); - }catch (Exception e){} - } - - @After - public void tearDown() throws Exception { - logger.info("Tearing down."); - r.db("rethinkdb").table("_debug_scratch").delete().run(conn); - if(!conn.isOpen()){ - conn.close(); - conn = TestingFramework.createConnection(); - } - r.dbDrop("test").run(conn); - conn.close(false); - } - - // Autogenerated tests below - - @Test(timeout=120000) - public void test() throws Exception { - - { - // math_logic/logic.yaml line #8 - /* true */ - Boolean expected_ = true; - /* r.expr(true) & true */ - logger.info("About to run line #8: r.expr(true).and(true)"); - Object obtained = runOrCatch(r.expr(true).and(true), - new OptArgs() - ,conn); - try { - assertEquals(expected_, obtained); - logger.info("Finished running line #8"); - } catch (Throwable ae) { - logger.error("Whoops, got exception on line #8:" + ae.toString()); - if(obtained instanceof Throwable) { - ae.addSuppressed((Throwable) obtained); - } - throw ae; - } - } - - { - // math_logic/logic.yaml line #9 - /* true */ - Boolean expected_ = true; - /* true & r.expr(true) */ - logger.info("About to run line #9: r.and(true, r.expr(true))"); - Object obtained = runOrCatch(r.and(true, r.expr(true)), - new OptArgs() - ,conn); - try { - assertEquals(expected_, obtained); - logger.info("Finished running line #9"); - } catch (Throwable ae) { - logger.error("Whoops, got exception on line #9:" + ae.toString()); - if(obtained instanceof Throwable) { - ae.addSuppressed((Throwable) obtained); - } - throw ae; - } - } - - { - // math_logic/logic.yaml line #10 - /* true */ - Boolean expected_ = true; - /* r.and_(true,true) */ - logger.info("About to run line #10: r.and(true, true)"); - Object obtained = runOrCatch(r.and(true, true), - new OptArgs() - ,conn); - try { - assertEquals(expected_, obtained); - logger.info("Finished running line #10"); - } catch (Throwable ae) { - logger.error("Whoops, got exception on line #10:" + ae.toString()); - if(obtained instanceof Throwable) { - ae.addSuppressed((Throwable) obtained); - } - throw ae; - } - } - - { - // math_logic/logic.yaml line #11 - /* true */ - Boolean expected_ = true; - /* r.expr(true).and_(true) */ - logger.info("About to run line #11: r.expr(true).and(true)"); - Object obtained = runOrCatch(r.expr(true).and(true), - new OptArgs() - ,conn); - try { - assertEquals(expected_, obtained); - logger.info("Finished running line #11"); - } catch (Throwable ae) { - logger.error("Whoops, got exception on line #11:" + ae.toString()); - if(obtained instanceof Throwable) { - ae.addSuppressed((Throwable) obtained); - } - throw ae; - } - } - - { - // math_logic/logic.yaml line #22 - /* false */ - Boolean expected_ = false; - /* r.expr(true) & false */ - logger.info("About to run line #22: r.expr(true).and(false)"); - Object obtained = runOrCatch(r.expr(true).and(false), - new OptArgs() - ,conn); - try { - assertEquals(expected_, obtained); - logger.info("Finished running line #22"); - } catch (Throwable ae) { - logger.error("Whoops, got exception on line #22:" + ae.toString()); - if(obtained instanceof Throwable) { - ae.addSuppressed((Throwable) obtained); - } - throw ae; - } - } - - { - // math_logic/logic.yaml line #23 - /* false */ - Boolean expected_ = false; - /* r.expr(false) & false */ - logger.info("About to run line #23: r.expr(false).and(false)"); - Object obtained = runOrCatch(r.expr(false).and(false), - new OptArgs() - ,conn); - try { - assertEquals(expected_, obtained); - logger.info("Finished running line #23"); - } catch (Throwable ae) { - logger.error("Whoops, got exception on line #23:" + ae.toString()); - if(obtained instanceof Throwable) { - ae.addSuppressed((Throwable) obtained); - } - throw ae; - } - } - - { - // math_logic/logic.yaml line #24 - /* false */ - Boolean expected_ = false; - /* true & r.expr(false) */ - logger.info("About to run line #24: r.and(true, r.expr(false))"); - Object obtained = runOrCatch(r.and(true, r.expr(false)), - new OptArgs() - ,conn); - try { - assertEquals(expected_, obtained); - logger.info("Finished running line #24"); - } catch (Throwable ae) { - logger.error("Whoops, got exception on line #24:" + ae.toString()); - if(obtained instanceof Throwable) { - ae.addSuppressed((Throwable) obtained); - } - throw ae; - } - } - - { - // math_logic/logic.yaml line #25 - /* false */ - Boolean expected_ = false; - /* false & r.expr(false) */ - logger.info("About to run line #25: r.and(false, r.expr(false))"); - Object obtained = runOrCatch(r.and(false, r.expr(false)), - new OptArgs() - ,conn); - try { - assertEquals(expected_, obtained); - logger.info("Finished running line #25"); - } catch (Throwable ae) { - logger.error("Whoops, got exception on line #25:" + ae.toString()); - if(obtained instanceof Throwable) { - ae.addSuppressed((Throwable) obtained); - } - throw ae; - } - } - - { - // math_logic/logic.yaml line #26 - /* false */ - Boolean expected_ = false; - /* r.and_(true,false) */ - logger.info("About to run line #26: r.and(true, false)"); - Object obtained = runOrCatch(r.and(true, false), - new OptArgs() - ,conn); - try { - assertEquals(expected_, obtained); - logger.info("Finished running line #26"); - } catch (Throwable ae) { - logger.error("Whoops, got exception on line #26:" + ae.toString()); - if(obtained instanceof Throwable) { - ae.addSuppressed((Throwable) obtained); - } - throw ae; - } - } - - { - // math_logic/logic.yaml line #27 - /* false */ - Boolean expected_ = false; - /* r.and_(false,false) */ - logger.info("About to run line #27: r.and(false, false)"); - Object obtained = runOrCatch(r.and(false, false), - new OptArgs() - ,conn); - try { - assertEquals(expected_, obtained); - logger.info("Finished running line #27"); - } catch (Throwable ae) { - logger.error("Whoops, got exception on line #27:" + ae.toString()); - if(obtained instanceof Throwable) { - ae.addSuppressed((Throwable) obtained); - } - throw ae; - } - } - - { - // math_logic/logic.yaml line #28 - /* false */ - Boolean expected_ = false; - /* r.expr(true).and_(false) */ - logger.info("About to run line #28: r.expr(true).and(false)"); - Object obtained = runOrCatch(r.expr(true).and(false), - new OptArgs() - ,conn); - try { - assertEquals(expected_, obtained); - logger.info("Finished running line #28"); - } catch (Throwable ae) { - logger.error("Whoops, got exception on line #28:" + ae.toString()); - if(obtained instanceof Throwable) { - ae.addSuppressed((Throwable) obtained); - } - throw ae; - } - } - - { - // math_logic/logic.yaml line #29 - /* false */ - Boolean expected_ = false; - /* r.expr(false).and_(false) */ - logger.info("About to run line #29: r.expr(false).and(false)"); - Object obtained = runOrCatch(r.expr(false).and(false), - new OptArgs() - ,conn); - try { - assertEquals(expected_, obtained); - logger.info("Finished running line #29"); - } catch (Throwable ae) { - logger.error("Whoops, got exception on line #29:" + ae.toString()); - if(obtained instanceof Throwable) { - ae.addSuppressed((Throwable) obtained); - } - throw ae; - } - } - - { - // math_logic/logic.yaml line #48 - /* true */ - Boolean expected_ = true; - /* r.expr(true) | true */ - logger.info("About to run line #48: r.expr(true).or(true)"); - Object obtained = runOrCatch(r.expr(true).or(true), - new OptArgs() - ,conn); - try { - assertEquals(expected_, obtained); - logger.info("Finished running line #48"); - } catch (Throwable ae) { - logger.error("Whoops, got exception on line #48:" + ae.toString()); - if(obtained instanceof Throwable) { - ae.addSuppressed((Throwable) obtained); - } - throw ae; - } - } - - { - // math_logic/logic.yaml line #49 - /* true */ - Boolean expected_ = true; - /* r.expr(true) | false */ - logger.info("About to run line #49: r.expr(true).or(false)"); - Object obtained = runOrCatch(r.expr(true).or(false), - new OptArgs() - ,conn); - try { - assertEquals(expected_, obtained); - logger.info("Finished running line #49"); - } catch (Throwable ae) { - logger.error("Whoops, got exception on line #49:" + ae.toString()); - if(obtained instanceof Throwable) { - ae.addSuppressed((Throwable) obtained); - } - throw ae; - } - } - - { - // math_logic/logic.yaml line #50 - /* true */ - Boolean expected_ = true; - /* true | r.expr(true) */ - logger.info("About to run line #50: r.or(true, r.expr(true))"); - Object obtained = runOrCatch(r.or(true, r.expr(true)), - new OptArgs() - ,conn); - try { - assertEquals(expected_, obtained); - logger.info("Finished running line #50"); - } catch (Throwable ae) { - logger.error("Whoops, got exception on line #50:" + ae.toString()); - if(obtained instanceof Throwable) { - ae.addSuppressed((Throwable) obtained); - } - throw ae; - } - } - - { - // math_logic/logic.yaml line #51 - /* true */ - Boolean expected_ = true; - /* true | r.expr(false) */ - logger.info("About to run line #51: r.or(true, r.expr(false))"); - Object obtained = runOrCatch(r.or(true, r.expr(false)), - new OptArgs() - ,conn); - try { - assertEquals(expected_, obtained); - logger.info("Finished running line #51"); - } catch (Throwable ae) { - logger.error("Whoops, got exception on line #51:" + ae.toString()); - if(obtained instanceof Throwable) { - ae.addSuppressed((Throwable) obtained); - } - throw ae; - } - } - - { - // math_logic/logic.yaml line #52 - /* true */ - Boolean expected_ = true; - /* r.or_(true,true) */ - logger.info("About to run line #52: r.or(true, true)"); - Object obtained = runOrCatch(r.or(true, true), - new OptArgs() - ,conn); - try { - assertEquals(expected_, obtained); - logger.info("Finished running line #52"); - } catch (Throwable ae) { - logger.error("Whoops, got exception on line #52:" + ae.toString()); - if(obtained instanceof Throwable) { - ae.addSuppressed((Throwable) obtained); - } - throw ae; - } - } - - { - // math_logic/logic.yaml line #53 - /* true */ - Boolean expected_ = true; - /* r.or_(true,false) */ - logger.info("About to run line #53: r.or(true, false)"); - Object obtained = runOrCatch(r.or(true, false), - new OptArgs() - ,conn); - try { - assertEquals(expected_, obtained); - logger.info("Finished running line #53"); - } catch (Throwable ae) { - logger.error("Whoops, got exception on line #53:" + ae.toString()); - if(obtained instanceof Throwable) { - ae.addSuppressed((Throwable) obtained); - } - throw ae; - } - } - - { - // math_logic/logic.yaml line #54 - /* true */ - Boolean expected_ = true; - /* r.expr(true).or_(true) */ - logger.info("About to run line #54: r.expr(true).or(true)"); - Object obtained = runOrCatch(r.expr(true).or(true), - new OptArgs() - ,conn); - try { - assertEquals(expected_, obtained); - logger.info("Finished running line #54"); - } catch (Throwable ae) { - logger.error("Whoops, got exception on line #54:" + ae.toString()); - if(obtained instanceof Throwable) { - ae.addSuppressed((Throwable) obtained); - } - throw ae; - } - } - - { - // math_logic/logic.yaml line #55 - /* true */ - Boolean expected_ = true; - /* r.expr(true).or_(false) */ - logger.info("About to run line #55: r.expr(true).or(false)"); - Object obtained = runOrCatch(r.expr(true).or(false), - new OptArgs() - ,conn); - try { - assertEquals(expected_, obtained); - logger.info("Finished running line #55"); - } catch (Throwable ae) { - logger.error("Whoops, got exception on line #55:" + ae.toString()); - if(obtained instanceof Throwable) { - ae.addSuppressed((Throwable) obtained); - } - throw ae; - } - } - - { - // math_logic/logic.yaml line #72 - /* false */ - Boolean expected_ = false; - /* r.expr(false) | false */ - logger.info("About to run line #72: r.expr(false).or(false)"); - Object obtained = runOrCatch(r.expr(false).or(false), - new OptArgs() - ,conn); - try { - assertEquals(expected_, obtained); - logger.info("Finished running line #72"); - } catch (Throwable ae) { - logger.error("Whoops, got exception on line #72:" + ae.toString()); - if(obtained instanceof Throwable) { - ae.addSuppressed((Throwable) obtained); - } - throw ae; - } - } - - { - // math_logic/logic.yaml line #73 - /* false */ - Boolean expected_ = false; - /* false | r.expr(false) */ - logger.info("About to run line #73: r.or(false, r.expr(false))"); - Object obtained = runOrCatch(r.or(false, r.expr(false)), - new OptArgs() - ,conn); - try { - assertEquals(expected_, obtained); - logger.info("Finished running line #73"); - } catch (Throwable ae) { - logger.error("Whoops, got exception on line #73:" + ae.toString()); - if(obtained instanceof Throwable) { - ae.addSuppressed((Throwable) obtained); - } - throw ae; - } - } - - { - // math_logic/logic.yaml line #74 - /* false */ - Boolean expected_ = false; - /* r.and_(false,false) */ - logger.info("About to run line #74: r.and(false, false)"); - Object obtained = runOrCatch(r.and(false, false), - new OptArgs() - ,conn); - try { - assertEquals(expected_, obtained); - logger.info("Finished running line #74"); - } catch (Throwable ae) { - logger.error("Whoops, got exception on line #74:" + ae.toString()); - if(obtained instanceof Throwable) { - ae.addSuppressed((Throwable) obtained); - } - throw ae; - } - } - - { - // math_logic/logic.yaml line #75 - /* false */ - Boolean expected_ = false; - /* r.expr(false).and_(false) */ - logger.info("About to run line #75: r.expr(false).and(false)"); - Object obtained = runOrCatch(r.expr(false).and(false), - new OptArgs() - ,conn); - try { - assertEquals(expected_, obtained); - logger.info("Finished running line #75"); - } catch (Throwable ae) { - logger.error("Whoops, got exception on line #75:" + ae.toString()); - if(obtained instanceof Throwable) { - ae.addSuppressed((Throwable) obtained); - } - throw ae; - } - } - - { - // math_logic/logic.yaml line #88 - /* false */ - Boolean expected_ = false; - /* ~r.expr(True) */ - logger.info("About to run line #88: r.expr(true).not()"); - Object obtained = runOrCatch(r.expr(true).not(), - new OptArgs() - ,conn); - try { - assertEquals(expected_, obtained); - logger.info("Finished running line #88"); - } catch (Throwable ae) { - logger.error("Whoops, got exception on line #88:" + ae.toString()); - if(obtained instanceof Throwable) { - ae.addSuppressed((Throwable) obtained); - } - throw ae; - } - } - - { - // math_logic/logic.yaml line #89 - /* false */ - Boolean expected_ = false; - /* r.not_(True) */ - logger.info("About to run line #89: r.not(true)"); - Object obtained = runOrCatch(r.not(true), - new OptArgs() - ,conn); - try { - assertEquals(expected_, obtained); - logger.info("Finished running line #89"); - } catch (Throwable ae) { - logger.error("Whoops, got exception on line #89:" + ae.toString()); - if(obtained instanceof Throwable) { - ae.addSuppressed((Throwable) obtained); - } - throw ae; - } - } - - { - // math_logic/logic.yaml line #93 - /* true */ - Boolean expected_ = true; - /* ~r.expr(False) */ - logger.info("About to run line #93: r.expr(false).not()"); - Object obtained = runOrCatch(r.expr(false).not(), - new OptArgs() - ,conn); - try { - assertEquals(expected_, obtained); - logger.info("Finished running line #93"); - } catch (Throwable ae) { - logger.error("Whoops, got exception on line #93:" + ae.toString()); - if(obtained instanceof Throwable) { - ae.addSuppressed((Throwable) obtained); - } - throw ae; - } - } - - { - // math_logic/logic.yaml line #94 - /* true */ - Boolean expected_ = true; - /* r.not_(False) */ - logger.info("About to run line #94: r.not(false)"); - Object obtained = runOrCatch(r.not(false), - new OptArgs() - ,conn); - try { - assertEquals(expected_, obtained); - logger.info("Finished running line #94"); - } catch (Throwable ae) { - logger.error("Whoops, got exception on line #94:" + ae.toString()); - if(obtained instanceof Throwable) { - ae.addSuppressed((Throwable) obtained); - } - throw ae; - } - } - - { - // math_logic/logic.yaml line #97 - /* false */ - Boolean expected_ = false; - /* r.expr(True).not_() */ - logger.info("About to run line #97: r.expr(true).not()"); - Object obtained = runOrCatch(r.expr(true).not(), - new OptArgs() - ,conn); - try { - assertEquals(expected_, obtained); - logger.info("Finished running line #97"); - } catch (Throwable ae) { - logger.error("Whoops, got exception on line #97:" + ae.toString()); - if(obtained instanceof Throwable) { - ae.addSuppressed((Throwable) obtained); - } - throw ae; - } - } - - { - // math_logic/logic.yaml line #100 - /* true */ - Boolean expected_ = true; - /* r.expr(False).not_() */ - logger.info("About to run line #100: r.expr(false).not()"); - Object obtained = runOrCatch(r.expr(false).not(), - new OptArgs() - ,conn); - try { - assertEquals(expected_, obtained); - logger.info("Finished running line #100"); - } catch (Throwable ae) { - logger.error("Whoops, got exception on line #100:" + ae.toString()); - if(obtained instanceof Throwable) { - ae.addSuppressed((Throwable) obtained); - } - throw ae; - } - } - - { - // math_logic/logic.yaml line #107 - /* true */ - Boolean expected_ = true; - /* ~r.and_(True, True) == r.or_(~r.expr(True), ~r.expr(True)) */ - logger.info("About to run line #107: r.and(true, true).not().eq(r.or(r.expr(true).not(), r.expr(true).not()))"); - Object obtained = runOrCatch(r.and(true, true).not().eq(r.or(r.expr(true).not(), r.expr(true).not())), - new OptArgs() - ,conn); - try { - assertEquals(expected_, obtained); - logger.info("Finished running line #107"); - } catch (Throwable ae) { - logger.error("Whoops, got exception on line #107:" + ae.toString()); - if(obtained instanceof Throwable) { - ae.addSuppressed((Throwable) obtained); - } - throw ae; - } - } - - { - // math_logic/logic.yaml line #108 - /* true */ - Boolean expected_ = true; - /* ~r.and_(True, False) == r.or_(~r.expr(True), ~r.expr(False)) */ - logger.info("About to run line #108: r.and(true, false).not().eq(r.or(r.expr(true).not(), r.expr(false).not()))"); - Object obtained = runOrCatch(r.and(true, false).not().eq(r.or(r.expr(true).not(), r.expr(false).not())), - new OptArgs() - ,conn); - try { - assertEquals(expected_, obtained); - logger.info("Finished running line #108"); - } catch (Throwable ae) { - logger.error("Whoops, got exception on line #108:" + ae.toString()); - if(obtained instanceof Throwable) { - ae.addSuppressed((Throwable) obtained); - } - throw ae; - } - } - - { - // math_logic/logic.yaml line #109 - /* true */ - Boolean expected_ = true; - /* ~r.and_(False, False) == r.or_(~r.expr(False), ~r.expr(False)) */ - logger.info("About to run line #109: r.and(false, false).not().eq(r.or(r.expr(false).not(), r.expr(false).not()))"); - Object obtained = runOrCatch(r.and(false, false).not().eq(r.or(r.expr(false).not(), r.expr(false).not())), - new OptArgs() - ,conn); - try { - assertEquals(expected_, obtained); - logger.info("Finished running line #109"); - } catch (Throwable ae) { - logger.error("Whoops, got exception on line #109:" + ae.toString()); - if(obtained instanceof Throwable) { - ae.addSuppressed((Throwable) obtained); - } - throw ae; - } - } - - { - // math_logic/logic.yaml line #110 - /* true */ - Boolean expected_ = true; - /* ~r.and_(False, True) == r.or_(~r.expr(False), ~r.expr(True)) */ - logger.info("About to run line #110: r.and(false, true).not().eq(r.or(r.expr(false).not(), r.expr(true).not()))"); - Object obtained = runOrCatch(r.and(false, true).not().eq(r.or(r.expr(false).not(), r.expr(true).not())), - new OptArgs() - ,conn); - try { - assertEquals(expected_, obtained); - logger.info("Finished running line #110"); - } catch (Throwable ae) { - logger.error("Whoops, got exception on line #110:" + ae.toString()); - if(obtained instanceof Throwable) { - ae.addSuppressed((Throwable) obtained); - } - throw ae; - } - } - - { - // math_logic/logic.yaml line #120 - /* true */ - Boolean expected_ = true; - /* r.and_(True, True, True, True, True) */ - logger.info("About to run line #120: r.and(true, true, true, true, true)"); - Object obtained = runOrCatch(r.and(true, true, true, true, true), - new OptArgs() - ,conn); - try { - assertEquals(expected_, obtained); - logger.info("Finished running line #120"); - } catch (Throwable ae) { - logger.error("Whoops, got exception on line #120:" + ae.toString()); - if(obtained instanceof Throwable) { - ae.addSuppressed((Throwable) obtained); - } - throw ae; - } - } - - { - // math_logic/logic.yaml line #123 - /* false */ - Boolean expected_ = false; - /* r.and_(True, True, True, False, True) */ - logger.info("About to run line #123: r.and(true, true, true, false, true)"); - Object obtained = runOrCatch(r.and(true, true, true, false, true), - new OptArgs() - ,conn); - try { - assertEquals(expected_, obtained); - logger.info("Finished running line #123"); - } catch (Throwable ae) { - logger.error("Whoops, got exception on line #123:" + ae.toString()); - if(obtained instanceof Throwable) { - ae.addSuppressed((Throwable) obtained); - } - throw ae; - } - } - - { - // math_logic/logic.yaml line #126 - /* false */ - Boolean expected_ = false; - /* r.and_(True, False, True, False, True) */ - logger.info("About to run line #126: r.and(true, false, true, false, true)"); - Object obtained = runOrCatch(r.and(true, false, true, false, true), - new OptArgs() - ,conn); - try { - assertEquals(expected_, obtained); - logger.info("Finished running line #126"); - } catch (Throwable ae) { - logger.error("Whoops, got exception on line #126:" + ae.toString()); - if(obtained instanceof Throwable) { - ae.addSuppressed((Throwable) obtained); - } - throw ae; - } - } - - { - // math_logic/logic.yaml line #129 - /* false */ - Boolean expected_ = false; - /* r.or_(False, False, False, False, False) */ - logger.info("About to run line #129: r.or(false, false, false, false, false)"); - Object obtained = runOrCatch(r.or(false, false, false, false, false), - new OptArgs() - ,conn); - try { - assertEquals(expected_, obtained); - logger.info("Finished running line #129"); - } catch (Throwable ae) { - logger.error("Whoops, got exception on line #129:" + ae.toString()); - if(obtained instanceof Throwable) { - ae.addSuppressed((Throwable) obtained); - } - throw ae; - } - } - - { - // math_logic/logic.yaml line #132 - /* true */ - Boolean expected_ = true; - /* r.or_(False, False, False, True, False) */ - logger.info("About to run line #132: r.or(false, false, false, true, false)"); - Object obtained = runOrCatch(r.or(false, false, false, true, false), - new OptArgs() - ,conn); - try { - assertEquals(expected_, obtained); - logger.info("Finished running line #132"); - } catch (Throwable ae) { - logger.error("Whoops, got exception on line #132:" + ae.toString()); - if(obtained instanceof Throwable) { - ae.addSuppressed((Throwable) obtained); - } - throw ae; - } - } - - { - // math_logic/logic.yaml line #135 - /* true */ - Boolean expected_ = true; - /* r.or_(False, True, False, True, False) */ - logger.info("About to run line #135: r.or(false, true, false, true, false)"); - Object obtained = runOrCatch(r.or(false, true, false, true, false), - new OptArgs() - ,conn); - try { - assertEquals(expected_, obtained); - logger.info("Finished running line #135"); - } catch (Throwable ae) { - logger.error("Whoops, got exception on line #135:" + ae.toString()); - if(obtained instanceof Throwable) { - ae.addSuppressed((Throwable) obtained); - } - throw ae; - } - } - - { - // math_logic/logic.yaml line #140 - /* err("ReqlQueryLogicError", "Cannot perform bracket on a non-object non-sequence `\"a\"`.", []) */ - Err expected_ = err("ReqlQueryLogicError", "Cannot perform bracket on a non-object non-sequence `\"a\"`.", r.array()); - /* r.expr(r.expr('a')['b']).default(2) */ - logger.info("About to run line #140: r.expr(r.expr('a').bracket('b')).default_(2L)"); - Object obtained = runOrCatch(r.expr(r.expr("a").bracket("b")).default_(2L), - new OptArgs() - ,conn); - try { - assertEquals(expected_, obtained); - logger.info("Finished running line #140"); - } catch (Throwable ae) { - logger.error("Whoops, got exception on line #140:" + ae.toString()); - if(obtained instanceof Throwable) { - ae.addSuppressed((Throwable) obtained); - } - throw ae; - } - } - - { - // math_logic/logic.yaml line #145 - /* False */ - Boolean expected_ = false; - /* r.expr(r.and_(True, False) == r.or_(False, True)) */ - logger.info("About to run line #145: r.expr(r.and(true, false).eq(r.or(false, true)))"); - Object obtained = runOrCatch(r.expr(r.and(true, false).eq(r.or(false, true))), - new OptArgs() - ,conn); - try { - assertEquals(expected_, obtained); - logger.info("Finished running line #145"); - } catch (Throwable ae) { - logger.error("Whoops, got exception on line #145:" + ae.toString()); - if(obtained instanceof Throwable) { - ae.addSuppressed((Throwable) obtained); - } - throw ae; - } - } - - { - // math_logic/logic.yaml line #151 - /* False */ - Boolean expected_ = false; - /* r.expr(r.and_(True, False) >= r.or_(False, True)) */ - logger.info("About to run line #151: r.expr(r.and(true, false).ge(r.or(false, true)))"); - Object obtained = runOrCatch(r.expr(r.and(true, false).ge(r.or(false, true))), - new OptArgs() - ,conn); - try { - assertEquals(expected_, obtained); - logger.info("Finished running line #151"); - } catch (Throwable ae) { - logger.error("Whoops, got exception on line #151:" + ae.toString()); - if(obtained instanceof Throwable) { - ae.addSuppressed((Throwable) obtained); - } - throw ae; - } - } - - { - // math_logic/logic.yaml line #155 - /* true */ - Boolean expected_ = true; - /* r.expr(1) & True */ - logger.info("About to run line #155: r.expr(1L).and(true)"); - Object obtained = runOrCatch(r.expr(1L).and(true), - new OptArgs() - ,conn); - try { - assertEquals(expected_, obtained); - logger.info("Finished running line #155"); - } catch (Throwable ae) { - logger.error("Whoops, got exception on line #155:" + ae.toString()); - if(obtained instanceof Throwable) { - ae.addSuppressed((Throwable) obtained); - } - throw ae; - } - } - - { - // math_logic/logic.yaml line #159 - /* ("str") */ - String expected_ = "str"; - /* r.expr(False) | 'str' */ - logger.info("About to run line #159: r.expr(false).or('str')"); - Object obtained = runOrCatch(r.expr(false).or("str"), - new OptArgs() - ,conn); - try { - assertEquals(expected_, obtained); - logger.info("Finished running line #159"); - } catch (Throwable ae) { - logger.error("Whoops, got exception on line #159:" + ae.toString()); - if(obtained instanceof Throwable) { - ae.addSuppressed((Throwable) obtained); - } - throw ae; - } - } - - { - // math_logic/logic.yaml line #163 - /* false */ - Boolean expected_ = false; - /* ~r.expr(1) */ - logger.info("About to run line #163: r.expr(1L).not()"); - Object obtained = runOrCatch(r.expr(1L).not(), - new OptArgs() - ,conn); - try { - assertEquals(expected_, obtained); - logger.info("Finished running line #163"); - } catch (Throwable ae) { - logger.error("Whoops, got exception on line #163:" + ae.toString()); - if(obtained instanceof Throwable) { - ae.addSuppressed((Throwable) obtained); - } - throw ae; - } - } - - { - // math_logic/logic.yaml line #167 - /* true */ - Boolean expected_ = true; - /* ~r.expr(null) */ - logger.info("About to run line #167: r.expr((ReqlExpr) null).not()"); - Object obtained = runOrCatch(r.expr((ReqlExpr) null).not(), - new OptArgs() - ,conn); - try { - assertEquals(expected_, obtained); - logger.info("Finished running line #167"); - } catch (Throwable ae) { - logger.error("Whoops, got exception on line #167:" + ae.toString()); - if(obtained instanceof Throwable) { - ae.addSuppressed((Throwable) obtained); - } - throw ae; - } - } - } -} diff --git a/drivers/java/src/test/java/com/rethinkdb/gen/MathLogicMath.java b/drivers/java/src/test/java/com/rethinkdb/gen/MathLogicMath.java deleted file mode 100644 index 4c6bbcad42d..00000000000 --- a/drivers/java/src/test/java/com/rethinkdb/gen/MathLogicMath.java +++ /dev/null @@ -1,98 +0,0 @@ -// Autogenerated by convert_tests.py and process_polyglot.py. -// Do not edit this file directly. -// The template for this file is located at: -// ../../../../../../../templates/Test.java -package com.rethinkdb.gen; - -import com.rethinkdb.RethinkDB; -import com.rethinkdb.gen.exc.*; -import com.rethinkdb.gen.ast.*; -import com.rethinkdb.ast.ReqlAst; -import com.rethinkdb.model.MapObject; -import com.rethinkdb.model.OptArgs; -import com.rethinkdb.net.Connection; -import com.rethinkdb.net.Cursor; -import junit.framework.TestCase; -import static org.junit.Assert.assertEquals; -import static org.junit.Assert.assertArrayEquals; -import org.slf4j.Logger; -import org.slf4j.LoggerFactory; - -import org.junit.*; -import org.junit.rules.ExpectedException; - -import java.util.Arrays; -import java.util.ArrayList; -import java.util.List; -import java.util.Map; -import java.util.Set; -import java.time.OffsetDateTime; -import java.time.ZoneOffset; -import java.time.Instant; -import java.util.stream.LongStream; -import java.util.stream.Collectors; -import java.util.stream.Stream; -import java.util.concurrent.TimeoutException; -import java.util.regex.Pattern; -import java.util.Collections; -import java.nio.charset.StandardCharsets; - -import static com.rethinkdb.TestingCommon.*; -import com.rethinkdb.TestingFramework; - -public class MathLogicMath { - // Tests of nested arithmetic expressions - Logger logger = LoggerFactory.getLogger(MathLogicMath.class); - public static final RethinkDB r = RethinkDB.r; - - Connection conn; - - @Before - public void setUp() throws Exception { - logger.info("Setting up."); - conn = TestingFramework.createConnection(); - try { - r.dbCreate("test").run(conn); - r.db("test").wait_().run(conn); - }catch (Exception e){} - } - - @After - public void tearDown() throws Exception { - logger.info("Tearing down."); - r.db("rethinkdb").table("_debug_scratch").delete().run(conn); - if(!conn.isOpen()){ - conn.close(); - conn = TestingFramework.createConnection(); - } - r.dbDrop("test").run(conn); - conn.close(false); - } - - // Autogenerated tests below - - @Test(timeout=120000) - public void test() throws Exception { - - { - // math_logic/math.yaml line #4 - /* 1 */ - Long expected_ = 1L; - /* (((4 + 2 * (r.expr(26) % 18)) / 5) - 3) */ - logger.info("About to run line #4: r.add(4L, r.mul(2L, r.expr(26L).mod(18L))).div(5L).sub(3L)"); - Object obtained = runOrCatch(r.add(4L, r.mul(2L, r.expr(26L).mod(18L))).div(5L).sub(3L), - new OptArgs() - ,conn); - try { - assertEquals(expected_, obtained); - logger.info("Finished running line #4"); - } catch (Throwable ae) { - logger.error("Whoops, got exception on line #4:" + ae.toString()); - if(obtained instanceof Throwable) { - ae.addSuppressed((Throwable) obtained); - } - throw ae; - } - } - } -} diff --git a/drivers/java/src/test/java/com/rethinkdb/gen/MathLogicMod.java b/drivers/java/src/test/java/com/rethinkdb/gen/MathLogicMod.java deleted file mode 100644 index d9a501e5868..00000000000 --- a/drivers/java/src/test/java/com/rethinkdb/gen/MathLogicMod.java +++ /dev/null @@ -1,224 +0,0 @@ -// Autogenerated by convert_tests.py and process_polyglot.py. -// Do not edit this file directly. -// The template for this file is located at: -// ../../../../../../../templates/Test.java -package com.rethinkdb.gen; - -import com.rethinkdb.RethinkDB; -import com.rethinkdb.gen.exc.*; -import com.rethinkdb.gen.ast.*; -import com.rethinkdb.ast.ReqlAst; -import com.rethinkdb.model.MapObject; -import com.rethinkdb.model.OptArgs; -import com.rethinkdb.net.Connection; -import com.rethinkdb.net.Cursor; -import junit.framework.TestCase; -import static org.junit.Assert.assertEquals; -import static org.junit.Assert.assertArrayEquals; -import org.slf4j.Logger; -import org.slf4j.LoggerFactory; - -import org.junit.*; -import org.junit.rules.ExpectedException; - -import java.util.Arrays; -import java.util.ArrayList; -import java.util.List; -import java.util.Map; -import java.util.Set; -import java.time.OffsetDateTime; -import java.time.ZoneOffset; -import java.time.Instant; -import java.util.stream.LongStream; -import java.util.stream.Collectors; -import java.util.stream.Stream; -import java.util.concurrent.TimeoutException; -import java.util.regex.Pattern; -import java.util.Collections; -import java.nio.charset.StandardCharsets; - -import static com.rethinkdb.TestingCommon.*; -import com.rethinkdb.TestingFramework; - -public class MathLogicMod { - // Tests for the basic usage of the mod operation - Logger logger = LoggerFactory.getLogger(MathLogicMod.class); - public static final RethinkDB r = RethinkDB.r; - - Connection conn; - - @Before - public void setUp() throws Exception { - logger.info("Setting up."); - conn = TestingFramework.createConnection(); - try { - r.dbCreate("test").run(conn); - r.db("test").wait_().run(conn); - }catch (Exception e){} - } - - @After - public void tearDown() throws Exception { - logger.info("Tearing down."); - r.db("rethinkdb").table("_debug_scratch").delete().run(conn); - if(!conn.isOpen()){ - conn.close(); - conn = TestingFramework.createConnection(); - } - r.dbDrop("test").run(conn); - conn.close(false); - } - - // Autogenerated tests below - - @Test(timeout=120000) - public void test() throws Exception { - - { - // math_logic/mod.yaml line #6 - /* 1 */ - Long expected_ = 1L; - /* r.expr(10) % 3 */ - logger.info("About to run line #6: r.expr(10L).mod(3L)"); - Object obtained = runOrCatch(r.expr(10L).mod(3L), - new OptArgs() - ,conn); - try { - assertEquals(expected_, obtained); - logger.info("Finished running line #6"); - } catch (Throwable ae) { - logger.error("Whoops, got exception on line #6:" + ae.toString()); - if(obtained instanceof Throwable) { - ae.addSuppressed((Throwable) obtained); - } - throw ae; - } - } - - { - // math_logic/mod.yaml line #7 - /* 1 */ - Long expected_ = 1L; - /* 10 % r.expr(3) */ - logger.info("About to run line #7: r.mod(10L, r.expr(3L))"); - Object obtained = runOrCatch(r.mod(10L, r.expr(3L)), - new OptArgs() - ,conn); - try { - assertEquals(expected_, obtained); - logger.info("Finished running line #7"); - } catch (Throwable ae) { - logger.error("Whoops, got exception on line #7:" + ae.toString()); - if(obtained instanceof Throwable) { - ae.addSuppressed((Throwable) obtained); - } - throw ae; - } - } - - { - // math_logic/mod.yaml line #8 - /* 1 */ - Long expected_ = 1L; - /* r.expr(10).mod(3) */ - logger.info("About to run line #8: r.expr(10L).mod(3L)"); - Object obtained = runOrCatch(r.expr(10L).mod(3L), - new OptArgs() - ,conn); - try { - assertEquals(expected_, obtained); - logger.info("Finished running line #8"); - } catch (Throwable ae) { - logger.error("Whoops, got exception on line #8:" + ae.toString()); - if(obtained instanceof Throwable) { - ae.addSuppressed((Throwable) obtained); - } - throw ae; - } - } - - { - // math_logic/mod.yaml line #16 - /* -1 */ - Long expected_ = -1L; - /* r.expr(-10) % -3 */ - logger.info("About to run line #16: r.expr(-10L).mod(-3L)"); - Object obtained = runOrCatch(r.expr(-10L).mod(-3L), - new OptArgs() - ,conn); - try { - assertEquals(expected_, obtained); - logger.info("Finished running line #16"); - } catch (Throwable ae) { - logger.error("Whoops, got exception on line #16:" + ae.toString()); - if(obtained instanceof Throwable) { - ae.addSuppressed((Throwable) obtained); - } - throw ae; - } - } - - { - // math_logic/mod.yaml line #22 - /* err('ReqlQueryLogicError', 'Expected type NUMBER but found STRING.', [1]) */ - Err expected_ = err("ReqlQueryLogicError", "Expected type NUMBER but found STRING.", r.array(1L)); - /* r.expr(4) % 'a' */ - logger.info("About to run line #22: r.expr(4L).mod('a')"); - Object obtained = runOrCatch(r.expr(4L).mod("a"), - new OptArgs() - ,conn); - try { - assertEquals(expected_, obtained); - logger.info("Finished running line #22"); - } catch (Throwable ae) { - logger.error("Whoops, got exception on line #22:" + ae.toString()); - if(obtained instanceof Throwable) { - ae.addSuppressed((Throwable) obtained); - } - throw ae; - } - } - - { - // math_logic/mod.yaml line #27 - /* err('ReqlQueryLogicError', 'Expected type NUMBER but found STRING.', [0]) */ - Err expected_ = err("ReqlQueryLogicError", "Expected type NUMBER but found STRING.", r.array(0L)); - /* r.expr('a') % 1 */ - logger.info("About to run line #27: r.expr('a').mod(1L)"); - Object obtained = runOrCatch(r.expr("a").mod(1L), - new OptArgs() - ,conn); - try { - assertEquals(expected_, obtained); - logger.info("Finished running line #27"); - } catch (Throwable ae) { - logger.error("Whoops, got exception on line #27:" + ae.toString()); - if(obtained instanceof Throwable) { - ae.addSuppressed((Throwable) obtained); - } - throw ae; - } - } - - { - // math_logic/mod.yaml line #32 - /* err('ReqlQueryLogicError', 'Expected type NUMBER but found STRING.', [0]) */ - Err expected_ = err("ReqlQueryLogicError", "Expected type NUMBER but found STRING.", r.array(0L)); - /* r.expr('a') % 'b' */ - logger.info("About to run line #32: r.expr('a').mod('b')"); - Object obtained = runOrCatch(r.expr("a").mod("b"), - new OptArgs() - ,conn); - try { - assertEquals(expected_, obtained); - logger.info("Finished running line #32"); - } catch (Throwable ae) { - logger.error("Whoops, got exception on line #32:" + ae.toString()); - if(obtained instanceof Throwable) { - ae.addSuppressed((Throwable) obtained); - } - throw ae; - } - } - } -} diff --git a/drivers/java/src/test/java/com/rethinkdb/gen/MathLogicMul.java b/drivers/java/src/test/java/com/rethinkdb/gen/MathLogicMul.java deleted file mode 100644 index 7bd5b5fd190..00000000000 --- a/drivers/java/src/test/java/com/rethinkdb/gen/MathLogicMul.java +++ /dev/null @@ -1,310 +0,0 @@ -// Autogenerated by convert_tests.py and process_polyglot.py. -// Do not edit this file directly. -// The template for this file is located at: -// ../../../../../../../templates/Test.java -package com.rethinkdb.gen; - -import com.rethinkdb.RethinkDB; -import com.rethinkdb.gen.exc.*; -import com.rethinkdb.gen.ast.*; -import com.rethinkdb.ast.ReqlAst; -import com.rethinkdb.model.MapObject; -import com.rethinkdb.model.OptArgs; -import com.rethinkdb.net.Connection; -import com.rethinkdb.net.Cursor; -import junit.framework.TestCase; -import static org.junit.Assert.assertEquals; -import static org.junit.Assert.assertArrayEquals; -import org.slf4j.Logger; -import org.slf4j.LoggerFactory; - -import org.junit.*; -import org.junit.rules.ExpectedException; - -import java.util.Arrays; -import java.util.ArrayList; -import java.util.List; -import java.util.Map; -import java.util.Set; -import java.time.OffsetDateTime; -import java.time.ZoneOffset; -import java.time.Instant; -import java.util.stream.LongStream; -import java.util.stream.Collectors; -import java.util.stream.Stream; -import java.util.concurrent.TimeoutException; -import java.util.regex.Pattern; -import java.util.Collections; -import java.nio.charset.StandardCharsets; - -import static com.rethinkdb.TestingCommon.*; -import com.rethinkdb.TestingFramework; - -public class MathLogicMul { - // Tests for the basic usage of the multiplication operation - Logger logger = LoggerFactory.getLogger(MathLogicMul.class); - public static final RethinkDB r = RethinkDB.r; - - Connection conn; - - @Before - public void setUp() throws Exception { - logger.info("Setting up."); - conn = TestingFramework.createConnection(); - try { - r.dbCreate("test").run(conn); - r.db("test").wait_().run(conn); - }catch (Exception e){} - } - - @After - public void tearDown() throws Exception { - logger.info("Tearing down."); - r.db("rethinkdb").table("_debug_scratch").delete().run(conn); - if(!conn.isOpen()){ - conn.close(); - conn = TestingFramework.createConnection(); - } - r.dbDrop("test").run(conn); - conn.close(false); - } - - // Autogenerated tests below - - @Test(timeout=120000) - public void test() throws Exception { - - { - // math_logic/mul.yaml line #6 - /* 2 */ - Long expected_ = 2L; - /* r.expr(1) * 2 */ - logger.info("About to run line #6: r.expr(1L).mul(2L)"); - Object obtained = runOrCatch(r.expr(1L).mul(2L), - new OptArgs() - ,conn); - try { - assertEquals(expected_, obtained); - logger.info("Finished running line #6"); - } catch (Throwable ae) { - logger.error("Whoops, got exception on line #6:" + ae.toString()); - if(obtained instanceof Throwable) { - ae.addSuppressed((Throwable) obtained); - } - throw ae; - } - } - - { - // math_logic/mul.yaml line #7 - /* 2 */ - Long expected_ = 2L; - /* 1 * r.expr(2) */ - logger.info("About to run line #7: r.mul(1L, r.expr(2L))"); - Object obtained = runOrCatch(r.mul(1L, r.expr(2L)), - new OptArgs() - ,conn); - try { - assertEquals(expected_, obtained); - logger.info("Finished running line #7"); - } catch (Throwable ae) { - logger.error("Whoops, got exception on line #7:" + ae.toString()); - if(obtained instanceof Throwable) { - ae.addSuppressed((Throwable) obtained); - } - throw ae; - } - } - - { - // math_logic/mul.yaml line #8 - /* 2 */ - Long expected_ = 2L; - /* r.expr(1).mul(2) */ - logger.info("About to run line #8: r.expr(1L).mul(2L)"); - Object obtained = runOrCatch(r.expr(1L).mul(2L), - new OptArgs() - ,conn); - try { - assertEquals(expected_, obtained); - logger.info("Finished running line #8"); - } catch (Throwable ae) { - logger.error("Whoops, got exception on line #8:" + ae.toString()); - if(obtained instanceof Throwable) { - ae.addSuppressed((Throwable) obtained); - } - throw ae; - } - } - - { - // math_logic/mul.yaml line #15 - /* 1 */ - Long expected_ = 1L; - /* r.expr(-1) * -1 */ - logger.info("About to run line #15: r.expr(-1L).mul(-1L)"); - Object obtained = runOrCatch(r.expr(-1L).mul(-1L), - new OptArgs() - ,conn); - try { - assertEquals(expected_, obtained); - logger.info("Finished running line #15"); - } catch (Throwable ae) { - logger.error("Whoops, got exception on line #15:" + ae.toString()); - if(obtained instanceof Throwable) { - ae.addSuppressed((Throwable) obtained); - } - throw ae; - } - } - - { - // math_logic/mul.yaml line #21 - /* 6.75 */ - Double expected_ = 6.75; - /* r.expr(1.5) * 4.5 */ - logger.info("About to run line #21: r.expr(1.5).mul(4.5)"); - Object obtained = runOrCatch(r.expr(1.5).mul(4.5), - new OptArgs() - ,conn); - try { - assertEquals((double) expected_, - ((Number) obtained).doubleValue(), - 0.00000000001); - logger.info("Finished running line #21"); - } catch (Throwable ae) { - logger.error("Whoops, got exception on line #21:" + ae.toString()); - if(obtained instanceof Throwable) { - ae.addSuppressed((Throwable) obtained); - } - throw ae; - } - } - - { - // math_logic/mul.yaml line #25 - /* [1,2,3,1,2,3,1,2,3] */ - List expected_ = r.array(1L, 2L, 3L, 1L, 2L, 3L, 1L, 2L, 3L); - /* r.expr([1,2,3]) * 3 */ - logger.info("About to run line #25: r.expr(r.array(1L, 2L, 3L)).mul(3L)"); - Object obtained = runOrCatch(r.expr(r.array(1L, 2L, 3L)).mul(3L), - new OptArgs() - ,conn); - try { - assertEquals(expected_, obtained); - logger.info("Finished running line #25"); - } catch (Throwable ae) { - logger.error("Whoops, got exception on line #25:" + ae.toString()); - if(obtained instanceof Throwable) { - ae.addSuppressed((Throwable) obtained); - } - throw ae; - } - } - - { - // math_logic/mul.yaml line #30 - /* 120 */ - Long expected_ = 120L; - /* r.expr(1).mul(2,3,4,5) */ - logger.info("About to run line #30: r.expr(1L).mul(2L, 3L, 4L, 5L)"); - Object obtained = runOrCatch(r.expr(1L).mul(2L, 3L, 4L, 5L), - new OptArgs() - ,conn); - try { - assertEquals(expected_, obtained); - logger.info("Finished running line #30"); - } catch (Throwable ae) { - logger.error("Whoops, got exception on line #30:" + ae.toString()); - if(obtained instanceof Throwable) { - ae.addSuppressed((Throwable) obtained); - } - throw ae; - } - } - - { - // math_logic/mul.yaml line #46 - /* err('ReqlQueryLogicError', 'Expected type NUMBER but found STRING.', [0]) */ - Err expected_ = err("ReqlQueryLogicError", "Expected type NUMBER but found STRING.", r.array(0L)); - /* r.expr('a') * 0.8 */ - logger.info("About to run line #46: r.expr('a').mul(0.8)"); - Object obtained = runOrCatch(r.expr("a").mul(0.8), - new OptArgs() - ,conn); - try { - assertEquals(expected_, obtained); - logger.info("Finished running line #46"); - } catch (Throwable ae) { - logger.error("Whoops, got exception on line #46:" + ae.toString()); - if(obtained instanceof Throwable) { - ae.addSuppressed((Throwable) obtained); - } - throw ae; - } - } - - { - // math_logic/mul.yaml line #50 - /* err('ReqlQueryLogicError', 'Expected type NUMBER but found STRING.', [1]) */ - Err expected_ = err("ReqlQueryLogicError", "Expected type NUMBER but found STRING.", r.array(1L)); - /* r.expr(1) * 'a' */ - logger.info("About to run line #50: r.expr(1L).mul('a')"); - Object obtained = runOrCatch(r.expr(1L).mul("a"), - new OptArgs() - ,conn); - try { - assertEquals(expected_, obtained); - logger.info("Finished running line #50"); - } catch (Throwable ae) { - logger.error("Whoops, got exception on line #50:" + ae.toString()); - if(obtained instanceof Throwable) { - ae.addSuppressed((Throwable) obtained); - } - throw ae; - } - } - - { - // math_logic/mul.yaml line #54 - /* err('ReqlQueryLogicError', 'Expected type NUMBER but found STRING.', [0]) */ - Err expected_ = err("ReqlQueryLogicError", "Expected type NUMBER but found STRING.", r.array(0L)); - /* r.expr('b') * 'a' */ - logger.info("About to run line #54: r.expr('b').mul('a')"); - Object obtained = runOrCatch(r.expr("b").mul("a"), - new OptArgs() - ,conn); - try { - assertEquals(expected_, obtained); - logger.info("Finished running line #54"); - } catch (Throwable ae) { - logger.error("Whoops, got exception on line #54:" + ae.toString()); - if(obtained instanceof Throwable) { - ae.addSuppressed((Throwable) obtained); - } - throw ae; - } - } - - { - // math_logic/mul.yaml line #58 - /* err('ReqlQueryLogicError', 'Number not an integer: 1.5', [0]) */ - Err expected_ = err("ReqlQueryLogicError", "Number not an integer: 1.5", r.array(0L)); - /* r.expr([]) * 1.5 */ - logger.info("About to run line #58: r.expr(r.array()).mul(1.5)"); - Object obtained = runOrCatch(r.expr(r.array()).mul(1.5), - new OptArgs() - ,conn); - try { - assertEquals(expected_, obtained); - logger.info("Finished running line #58"); - } catch (Throwable ae) { - logger.error("Whoops, got exception on line #58:" + ae.toString()); - if(obtained instanceof Throwable) { - ae.addSuppressed((Throwable) obtained); - } - throw ae; - } - } - } -} diff --git a/drivers/java/src/test/java/com/rethinkdb/gen/MathLogicSub.java b/drivers/java/src/test/java/com/rethinkdb/gen/MathLogicSub.java deleted file mode 100644 index c1f94df57ec..00000000000 --- a/drivers/java/src/test/java/com/rethinkdb/gen/MathLogicSub.java +++ /dev/null @@ -1,268 +0,0 @@ -// Autogenerated by convert_tests.py and process_polyglot.py. -// Do not edit this file directly. -// The template for this file is located at: -// ../../../../../../../templates/Test.java -package com.rethinkdb.gen; - -import com.rethinkdb.RethinkDB; -import com.rethinkdb.gen.exc.*; -import com.rethinkdb.gen.ast.*; -import com.rethinkdb.ast.ReqlAst; -import com.rethinkdb.model.MapObject; -import com.rethinkdb.model.OptArgs; -import com.rethinkdb.net.Connection; -import com.rethinkdb.net.Cursor; -import junit.framework.TestCase; -import static org.junit.Assert.assertEquals; -import static org.junit.Assert.assertArrayEquals; -import org.slf4j.Logger; -import org.slf4j.LoggerFactory; - -import org.junit.*; -import org.junit.rules.ExpectedException; - -import java.util.Arrays; -import java.util.ArrayList; -import java.util.List; -import java.util.Map; -import java.util.Set; -import java.time.OffsetDateTime; -import java.time.ZoneOffset; -import java.time.Instant; -import java.util.stream.LongStream; -import java.util.stream.Collectors; -import java.util.stream.Stream; -import java.util.concurrent.TimeoutException; -import java.util.regex.Pattern; -import java.util.Collections; -import java.nio.charset.StandardCharsets; - -import static com.rethinkdb.TestingCommon.*; -import com.rethinkdb.TestingFramework; - -public class MathLogicSub { - // Tests for basic usage of the subtraction operation - Logger logger = LoggerFactory.getLogger(MathLogicSub.class); - public static final RethinkDB r = RethinkDB.r; - - Connection conn; - - @Before - public void setUp() throws Exception { - logger.info("Setting up."); - conn = TestingFramework.createConnection(); - try { - r.dbCreate("test").run(conn); - r.db("test").wait_().run(conn); - }catch (Exception e){} - } - - @After - public void tearDown() throws Exception { - logger.info("Tearing down."); - r.db("rethinkdb").table("_debug_scratch").delete().run(conn); - if(!conn.isOpen()){ - conn.close(); - conn = TestingFramework.createConnection(); - } - r.dbDrop("test").run(conn); - conn.close(false); - } - - // Autogenerated tests below - - @Test(timeout=120000) - public void test() throws Exception { - - { - // math_logic/sub.yaml line #6 - /* 0 */ - Long expected_ = 0L; - /* r.expr(1) - 1 */ - logger.info("About to run line #6: r.expr(1L).sub(1L)"); - Object obtained = runOrCatch(r.expr(1L).sub(1L), - new OptArgs() - ,conn); - try { - assertEquals(expected_, obtained); - logger.info("Finished running line #6"); - } catch (Throwable ae) { - logger.error("Whoops, got exception on line #6:" + ae.toString()); - if(obtained instanceof Throwable) { - ae.addSuppressed((Throwable) obtained); - } - throw ae; - } - } - - { - // math_logic/sub.yaml line #7 - /* 0 */ - Long expected_ = 0L; - /* 1 - r.expr(1) */ - logger.info("About to run line #7: r.sub(1L, r.expr(1L))"); - Object obtained = runOrCatch(r.sub(1L, r.expr(1L)), - new OptArgs() - ,conn); - try { - assertEquals(expected_, obtained); - logger.info("Finished running line #7"); - } catch (Throwable ae) { - logger.error("Whoops, got exception on line #7:" + ae.toString()); - if(obtained instanceof Throwable) { - ae.addSuppressed((Throwable) obtained); - } - throw ae; - } - } - - { - // math_logic/sub.yaml line #8 - /* 0 */ - Long expected_ = 0L; - /* r.expr(1).sub(1) */ - logger.info("About to run line #8: r.expr(1L).sub(1L)"); - Object obtained = runOrCatch(r.expr(1L).sub(1L), - new OptArgs() - ,conn); - try { - assertEquals(expected_, obtained); - logger.info("Finished running line #8"); - } catch (Throwable ae) { - logger.error("Whoops, got exception on line #8:" + ae.toString()); - if(obtained instanceof Throwable) { - ae.addSuppressed((Throwable) obtained); - } - throw ae; - } - } - - { - // math_logic/sub.yaml line #17 - /* -2 */ - Long expected_ = -2L; - /* r.expr(-1) - 1 */ - logger.info("About to run line #17: r.expr(-1L).sub(1L)"); - Object obtained = runOrCatch(r.expr(-1L).sub(1L), - new OptArgs() - ,conn); - try { - assertEquals(expected_, obtained); - logger.info("Finished running line #17"); - } catch (Throwable ae) { - logger.error("Whoops, got exception on line #17:" + ae.toString()); - if(obtained instanceof Throwable) { - ae.addSuppressed((Throwable) obtained); - } - throw ae; - } - } - - { - // math_logic/sub.yaml line #22 - /* -6.75 */ - Double expected_ = -6.75; - /* r.expr(1.75) - 8.5 */ - logger.info("About to run line #22: r.expr(1.75).sub(8.5)"); - Object obtained = runOrCatch(r.expr(1.75).sub(8.5), - new OptArgs() - ,conn); - try { - assertEquals((double) expected_, - ((Number) obtained).doubleValue(), - 0.00000000001); - logger.info("Finished running line #22"); - } catch (Throwable ae) { - logger.error("Whoops, got exception on line #22:" + ae.toString()); - if(obtained instanceof Throwable) { - ae.addSuppressed((Throwable) obtained); - } - throw ae; - } - } - - { - // math_logic/sub.yaml line #26 - /* -13 */ - Long expected_ = -13L; - /* r.expr(1).sub(2,3,4,5) */ - logger.info("About to run line #26: r.expr(1L).sub(2L, 3L, 4L, 5L)"); - Object obtained = runOrCatch(r.expr(1L).sub(2L, 3L, 4L, 5L), - new OptArgs() - ,conn); - try { - assertEquals(expected_, obtained); - logger.info("Finished running line #26"); - } catch (Throwable ae) { - logger.error("Whoops, got exception on line #26:" + ae.toString()); - if(obtained instanceof Throwable) { - ae.addSuppressed((Throwable) obtained); - } - throw ae; - } - } - - { - // math_logic/sub.yaml line #30 - /* err('ReqlQueryLogicError', 'Expected type NUMBER but found STRING.', [0]) */ - Err expected_ = err("ReqlQueryLogicError", "Expected type NUMBER but found STRING.", r.array(0L)); - /* r.expr('a').sub(0.8) */ - logger.info("About to run line #30: r.expr('a').sub(0.8)"); - Object obtained = runOrCatch(r.expr("a").sub(0.8), - new OptArgs() - ,conn); - try { - assertEquals(expected_, obtained); - logger.info("Finished running line #30"); - } catch (Throwable ae) { - logger.error("Whoops, got exception on line #30:" + ae.toString()); - if(obtained instanceof Throwable) { - ae.addSuppressed((Throwable) obtained); - } - throw ae; - } - } - - { - // math_logic/sub.yaml line #33 - /* err('ReqlQueryLogicError', 'Expected type NUMBER but found STRING.', [1]) */ - Err expected_ = err("ReqlQueryLogicError", "Expected type NUMBER but found STRING.", r.array(1L)); - /* r.expr(1).sub('a') */ - logger.info("About to run line #33: r.expr(1L).sub('a')"); - Object obtained = runOrCatch(r.expr(1L).sub("a"), - new OptArgs() - ,conn); - try { - assertEquals(expected_, obtained); - logger.info("Finished running line #33"); - } catch (Throwable ae) { - logger.error("Whoops, got exception on line #33:" + ae.toString()); - if(obtained instanceof Throwable) { - ae.addSuppressed((Throwable) obtained); - } - throw ae; - } - } - - { - // math_logic/sub.yaml line #36 - /* err('ReqlQueryLogicError', 'Expected type NUMBER but found STRING.', [0]) */ - Err expected_ = err("ReqlQueryLogicError", "Expected type NUMBER but found STRING.", r.array(0L)); - /* r.expr('b').sub('a') */ - logger.info("About to run line #36: r.expr('b').sub('a')"); - Object obtained = runOrCatch(r.expr("b").sub("a"), - new OptArgs() - ,conn); - try { - assertEquals(expected_, obtained); - logger.info("Finished running line #36"); - } catch (Throwable ae) { - logger.error("Whoops, got exception on line #36:" + ae.toString()); - if(obtained instanceof Throwable) { - ae.addSuppressed((Throwable) obtained); - } - throw ae; - } - } - } -} diff --git a/drivers/java/src/test/java/com/rethinkdb/gen/MetaDbs.java b/drivers/java/src/test/java/com/rethinkdb/gen/MetaDbs.java deleted file mode 100644 index 503fc596e22..00000000000 --- a/drivers/java/src/test/java/com/rethinkdb/gen/MetaDbs.java +++ /dev/null @@ -1,350 +0,0 @@ -// Autogenerated by convert_tests.py and process_polyglot.py. -// Do not edit this file directly. -// The template for this file is located at: -// ../../../../../../../templates/Test.java -package com.rethinkdb.gen; - -import com.rethinkdb.RethinkDB; -import com.rethinkdb.gen.exc.*; -import com.rethinkdb.gen.ast.*; -import com.rethinkdb.ast.ReqlAst; -import com.rethinkdb.model.MapObject; -import com.rethinkdb.model.OptArgs; -import com.rethinkdb.net.Connection; -import com.rethinkdb.net.Cursor; -import junit.framework.TestCase; -import static org.junit.Assert.assertEquals; -import static org.junit.Assert.assertArrayEquals; -import org.slf4j.Logger; -import org.slf4j.LoggerFactory; - -import org.junit.*; -import org.junit.rules.ExpectedException; - -import java.util.Arrays; -import java.util.ArrayList; -import java.util.List; -import java.util.Map; -import java.util.Set; -import java.time.OffsetDateTime; -import java.time.ZoneOffset; -import java.time.Instant; -import java.util.stream.LongStream; -import java.util.stream.Collectors; -import java.util.stream.Stream; -import java.util.concurrent.TimeoutException; -import java.util.regex.Pattern; -import java.util.Collections; -import java.nio.charset.StandardCharsets; - -import static com.rethinkdb.TestingCommon.*; -import com.rethinkdb.TestingFramework; - -public class MetaDbs { - // Tests meta queries for databases - Logger logger = LoggerFactory.getLogger(MetaDbs.class); - public static final RethinkDB r = RethinkDB.r; - - Connection conn; - - @Before - public void setUp() throws Exception { - logger.info("Setting up."); - conn = TestingFramework.createConnection(); - try { - r.dbCreate("test").run(conn); - r.db("test").wait_().run(conn); - }catch (Exception e){} - } - - @After - public void tearDown() throws Exception { - logger.info("Tearing down."); - r.db("rethinkdb").table("_debug_scratch").delete().run(conn); - if(!conn.isOpen()){ - conn.close(); - conn = TestingFramework.createConnection(); - } - r.dbDrop("test").run(conn); - conn.close(false); - } - - // Autogenerated tests below - - @Test(timeout=120000) - public void test() throws Exception { - - { - // meta/dbs.yaml line #6 - /* bag(['rethinkdb', 'test']) */ - Bag expected_ = bag(r.array("rethinkdb", "test")); - /* r.db_list() */ - logger.info("About to run line #6: r.dbList()"); - Object obtained = runOrCatch(r.dbList(), - new OptArgs() - ,conn); - try { - assertEquals(expected_, obtained); - logger.info("Finished running line #6"); - } catch (Throwable ae) { - logger.error("Whoops, got exception on line #6:" + ae.toString()); - if(obtained instanceof Throwable) { - ae.addSuppressed((Throwable) obtained); - } - throw ae; - } - } - - { - // meta/dbs.yaml line #11 - /* partial({'dbs_created':1}) */ - Partial expected_ = partial(r.hashMap("dbs_created", 1L)); - /* r.db_create('a') */ - logger.info("About to run line #11: r.dbCreate('a')"); - Object obtained = runOrCatch(r.dbCreate("a"), - new OptArgs() - ,conn); - try { - assertEquals(expected_, obtained); - logger.info("Finished running line #11"); - } catch (Throwable ae) { - logger.error("Whoops, got exception on line #11:" + ae.toString()); - if(obtained instanceof Throwable) { - ae.addSuppressed((Throwable) obtained); - } - throw ae; - } - } - - { - // meta/dbs.yaml line #13 - /* partial({'dbs_created':1}) */ - Partial expected_ = partial(r.hashMap("dbs_created", 1L)); - /* r.db_create('b') */ - logger.info("About to run line #13: r.dbCreate('b')"); - Object obtained = runOrCatch(r.dbCreate("b"), - new OptArgs() - ,conn); - try { - assertEquals(expected_, obtained); - logger.info("Finished running line #13"); - } catch (Throwable ae) { - logger.error("Whoops, got exception on line #13:" + ae.toString()); - if(obtained instanceof Throwable) { - ae.addSuppressed((Throwable) obtained); - } - throw ae; - } - } - - { - // meta/dbs.yaml line #18 - /* bag(['rethinkdb', 'a', 'b', 'test']) */ - Bag expected_ = bag(r.array("rethinkdb", "a", "b", "test")); - /* r.db_list() */ - logger.info("About to run line #18: r.dbList()"); - Object obtained = runOrCatch(r.dbList(), - new OptArgs() - ,conn); - try { - assertEquals(expected_, obtained); - logger.info("Finished running line #18"); - } catch (Throwable ae) { - logger.error("Whoops, got exception on line #18:" + ae.toString()); - if(obtained instanceof Throwable) { - ae.addSuppressed((Throwable) obtained); - } - throw ae; - } - } - - { - // meta/dbs.yaml line #23 - /* {'name':'a','id':uuid()} */ - Map expected_ = r.hashMap("name", "a").with("id", uuid()); - /* r.db('a').config() */ - logger.info("About to run line #23: r.db('a').config()"); - Object obtained = runOrCatch(r.db("a").config(), - new OptArgs() - ,conn); - try { - assertEquals(expected_, obtained); - logger.info("Finished running line #23"); - } catch (Throwable ae) { - logger.error("Whoops, got exception on line #23:" + ae.toString()); - if(obtained instanceof Throwable) { - ae.addSuppressed((Throwable) obtained); - } - throw ae; - } - } - - { - // meta/dbs.yaml line #28 - /* partial({'dbs_dropped':1}) */ - Partial expected_ = partial(r.hashMap("dbs_dropped", 1L)); - /* r.db_drop('b') */ - logger.info("About to run line #28: r.dbDrop('b')"); - Object obtained = runOrCatch(r.dbDrop("b"), - new OptArgs() - ,conn); - try { - assertEquals(expected_, obtained); - logger.info("Finished running line #28"); - } catch (Throwable ae) { - logger.error("Whoops, got exception on line #28:" + ae.toString()); - if(obtained instanceof Throwable) { - ae.addSuppressed((Throwable) obtained); - } - throw ae; - } - } - - { - // meta/dbs.yaml line #31 - /* bag(['rethinkdb', 'a', 'test']) */ - Bag expected_ = bag(r.array("rethinkdb", "a", "test")); - /* r.db_list() */ - logger.info("About to run line #31: r.dbList()"); - Object obtained = runOrCatch(r.dbList(), - new OptArgs() - ,conn); - try { - assertEquals(expected_, obtained); - logger.info("Finished running line #31"); - } catch (Throwable ae) { - logger.error("Whoops, got exception on line #31:" + ae.toString()); - if(obtained instanceof Throwable) { - ae.addSuppressed((Throwable) obtained); - } - throw ae; - } - } - - { - // meta/dbs.yaml line #34 - /* partial({'dbs_dropped':1}) */ - Partial expected_ = partial(r.hashMap("dbs_dropped", 1L)); - /* r.db_drop('a') */ - logger.info("About to run line #34: r.dbDrop('a')"); - Object obtained = runOrCatch(r.dbDrop("a"), - new OptArgs() - ,conn); - try { - assertEquals(expected_, obtained); - logger.info("Finished running line #34"); - } catch (Throwable ae) { - logger.error("Whoops, got exception on line #34:" + ae.toString()); - if(obtained instanceof Throwable) { - ae.addSuppressed((Throwable) obtained); - } - throw ae; - } - } - - { - // meta/dbs.yaml line #37 - /* bag(['rethinkdb', 'test']) */ - Bag expected_ = bag(r.array("rethinkdb", "test")); - /* r.db_list() */ - logger.info("About to run line #37: r.dbList()"); - Object obtained = runOrCatch(r.dbList(), - new OptArgs() - ,conn); - try { - assertEquals(expected_, obtained); - logger.info("Finished running line #37"); - } catch (Throwable ae) { - logger.error("Whoops, got exception on line #37:" + ae.toString()); - if(obtained instanceof Throwable) { - ae.addSuppressed((Throwable) obtained); - } - throw ae; - } - } - - { - // meta/dbs.yaml line #41 - /* partial({'dbs_created':1}) */ - Partial expected_ = partial(r.hashMap("dbs_created", 1L)); - /* r.db_create('bar') */ - logger.info("About to run line #41: r.dbCreate('bar')"); - Object obtained = runOrCatch(r.dbCreate("bar"), - new OptArgs() - ,conn); - try { - assertEquals(expected_, obtained); - logger.info("Finished running line #41"); - } catch (Throwable ae) { - logger.error("Whoops, got exception on line #41:" + ae.toString()); - if(obtained instanceof Throwable) { - ae.addSuppressed((Throwable) obtained); - } - throw ae; - } - } - - { - // meta/dbs.yaml line #44 - /* err('ReqlOpFailedError', 'Database `bar` already exists.', [0]) */ - Err expected_ = err("ReqlOpFailedError", "Database `bar` already exists.", r.array(0L)); - /* r.db_create('bar') */ - logger.info("About to run line #44: r.dbCreate('bar')"); - Object obtained = runOrCatch(r.dbCreate("bar"), - new OptArgs() - ,conn); - try { - assertEquals(expected_, obtained); - logger.info("Finished running line #44"); - } catch (Throwable ae) { - logger.error("Whoops, got exception on line #44:" + ae.toString()); - if(obtained instanceof Throwable) { - ae.addSuppressed((Throwable) obtained); - } - throw ae; - } - } - - { - // meta/dbs.yaml line #47 - /* partial({'dbs_dropped':1}) */ - Partial expected_ = partial(r.hashMap("dbs_dropped", 1L)); - /* r.db_drop('bar') */ - logger.info("About to run line #47: r.dbDrop('bar')"); - Object obtained = runOrCatch(r.dbDrop("bar"), - new OptArgs() - ,conn); - try { - assertEquals(expected_, obtained); - logger.info("Finished running line #47"); - } catch (Throwable ae) { - logger.error("Whoops, got exception on line #47:" + ae.toString()); - if(obtained instanceof Throwable) { - ae.addSuppressed((Throwable) obtained); - } - throw ae; - } - } - - { - // meta/dbs.yaml line #50 - /* err('ReqlOpFailedError', 'Database `bar` does not exist.', [0]) */ - Err expected_ = err("ReqlOpFailedError", "Database `bar` does not exist.", r.array(0L)); - /* r.db_drop('bar') */ - logger.info("About to run line #50: r.dbDrop('bar')"); - Object obtained = runOrCatch(r.dbDrop("bar"), - new OptArgs() - ,conn); - try { - assertEquals(expected_, obtained); - logger.info("Finished running line #50"); - } catch (Throwable ae) { - logger.error("Whoops, got exception on line #50:" + ae.toString()); - if(obtained instanceof Throwable) { - ae.addSuppressed((Throwable) obtained); - } - throw ae; - } - } - } -} diff --git a/drivers/java/src/test/java/com/rethinkdb/gen/MetaTable.java b/drivers/java/src/test/java/com/rethinkdb/gen/MetaTable.java deleted file mode 100644 index 663ca801856..00000000000 --- a/drivers/java/src/test/java/com/rethinkdb/gen/MetaTable.java +++ /dev/null @@ -1,1832 +0,0 @@ -// Autogenerated by convert_tests.py and process_polyglot.py. -// Do not edit this file directly. -// The template for this file is located at: -// ../../../../../../../templates/Test.java -package com.rethinkdb.gen; - -import com.rethinkdb.RethinkDB; -import com.rethinkdb.gen.exc.*; -import com.rethinkdb.gen.ast.*; -import com.rethinkdb.ast.ReqlAst; -import com.rethinkdb.model.MapObject; -import com.rethinkdb.model.OptArgs; -import com.rethinkdb.net.Connection; -import com.rethinkdb.net.Cursor; -import junit.framework.TestCase; -import static org.junit.Assert.assertEquals; -import static org.junit.Assert.assertArrayEquals; -import org.slf4j.Logger; -import org.slf4j.LoggerFactory; - -import org.junit.*; -import org.junit.rules.ExpectedException; - -import java.util.Arrays; -import java.util.ArrayList; -import java.util.List; -import java.util.Map; -import java.util.Set; -import java.time.OffsetDateTime; -import java.time.ZoneOffset; -import java.time.Instant; -import java.util.stream.LongStream; -import java.util.stream.Collectors; -import java.util.stream.Stream; -import java.util.concurrent.TimeoutException; -import java.util.regex.Pattern; -import java.util.Collections; -import java.nio.charset.StandardCharsets; - -import static com.rethinkdb.TestingCommon.*; -import com.rethinkdb.TestingFramework; - -public class MetaTable { - // Tests meta queries for creating and deleting tables - Logger logger = LoggerFactory.getLogger(MetaTable.class); - public static final RethinkDB r = RethinkDB.r; - - Connection conn; - - @Before - public void setUp() throws Exception { - logger.info("Setting up."); - conn = TestingFramework.createConnection(); - try { - r.dbCreate("test").run(conn); - r.db("test").wait_().run(conn); - }catch (Exception e){} - } - - @After - public void tearDown() throws Exception { - logger.info("Tearing down."); - r.db("rethinkdb").table("_debug_scratch").delete().run(conn); - if(!conn.isOpen()){ - conn.close(); - conn = TestingFramework.createConnection(); - } - r.dbDrop("test").run(conn); - conn.close(false); - } - - // Autogenerated tests below - - @Test(timeout=120000) - public void test() throws Exception { - - // meta/table.yaml line #4 - // db = r.db('test') - logger.info("Possibly executing: Db db = (Db) (r.db('test'));"); - Db db = (Db) (r.db("test")); - - { - // meta/table.yaml line #6 - /* [] */ - List expected_ = r.array(); - /* db.table_list() */ - logger.info("About to run line #6: db.tableList()"); - Object obtained = runOrCatch(db.tableList(), - new OptArgs() - ,conn); - try { - assertEquals(expected_, obtained); - logger.info("Finished running line #6"); - } catch (Throwable ae) { - logger.error("Whoops, got exception on line #6:" + ae.toString()); - if(obtained instanceof Throwable) { - ae.addSuppressed((Throwable) obtained); - } - throw ae; - } - } - - { - // meta/table.yaml line #9 - /* ({'type':'DB','name':'rethinkdb','id':null}) */ - Map expected_ = r.hashMap("type", "DB").with("name", "rethinkdb").with("id", null); - /* r.db('rethinkdb').info() */ - logger.info("About to run line #9: r.db('rethinkdb').info()"); - Object obtained = runOrCatch(r.db("rethinkdb").info(), - new OptArgs() - ,conn); - try { - assertEquals(expected_, obtained); - logger.info("Finished running line #9"); - } catch (Throwable ae) { - logger.error("Whoops, got exception on line #9:" + ae.toString()); - if(obtained instanceof Throwable) { - ae.addSuppressed((Throwable) obtained); - } - throw ae; - } - } - - { - // meta/table.yaml line #12 - /* partial({'db':{'type':'DB','name':'rethinkdb','id':null}, -'type':'TABLE','id':null,'name':'stats', -'indexes':[],'primary_key':'id'}) */ - Partial expected_ = partial(r.hashMap("db", r.hashMap("type", "DB").with("name", "rethinkdb").with("id", null)).with("type", "TABLE").with("id", null).with("name", "stats").with("indexes", r.array()).with("primary_key", "id")); - /* r.db('rethinkdb').table('stats').info() */ - logger.info("About to run line #12: r.db('rethinkdb').table('stats').info()"); - Object obtained = runOrCatch(r.db("rethinkdb").table("stats").info(), - new OptArgs() - ,conn); - try { - assertEquals(expected_, obtained); - logger.info("Finished running line #12"); - } catch (Throwable ae) { - logger.error("Whoops, got exception on line #12:" + ae.toString()); - if(obtained instanceof Throwable) { - ae.addSuppressed((Throwable) obtained); - } - throw ae; - } - } - - { - // meta/table.yaml line #18 - /* partial({'tables_created':1}) */ - Partial expected_ = partial(r.hashMap("tables_created", 1L)); - /* db.table_create('a') */ - logger.info("About to run line #18: db.tableCreate('a')"); - Object obtained = runOrCatch(db.tableCreate("a"), - new OptArgs() - ,conn); - try { - assertEquals(expected_, obtained); - logger.info("Finished running line #18"); - } catch (Throwable ae) { - logger.error("Whoops, got exception on line #18:" + ae.toString()); - if(obtained instanceof Throwable) { - ae.addSuppressed((Throwable) obtained); - } - throw ae; - } - } - - { - // meta/table.yaml line #21 - /* ['a'] */ - List expected_ = r.array("a"); - /* db.table_list() */ - logger.info("About to run line #21: db.tableList()"); - Object obtained = runOrCatch(db.tableList(), - new OptArgs() - ,conn); - try { - assertEquals(expected_, obtained); - logger.info("Finished running line #21"); - } catch (Throwable ae) { - logger.error("Whoops, got exception on line #21:" + ae.toString()); - if(obtained instanceof Throwable) { - ae.addSuppressed((Throwable) obtained); - } - throw ae; - } - } - - { - // meta/table.yaml line #24 - /* partial({'tables_created':1}) */ - Partial expected_ = partial(r.hashMap("tables_created", 1L)); - /* db.table_create('b') */ - logger.info("About to run line #24: db.tableCreate('b')"); - Object obtained = runOrCatch(db.tableCreate("b"), - new OptArgs() - ,conn); - try { - assertEquals(expected_, obtained); - logger.info("Finished running line #24"); - } catch (Throwable ae) { - logger.error("Whoops, got exception on line #24:" + ae.toString()); - if(obtained instanceof Throwable) { - ae.addSuppressed((Throwable) obtained); - } - throw ae; - } - } - - { - // meta/table.yaml line #27 - /* bag(['a', 'b']) */ - Bag expected_ = bag(r.array("a", "b")); - /* db.table_list() */ - logger.info("About to run line #27: db.tableList()"); - Object obtained = runOrCatch(db.tableList(), - new OptArgs() - ,conn); - try { - assertEquals(expected_, obtained); - logger.info("Finished running line #27"); - } catch (Throwable ae) { - logger.error("Whoops, got exception on line #27:" + ae.toString()); - if(obtained instanceof Throwable) { - ae.addSuppressed((Throwable) obtained); - } - throw ae; - } - } - - { - // meta/table.yaml line #31 - /* partial({'tables_dropped':1}) */ - Partial expected_ = partial(r.hashMap("tables_dropped", 1L)); - /* db.table_drop('a') */ - logger.info("About to run line #31: db.tableDrop('a')"); - Object obtained = runOrCatch(db.tableDrop("a"), - new OptArgs() - ,conn); - try { - assertEquals(expected_, obtained); - logger.info("Finished running line #31"); - } catch (Throwable ae) { - logger.error("Whoops, got exception on line #31:" + ae.toString()); - if(obtained instanceof Throwable) { - ae.addSuppressed((Throwable) obtained); - } - throw ae; - } - } - - { - // meta/table.yaml line #34 - /* ['b'] */ - List expected_ = r.array("b"); - /* db.table_list() */ - logger.info("About to run line #34: db.tableList()"); - Object obtained = runOrCatch(db.tableList(), - new OptArgs() - ,conn); - try { - assertEquals(expected_, obtained); - logger.info("Finished running line #34"); - } catch (Throwable ae) { - logger.error("Whoops, got exception on line #34:" + ae.toString()); - if(obtained instanceof Throwable) { - ae.addSuppressed((Throwable) obtained); - } - throw ae; - } - } - - { - // meta/table.yaml line #37 - /* partial({'tables_dropped':1}) */ - Partial expected_ = partial(r.hashMap("tables_dropped", 1L)); - /* db.table_drop('b') */ - logger.info("About to run line #37: db.tableDrop('b')"); - Object obtained = runOrCatch(db.tableDrop("b"), - new OptArgs() - ,conn); - try { - assertEquals(expected_, obtained); - logger.info("Finished running line #37"); - } catch (Throwable ae) { - logger.error("Whoops, got exception on line #37:" + ae.toString()); - if(obtained instanceof Throwable) { - ae.addSuppressed((Throwable) obtained); - } - throw ae; - } - } - - { - // meta/table.yaml line #40 - /* [] */ - List expected_ = r.array(); - /* db.table_list() */ - logger.info("About to run line #40: db.tableList()"); - Object obtained = runOrCatch(db.tableList(), - new OptArgs() - ,conn); - try { - assertEquals(expected_, obtained); - logger.info("Finished running line #40"); - } catch (Throwable ae) { - logger.error("Whoops, got exception on line #40:" + ae.toString()); - if(obtained instanceof Throwable) { - ae.addSuppressed((Throwable) obtained); - } - throw ae; - } - } - - { - // meta/table.yaml line #44 - /* partial({'tables_created':1,'config_changes':[partial({'new_val':partial({'durability':'soft'})})]}) */ - Partial expected_ = partial(r.hashMap("tables_created", 1L).with("config_changes", r.array(partial(r.hashMap("new_val", partial(r.hashMap("durability", "soft"))))))); - /* db.table_create('ab', durability='soft') */ - logger.info("About to run line #44: db.tableCreate('ab').optArg('durability', 'soft')"); - Object obtained = runOrCatch(db.tableCreate("ab").optArg("durability", "soft"), - new OptArgs() - ,conn); - try { - assertEquals(expected_, obtained); - logger.info("Finished running line #44"); - } catch (Throwable ae) { - logger.error("Whoops, got exception on line #44:" + ae.toString()); - if(obtained instanceof Throwable) { - ae.addSuppressed((Throwable) obtained); - } - throw ae; - } - } - - { - // meta/table.yaml line #49 - /* partial({'tables_dropped':1}) */ - Partial expected_ = partial(r.hashMap("tables_dropped", 1L)); - /* db.table_drop('ab') */ - logger.info("About to run line #49: db.tableDrop('ab')"); - Object obtained = runOrCatch(db.tableDrop("ab"), - new OptArgs() - ,conn); - try { - assertEquals(expected_, obtained); - logger.info("Finished running line #49"); - } catch (Throwable ae) { - logger.error("Whoops, got exception on line #49:" + ae.toString()); - if(obtained instanceof Throwable) { - ae.addSuppressed((Throwable) obtained); - } - throw ae; - } - } - - { - // meta/table.yaml line #52 - /* partial({'tables_created':1,'config_changes':[partial({'new_val':partial({'durability':'hard'})})]}) */ - Partial expected_ = partial(r.hashMap("tables_created", 1L).with("config_changes", r.array(partial(r.hashMap("new_val", partial(r.hashMap("durability", "hard"))))))); - /* db.table_create('ab', durability='hard') */ - logger.info("About to run line #52: db.tableCreate('ab').optArg('durability', 'hard')"); - Object obtained = runOrCatch(db.tableCreate("ab").optArg("durability", "hard"), - new OptArgs() - ,conn); - try { - assertEquals(expected_, obtained); - logger.info("Finished running line #52"); - } catch (Throwable ae) { - logger.error("Whoops, got exception on line #52:" + ae.toString()); - if(obtained instanceof Throwable) { - ae.addSuppressed((Throwable) obtained); - } - throw ae; - } - } - - { - // meta/table.yaml line #57 - /* partial({'tables_dropped':1}) */ - Partial expected_ = partial(r.hashMap("tables_dropped", 1L)); - /* db.table_drop('ab') */ - logger.info("About to run line #57: db.tableDrop('ab')"); - Object obtained = runOrCatch(db.tableDrop("ab"), - new OptArgs() - ,conn); - try { - assertEquals(expected_, obtained); - logger.info("Finished running line #57"); - } catch (Throwable ae) { - logger.error("Whoops, got exception on line #57:" + ae.toString()); - if(obtained instanceof Throwable) { - ae.addSuppressed((Throwable) obtained); - } - throw ae; - } - } - - { - // meta/table.yaml line #60 - /* err('ReqlQueryLogicError', 'Durability option `fake` unrecognized (options are "hard" and "soft").') */ - Err expected_ = err("ReqlQueryLogicError", "Durability option `fake` unrecognized (options are \"hard\" and \"soft\")."); - /* db.table_create('ab', durability='fake') */ - logger.info("About to run line #60: db.tableCreate('ab').optArg('durability', 'fake')"); - Object obtained = runOrCatch(db.tableCreate("ab").optArg("durability", "fake"), - new OptArgs() - ,conn); - try { - assertEquals(expected_, obtained); - logger.info("Finished running line #60"); - } catch (Throwable ae) { - logger.error("Whoops, got exception on line #60:" + ae.toString()); - if(obtained instanceof Throwable) { - ae.addSuppressed((Throwable) obtained); - } - throw ae; - } - } - - { - // meta/table.yaml line #65 - /* partial({'tables_created':1}) */ - Partial expected_ = partial(r.hashMap("tables_created", 1L)); - /* db.table_create('ab', primary_key='bar', shards=2, replicas=1) */ - logger.info("About to run line #65: db.tableCreate('ab').optArg('primary_key', 'bar').optArg('shards', 2L).optArg('replicas', 1L)"); - Object obtained = runOrCatch(db.tableCreate("ab").optArg("primary_key", "bar").optArg("shards", 2L).optArg("replicas", 1L), - new OptArgs() - ,conn); - try { - assertEquals(expected_, obtained); - logger.info("Finished running line #65"); - } catch (Throwable ae) { - logger.error("Whoops, got exception on line #65:" + ae.toString()); - if(obtained instanceof Throwable) { - ae.addSuppressed((Throwable) obtained); - } - throw ae; - } - } - - { - // meta/table.yaml line #70 - /* partial({'tables_dropped':1}) */ - Partial expected_ = partial(r.hashMap("tables_dropped", 1L)); - /* db.table_drop('ab') */ - logger.info("About to run line #70: db.tableDrop('ab')"); - Object obtained = runOrCatch(db.tableDrop("ab"), - new OptArgs() - ,conn); - try { - assertEquals(expected_, obtained); - logger.info("Finished running line #70"); - } catch (Throwable ae) { - logger.error("Whoops, got exception on line #70:" + ae.toString()); - if(obtained instanceof Throwable) { - ae.addSuppressed((Throwable) obtained); - } - throw ae; - } - } - - { - // meta/table.yaml line #73 - /* partial({'tables_created':1}) */ - Partial expected_ = partial(r.hashMap("tables_created", 1L)); - /* db.table_create('ab', primary_key='bar', primary_replica_tag='default') */ - logger.info("About to run line #73: db.tableCreate('ab').optArg('primary_key', 'bar').optArg('primary_replica_tag', 'default')"); - Object obtained = runOrCatch(db.tableCreate("ab").optArg("primary_key", "bar").optArg("primary_replica_tag", "default"), - new OptArgs() - ,conn); - try { - assertEquals(expected_, obtained); - logger.info("Finished running line #73"); - } catch (Throwable ae) { - logger.error("Whoops, got exception on line #73:" + ae.toString()); - if(obtained instanceof Throwable) { - ae.addSuppressed((Throwable) obtained); - } - throw ae; - } - } - - { - // meta/table.yaml line #78 - /* partial({'tables_dropped':1}) */ - Partial expected_ = partial(r.hashMap("tables_dropped", 1L)); - /* db.table_drop('ab') */ - logger.info("About to run line #78: db.tableDrop('ab')"); - Object obtained = runOrCatch(db.tableDrop("ab"), - new OptArgs() - ,conn); - try { - assertEquals(expected_, obtained); - logger.info("Finished running line #78"); - } catch (Throwable ae) { - logger.error("Whoops, got exception on line #78:" + ae.toString()); - if(obtained instanceof Throwable) { - ae.addSuppressed((Throwable) obtained); - } - throw ae; - } - } - - { - // meta/table.yaml line #81 - /* partial({'tables_created':1}) */ - Partial expected_ = partial(r.hashMap("tables_created", 1L)); - /* db.table_create('ab', nonvoting_replica_tags=['default']) */ - logger.info("About to run line #81: db.tableCreate('ab').optArg('nonvoting_replica_tags', r.array('default'))"); - Object obtained = runOrCatch(db.tableCreate("ab").optArg("nonvoting_replica_tags", r.array("default")), - new OptArgs() - ,conn); - try { - assertEquals(expected_, obtained); - logger.info("Finished running line #81"); - } catch (Throwable ae) { - logger.error("Whoops, got exception on line #81:" + ae.toString()); - if(obtained instanceof Throwable) { - ae.addSuppressed((Throwable) obtained); - } - throw ae; - } - } - - { - // meta/table.yaml line #86 - /* partial({'tables_dropped':1}) */ - Partial expected_ = partial(r.hashMap("tables_dropped", 1L)); - /* db.table_drop('ab') */ - logger.info("About to run line #86: db.tableDrop('ab')"); - Object obtained = runOrCatch(db.tableDrop("ab"), - new OptArgs() - ,conn); - try { - assertEquals(expected_, obtained); - logger.info("Finished running line #86"); - } catch (Throwable ae) { - logger.error("Whoops, got exception on line #86:" + ae.toString()); - if(obtained instanceof Throwable) { - ae.addSuppressed((Throwable) obtained); - } - throw ae; - } - } - - { - // meta/table.yaml line #90 - /* partial({'tables_created':1}) */ - Partial expected_ = partial(r.hashMap("tables_created", 1L)); - /* db.table_create('a') */ - logger.info("About to run line #90: db.tableCreate('a')"); - Object obtained = runOrCatch(db.tableCreate("a"), - new OptArgs() - ,conn); - try { - assertEquals(expected_, obtained); - logger.info("Finished running line #90"); - } catch (Throwable ae) { - logger.error("Whoops, got exception on line #90:" + ae.toString()); - if(obtained instanceof Throwable) { - ae.addSuppressed((Throwable) obtained); - } - throw ae; - } - } - - { - // meta/table.yaml line #93 - /* partial({'reconfigured':1}) */ - Partial expected_ = partial(r.hashMap("reconfigured", 1L)); - /* db.table('a').reconfigure(shards=1, replicas=1) */ - logger.info("About to run line #93: db.table('a').reconfigure().optArg('shards', 1L).optArg('replicas', 1L)"); - Object obtained = runOrCatch(db.table("a").reconfigure().optArg("shards", 1L).optArg("replicas", 1L), - new OptArgs() - ,conn); - try { - assertEquals(expected_, obtained); - logger.info("Finished running line #93"); - } catch (Throwable ae) { - logger.error("Whoops, got exception on line #93:" + ae.toString()); - if(obtained instanceof Throwable) { - ae.addSuppressed((Throwable) obtained); - } - throw ae; - } - } - - { - // meta/table.yaml line #98 - /* partial({'reconfigured':1}) */ - Partial expected_ = partial(r.hashMap("reconfigured", 1L)); - /* db.table('a').reconfigure(shards=1, replicas={"default":1}, nonvoting_replica_tags=['default'], primary_replica_tag='default') */ - logger.info("About to run line #98: db.table('a').reconfigure().optArg('shards', 1L).optArg('replicas', r.hashMap('default', 1L)).optArg('nonvoting_replica_tags', r.array('default')).optArg('primary_replica_tag', 'default')"); - Object obtained = runOrCatch(db.table("a").reconfigure().optArg("shards", 1L).optArg("replicas", r.hashMap("default", 1L)).optArg("nonvoting_replica_tags", r.array("default")).optArg("primary_replica_tag", "default"), - new OptArgs() - ,conn); - try { - assertEquals(expected_, obtained); - logger.info("Finished running line #98"); - } catch (Throwable ae) { - logger.error("Whoops, got exception on line #98:" + ae.toString()); - if(obtained instanceof Throwable) { - ae.addSuppressed((Throwable) obtained); - } - throw ae; - } - } - - { - // meta/table.yaml line #103 - /* partial({'reconfigured':0}) */ - Partial expected_ = partial(r.hashMap("reconfigured", 0L)); - /* db.table('a').reconfigure(shards=1, replicas=1, dry_run=True) */ - logger.info("About to run line #103: db.table('a').reconfigure().optArg('shards', 1L).optArg('replicas', 1L).optArg('dry_run', true)"); - Object obtained = runOrCatch(db.table("a").reconfigure().optArg("shards", 1L).optArg("replicas", 1L).optArg("dry_run", true), - new OptArgs() - ,conn); - try { - assertEquals(expected_, obtained); - logger.info("Finished running line #103"); - } catch (Throwable ae) { - logger.error("Whoops, got exception on line #103:" + ae.toString()); - if(obtained instanceof Throwable) { - ae.addSuppressed((Throwable) obtained); - } - throw ae; - } - } - - { - // meta/table.yaml line #108 - /* err('ReqlOpFailedError', 'This table doesn\'t need to be repaired.', []) */ - Err expected_ = err("ReqlOpFailedError", "This table doesn't need to be repaired.", r.array()); - /* db.table('a').reconfigure(emergency_repair="unsafe_rollback") */ - logger.info("About to run line #108: db.table('a').reconfigure().optArg('emergency_repair', 'unsafe_rollback')"); - Object obtained = runOrCatch(db.table("a").reconfigure().optArg("emergency_repair", "unsafe_rollback"), - new OptArgs() - ,conn); - try { - assertEquals(expected_, obtained); - logger.info("Finished running line #108"); - } catch (Throwable ae) { - logger.error("Whoops, got exception on line #108:" + ae.toString()); - if(obtained instanceof Throwable) { - ae.addSuppressed((Throwable) obtained); - } - throw ae; - } - } - - { - // meta/table.yaml line #113 - /* err('ReqlOpFailedError', 'This table doesn\'t need to be repaired.', []) */ - Err expected_ = err("ReqlOpFailedError", "This table doesn't need to be repaired.", r.array()); - /* db.table('a').reconfigure(emergency_repair="unsafe_rollback", dry_run=True) */ - logger.info("About to run line #113: db.table('a').reconfigure().optArg('emergency_repair', 'unsafe_rollback').optArg('dry_run', true)"); - Object obtained = runOrCatch(db.table("a").reconfigure().optArg("emergency_repair", "unsafe_rollback").optArg("dry_run", true), - new OptArgs() - ,conn); - try { - assertEquals(expected_, obtained); - logger.info("Finished running line #113"); - } catch (Throwable ae) { - logger.error("Whoops, got exception on line #113:" + ae.toString()); - if(obtained instanceof Throwable) { - ae.addSuppressed((Throwable) obtained); - } - throw ae; - } - } - - { - // meta/table.yaml line #118 - /* err('ReqlOpFailedError', 'This table doesn\'t need to be repaired.', []) */ - Err expected_ = err("ReqlOpFailedError", "This table doesn't need to be repaired.", r.array()); - /* db.table('a').reconfigure(emergency_repair="unsafe_rollback_or_erase") */ - logger.info("About to run line #118: db.table('a').reconfigure().optArg('emergency_repair', 'unsafe_rollback_or_erase')"); - Object obtained = runOrCatch(db.table("a").reconfigure().optArg("emergency_repair", "unsafe_rollback_or_erase"), - new OptArgs() - ,conn); - try { - assertEquals(expected_, obtained); - logger.info("Finished running line #118"); - } catch (Throwable ae) { - logger.error("Whoops, got exception on line #118:" + ae.toString()); - if(obtained instanceof Throwable) { - ae.addSuppressed((Throwable) obtained); - } - throw ae; - } - } - - { - // meta/table.yaml line #123 - /* partial({'reconfigured':0}) */ - Partial expected_ = partial(r.hashMap("reconfigured", 0L)); - /* db.table('a').reconfigure(emergency_repair=None, shards=1, replicas=1, dry_run=True) */ - logger.info("About to run line #123: db.table('a').reconfigure().optArg('emergency_repair', (ReqlExpr) null).optArg('shards', 1L).optArg('replicas', 1L).optArg('dry_run', true)"); - Object obtained = runOrCatch(db.table("a").reconfigure().optArg("emergency_repair", (ReqlExpr) null).optArg("shards", 1L).optArg("replicas", 1L).optArg("dry_run", true), - new OptArgs() - ,conn); - try { - assertEquals(expected_, obtained); - logger.info("Finished running line #123"); - } catch (Throwable ae) { - logger.error("Whoops, got exception on line #123:" + ae.toString()); - if(obtained instanceof Throwable) { - ae.addSuppressed((Throwable) obtained); - } - throw ae; - } - } - - { - // meta/table.yaml line #128 - /* partial({'tables_dropped':1}) */ - Partial expected_ = partial(r.hashMap("tables_dropped", 1L)); - /* db.table_drop('a') */ - logger.info("About to run line #128: db.tableDrop('a')"); - Object obtained = runOrCatch(db.tableDrop("a"), - new OptArgs() - ,conn); - try { - assertEquals(expected_, obtained); - logger.info("Finished running line #128"); - } catch (Throwable ae) { - logger.error("Whoops, got exception on line #128:" + ae.toString()); - if(obtained instanceof Throwable) { - ae.addSuppressed((Throwable) obtained); - } - throw ae; - } - } - - { - // meta/table.yaml line #132 - /* partial({'tables_created':1}) */ - Partial expected_ = partial(r.hashMap("tables_created", 1L)); - /* db.table_create('foo') */ - logger.info("About to run line #132: db.tableCreate('foo')"); - Object obtained = runOrCatch(db.tableCreate("foo"), - new OptArgs() - ,conn); - try { - assertEquals(expected_, obtained); - logger.info("Finished running line #132"); - } catch (Throwable ae) { - logger.error("Whoops, got exception on line #132:" + ae.toString()); - if(obtained instanceof Throwable) { - ae.addSuppressed((Throwable) obtained); - } - throw ae; - } - } - - { - // meta/table.yaml line #135 - /* err('ReqlOpFailedError', 'Table `test.foo` already exists.', [0]) */ - Err expected_ = err("ReqlOpFailedError", "Table `test.foo` already exists.", r.array(0L)); - /* db.table_create('foo') */ - logger.info("About to run line #135: db.tableCreate('foo')"); - Object obtained = runOrCatch(db.tableCreate("foo"), - new OptArgs() - ,conn); - try { - assertEquals(expected_, obtained); - logger.info("Finished running line #135"); - } catch (Throwable ae) { - logger.error("Whoops, got exception on line #135:" + ae.toString()); - if(obtained instanceof Throwable) { - ae.addSuppressed((Throwable) obtained); - } - throw ae; - } - } - - { - // meta/table.yaml line #138 - /* partial({'tables_dropped':1}) */ - Partial expected_ = partial(r.hashMap("tables_dropped", 1L)); - /* db.table_drop('foo') */ - logger.info("About to run line #138: db.tableDrop('foo')"); - Object obtained = runOrCatch(db.tableDrop("foo"), - new OptArgs() - ,conn); - try { - assertEquals(expected_, obtained); - logger.info("Finished running line #138"); - } catch (Throwable ae) { - logger.error("Whoops, got exception on line #138:" + ae.toString()); - if(obtained instanceof Throwable) { - ae.addSuppressed((Throwable) obtained); - } - throw ae; - } - } - - { - // meta/table.yaml line #141 - /* err('ReqlOpFailedError', 'Table `test.foo` does not exist.', [0]) */ - Err expected_ = err("ReqlOpFailedError", "Table `test.foo` does not exist.", r.array(0L)); - /* db.table_drop('foo') */ - logger.info("About to run line #141: db.tableDrop('foo')"); - Object obtained = runOrCatch(db.tableDrop("foo"), - new OptArgs() - ,conn); - try { - assertEquals(expected_, obtained); - logger.info("Finished running line #141"); - } catch (Throwable ae) { - logger.error("Whoops, got exception on line #141:" + ae.toString()); - if(obtained instanceof Throwable) { - ae.addSuppressed((Throwable) obtained); - } - throw ae; - } - } - - { - // meta/table.yaml line #151 - /* err('ReqlCompileError', "Unrecognized optional argument `foo`.", []) */ - Err expected_ = err("ReqlCompileError", "Unrecognized optional argument `foo`.", r.array()); - /* db.table_create('nonsense', foo='bar') */ - logger.info("About to run line #151: db.tableCreate('nonsense').optArg('foo', 'bar')"); - Object obtained = runOrCatch(db.tableCreate("nonsense").optArg("foo", "bar"), - new OptArgs() - ,conn); - try { - assertEquals(expected_, obtained); - logger.info("Finished running line #151"); - } catch (Throwable ae) { - logger.error("Whoops, got exception on line #151:" + ae.toString()); - if(obtained instanceof Throwable) { - ae.addSuppressed((Throwable) obtained); - } - throw ae; - } - } - - { - // meta/table.yaml line #158 - /* partial({'tables_created':1}) */ - Partial expected_ = partial(r.hashMap("tables_created", 1L)); - /* db.table_create('a') */ - logger.info("About to run line #158: db.tableCreate('a')"); - Object obtained = runOrCatch(db.tableCreate("a"), - new OptArgs() - ,conn); - try { - assertEquals(expected_, obtained); - logger.info("Finished running line #158"); - } catch (Throwable ae) { - logger.error("Whoops, got exception on line #158:" + ae.toString()); - if(obtained instanceof Throwable) { - ae.addSuppressed((Throwable) obtained); - } - throw ae; - } - } - - { - // meta/table.yaml line #161 - /* err('ReqlQueryLogicError', 'Every table must have at least one shard.', []) */ - Err expected_ = err("ReqlQueryLogicError", "Every table must have at least one shard.", r.array()); - /* db.table('a').reconfigure(shards=0, replicas=1) */ - logger.info("About to run line #161: db.table('a').reconfigure().optArg('shards', 0L).optArg('replicas', 1L)"); - Object obtained = runOrCatch(db.table("a").reconfigure().optArg("shards", 0L).optArg("replicas", 1L), - new OptArgs() - ,conn); - try { - assertEquals(expected_, obtained); - logger.info("Finished running line #161"); - } catch (Throwable ae) { - logger.error("Whoops, got exception on line #161:" + ae.toString()); - if(obtained instanceof Throwable) { - ae.addSuppressed((Throwable) obtained); - } - throw ae; - } - } - - { - // meta/table.yaml line #166 - /* err('ReqlOpFailedError', 'Can\'t use server tag `foo` for primary replicas because you specified no replicas in server tag `foo`.', []) */ - Err expected_ = err("ReqlOpFailedError", "Can't use server tag `foo` for primary replicas because you specified no replicas in server tag `foo`.", r.array()); - /* db.table('a').reconfigure(shards=1, replicas={"default":1}, primary_replica_tag="foo") */ - logger.info("About to run line #166: db.table('a').reconfigure().optArg('shards', 1L).optArg('replicas', r.hashMap('default', 1L)).optArg('primary_replica_tag', 'foo')"); - Object obtained = runOrCatch(db.table("a").reconfigure().optArg("shards", 1L).optArg("replicas", r.hashMap("default", 1L)).optArg("primary_replica_tag", "foo"), - new OptArgs() - ,conn); - try { - assertEquals(expected_, obtained); - logger.info("Finished running line #166"); - } catch (Throwable ae) { - logger.error("Whoops, got exception on line #166:" + ae.toString()); - if(obtained instanceof Throwable) { - ae.addSuppressed((Throwable) obtained); - } - throw ae; - } - } - - { - // meta/table.yaml line #171 - /* err('ReqlOpFailedError', 'You specified that the replicas in server tag `foo` should be non-voting, but you didn\'t specify a number of replicas in server tag `foo`.', []) */ - Err expected_ = err("ReqlOpFailedError", "You specified that the replicas in server tag `foo` should be non-voting, but you didn't specify a number of replicas in server tag `foo`.", r.array()); - /* db.table('a').reconfigure(shards=1, replicas={"default":1}, primary_replica_tag="default", nonvoting_replica_tags=["foo"]) */ - logger.info("About to run line #171: db.table('a').reconfigure().optArg('shards', 1L).optArg('replicas', r.hashMap('default', 1L)).optArg('primary_replica_tag', 'default').optArg('nonvoting_replica_tags', r.array('foo'))"); - Object obtained = runOrCatch(db.table("a").reconfigure().optArg("shards", 1L).optArg("replicas", r.hashMap("default", 1L)).optArg("primary_replica_tag", "default").optArg("nonvoting_replica_tags", r.array("foo")), - new OptArgs() - ,conn); - try { - assertEquals(expected_, obtained); - logger.info("Finished running line #171"); - } catch (Throwable ae) { - logger.error("Whoops, got exception on line #171:" + ae.toString()); - if(obtained instanceof Throwable) { - ae.addSuppressed((Throwable) obtained); - } - throw ae; - } - } - - { - // meta/table.yaml line #176 - /* err('ReqlOpFailedError', 'You must set `replicas` to at least one. `replicas` includes the primary replica; if there are zero replicas, there is nowhere to put the data.', []) */ - Err expected_ = err("ReqlOpFailedError", "You must set `replicas` to at least one. `replicas` includes the primary replica; if there are zero replicas, there is nowhere to put the data.", r.array()); - /* db.table('a').reconfigure(shards=1, replicas={"foo":0}, primary_replica_tag="foo") */ - logger.info("About to run line #176: db.table('a').reconfigure().optArg('shards', 1L).optArg('replicas', r.hashMap('foo', 0L)).optArg('primary_replica_tag', 'foo')"); - Object obtained = runOrCatch(db.table("a").reconfigure().optArg("shards", 1L).optArg("replicas", r.hashMap("foo", 0L)).optArg("primary_replica_tag", "foo"), - new OptArgs() - ,conn); - try { - assertEquals(expected_, obtained); - logger.info("Finished running line #176"); - } catch (Throwable ae) { - logger.error("Whoops, got exception on line #176:" + ae.toString()); - if(obtained instanceof Throwable) { - ae.addSuppressed((Throwable) obtained); - } - throw ae; - } - } - - { - // meta/table.yaml line #181 - /* err('ReqlQueryLogicError', '`primary_replica_tag` must be specified when `replicas` is an OBJECT.', []) */ - Err expected_ = err("ReqlQueryLogicError", "`primary_replica_tag` must be specified when `replicas` is an OBJECT.", r.array()); - /* db.table('a').reconfigure(shards=1, replicas={"default":0}) */ - logger.info("About to run line #181: db.table('a').reconfigure().optArg('shards', 1L).optArg('replicas', r.hashMap('default', 0L))"); - Object obtained = runOrCatch(db.table("a").reconfigure().optArg("shards", 1L).optArg("replicas", r.hashMap("default", 0L)), - new OptArgs() - ,conn); - try { - assertEquals(expected_, obtained); - logger.info("Finished running line #181"); - } catch (Throwable ae) { - logger.error("Whoops, got exception on line #181:" + ae.toString()); - if(obtained instanceof Throwable) { - ae.addSuppressed((Throwable) obtained); - } - throw ae; - } - } - - { - // meta/table.yaml line #186 - /* err('ReqlQueryLogicError', 'Can\'t have a negative number of replicas', []) */ - Err expected_ = err("ReqlQueryLogicError", "Can't have a negative number of replicas", r.array()); - /* db.table('a').reconfigure(shards=1, replicas={"default":-3}, primary_replica_tag='default') */ - logger.info("About to run line #186: db.table('a').reconfigure().optArg('shards', 1L).optArg('replicas', r.hashMap('default', -3L)).optArg('primary_replica_tag', 'default')"); - Object obtained = runOrCatch(db.table("a").reconfigure().optArg("shards", 1L).optArg("replicas", r.hashMap("default", -3L)).optArg("primary_replica_tag", "default"), - new OptArgs() - ,conn); - try { - assertEquals(expected_, obtained); - logger.info("Finished running line #186"); - } catch (Throwable ae) { - logger.error("Whoops, got exception on line #186:" + ae.toString()); - if(obtained instanceof Throwable) { - ae.addSuppressed((Throwable) obtained); - } - throw ae; - } - } - - { - // meta/table.yaml line #191 - /* err('ReqlQueryLogicError', '`replicas` must be an OBJECT if `primary_replica_tag` is specified.', []) */ - Err expected_ = err("ReqlQueryLogicError", "`replicas` must be an OBJECT if `primary_replica_tag` is specified.", r.array()); - /* db.table('a').reconfigure(shards=1, replicas=3, primary_replica_tag='foo') */ - logger.info("About to run line #191: db.table('a').reconfigure().optArg('shards', 1L).optArg('replicas', 3L).optArg('primary_replica_tag', 'foo')"); - Object obtained = runOrCatch(db.table("a").reconfigure().optArg("shards", 1L).optArg("replicas", 3L).optArg("primary_replica_tag", "foo"), - new OptArgs() - ,conn); - try { - assertEquals(expected_, obtained); - logger.info("Finished running line #191"); - } catch (Throwable ae) { - logger.error("Whoops, got exception on line #191:" + ae.toString()); - if(obtained instanceof Throwable) { - ae.addSuppressed((Throwable) obtained); - } - throw ae; - } - } - - { - // meta/table.yaml line #196 - /* err('ReqlQueryLogicError', '`replicas` must be an OBJECT if `nonvoting_replica_tags` is specified.', []) */ - Err expected_ = err("ReqlQueryLogicError", "`replicas` must be an OBJECT if `nonvoting_replica_tags` is specified.", r.array()); - /* db.table('a').reconfigure(shards=1, replicas=3, nonvoting_replica_tags=['foo']) */ - logger.info("About to run line #196: db.table('a').reconfigure().optArg('shards', 1L).optArg('replicas', 3L).optArg('nonvoting_replica_tags', r.array('foo'))"); - Object obtained = runOrCatch(db.table("a").reconfigure().optArg("shards", 1L).optArg("replicas", 3L).optArg("nonvoting_replica_tags", r.array("foo")), - new OptArgs() - ,conn); - try { - assertEquals(expected_, obtained); - logger.info("Finished running line #196"); - } catch (Throwable ae) { - logger.error("Whoops, got exception on line #196:" + ae.toString()); - if(obtained instanceof Throwable) { - ae.addSuppressed((Throwable) obtained); - } - throw ae; - } - } - - { - // meta/table.yaml line #201 - /* err('ReqlQueryLogicError', 'Can\'t emergency repair an entire database at once; instead you should run `reconfigure()` on each table individually.') */ - Err expected_ = err("ReqlQueryLogicError", "Can't emergency repair an entire database at once; instead you should run `reconfigure()` on each table individually."); - /* db.reconfigure(emergency_repair="unsafe_rollback") */ - logger.info("About to run line #201: db.reconfigure().optArg('emergency_repair', 'unsafe_rollback')"); - Object obtained = runOrCatch(db.reconfigure().optArg("emergency_repair", "unsafe_rollback"), - new OptArgs() - ,conn); - try { - assertEquals(expected_, obtained); - logger.info("Finished running line #201"); - } catch (Throwable ae) { - logger.error("Whoops, got exception on line #201:" + ae.toString()); - if(obtained instanceof Throwable) { - ae.addSuppressed((Throwable) obtained); - } - throw ae; - } - } - - { - // meta/table.yaml line #206 - /* err('ReqlQueryLogicError', '`emergency_repair` should be "unsafe_rollback" or "unsafe_rollback_or_erase"', []) */ - Err expected_ = err("ReqlQueryLogicError", "`emergency_repair` should be \"unsafe_rollback\" or \"unsafe_rollback_or_erase\"", r.array()); - /* db.table('a').reconfigure(emergency_repair="foo") */ - logger.info("About to run line #206: db.table('a').reconfigure().optArg('emergency_repair', 'foo')"); - Object obtained = runOrCatch(db.table("a").reconfigure().optArg("emergency_repair", "foo"), - new OptArgs() - ,conn); - try { - assertEquals(expected_, obtained); - logger.info("Finished running line #206"); - } catch (Throwable ae) { - logger.error("Whoops, got exception on line #206:" + ae.toString()); - if(obtained instanceof Throwable) { - ae.addSuppressed((Throwable) obtained); - } - throw ae; - } - } - - { - // meta/table.yaml line #211 - /* err('ReqlQueryLogicError', 'In emergency repair mode, you can\'t specify shards, replicas, etc.') */ - Err expected_ = err("ReqlQueryLogicError", "In emergency repair mode, you can't specify shards, replicas, etc."); - /* db.table('a').reconfigure(emergency_repair="unsafe_rollback", shards=1, replicas=1) */ - logger.info("About to run line #211: db.table('a').reconfigure().optArg('emergency_repair', 'unsafe_rollback').optArg('shards', 1L).optArg('replicas', 1L)"); - Object obtained = runOrCatch(db.table("a").reconfigure().optArg("emergency_repair", "unsafe_rollback").optArg("shards", 1L).optArg("replicas", 1L), - new OptArgs() - ,conn); - try { - assertEquals(expected_, obtained); - logger.info("Finished running line #211"); - } catch (Throwable ae) { - logger.error("Whoops, got exception on line #211:" + ae.toString()); - if(obtained instanceof Throwable) { - ae.addSuppressed((Throwable) obtained); - } - throw ae; - } - } - - { - // meta/table.yaml line #217 - /* partial({'reconfigured':1}) */ - Partial expected_ = partial(r.hashMap("reconfigured", 1L)); - /* db.table('a').reconfigure(shards=2, replicas=1) */ - logger.info("About to run line #217: db.table('a').reconfigure().optArg('shards', 2L).optArg('replicas', 1L)"); - Object obtained = runOrCatch(db.table("a").reconfigure().optArg("shards", 2L).optArg("replicas", 1L), - new OptArgs() - ,conn); - try { - assertEquals(expected_, obtained); - logger.info("Finished running line #217"); - } catch (Throwable ae) { - logger.error("Whoops, got exception on line #217:" + ae.toString()); - if(obtained instanceof Throwable) { - ae.addSuppressed((Throwable) obtained); - } - throw ae; - } - } - - { - // meta/table.yaml line #222 - /* AnythingIsFine */ - Object expected_ = AnythingIsFine; - /* db.table('a').wait() */ - logger.info("About to run line #222: db.table('a').wait_()"); - Object obtained = runOrCatch(db.table("a").wait_(), - new OptArgs() - ,conn); - try { - assertEquals(expected_, obtained); - logger.info("Finished running line #222"); - } catch (Throwable ae) { - logger.error("Whoops, got exception on line #222:" + ae.toString()); - if(obtained instanceof Throwable) { - ae.addSuppressed((Throwable) obtained); - } - throw ae; - } - } - - { - // meta/table.yaml line #225 - /* partial({"inserted":4}) */ - Partial expected_ = partial(r.hashMap("inserted", 4L)); - /* db.table('a').insert([{"id":1}, {"id":2}, {"id":3}, {"id":4}]) */ - logger.info("About to run line #225: db.table('a').insert(r.array(r.hashMap('id', 1L), r.hashMap('id', 2L), r.hashMap('id', 3L), r.hashMap('id', 4L)))"); - Object obtained = runOrCatch(db.table("a").insert(r.array(r.hashMap("id", 1L), r.hashMap("id", 2L), r.hashMap("id", 3L), r.hashMap("id", 4L))), - new OptArgs() - ,conn); - try { - assertEquals(expected_, obtained); - logger.info("Finished running line #225"); - } catch (Throwable ae) { - logger.error("Whoops, got exception on line #225:" + ae.toString()); - if(obtained instanceof Throwable) { - ae.addSuppressed((Throwable) obtained); - } - throw ae; - } - } - - { - // meta/table.yaml line #230 - /* partial({'reconfigured':1}) */ - Partial expected_ = partial(r.hashMap("reconfigured", 1L)); - /* db.table('a').reconfigure(shards=2, replicas=1) */ - logger.info("About to run line #230: db.table('a').reconfigure().optArg('shards', 2L).optArg('replicas', 1L)"); - Object obtained = runOrCatch(db.table("a").reconfigure().optArg("shards", 2L).optArg("replicas", 1L), - new OptArgs() - ,conn); - try { - assertEquals(expected_, obtained); - logger.info("Finished running line #230"); - } catch (Throwable ae) { - logger.error("Whoops, got exception on line #230:" + ae.toString()); - if(obtained instanceof Throwable) { - ae.addSuppressed((Throwable) obtained); - } - throw ae; - } - } - - { - // meta/table.yaml line #235 - /* err('ReqlOpFailedError', 'Can\'t put 2 replicas on servers with the tag `default` because there are only 1 servers with the tag `default`. It\'s impossible to have more replicas of the data than there are servers.', []) */ - Err expected_ = err("ReqlOpFailedError", "Can't put 2 replicas on servers with the tag `default` because there are only 1 servers with the tag `default`. It's impossible to have more replicas of the data than there are servers.", r.array()); - /* db.table('a').reconfigure(shards=1, replicas=2) */ - logger.info("About to run line #235: db.table('a').reconfigure().optArg('shards', 1L).optArg('replicas', 2L)"); - Object obtained = runOrCatch(db.table("a").reconfigure().optArg("shards", 1L).optArg("replicas", 2L), - new OptArgs() - ,conn); - try { - assertEquals(expected_, obtained); - logger.info("Finished running line #235"); - } catch (Throwable ae) { - logger.error("Whoops, got exception on line #235:" + ae.toString()); - if(obtained instanceof Throwable) { - ae.addSuppressed((Throwable) obtained); - } - throw ae; - } - } - - { - // meta/table.yaml line #241 - /* partial({'ready':1}) */ - Partial expected_ = partial(r.hashMap("ready", 1L)); - /* db.table('a').wait() */ - logger.info("About to run line #241: db.table('a').wait_()"); - Object obtained = runOrCatch(db.table("a").wait_(), - new OptArgs() - ,conn); - try { - assertEquals(expected_, obtained); - logger.info("Finished running line #241"); - } catch (Throwable ae) { - logger.error("Whoops, got exception on line #241:" + ae.toString()); - if(obtained instanceof Throwable) { - ae.addSuppressed((Throwable) obtained); - } - throw ae; - } - } - - { - // meta/table.yaml line #243 - /* partial({'rebalanced':1}) */ - Partial expected_ = partial(r.hashMap("rebalanced", 1L)); - /* db.table('a').rebalance() */ - logger.info("About to run line #243: db.table('a').rebalance()"); - Object obtained = runOrCatch(db.table("a").rebalance(), - new OptArgs() - ,conn); - try { - assertEquals(expected_, obtained); - logger.info("Finished running line #243"); - } catch (Throwable ae) { - logger.error("Whoops, got exception on line #243:" + ae.toString()); - if(obtained instanceof Throwable) { - ae.addSuppressed((Throwable) obtained); - } - throw ae; - } - } - - { - // meta/table.yaml line #246 - /* partial({'ready':1}) */ - Partial expected_ = partial(r.hashMap("ready", 1L)); - /* db.wait() */ - logger.info("About to run line #246: db.wait_()"); - Object obtained = runOrCatch(db.wait_(), - new OptArgs() - ,conn); - try { - assertEquals(expected_, obtained); - logger.info("Finished running line #246"); - } catch (Throwable ae) { - logger.error("Whoops, got exception on line #246:" + ae.toString()); - if(obtained instanceof Throwable) { - ae.addSuppressed((Throwable) obtained); - } - throw ae; - } - } - - { - // meta/table.yaml line #248 - /* partial({'rebalanced':1}) */ - Partial expected_ = partial(r.hashMap("rebalanced", 1L)); - /* db.rebalance() */ - logger.info("About to run line #248: db.rebalance()"); - Object obtained = runOrCatch(db.rebalance(), - new OptArgs() - ,conn); - try { - assertEquals(expected_, obtained); - logger.info("Finished running line #248"); - } catch (Throwable ae) { - logger.error("Whoops, got exception on line #248:" + ae.toString()); - if(obtained instanceof Throwable) { - ae.addSuppressed((Throwable) obtained); - } - throw ae; - } - } - - { - // meta/table.yaml line #262 - /* partial({'tables_dropped':1}) */ - Partial expected_ = partial(r.hashMap("tables_dropped", 1L)); - /* db.table_drop('a') */ - logger.info("About to run line #262: db.tableDrop('a')"); - Object obtained = runOrCatch(db.tableDrop("a"), - new OptArgs() - ,conn); - try { - assertEquals(expected_, obtained); - logger.info("Finished running line #262"); - } catch (Throwable ae) { - logger.error("Whoops, got exception on line #262:" + ae.toString()); - if(obtained instanceof Throwable) { - ae.addSuppressed((Throwable) obtained); - } - throw ae; - } - } - - { - // meta/table.yaml line #266 - /* AnythingIsFine */ - Object expected_ = AnythingIsFine; - /* db.table_create('a') */ - logger.info("About to run line #266: db.tableCreate('a')"); - Object obtained = runOrCatch(db.tableCreate("a"), - new OptArgs() - ,conn); - try { - assertEquals(expected_, obtained); - logger.info("Finished running line #266"); - } catch (Throwable ae) { - logger.error("Whoops, got exception on line #266:" + ae.toString()); - if(obtained instanceof Throwable) { - ae.addSuppressed((Throwable) obtained); - } - throw ae; - } - } - - { - // meta/table.yaml line #267 - /* AnythingIsFine */ - Object expected_ = AnythingIsFine; - /* db.table_create('b') */ - logger.info("About to run line #267: db.tableCreate('b')"); - Object obtained = runOrCatch(db.tableCreate("b"), - new OptArgs() - ,conn); - try { - assertEquals(expected_, obtained); - logger.info("Finished running line #267"); - } catch (Throwable ae) { - logger.error("Whoops, got exception on line #267:" + ae.toString()); - if(obtained instanceof Throwable) { - ae.addSuppressed((Throwable) obtained); - } - throw ae; - } - } - - { - // meta/table.yaml line #268 - /* AnythingIsFine */ - Object expected_ = AnythingIsFine; - /* db.table_create('c') */ - logger.info("About to run line #268: db.tableCreate('c')"); - Object obtained = runOrCatch(db.tableCreate("c"), - new OptArgs() - ,conn); - try { - assertEquals(expected_, obtained); - logger.info("Finished running line #268"); - } catch (Throwable ae) { - logger.error("Whoops, got exception on line #268:" + ae.toString()); - if(obtained instanceof Throwable) { - ae.addSuppressed((Throwable) obtained); - } - throw ae; - } - } - - { - // meta/table.yaml line #270 - /* err('ReqlQueryLogicError', 'Every table must have at least one shard.', []) */ - Err expected_ = err("ReqlQueryLogicError", "Every table must have at least one shard.", r.array()); - /* db.reconfigure(shards=0, replicas=1) */ - logger.info("About to run line #270: db.reconfigure().optArg('shards', 0L).optArg('replicas', 1L)"); - Object obtained = runOrCatch(db.reconfigure().optArg("shards", 0L).optArg("replicas", 1L), - new OptArgs() - ,conn); - try { - assertEquals(expected_, obtained); - logger.info("Finished running line #270"); - } catch (Throwable ae) { - logger.error("Whoops, got exception on line #270:" + ae.toString()); - if(obtained instanceof Throwable) { - ae.addSuppressed((Throwable) obtained); - } - throw ae; - } - } - - { - // meta/table.yaml line #275 - /* err('ReqlQueryLogicError', '`primary_replica_tag` must be specified when `replicas` is an OBJECT.', []) */ - Err expected_ = err("ReqlQueryLogicError", "`primary_replica_tag` must be specified when `replicas` is an OBJECT.", r.array()); - /* db.reconfigure(shards=1, replicas={"default":0}) */ - logger.info("About to run line #275: db.reconfigure().optArg('shards', 1L).optArg('replicas', r.hashMap('default', 0L))"); - Object obtained = runOrCatch(db.reconfigure().optArg("shards", 1L).optArg("replicas", r.hashMap("default", 0L)), - new OptArgs() - ,conn); - try { - assertEquals(expected_, obtained); - logger.info("Finished running line #275"); - } catch (Throwable ae) { - logger.error("Whoops, got exception on line #275:" + ae.toString()); - if(obtained instanceof Throwable) { - ae.addSuppressed((Throwable) obtained); - } - throw ae; - } - } - - { - // meta/table.yaml line #280 - /* err('ReqlQueryLogicError', 'Can\'t have a negative number of replicas', []) */ - Err expected_ = err("ReqlQueryLogicError", "Can't have a negative number of replicas", r.array()); - /* db.reconfigure(shards=1, replicas={"default":-3}, primary_replica_tag='default') */ - logger.info("About to run line #280: db.reconfigure().optArg('shards', 1L).optArg('replicas', r.hashMap('default', -3L)).optArg('primary_replica_tag', 'default')"); - Object obtained = runOrCatch(db.reconfigure().optArg("shards", 1L).optArg("replicas", r.hashMap("default", -3L)).optArg("primary_replica_tag", "default"), - new OptArgs() - ,conn); - try { - assertEquals(expected_, obtained); - logger.info("Finished running line #280"); - } catch (Throwable ae) { - logger.error("Whoops, got exception on line #280:" + ae.toString()); - if(obtained instanceof Throwable) { - ae.addSuppressed((Throwable) obtained); - } - throw ae; - } - } - - { - // meta/table.yaml line #285 - /* err('ReqlQueryLogicError', '`replicas` must be an OBJECT if `primary_replica_tag` is specified.', []) */ - Err expected_ = err("ReqlQueryLogicError", "`replicas` must be an OBJECT if `primary_replica_tag` is specified.", r.array()); - /* db.reconfigure(shards=1, replicas=3, primary_replica_tag='foo') */ - logger.info("About to run line #285: db.reconfigure().optArg('shards', 1L).optArg('replicas', 3L).optArg('primary_replica_tag', 'foo')"); - Object obtained = runOrCatch(db.reconfigure().optArg("shards", 1L).optArg("replicas", 3L).optArg("primary_replica_tag", "foo"), - new OptArgs() - ,conn); - try { - assertEquals(expected_, obtained); - logger.info("Finished running line #285"); - } catch (Throwable ae) { - logger.error("Whoops, got exception on line #285:" + ae.toString()); - if(obtained instanceof Throwable) { - ae.addSuppressed((Throwable) obtained); - } - throw ae; - } - } - - { - // meta/table.yaml line #290 - /* partial({'reconfigured':3}) */ - Partial expected_ = partial(r.hashMap("reconfigured", 3L)); - /* db.reconfigure(shards=2, replicas=1) */ - logger.info("About to run line #290: db.reconfigure().optArg('shards', 2L).optArg('replicas', 1L)"); - Object obtained = runOrCatch(db.reconfigure().optArg("shards", 2L).optArg("replicas", 1L), - new OptArgs() - ,conn); - try { - assertEquals(expected_, obtained); - logger.info("Finished running line #290"); - } catch (Throwable ae) { - logger.error("Whoops, got exception on line #290:" + ae.toString()); - if(obtained instanceof Throwable) { - ae.addSuppressed((Throwable) obtained); - } - throw ae; - } - } - - { - // meta/table.yaml line #295 - /* partial({'tables_dropped':1}) */ - Partial expected_ = partial(r.hashMap("tables_dropped", 1L)); - /* db.table_drop('a') */ - logger.info("About to run line #295: db.tableDrop('a')"); - Object obtained = runOrCatch(db.tableDrop("a"), - new OptArgs() - ,conn); - try { - assertEquals(expected_, obtained); - logger.info("Finished running line #295"); - } catch (Throwable ae) { - logger.error("Whoops, got exception on line #295:" + ae.toString()); - if(obtained instanceof Throwable) { - ae.addSuppressed((Throwable) obtained); - } - throw ae; - } - } - - { - // meta/table.yaml line #297 - /* partial({'tables_dropped':1}) */ - Partial expected_ = partial(r.hashMap("tables_dropped", 1L)); - /* db.table_drop('b') */ - logger.info("About to run line #297: db.tableDrop('b')"); - Object obtained = runOrCatch(db.tableDrop("b"), - new OptArgs() - ,conn); - try { - assertEquals(expected_, obtained); - logger.info("Finished running line #297"); - } catch (Throwable ae) { - logger.error("Whoops, got exception on line #297:" + ae.toString()); - if(obtained instanceof Throwable) { - ae.addSuppressed((Throwable) obtained); - } - throw ae; - } - } - - { - // meta/table.yaml line #299 - /* partial({'tables_dropped':1}) */ - Partial expected_ = partial(r.hashMap("tables_dropped", 1L)); - /* db.table_drop('c') */ - logger.info("About to run line #299: db.tableDrop('c')"); - Object obtained = runOrCatch(db.tableDrop("c"), - new OptArgs() - ,conn); - try { - assertEquals(expected_, obtained); - logger.info("Finished running line #299"); - } catch (Throwable ae) { - logger.error("Whoops, got exception on line #299:" + ae.toString()); - if(obtained instanceof Throwable) { - ae.addSuppressed((Throwable) obtained); - } - throw ae; - } - } - - { - // meta/table.yaml line #303 - /* partial({'dbs_created':1}) */ - Partial expected_ = partial(r.hashMap("dbs_created", 1L)); - /* r.db_create("test2") */ - logger.info("About to run line #303: r.dbCreate('test2')"); - Object obtained = runOrCatch(r.dbCreate("test2"), - new OptArgs() - ,conn); - try { - assertEquals(expected_, obtained); - logger.info("Finished running line #303"); - } catch (Throwable ae) { - logger.error("Whoops, got exception on line #303:" + ae.toString()); - if(obtained instanceof Throwable) { - ae.addSuppressed((Throwable) obtained); - } - throw ae; - } - } - - // meta/table.yaml line #306 - // db2 = r.db("test2") - logger.info("Possibly executing: Db db2 = (Db) (r.db('test2'));"); - Db db2 = (Db) (r.db("test2")); - - { - // meta/table.yaml line #308 - /* partial({'tables_created':1}) */ - Partial expected_ = partial(r.hashMap("tables_created", 1L)); - /* db.table_create("testA") */ - logger.info("About to run line #308: db.tableCreate('testA')"); - Object obtained = runOrCatch(db.tableCreate("testA"), - new OptArgs() - ,conn); - try { - assertEquals(expected_, obtained); - logger.info("Finished running line #308"); - } catch (Throwable ae) { - logger.error("Whoops, got exception on line #308:" + ae.toString()); - if(obtained instanceof Throwable) { - ae.addSuppressed((Throwable) obtained); - } - throw ae; - } - } - - { - // meta/table.yaml line #310 - /* partial({'tables_created':1}) */ - Partial expected_ = partial(r.hashMap("tables_created", 1L)); - /* db.table_create("testB") */ - logger.info("About to run line #310: db.tableCreate('testB')"); - Object obtained = runOrCatch(db.tableCreate("testB"), - new OptArgs() - ,conn); - try { - assertEquals(expected_, obtained); - logger.info("Finished running line #310"); - } catch (Throwable ae) { - logger.error("Whoops, got exception on line #310:" + ae.toString()); - if(obtained instanceof Throwable) { - ae.addSuppressed((Throwable) obtained); - } - throw ae; - } - } - - { - // meta/table.yaml line #312 - /* partial({'tables_created':1}) */ - Partial expected_ = partial(r.hashMap("tables_created", 1L)); - /* db2.table_create("test2B") */ - logger.info("About to run line #312: db2.tableCreate('test2B')"); - Object obtained = runOrCatch(db2.tableCreate("test2B"), - new OptArgs() - ,conn); - try { - assertEquals(expected_, obtained); - logger.info("Finished running line #312"); - } catch (Throwable ae) { - logger.error("Whoops, got exception on line #312:" + ae.toString()); - if(obtained instanceof Throwable) { - ae.addSuppressed((Throwable) obtained); - } - throw ae; - } - } - - { - // meta/table.yaml line #315 - /* {'db':'test','name':'testA'} */ - Map expected_ = r.hashMap("db", "test").with("name", "testA"); - /* r.table('testA').config().pluck('db','name') */ - logger.info("About to run line #315: r.table('testA').config().pluck('db', 'name')"); - Object obtained = runOrCatch(r.table("testA").config().pluck("db", "name"), - new OptArgs() - ,conn); - try { - assertEquals(expected_, obtained); - logger.info("Finished running line #315"); - } catch (Throwable ae) { - logger.error("Whoops, got exception on line #315:" + ae.toString()); - if(obtained instanceof Throwable) { - ae.addSuppressed((Throwable) obtained); - } - throw ae; - } - } - - { - // meta/table.yaml line #318 - /* err('ReqlOpFailedError', 'Table `test.doesntexist` does not exist.', []) */ - Err expected_ = err("ReqlOpFailedError", "Table `test.doesntexist` does not exist.", r.array()); - /* r.table('doesntexist').config() */ - logger.info("About to run line #318: r.table('doesntexist').config()"); - Object obtained = runOrCatch(r.table("doesntexist").config(), - new OptArgs() - ,conn); - try { - assertEquals(expected_, obtained); - logger.info("Finished running line #318"); - } catch (Throwable ae) { - logger.error("Whoops, got exception on line #318:" + ae.toString()); - if(obtained instanceof Throwable) { - ae.addSuppressed((Throwable) obtained); - } - throw ae; - } - } - - { - // meta/table.yaml line #321 - /* err('ReqlOpFailedError', 'Table `test.test2B` does not exist.', []) */ - Err expected_ = err("ReqlOpFailedError", "Table `test.test2B` does not exist.", r.array()); - /* r.table('test2B').config() */ - logger.info("About to run line #321: r.table('test2B').config()"); - Object obtained = runOrCatch(r.table("test2B").config(), - new OptArgs() - ,conn); - try { - assertEquals(expected_, obtained); - logger.info("Finished running line #321"); - } catch (Throwable ae) { - logger.error("Whoops, got exception on line #321:" + ae.toString()); - if(obtained instanceof Throwable) { - ae.addSuppressed((Throwable) obtained); - } - throw ae; - } - } - - { - // meta/table.yaml line #324 - /* True */ - Boolean expected_ = true; - /* r.db('rethinkdb').table('table_config').filter({'name':'testA'}).nth(0).eq(r.table('testA').config()) */ - logger.info("About to run line #324: r.db('rethinkdb').table('table_config').filter(r.hashMap('name', 'testA')).nth(0L).eq(r.table('testA').config())"); - Object obtained = runOrCatch(r.db("rethinkdb").table("table_config").filter(r.hashMap("name", "testA")).nth(0L).eq(r.table("testA").config()), - new OptArgs() - ,conn); - try { - assertEquals(expected_, obtained); - logger.info("Finished running line #324"); - } catch (Throwable ae) { - logger.error("Whoops, got exception on line #324:" + ae.toString()); - if(obtained instanceof Throwable) { - ae.addSuppressed((Throwable) obtained); - } - throw ae; - } - } - - { - // meta/table.yaml line #327 - /* True */ - Boolean expected_ = true; - /* r.db('rethinkdb').table('table_status').filter({'name':'testA'}).nth(0).eq(r.table('testA').status()) */ - logger.info("About to run line #327: r.db('rethinkdb').table('table_status').filter(r.hashMap('name', 'testA')).nth(0L).eq(r.table('testA').status())"); - Object obtained = runOrCatch(r.db("rethinkdb").table("table_status").filter(r.hashMap("name", "testA")).nth(0L).eq(r.table("testA").status()), - new OptArgs() - ,conn); - try { - assertEquals(expected_, obtained); - logger.info("Finished running line #327"); - } catch (Throwable ae) { - logger.error("Whoops, got exception on line #327:" + ae.toString()); - if(obtained instanceof Throwable) { - ae.addSuppressed((Throwable) obtained); - } - throw ae; - } - } - - { - // meta/table.yaml line #330 - /* uuid() */ - UUIDMatch expected_ = uuid(); - /* r.db('rethinkdb').table('table_config', identifier_format='uuid').nth(0)["db"] */ - logger.info("About to run line #330: r.db('rethinkdb').table('table_config').optArg('identifier_format', 'uuid').nth(0L).bracket('db')"); - Object obtained = runOrCatch(r.db("rethinkdb").table("table_config").optArg("identifier_format", "uuid").nth(0L).bracket("db"), - new OptArgs() - ,conn); - try { - assertEquals(expected_, obtained); - logger.info("Finished running line #330"); - } catch (Throwable ae) { - logger.error("Whoops, got exception on line #330:" + ae.toString()); - if(obtained instanceof Throwable) { - ae.addSuppressed((Throwable) obtained); - } - throw ae; - } - } - - { - // meta/table.yaml line #335 - /* 0 */ - Long expected_ = 0L; - /* r.table('testA', identifier_format='uuid').count() */ - logger.info("About to run line #335: r.table('testA').optArg('identifier_format', 'uuid').count()"); - Object obtained = runOrCatch(r.table("testA").optArg("identifier_format", "uuid").count(), - new OptArgs() - ,conn); - try { - assertEquals(expected_, obtained); - logger.info("Finished running line #335"); - } catch (Throwable ae) { - logger.error("Whoops, got exception on line #335:" + ae.toString()); - if(obtained instanceof Throwable) { - ae.addSuppressed((Throwable) obtained); - } - throw ae; - } - } - - { - // meta/table.yaml line #348 - /* partial({'tables_dropped':1}) */ - Partial expected_ = partial(r.hashMap("tables_dropped", 1L)); - /* db.table_drop('testA') */ - logger.info("About to run line #348: db.tableDrop('testA')"); - Object obtained = runOrCatch(db.tableDrop("testA"), - new OptArgs() - ,conn); - try { - assertEquals(expected_, obtained); - logger.info("Finished running line #348"); - } catch (Throwable ae) { - logger.error("Whoops, got exception on line #348:" + ae.toString()); - if(obtained instanceof Throwable) { - ae.addSuppressed((Throwable) obtained); - } - throw ae; - } - } - - { - // meta/table.yaml line #351 - /* partial({'tables_dropped':1}) */ - Partial expected_ = partial(r.hashMap("tables_dropped", 1L)); - /* db.table_drop('testB') */ - logger.info("About to run line #351: db.tableDrop('testB')"); - Object obtained = runOrCatch(db.tableDrop("testB"), - new OptArgs() - ,conn); - try { - assertEquals(expected_, obtained); - logger.info("Finished running line #351"); - } catch (Throwable ae) { - logger.error("Whoops, got exception on line #351:" + ae.toString()); - if(obtained instanceof Throwable) { - ae.addSuppressed((Throwable) obtained); - } - throw ae; - } - } - - { - // meta/table.yaml line #354 - /* partial({'dbs_dropped':1,'tables_dropped':1}) */ - Partial expected_ = partial(r.hashMap("dbs_dropped", 1L).with("tables_dropped", 1L)); - /* r.db_drop('test2') */ - logger.info("About to run line #354: r.dbDrop('test2')"); - Object obtained = runOrCatch(r.dbDrop("test2"), - new OptArgs() - ,conn); - try { - assertEquals(expected_, obtained); - logger.info("Finished running line #354"); - } catch (Throwable ae) { - logger.error("Whoops, got exception on line #354:" + ae.toString()); - if(obtained instanceof Throwable) { - ae.addSuppressed((Throwable) obtained); - } - throw ae; - } - } - } -} diff --git a/drivers/java/src/test/java/com/rethinkdb/gen/MutationAtomicGetSet.java b/drivers/java/src/test/java/com/rethinkdb/gen/MutationAtomicGetSet.java deleted file mode 100644 index b3c2a948854..00000000000 --- a/drivers/java/src/test/java/com/rethinkdb/gen/MutationAtomicGetSet.java +++ /dev/null @@ -1,419 +0,0 @@ -// Autogenerated by convert_tests.py and process_polyglot.py. -// Do not edit this file directly. -// The template for this file is located at: -// ../../../../../../../templates/Test.java -package com.rethinkdb.gen; - -import com.rethinkdb.RethinkDB; -import com.rethinkdb.gen.exc.*; -import com.rethinkdb.gen.ast.*; -import com.rethinkdb.ast.ReqlAst; -import com.rethinkdb.model.MapObject; -import com.rethinkdb.model.OptArgs; -import com.rethinkdb.net.Connection; -import com.rethinkdb.net.Cursor; -import junit.framework.TestCase; -import static org.junit.Assert.assertEquals; -import static org.junit.Assert.assertArrayEquals; -import org.slf4j.Logger; -import org.slf4j.LoggerFactory; - -import org.junit.*; -import org.junit.rules.ExpectedException; - -import java.util.Arrays; -import java.util.ArrayList; -import java.util.List; -import java.util.Map; -import java.util.Set; -import java.time.OffsetDateTime; -import java.time.ZoneOffset; -import java.time.Instant; -import java.util.stream.LongStream; -import java.util.stream.Collectors; -import java.util.stream.Stream; -import java.util.concurrent.TimeoutException; -import java.util.regex.Pattern; -import java.util.Collections; -import java.nio.charset.StandardCharsets; - -import static com.rethinkdb.TestingCommon.*; -import com.rethinkdb.TestingFramework; - -public class MutationAtomicGetSet { - // Tests replacement of selections - Logger logger = LoggerFactory.getLogger(MutationAtomicGetSet.class); - public static final RethinkDB r = RethinkDB.r; - public static final Table tbl = r.db("test").table("tbl"); - - Connection conn; - - @Before - public void setUp() throws Exception { - logger.info("Setting up."); - conn = TestingFramework.createConnection(); - try { - r.dbCreate("test").run(conn); - r.db("test").wait_().run(conn); - }catch (Exception e){} - try { - r.db("test").tableCreate("tbl").run(conn); - r.db("test").table(tbl).wait_().run(conn); - }catch (Exception e){} - } - - @After - public void tearDown() throws Exception { - logger.info("Tearing down."); - r.db("rethinkdb").table("_debug_scratch").delete().run(conn); - if(!conn.isOpen()){ - conn.close(); - conn = TestingFramework.createConnection(); - } - r.db("test").tableDrop("tbl").run(conn); - r.dbDrop("test").run(conn); - conn.close(false); - } - - // Autogenerated tests below - - @Test(timeout=120000) - public void test() throws Exception { - - { - // mutation/atomic_get_set.yaml line #7 - /* err("ReqlQueryLogicError", "Error:"+" encountered obsolete optarg `return_vals`. Use `return_changes` instead.", [0]) */ - Err expected_ = err("ReqlQueryLogicError", "Error:" + " encountered obsolete optarg `return_vals`. Use `return_changes` instead.", r.array(0L)); - /* tbl.insert({'id':0}, return_vals=True).pluck('changes', 'first_error') */ - logger.info("About to run line #7: tbl.insert(r.hashMap('id', 0L)).optArg('return_vals', true).pluck('changes', 'first_error')"); - Object obtained = runOrCatch(tbl.insert(r.hashMap("id", 0L)).optArg("return_vals", true).pluck("changes", "first_error"), - new OptArgs() - ,conn); - try { - assertEquals(expected_, obtained); - logger.info("Finished running line #7"); - } catch (Throwable ae) { - logger.error("Whoops, got exception on line #7:" + ae.toString()); - if(obtained instanceof Throwable) { - ae.addSuppressed((Throwable) obtained); - } - throw ae; - } - } - - { - // mutation/atomic_get_set.yaml line #12 - /* ({'changes':[{'old_val':null,'new_val':{'id':0}}]}) */ - Map expected_ = r.hashMap("changes", r.array(r.hashMap("old_val", null).with("new_val", r.hashMap("id", 0L)))); - /* tbl.insert({'id':0}, return_changes=True).pluck('changes', 'first_error') */ - logger.info("About to run line #12: tbl.insert(r.hashMap('id', 0L)).optArg('return_changes', true).pluck('changes', 'first_error')"); - Object obtained = runOrCatch(tbl.insert(r.hashMap("id", 0L)).optArg("return_changes", true).pluck("changes", "first_error"), - new OptArgs() - ,conn); - try { - assertEquals(expected_, obtained); - logger.info("Finished running line #12"); - } catch (Throwable ae) { - logger.error("Whoops, got exception on line #12:" + ae.toString()); - if(obtained instanceof Throwable) { - ae.addSuppressed((Throwable) obtained); - } - throw ae; - } - } - - { - // mutation/atomic_get_set.yaml line #16 - /* ({'changes':[], 'first_error':"Duplicate primary key `id`:\n{\n\t\"id\":\t0\n}\n{\n\t\"id\":\t0\n}"}) */ - Map expected_ = r.hashMap("changes", r.array()).with("first_error", "Duplicate primary key `id`:\n{\n\t\"id\":\t0\n}\n{\n\t\"id\":\t0\n}"); - /* tbl.insert({'id':0}, return_changes=True).pluck('changes', 'first_error') */ - logger.info("About to run line #16: tbl.insert(r.hashMap('id', 0L)).optArg('return_changes', true).pluck('changes', 'first_error')"); - Object obtained = runOrCatch(tbl.insert(r.hashMap("id", 0L)).optArg("return_changes", true).pluck("changes", "first_error"), - new OptArgs() - ,conn); - try { - assertEquals(expected_, obtained); - logger.info("Finished running line #16"); - } catch (Throwable ae) { - logger.error("Whoops, got exception on line #16:" + ae.toString()); - if(obtained instanceof Throwable) { - ae.addSuppressed((Throwable) obtained); - } - throw ae; - } - } - - { - // mutation/atomic_get_set.yaml line #20 - /* ({'first_error':"Duplicate primary key `id`:\n{\n\t\"id\":\t0\n}\n{\n\t\"id\":\t0\n}",'changes':[{'old_val':{'id':0},'new_val':{'id':0},'error':"Duplicate primary key `id`:\n{\n\t\"id\":\t0\n}\n{\n\t\"id\":\t0\n}"}]}) */ - Map expected_ = r.hashMap("first_error", "Duplicate primary key `id`:\n{\n\t\"id\":\t0\n}\n{\n\t\"id\":\t0\n}").with("changes", r.array(r.hashMap("old_val", r.hashMap("id", 0L)).with("new_val", r.hashMap("id", 0L)).with("error", "Duplicate primary key `id`:\n{\n\t\"id\":\t0\n}\n{\n\t\"id\":\t0\n}"))); - /* tbl.insert({'id':0}, return_changes='always').pluck('changes', 'first_error') */ - logger.info("About to run line #20: tbl.insert(r.hashMap('id', 0L)).optArg('return_changes', 'always').pluck('changes', 'first_error')"); - Object obtained = runOrCatch(tbl.insert(r.hashMap("id", 0L)).optArg("return_changes", "always").pluck("changes", "first_error"), - new OptArgs() - ,conn); - try { - assertEquals(expected_, obtained); - logger.info("Finished running line #20"); - } catch (Throwable ae) { - logger.error("Whoops, got exception on line #20:" + ae.toString()); - if(obtained instanceof Throwable) { - ae.addSuppressed((Throwable) obtained); - } - throw ae; - } - } - - { - // mutation/atomic_get_set.yaml line #24 - /* ({'changes':[{'new_val':{'id':1},'old_val':null}], 'errors':0, 'deleted':0, 'unchanged':0, 'skipped':0, 'replaced':0, 'inserted':1}) */ - Map expected_ = r.hashMap("changes", r.array(r.hashMap("new_val", r.hashMap("id", 1L)).with("old_val", null))).with("errors", 0L).with("deleted", 0L).with("unchanged", 0L).with("skipped", 0L).with("replaced", 0L).with("inserted", 1L); - /* tbl.insert([{'id':1}], return_changes=True) */ - logger.info("About to run line #24: tbl.insert(r.array(r.hashMap('id', 1L))).optArg('return_changes', true)"); - Object obtained = runOrCatch(tbl.insert(r.array(r.hashMap("id", 1L))).optArg("return_changes", true), - new OptArgs() - ,conn); - try { - assertEquals(expected_, obtained); - logger.info("Finished running line #24"); - } catch (Throwable ae) { - logger.error("Whoops, got exception on line #24:" + ae.toString()); - if(obtained instanceof Throwable) { - ae.addSuppressed((Throwable) obtained); - } - throw ae; - } - } - - { - // mutation/atomic_get_set.yaml line #28 - /* ({'changes':[],'first_error':"Duplicate primary key `id`:\n{\n\t\"id\":\t0\n}\n{\n\t\"id\":\t0\n}"}) */ - Map expected_ = r.hashMap("changes", r.array()).with("first_error", "Duplicate primary key `id`:\n{\n\t\"id\":\t0\n}\n{\n\t\"id\":\t0\n}"); - /* tbl.insert([{'id':0}], return_changes=True).pluck('changes', 'first_error') */ - logger.info("About to run line #28: tbl.insert(r.array(r.hashMap('id', 0L))).optArg('return_changes', true).pluck('changes', 'first_error')"); - Object obtained = runOrCatch(tbl.insert(r.array(r.hashMap("id", 0L))).optArg("return_changes", true).pluck("changes", "first_error"), - new OptArgs() - ,conn); - try { - assertEquals(expected_, obtained); - logger.info("Finished running line #28"); - } catch (Throwable ae) { - logger.error("Whoops, got exception on line #28:" + ae.toString()); - if(obtained instanceof Throwable) { - ae.addSuppressed((Throwable) obtained); - } - throw ae; - } - } - - { - // mutation/atomic_get_set.yaml line #33 - /* ({'changes':[{'old_val':{'id':0},'new_val':{'id':0,'x':1}}]}) */ - Map expected_ = r.hashMap("changes", r.array(r.hashMap("old_val", r.hashMap("id", 0L)).with("new_val", r.hashMap("id", 0L).with("x", 1L)))); - /* tbl.get(0).update({'x':1}, return_changes=True).pluck('changes', 'first_error') */ - logger.info("About to run line #33: tbl.get(0L).update(r.hashMap('x', 1L)).optArg('return_changes', true).pluck('changes', 'first_error')"); - Object obtained = runOrCatch(tbl.get(0L).update(r.hashMap("x", 1L)).optArg("return_changes", true).pluck("changes", "first_error"), - new OptArgs() - ,conn); - try { - assertEquals(expected_, obtained); - logger.info("Finished running line #33"); - } catch (Throwable ae) { - logger.error("Whoops, got exception on line #33:" + ae.toString()); - if(obtained instanceof Throwable) { - ae.addSuppressed((Throwable) obtained); - } - throw ae; - } - } - - { - // mutation/atomic_get_set.yaml line #37 - /* ({'changes':[],'first_error':'a'}) */ - Map expected_ = r.hashMap("changes", r.array()).with("first_error", "a"); - /* tbl.get(0).update({'x':r.error("a")}, return_changes=True).pluck('changes', 'first_error') */ - logger.info("About to run line #37: tbl.get(0L).update(r.hashMap('x', r.error('a'))).optArg('return_changes', true).pluck('changes', 'first_error')"); - Object obtained = runOrCatch(tbl.get(0L).update(r.hashMap("x", r.error("a"))).optArg("return_changes", true).pluck("changes", "first_error"), - new OptArgs() - ,conn); - try { - assertEquals(expected_, obtained); - logger.info("Finished running line #37"); - } catch (Throwable ae) { - logger.error("Whoops, got exception on line #37:" + ae.toString()); - if(obtained instanceof Throwable) { - ae.addSuppressed((Throwable) obtained); - } - throw ae; - } - } - - { - // mutation/atomic_get_set.yaml line #41 - /* ({'changes':[{'old_val':{'id':0, 'x':1},'new_val':{'id':0, 'x':3}}, {'old_val':{'id':1},'new_val':{'id':1, 'x':3}}]}) */ - Map expected_ = r.hashMap("changes", r.array(r.hashMap("old_val", r.hashMap("id", 0L).with("x", 1L)).with("new_val", r.hashMap("id", 0L).with("x", 3L)), r.hashMap("old_val", r.hashMap("id", 1L)).with("new_val", r.hashMap("id", 1L).with("x", 3L)))); - /* tbl.update({'x':3}, return_changes=True).pluck('changes', 'first_error').do(lambda d:d.merge({'changes':d['changes'].order_by(lambda a:a['old_val']['id'])})) */ - logger.info("About to run line #41: tbl.update(r.hashMap('x', 3L)).optArg('return_changes', true).pluck('changes', 'first_error').do_(d -> d.merge(r.hashMap('changes', d.bracket('changes').orderBy(a -> a.bracket('old_val').bracket('id')))))"); - Object obtained = runOrCatch(tbl.update(r.hashMap("x", 3L)).optArg("return_changes", true).pluck("changes", "first_error").do_(d -> d.merge(r.hashMap("changes", d.bracket("changes").orderBy(a -> a.bracket("old_val").bracket("id"))))), - new OptArgs() - ,conn); - try { - assertEquals(expected_, obtained); - logger.info("Finished running line #41"); - } catch (Throwable ae) { - logger.error("Whoops, got exception on line #41:" + ae.toString()); - if(obtained instanceof Throwable) { - ae.addSuppressed((Throwable) obtained); - } - throw ae; - } - } - - { - // mutation/atomic_get_set.yaml line #46 - /* ({'changes':[{'old_val':{'id':0,'x':3},'new_val':{'id':0,'x':2}}]}) */ - Map expected_ = r.hashMap("changes", r.array(r.hashMap("old_val", r.hashMap("id", 0L).with("x", 3L)).with("new_val", r.hashMap("id", 0L).with("x", 2L)))); - /* tbl.get(0).replace({'id':0,'x':2}, return_changes=True).pluck('changes', 'first_error') */ - logger.info("About to run line #46: tbl.get(0L).replace(r.hashMap('id', 0L).with('x', 2L)).optArg('return_changes', true).pluck('changes', 'first_error')"); - Object obtained = runOrCatch(tbl.get(0L).replace(r.hashMap("id", 0L).with("x", 2L)).optArg("return_changes", true).pluck("changes", "first_error"), - new OptArgs() - ,conn); - try { - assertEquals(expected_, obtained); - logger.info("Finished running line #46"); - } catch (Throwable ae) { - logger.error("Whoops, got exception on line #46:" + ae.toString()); - if(obtained instanceof Throwable) { - ae.addSuppressed((Throwable) obtained); - } - throw ae; - } - } - - { - // mutation/atomic_get_set.yaml line #50 - /* ({'changes':[],'first_error':'a'}) */ - Map expected_ = r.hashMap("changes", r.array()).with("first_error", "a"); - /* tbl.get(0).replace(lambda y:{'x':r.error('a')}, return_changes=True).pluck('changes', 'first_error') */ - logger.info("About to run line #50: tbl.get(0L).replace(y -> r.hashMap('x', r.error('a'))).optArg('return_changes', true).pluck('changes', 'first_error')"); - Object obtained = runOrCatch(tbl.get(0L).replace(y -> r.hashMap("x", r.error("a"))).optArg("return_changes", true).pluck("changes", "first_error"), - new OptArgs() - ,conn); - try { - assertEquals(expected_, obtained); - logger.info("Finished running line #50"); - } catch (Throwable ae) { - logger.error("Whoops, got exception on line #50:" + ae.toString()); - if(obtained instanceof Throwable) { - ae.addSuppressed((Throwable) obtained); - } - throw ae; - } - } - - { - // mutation/atomic_get_set.yaml line #54 - /* ({'first_error':'a','changes':[{'old_val':{'id':0,'x':2},'new_val':{'id':0,'x':2},'error':'a'}]}) */ - Map expected_ = r.hashMap("first_error", "a").with("changes", r.array(r.hashMap("old_val", r.hashMap("id", 0L).with("x", 2L)).with("new_val", r.hashMap("id", 0L).with("x", 2L)).with("error", "a"))); - /* tbl.get(0).replace(lambda y:{'x':r.error('a')}, return_changes='always').pluck('changes', 'first_error') */ - logger.info("About to run line #54: tbl.get(0L).replace(y -> r.hashMap('x', r.error('a'))).optArg('return_changes', 'always').pluck('changes', 'first_error')"); - Object obtained = runOrCatch(tbl.get(0L).replace(y -> r.hashMap("x", r.error("a"))).optArg("return_changes", "always").pluck("changes", "first_error"), - new OptArgs() - ,conn); - try { - assertEquals(expected_, obtained); - logger.info("Finished running line #54"); - } catch (Throwable ae) { - logger.error("Whoops, got exception on line #54:" + ae.toString()); - if(obtained instanceof Throwable) { - ae.addSuppressed((Throwable) obtained); - } - throw ae; - } - } - - { - // mutation/atomic_get_set.yaml line #58 - /* ({'changes':[{'new_val':{'id':0},'old_val':{'id':0, 'x':2}}, {'new_val':{'id':1},'old_val':{'id':1,'x':3}}]}) */ - Map expected_ = r.hashMap("changes", r.array(r.hashMap("new_val", r.hashMap("id", 0L)).with("old_val", r.hashMap("id", 0L).with("x", 2L)), r.hashMap("new_val", r.hashMap("id", 1L)).with("old_val", r.hashMap("id", 1L).with("x", 3L)))); - /* tbl.replace(lambda y:y.without('x'), return_changes=True).pluck('changes', 'first_error').do(lambda d:d.merge({'changes':d['changes'].order_by(lambda a:a['old_val']['id'])})) */ - logger.info("About to run line #58: tbl.replace(y -> y.without('x')).optArg('return_changes', true).pluck('changes', 'first_error').do_(d -> d.merge(r.hashMap('changes', d.bracket('changes').orderBy(a -> a.bracket('old_val').bracket('id')))))"); - Object obtained = runOrCatch(tbl.replace(y -> y.without("x")).optArg("return_changes", true).pluck("changes", "first_error").do_(d -> d.merge(r.hashMap("changes", d.bracket("changes").orderBy(a -> a.bracket("old_val").bracket("id"))))), - new OptArgs() - ,conn); - try { - assertEquals(expected_, obtained); - logger.info("Finished running line #58"); - } catch (Throwable ae) { - logger.error("Whoops, got exception on line #58:" + ae.toString()); - if(obtained instanceof Throwable) { - ae.addSuppressed((Throwable) obtained); - } - throw ae; - } - } - - { - // mutation/atomic_get_set.yaml line #62 - /* ({'first_error':"Inserted object must have primary key `id`:\n{\n\t\"x\":\t1\n}", 'changes':[{'new_val':{'id':0},'old_val':{'id':0}, 'error':"Inserted object must have primary key `id`:\n{\n\t\"x\":\t1\n}"}, {'new_val':{'id':1},'old_val':{'id':1},'error':"Inserted object must have primary key `id`:\n{\n\t\"x\":\t1\n}"}]}) */ - Map expected_ = r.hashMap("first_error", "Inserted object must have primary key `id`:\n{\n\t\"x\":\t1\n}").with("changes", r.array(r.hashMap("new_val", r.hashMap("id", 0L)).with("old_val", r.hashMap("id", 0L)).with("error", "Inserted object must have primary key `id`:\n{\n\t\"x\":\t1\n}"), r.hashMap("new_val", r.hashMap("id", 1L)).with("old_val", r.hashMap("id", 1L)).with("error", "Inserted object must have primary key `id`:\n{\n\t\"x\":\t1\n}"))); - /* tbl.replace({'x':1}, return_changes='always').pluck('changes', 'first_error').do(lambda d:d.merge({'changes':d['changes'].order_by(lambda a:a['old_val']['id'])})) */ - logger.info("About to run line #62: tbl.replace(r.hashMap('x', 1L)).optArg('return_changes', 'always').pluck('changes', 'first_error').do_(d -> d.merge(r.hashMap('changes', d.bracket('changes').orderBy(a -> a.bracket('old_val').bracket('id')))))"); - Object obtained = runOrCatch(tbl.replace(r.hashMap("x", 1L)).optArg("return_changes", "always").pluck("changes", "first_error").do_(d -> d.merge(r.hashMap("changes", d.bracket("changes").orderBy(a -> a.bracket("old_val").bracket("id"))))), - new OptArgs() - ,conn); - try { - assertEquals(expected_, obtained); - logger.info("Finished running line #62"); - } catch (Throwable ae) { - logger.error("Whoops, got exception on line #62:" + ae.toString()); - if(obtained instanceof Throwable) { - ae.addSuppressed((Throwable) obtained); - } - throw ae; - } - } - - { - // mutation/atomic_get_set.yaml line #86 - /* ({'changes':[{'old_val':{'id':0},'new_val':null}]}) */ - Map expected_ = r.hashMap("changes", r.array(r.hashMap("old_val", r.hashMap("id", 0L)).with("new_val", null))); - /* tbl.get(0).delete(return_changes=True).pluck('changes', 'first_error') */ - logger.info("About to run line #86: tbl.get(0L).delete().optArg('return_changes', true).pluck('changes', 'first_error')"); - Object obtained = runOrCatch(tbl.get(0L).delete().optArg("return_changes", true).pluck("changes", "first_error"), - new OptArgs() - ,conn); - try { - assertEquals(expected_, obtained); - logger.info("Finished running line #86"); - } catch (Throwable ae) { - logger.error("Whoops, got exception on line #86:" + ae.toString()); - if(obtained instanceof Throwable) { - ae.addSuppressed((Throwable) obtained); - } - throw ae; - } - } - - { - // mutation/atomic_get_set.yaml line #90 - /* ({'deleted':1,'errors':0,'inserted':0,'replaced':0,'skipped':0,'unchanged':0,'changes':[{'new_val':null, 'old_val':{'id':1}}]}) */ - Map expected_ = r.hashMap("deleted", 1L).with("errors", 0L).with("inserted", 0L).with("replaced", 0L).with("skipped", 0L).with("unchanged", 0L).with("changes", r.array(r.hashMap("new_val", null).with("old_val", r.hashMap("id", 1L)))); - /* tbl.delete(return_changes=True) */ - logger.info("About to run line #90: tbl.delete().optArg('return_changes', true)"); - Object obtained = runOrCatch(tbl.delete().optArg("return_changes", true), - new OptArgs() - ,conn); - try { - assertEquals(expected_, obtained); - logger.info("Finished running line #90"); - } catch (Throwable ae) { - logger.error("Whoops, got exception on line #90:" + ae.toString()); - if(obtained instanceof Throwable) { - ae.addSuppressed((Throwable) obtained); - } - throw ae; - } - } - } -} diff --git a/drivers/java/src/test/java/com/rethinkdb/gen/MutationDelete.java b/drivers/java/src/test/java/com/rethinkdb/gen/MutationDelete.java deleted file mode 100644 index 9ea3fc55e5e..00000000000 --- a/drivers/java/src/test/java/com/rethinkdb/gen/MutationDelete.java +++ /dev/null @@ -1,230 +0,0 @@ -// Autogenerated by convert_tests.py and process_polyglot.py. -// Do not edit this file directly. -// The template for this file is located at: -// ../../../../../../../templates/Test.java -package com.rethinkdb.gen; - -import com.rethinkdb.RethinkDB; -import com.rethinkdb.gen.exc.*; -import com.rethinkdb.gen.ast.*; -import com.rethinkdb.ast.ReqlAst; -import com.rethinkdb.model.MapObject; -import com.rethinkdb.model.OptArgs; -import com.rethinkdb.net.Connection; -import com.rethinkdb.net.Cursor; -import junit.framework.TestCase; -import static org.junit.Assert.assertEquals; -import static org.junit.Assert.assertArrayEquals; -import org.slf4j.Logger; -import org.slf4j.LoggerFactory; - -import org.junit.*; -import org.junit.rules.ExpectedException; - -import java.util.Arrays; -import java.util.ArrayList; -import java.util.List; -import java.util.Map; -import java.util.Set; -import java.time.OffsetDateTime; -import java.time.ZoneOffset; -import java.time.Instant; -import java.util.stream.LongStream; -import java.util.stream.Collectors; -import java.util.stream.Stream; -import java.util.concurrent.TimeoutException; -import java.util.regex.Pattern; -import java.util.Collections; -import java.nio.charset.StandardCharsets; - -import static com.rethinkdb.TestingCommon.*; -import com.rethinkdb.TestingFramework; - -public class MutationDelete { - // Tests deletes of selections - Logger logger = LoggerFactory.getLogger(MutationDelete.class); - public static final RethinkDB r = RethinkDB.r; - public static final Table tbl = r.db("test").table("tbl"); - - Connection conn; - - @Before - public void setUp() throws Exception { - logger.info("Setting up."); - conn = TestingFramework.createConnection(); - try { - r.dbCreate("test").run(conn); - r.db("test").wait_().run(conn); - }catch (Exception e){} - try { - r.db("test").tableCreate("tbl").run(conn); - r.db("test").table(tbl).wait_().run(conn); - }catch (Exception e){} - } - - @After - public void tearDown() throws Exception { - logger.info("Tearing down."); - r.db("rethinkdb").table("_debug_scratch").delete().run(conn); - if(!conn.isOpen()){ - conn.close(); - conn = TestingFramework.createConnection(); - } - r.db("test").tableDrop("tbl").run(conn); - r.dbDrop("test").run(conn); - conn.close(false); - } - - // Autogenerated tests below - - @Test(timeout=120000) - public void test() throws Exception { - - { - // mutation/delete.yaml line #7 - /* ({'deleted':0,'replaced':0,'unchanged':0,'errors':0,'skipped':0,'inserted':100}) */ - Map expected_ = r.hashMap("deleted", 0L).with("replaced", 0L).with("unchanged", 0L).with("errors", 0L).with("skipped", 0L).with("inserted", 100L); - /* tbl.insert([{'id':i} for i in xrange(100)]) */ - logger.info("About to run line #7: tbl.insert(LongStream.range(0, 100L).boxed().map(i -> r.hashMap('id', i)).collect(Collectors.toList()))"); - Object obtained = runOrCatch(tbl.insert(LongStream.range(0, 100L).boxed().map(i -> r.hashMap("id", i)).collect(Collectors.toList())), - new OptArgs() - ,conn); - try { - assertEquals(expected_, obtained); - logger.info("Finished running line #7"); - } catch (Throwable ae) { - logger.error("Whoops, got exception on line #7:" + ae.toString()); - if(obtained instanceof Throwable) { - ae.addSuppressed((Throwable) obtained); - } - throw ae; - } - } - - { - // mutation/delete.yaml line #19 - /* 100 */ - Long expected_ = 100L; - /* tbl.count() */ - logger.info("About to run line #19: tbl.count()"); - Object obtained = runOrCatch(tbl.count(), - new OptArgs() - ,conn); - try { - assertEquals(expected_, obtained); - logger.info("Finished running line #19"); - } catch (Throwable ae) { - logger.error("Whoops, got exception on line #19:" + ae.toString()); - if(obtained instanceof Throwable) { - ae.addSuppressed((Throwable) obtained); - } - throw ae; - } - } - - { - // mutation/delete.yaml line #24 - /* ({'deleted':1,'replaced':0,'unchanged':0,'errors':0,'skipped':0,'inserted':0}) */ - Map expected_ = r.hashMap("deleted", 1L).with("replaced", 0L).with("unchanged", 0L).with("errors", 0L).with("skipped", 0L).with("inserted", 0L); - /* tbl.get(12).delete() */ - logger.info("About to run line #24: tbl.get(12L).delete()"); - Object obtained = runOrCatch(tbl.get(12L).delete(), - new OptArgs() - ,conn); - try { - assertEquals(expected_, obtained); - logger.info("Finished running line #24"); - } catch (Throwable ae) { - logger.error("Whoops, got exception on line #24:" + ae.toString()); - if(obtained instanceof Throwable) { - ae.addSuppressed((Throwable) obtained); - } - throw ae; - } - } - - { - // mutation/delete.yaml line #31 - /* err('ReqlQueryLogicError', 'Durability option `wrong` unrecognized (options are "hard" and "soft").', [0]) */ - Err expected_ = err("ReqlQueryLogicError", "Durability option `wrong` unrecognized (options are \"hard\" and \"soft\").", r.array(0L)); - /* tbl.skip(50).delete(durability='wrong') */ - logger.info("About to run line #31: tbl.skip(50L).delete().optArg('durability', 'wrong')"); - Object obtained = runOrCatch(tbl.skip(50L).delete().optArg("durability", "wrong"), - new OptArgs() - ,conn); - try { - assertEquals(expected_, obtained); - logger.info("Finished running line #31"); - } catch (Throwable ae) { - logger.error("Whoops, got exception on line #31:" + ae.toString()); - if(obtained instanceof Throwable) { - ae.addSuppressed((Throwable) obtained); - } - throw ae; - } - } - - { - // mutation/delete.yaml line #38 - /* ({'deleted':49,'replaced':0,'unchanged':0,'errors':0,'skipped':0,'inserted':0}) */ - Map expected_ = r.hashMap("deleted", 49L).with("replaced", 0L).with("unchanged", 0L).with("errors", 0L).with("skipped", 0L).with("inserted", 0L); - /* tbl.skip(50).delete(durability='soft') */ - logger.info("About to run line #38: tbl.skip(50L).delete().optArg('durability', 'soft')"); - Object obtained = runOrCatch(tbl.skip(50L).delete().optArg("durability", "soft"), - new OptArgs() - ,conn); - try { - assertEquals(expected_, obtained); - logger.info("Finished running line #38"); - } catch (Throwable ae) { - logger.error("Whoops, got exception on line #38:" + ae.toString()); - if(obtained instanceof Throwable) { - ae.addSuppressed((Throwable) obtained); - } - throw ae; - } - } - - { - // mutation/delete.yaml line #45 - /* ({'deleted':50,'replaced':0,'unchanged':0,'errors':0,'skipped':0,'inserted':0}) */ - Map expected_ = r.hashMap("deleted", 50L).with("replaced", 0L).with("unchanged", 0L).with("errors", 0L).with("skipped", 0L).with("inserted", 0L); - /* tbl.delete(durability='hard') */ - logger.info("About to run line #45: tbl.delete().optArg('durability', 'hard')"); - Object obtained = runOrCatch(tbl.delete().optArg("durability", "hard"), - new OptArgs() - ,conn); - try { - assertEquals(expected_, obtained); - logger.info("Finished running line #45"); - } catch (Throwable ae) { - logger.error("Whoops, got exception on line #45:" + ae.toString()); - if(obtained instanceof Throwable) { - ae.addSuppressed((Throwable) obtained); - } - throw ae; - } - } - - { - // mutation/delete.yaml line #49 - /* err('ReqlQueryLogicError', 'Expected type SELECTION but found DATUM:', [0]) */ - Err expected_ = err("ReqlQueryLogicError", "Expected type SELECTION but found DATUM:", r.array(0L)); - /* r.expr([1, 2]).delete() */ - logger.info("About to run line #49: r.expr(r.array(1L, 2L)).delete()"); - Object obtained = runOrCatch(r.expr(r.array(1L, 2L)).delete(), - new OptArgs() - ,conn); - try { - assertEquals(expected_, obtained); - logger.info("Finished running line #49"); - } catch (Throwable ae) { - logger.error("Whoops, got exception on line #49:" + ae.toString()); - if(obtained instanceof Throwable) { - ae.addSuppressed((Throwable) obtained); - } - throw ae; - } - } - } -} diff --git a/drivers/java/src/test/java/com/rethinkdb/gen/MutationInsert.java b/drivers/java/src/test/java/com/rethinkdb/gen/MutationInsert.java deleted file mode 100644 index b04d29b9b99..00000000000 --- a/drivers/java/src/test/java/com/rethinkdb/gen/MutationInsert.java +++ /dev/null @@ -1,1143 +0,0 @@ -// Autogenerated by convert_tests.py and process_polyglot.py. -// Do not edit this file directly. -// The template for this file is located at: -// ../../../../../../../templates/Test.java -package com.rethinkdb.gen; - -import com.rethinkdb.RethinkDB; -import com.rethinkdb.gen.exc.*; -import com.rethinkdb.gen.ast.*; -import com.rethinkdb.ast.ReqlAst; -import com.rethinkdb.model.MapObject; -import com.rethinkdb.model.OptArgs; -import com.rethinkdb.net.Connection; -import com.rethinkdb.net.Cursor; -import junit.framework.TestCase; -import static org.junit.Assert.assertEquals; -import static org.junit.Assert.assertArrayEquals; -import org.slf4j.Logger; -import org.slf4j.LoggerFactory; - -import org.junit.*; -import org.junit.rules.ExpectedException; - -import java.util.Arrays; -import java.util.ArrayList; -import java.util.List; -import java.util.Map; -import java.util.Set; -import java.time.OffsetDateTime; -import java.time.ZoneOffset; -import java.time.Instant; -import java.util.stream.LongStream; -import java.util.stream.Collectors; -import java.util.stream.Stream; -import java.util.concurrent.TimeoutException; -import java.util.regex.Pattern; -import java.util.Collections; -import java.nio.charset.StandardCharsets; - -import static com.rethinkdb.TestingCommon.*; -import com.rethinkdb.TestingFramework; - -public class MutationInsert { - // Tests insertion into tables - Logger logger = LoggerFactory.getLogger(MutationInsert.class); - public static final RethinkDB r = RethinkDB.r; - public static final Table tbl = r.db("test").table("tbl"); - - Connection conn; - - @Before - public void setUp() throws Exception { - logger.info("Setting up."); - conn = TestingFramework.createConnection(); - try { - r.dbCreate("test").run(conn); - r.db("test").wait_().run(conn); - }catch (Exception e){} - try { - r.db("test").tableCreate("tbl").run(conn); - r.db("test").table(tbl).wait_().run(conn); - }catch (Exception e){} - } - - @After - public void tearDown() throws Exception { - logger.info("Tearing down."); - r.db("rethinkdb").table("_debug_scratch").delete().run(conn); - if(!conn.isOpen()){ - conn.close(); - conn = TestingFramework.createConnection(); - } - r.db("test").tableDrop("tbl").run(conn); - r.dbDrop("test").run(conn); - conn.close(false); - } - - // Autogenerated tests below - - @Test(timeout=120000) - public void test() throws Exception { - - { - // mutation/insert.yaml line #6 - /* partial({'tables_created':1}) */ - Partial expected_ = partial(r.hashMap("tables_created", 1L)); - /* r.db('test').table_create('test2') */ - logger.info("About to run line #6: r.db('test').tableCreate('test2')"); - Object obtained = runOrCatch(r.db("test").tableCreate("test2"), - new OptArgs() - ,conn); - try { - assertEquals(expected_, obtained); - logger.info("Finished running line #6"); - } catch (Throwable ae) { - logger.error("Whoops, got exception on line #6:" + ae.toString()); - if(obtained instanceof Throwable) { - ae.addSuppressed((Throwable) obtained); - } - throw ae; - } - } - - // mutation/insert.yaml line #9 - // tbl2 = r.db('test').table('test2') - logger.info("Possibly executing: Table tbl2 = (Table) (r.db('test').table('test2'));"); - Table tbl2 = (Table) (r.db("test").table("test2")); - - { - // mutation/insert.yaml line #12 - /* {'deleted':0,'replaced':0,'unchanged':0,'errors':0,'skipped':0,'inserted':1} */ - Map expected_ = r.hashMap("deleted", 0L).with("replaced", 0L).with("unchanged", 0L).with("errors", 0L).with("skipped", 0L).with("inserted", 1L); - /* tbl.insert({'id':0,'a':0}) */ - logger.info("About to run line #12: tbl.insert(r.hashMap('id', 0L).with('a', 0L))"); - Object obtained = runOrCatch(tbl.insert(r.hashMap("id", 0L).with("a", 0L)), - new OptArgs() - ,conn); - try { - assertEquals(expected_, obtained); - logger.info("Finished running line #12"); - } catch (Throwable ae) { - logger.error("Whoops, got exception on line #12:" + ae.toString()); - if(obtained instanceof Throwable) { - ae.addSuppressed((Throwable) obtained); - } - throw ae; - } - } - - { - // mutation/insert.yaml line #14 - /* 1 */ - Long expected_ = 1L; - /* tbl.count() */ - logger.info("About to run line #14: tbl.count()"); - Object obtained = runOrCatch(tbl.count(), - new OptArgs() - ,conn); - try { - assertEquals(expected_, obtained); - logger.info("Finished running line #14"); - } catch (Throwable ae) { - logger.error("Whoops, got exception on line #14:" + ae.toString()); - if(obtained instanceof Throwable) { - ae.addSuppressed((Throwable) obtained); - } - throw ae; - } - } - - { - // mutation/insert.yaml line #18 - /* {'deleted':0,'replaced':0,'unchanged':0,'errors':0,'skipped':0,'inserted':1} */ - Map expected_ = r.hashMap("deleted", 0L).with("replaced", 0L).with("unchanged", 0L).with("errors", 0L).with("skipped", 0L).with("inserted", 1L); - /* tbl.insert({'id':1, 'a':1}, durability='hard') */ - logger.info("About to run line #18: tbl.insert(r.hashMap('id', 1L).with('a', 1L)).optArg('durability', 'hard')"); - Object obtained = runOrCatch(tbl.insert(r.hashMap("id", 1L).with("a", 1L)).optArg("durability", "hard"), - new OptArgs() - ,conn); - try { - assertEquals(expected_, obtained); - logger.info("Finished running line #18"); - } catch (Throwable ae) { - logger.error("Whoops, got exception on line #18:" + ae.toString()); - if(obtained instanceof Throwable) { - ae.addSuppressed((Throwable) obtained); - } - throw ae; - } - } - - { - // mutation/insert.yaml line #22 - /* 2 */ - Long expected_ = 2L; - /* tbl.count() */ - logger.info("About to run line #22: tbl.count()"); - Object obtained = runOrCatch(tbl.count(), - new OptArgs() - ,conn); - try { - assertEquals(expected_, obtained); - logger.info("Finished running line #22"); - } catch (Throwable ae) { - logger.error("Whoops, got exception on line #22:" + ae.toString()); - if(obtained instanceof Throwable) { - ae.addSuppressed((Throwable) obtained); - } - throw ae; - } - } - - { - // mutation/insert.yaml line #26 - /* {'deleted':0,'replaced':0,'unchanged':0,'errors':0,'skipped':0,'inserted':1} */ - Map expected_ = r.hashMap("deleted", 0L).with("replaced", 0L).with("unchanged", 0L).with("errors", 0L).with("skipped", 0L).with("inserted", 1L); - /* tbl.insert({'id':2, 'a':2}, durability='soft') */ - logger.info("About to run line #26: tbl.insert(r.hashMap('id', 2L).with('a', 2L)).optArg('durability', 'soft')"); - Object obtained = runOrCatch(tbl.insert(r.hashMap("id", 2L).with("a", 2L)).optArg("durability", "soft"), - new OptArgs() - ,conn); - try { - assertEquals(expected_, obtained); - logger.info("Finished running line #26"); - } catch (Throwable ae) { - logger.error("Whoops, got exception on line #26:" + ae.toString()); - if(obtained instanceof Throwable) { - ae.addSuppressed((Throwable) obtained); - } - throw ae; - } - } - - { - // mutation/insert.yaml line #30 - /* 3 */ - Long expected_ = 3L; - /* tbl.count() */ - logger.info("About to run line #30: tbl.count()"); - Object obtained = runOrCatch(tbl.count(), - new OptArgs() - ,conn); - try { - assertEquals(expected_, obtained); - logger.info("Finished running line #30"); - } catch (Throwable ae) { - logger.error("Whoops, got exception on line #30:" + ae.toString()); - if(obtained instanceof Throwable) { - ae.addSuppressed((Throwable) obtained); - } - throw ae; - } - } - - { - // mutation/insert.yaml line #34 - /* err('ReqlQueryLogicError', 'Durability option `wrong` unrecognized (options are "hard" and "soft").', [0]) */ - Err expected_ = err("ReqlQueryLogicError", "Durability option `wrong` unrecognized (options are \"hard\" and \"soft\").", r.array(0L)); - /* tbl.insert({'id':3, 'a':3}, durability='wrong') */ - logger.info("About to run line #34: tbl.insert(r.hashMap('id', 3L).with('a', 3L)).optArg('durability', 'wrong')"); - Object obtained = runOrCatch(tbl.insert(r.hashMap("id", 3L).with("a", 3L)).optArg("durability", "wrong"), - new OptArgs() - ,conn); - try { - assertEquals(expected_, obtained); - logger.info("Finished running line #34"); - } catch (Throwable ae) { - logger.error("Whoops, got exception on line #34:" + ae.toString()); - if(obtained instanceof Throwable) { - ae.addSuppressed((Throwable) obtained); - } - throw ae; - } - } - - { - // mutation/insert.yaml line #38 - /* 3 */ - Long expected_ = 3L; - /* tbl.count() */ - logger.info("About to run line #38: tbl.count()"); - Object obtained = runOrCatch(tbl.count(), - new OptArgs() - ,conn); - try { - assertEquals(expected_, obtained); - logger.info("Finished running line #38"); - } catch (Throwable ae) { - logger.error("Whoops, got exception on line #38:" + ae.toString()); - if(obtained instanceof Throwable) { - ae.addSuppressed((Throwable) obtained); - } - throw ae; - } - } - - { - // mutation/insert.yaml line #42 - /* {'deleted':1,'replaced':0,'unchanged':0,'errors':0,'skipped':0,'inserted':0} */ - Map expected_ = r.hashMap("deleted", 1L).with("replaced", 0L).with("unchanged", 0L).with("errors", 0L).with("skipped", 0L).with("inserted", 0L); - /* tbl.get(2).delete() */ - logger.info("About to run line #42: tbl.get(2L).delete()"); - Object obtained = runOrCatch(tbl.get(2L).delete(), - new OptArgs() - ,conn); - try { - assertEquals(expected_, obtained); - logger.info("Finished running line #42"); - } catch (Throwable ae) { - logger.error("Whoops, got exception on line #42:" + ae.toString()); - if(obtained instanceof Throwable) { - ae.addSuppressed((Throwable) obtained); - } - throw ae; - } - } - - { - // mutation/insert.yaml line #46 - /* {'deleted':0,'replaced':0,'unchanged':0,'errors':0,'skipped':0,'inserted':2} */ - Map expected_ = r.hashMap("deleted", 0L).with("replaced", 0L).with("unchanged", 0L).with("errors", 0L).with("skipped", 0L).with("inserted", 2L); - /* tbl.insert([{'id':2,'a':2}, {'id':3,'a':3}]) */ - logger.info("About to run line #46: tbl.insert(r.array(r.hashMap('id', 2L).with('a', 2L), r.hashMap('id', 3L).with('a', 3L)))"); - Object obtained = runOrCatch(tbl.insert(r.array(r.hashMap("id", 2L).with("a", 2L), r.hashMap("id", 3L).with("a", 3L))), - new OptArgs() - ,conn); - try { - assertEquals(expected_, obtained); - logger.info("Finished running line #46"); - } catch (Throwable ae) { - logger.error("Whoops, got exception on line #46:" + ae.toString()); - if(obtained instanceof Throwable) { - ae.addSuppressed((Throwable) obtained); - } - throw ae; - } - } - - { - // mutation/insert.yaml line #50 - /* {'deleted':0,'replaced':0,'unchanged':0,'errors':0,'skipped':0,'inserted':4} */ - Map expected_ = r.hashMap("deleted", 0L).with("replaced", 0L).with("unchanged", 0L).with("errors", 0L).with("skipped", 0L).with("inserted", 4L); - /* tbl2.insert(tbl) */ - logger.info("About to run line #50: tbl2.insert(tbl)"); - Object obtained = runOrCatch(tbl2.insert(tbl), - new OptArgs() - ,conn); - try { - assertEquals(expected_, obtained); - logger.info("Finished running line #50"); - } catch (Throwable ae) { - logger.error("Whoops, got exception on line #50:" + ae.toString()); - if(obtained instanceof Throwable) { - ae.addSuppressed((Throwable) obtained); - } - throw ae; - } - } - - { - // mutation/insert.yaml line #54 - /* {'first_error':"Duplicate primary key `id`:\n{\n\t\"a\":\t2,\n\t\"id\":\t2\n}\n{\n\t\"b\":\t20,\n\t\"id\":\t2\n}",'deleted':0,'replaced':0,'unchanged':0,'errors':1,'skipped':0,'inserted':0} */ - Map expected_ = r.hashMap("first_error", "Duplicate primary key `id`:\n{\n\t\"a\":\t2,\n\t\"id\":\t2\n}\n{\n\t\"b\":\t20,\n\t\"id\":\t2\n}").with("deleted", 0L).with("replaced", 0L).with("unchanged", 0L).with("errors", 1L).with("skipped", 0L).with("inserted", 0L); - /* tbl.insert({'id':2,'b':20}) */ - logger.info("About to run line #54: tbl.insert(r.hashMap('id', 2L).with('b', 20L))"); - Object obtained = runOrCatch(tbl.insert(r.hashMap("id", 2L).with("b", 20L)), - new OptArgs() - ,conn); - try { - assertEquals(expected_, obtained); - logger.info("Finished running line #54"); - } catch (Throwable ae) { - logger.error("Whoops, got exception on line #54:" + ae.toString()); - if(obtained instanceof Throwable) { - ae.addSuppressed((Throwable) obtained); - } - throw ae; - } - } - - { - // mutation/insert.yaml line #58 - /* {'first_error':"Duplicate primary key `id`:\n{\n\t\"a\":\t2,\n\t\"id\":\t2\n}\n{\n\t\"b\":\t20,\n\t\"id\":\t2\n}",'deleted':0,'replaced':0,'unchanged':0,'errors':1,'skipped':0,'inserted':0} */ - Map expected_ = r.hashMap("first_error", "Duplicate primary key `id`:\n{\n\t\"a\":\t2,\n\t\"id\":\t2\n}\n{\n\t\"b\":\t20,\n\t\"id\":\t2\n}").with("deleted", 0L).with("replaced", 0L).with("unchanged", 0L).with("errors", 1L).with("skipped", 0L).with("inserted", 0L); - /* tbl.insert({'id':2,'b':20}, conflict='error') */ - logger.info("About to run line #58: tbl.insert(r.hashMap('id', 2L).with('b', 20L)).optArg('conflict', 'error')"); - Object obtained = runOrCatch(tbl.insert(r.hashMap("id", 2L).with("b", 20L)).optArg("conflict", "error"), - new OptArgs() - ,conn); - try { - assertEquals(expected_, obtained); - logger.info("Finished running line #58"); - } catch (Throwable ae) { - logger.error("Whoops, got exception on line #58:" + ae.toString()); - if(obtained instanceof Throwable) { - ae.addSuppressed((Throwable) obtained); - } - throw ae; - } - } - - { - // mutation/insert.yaml line #64 - /* {'deleted':0,'replaced':0,'unchanged':0,'errors':0,'skipped':0,'inserted':1} */ - Map expected_ = r.hashMap("deleted", 0L).with("replaced", 0L).with("unchanged", 0L).with("errors", 0L).with("skipped", 0L).with("inserted", 1L); - /* tbl.insert({'id':15,'b':20}, conflict='error') */ - logger.info("About to run line #64: tbl.insert(r.hashMap('id', 15L).with('b', 20L)).optArg('conflict', 'error')"); - Object obtained = runOrCatch(tbl.insert(r.hashMap("id", 15L).with("b", 20L)).optArg("conflict", "error"), - new OptArgs() - ,conn); - try { - assertEquals(expected_, obtained); - logger.info("Finished running line #64"); - } catch (Throwable ae) { - logger.error("Whoops, got exception on line #64:" + ae.toString()); - if(obtained instanceof Throwable) { - ae.addSuppressed((Throwable) obtained); - } - throw ae; - } - } - - { - // mutation/insert.yaml line #69 - /* {'id':15,'b':20} */ - Map expected_ = r.hashMap("id", 15L).with("b", 20L); - /* tbl.get(15) */ - logger.info("About to run line #69: tbl.get(15L)"); - Object obtained = runOrCatch(tbl.get(15L), - new OptArgs() - ,conn); - try { - assertEquals(expected_, obtained); - logger.info("Finished running line #69"); - } catch (Throwable ae) { - logger.error("Whoops, got exception on line #69:" + ae.toString()); - if(obtained instanceof Throwable) { - ae.addSuppressed((Throwable) obtained); - } - throw ae; - } - } - - { - // mutation/insert.yaml line #73 - /* {'deleted':0,'replaced':1,'unchanged':0,'errors':0,'skipped':0,'inserted':0} */ - Map expected_ = r.hashMap("deleted", 0L).with("replaced", 1L).with("unchanged", 0L).with("errors", 0L).with("skipped", 0L).with("inserted", 0L); - /* tbl.insert({'id':2,'b':20}, conflict='replace') */ - logger.info("About to run line #73: tbl.insert(r.hashMap('id', 2L).with('b', 20L)).optArg('conflict', 'replace')"); - Object obtained = runOrCatch(tbl.insert(r.hashMap("id", 2L).with("b", 20L)).optArg("conflict", "replace"), - new OptArgs() - ,conn); - try { - assertEquals(expected_, obtained); - logger.info("Finished running line #73"); - } catch (Throwable ae) { - logger.error("Whoops, got exception on line #73:" + ae.toString()); - if(obtained instanceof Throwable) { - ae.addSuppressed((Throwable) obtained); - } - throw ae; - } - } - - { - // mutation/insert.yaml line #78 - /* {'id':2,'b':20} */ - Map expected_ = r.hashMap("id", 2L).with("b", 20L); - /* tbl.get(2) */ - logger.info("About to run line #78: tbl.get(2L)"); - Object obtained = runOrCatch(tbl.get(2L), - new OptArgs() - ,conn); - try { - assertEquals(expected_, obtained); - logger.info("Finished running line #78"); - } catch (Throwable ae) { - logger.error("Whoops, got exception on line #78:" + ae.toString()); - if(obtained instanceof Throwable) { - ae.addSuppressed((Throwable) obtained); - } - throw ae; - } - } - - { - // mutation/insert.yaml line #82 - /* {'deleted':0,'replaced':0,'unchanged':0,'errors':0,'skipped':0,'inserted':1} */ - Map expected_ = r.hashMap("deleted", 0L).with("replaced", 0L).with("unchanged", 0L).with("errors", 0L).with("skipped", 0L).with("inserted", 1L); - /* tbl.insert({'id':20,'b':20}, conflict='replace') */ - logger.info("About to run line #82: tbl.insert(r.hashMap('id', 20L).with('b', 20L)).optArg('conflict', 'replace')"); - Object obtained = runOrCatch(tbl.insert(r.hashMap("id", 20L).with("b", 20L)).optArg("conflict", "replace"), - new OptArgs() - ,conn); - try { - assertEquals(expected_, obtained); - logger.info("Finished running line #82"); - } catch (Throwable ae) { - logger.error("Whoops, got exception on line #82:" + ae.toString()); - if(obtained instanceof Throwable) { - ae.addSuppressed((Throwable) obtained); - } - throw ae; - } - } - - { - // mutation/insert.yaml line #87 - /* {'id':20,'b':20} */ - Map expected_ = r.hashMap("id", 20L).with("b", 20L); - /* tbl.get(20) */ - logger.info("About to run line #87: tbl.get(20L)"); - Object obtained = runOrCatch(tbl.get(20L), - new OptArgs() - ,conn); - try { - assertEquals(expected_, obtained); - logger.info("Finished running line #87"); - } catch (Throwable ae) { - logger.error("Whoops, got exception on line #87:" + ae.toString()); - if(obtained instanceof Throwable) { - ae.addSuppressed((Throwable) obtained); - } - throw ae; - } - } - - { - // mutation/insert.yaml line #91 - /* {'deleted':0,'replaced':1,'unchanged':0,'errors':0,'skipped':0,'inserted':0} */ - Map expected_ = r.hashMap("deleted", 0L).with("replaced", 1L).with("unchanged", 0L).with("errors", 0L).with("skipped", 0L).with("inserted", 0L); - /* tbl.insert({'id':2,'c':30}, conflict='update') */ - logger.info("About to run line #91: tbl.insert(r.hashMap('id', 2L).with('c', 30L)).optArg('conflict', 'update')"); - Object obtained = runOrCatch(tbl.insert(r.hashMap("id", 2L).with("c", 30L)).optArg("conflict", "update"), - new OptArgs() - ,conn); - try { - assertEquals(expected_, obtained); - logger.info("Finished running line #91"); - } catch (Throwable ae) { - logger.error("Whoops, got exception on line #91:" + ae.toString()); - if(obtained instanceof Throwable) { - ae.addSuppressed((Throwable) obtained); - } - throw ae; - } - } - - { - // mutation/insert.yaml line #96 - /* {'id':2, 'b':20, 'c':30} */ - Map expected_ = r.hashMap("id", 2L).with("b", 20L).with("c", 30L); - /* tbl.get(2) */ - logger.info("About to run line #96: tbl.get(2L)"); - Object obtained = runOrCatch(tbl.get(2L), - new OptArgs() - ,conn); - try { - assertEquals(expected_, obtained); - logger.info("Finished running line #96"); - } catch (Throwable ae) { - logger.error("Whoops, got exception on line #96:" + ae.toString()); - if(obtained instanceof Throwable) { - ae.addSuppressed((Throwable) obtained); - } - throw ae; - } - } - - { - // mutation/insert.yaml line #100 - /* {'deleted':0,'replaced':0,'unchanged':0,'errors':0,'skipped':0,'inserted':1} */ - Map expected_ = r.hashMap("deleted", 0L).with("replaced", 0L).with("unchanged", 0L).with("errors", 0L).with("skipped", 0L).with("inserted", 1L); - /* tbl.insert({'id':30,'b':20}, conflict='update') */ - logger.info("About to run line #100: tbl.insert(r.hashMap('id', 30L).with('b', 20L)).optArg('conflict', 'update')"); - Object obtained = runOrCatch(tbl.insert(r.hashMap("id", 30L).with("b", 20L)).optArg("conflict", "update"), - new OptArgs() - ,conn); - try { - assertEquals(expected_, obtained); - logger.info("Finished running line #100"); - } catch (Throwable ae) { - logger.error("Whoops, got exception on line #100:" + ae.toString()); - if(obtained instanceof Throwable) { - ae.addSuppressed((Throwable) obtained); - } - throw ae; - } - } - - { - // mutation/insert.yaml line #105 - /* {'id':30,'b':20} */ - Map expected_ = r.hashMap("id", 30L).with("b", 20L); - /* tbl.get(30) */ - logger.info("About to run line #105: tbl.get(30L)"); - Object obtained = runOrCatch(tbl.get(30L), - new OptArgs() - ,conn); - try { - assertEquals(expected_, obtained); - logger.info("Finished running line #105"); - } catch (Throwable ae) { - logger.error("Whoops, got exception on line #105:" + ae.toString()); - if(obtained instanceof Throwable) { - ae.addSuppressed((Throwable) obtained); - } - throw ae; - } - } - - { - // mutation/insert.yaml line #109 - /* err('ReqlQueryLogicError', 'Conflict option `wrong` unrecognized (options are "error", "replace" and "update").', [0]) */ - Err expected_ = err("ReqlQueryLogicError", "Conflict option `wrong` unrecognized (options are \"error\", \"replace\" and \"update\").", r.array(0L)); - /* tbl.insert({'id':3, 'a':3}, conflict='wrong') */ - logger.info("About to run line #109: tbl.insert(r.hashMap('id', 3L).with('a', 3L)).optArg('conflict', 'wrong')"); - Object obtained = runOrCatch(tbl.insert(r.hashMap("id", 3L).with("a", 3L)).optArg("conflict", "wrong"), - new OptArgs() - ,conn); - try { - assertEquals(expected_, obtained); - logger.info("Finished running line #109"); - } catch (Throwable ae) { - logger.error("Whoops, got exception on line #109:" + ae.toString()); - if(obtained instanceof Throwable) { - ae.addSuppressed((Throwable) obtained); - } - throw ae; - } - } - - // mutation/insert.yaml line #120 - // tblpkey = r.db('test').table('testpkey') - logger.info("Possibly executing: Table tblpkey = (Table) (r.db('test').table('testpkey'));"); - Table tblpkey = (Table) (r.db("test").table("testpkey")); - - { - // mutation/insert.yaml line #115 - /* partial({'tables_created':1}) */ - Partial expected_ = partial(r.hashMap("tables_created", 1L)); - /* r.db('test').table_create('testpkey', primary_key='foo') */ - logger.info("About to run line #115: r.db('test').tableCreate('testpkey').optArg('primary_key', 'foo')"); - Object obtained = runOrCatch(r.db("test").tableCreate("testpkey").optArg("primary_key", "foo"), - new OptArgs() - ,conn); - try { - assertEquals(expected_, obtained); - logger.info("Finished running line #115"); - } catch (Throwable ae) { - logger.error("Whoops, got exception on line #115:" + ae.toString()); - if(obtained instanceof Throwable) { - ae.addSuppressed((Throwable) obtained); - } - throw ae; - } - } - - { - // mutation/insert.yaml line #122 - /* {'deleted':0,'replaced':0,'generated_keys':arrlen(1,uuid()),'unchanged':0,'errors':0,'skipped':0,'inserted':1} */ - Map expected_ = r.hashMap("deleted", 0L).with("replaced", 0L).with("generated_keys", arrlen(1L, uuid())).with("unchanged", 0L).with("errors", 0L).with("skipped", 0L).with("inserted", 1L); - /* tblpkey.insert({}) */ - logger.info("About to run line #122: tblpkey.insert(r.hashMap())"); - Object obtained = runOrCatch(tblpkey.insert(r.hashMap()), - new OptArgs() - ,conn); - try { - assertEquals(expected_, obtained); - logger.info("Finished running line #122"); - } catch (Throwable ae) { - logger.error("Whoops, got exception on line #122:" + ae.toString()); - if(obtained instanceof Throwable) { - ae.addSuppressed((Throwable) obtained); - } - throw ae; - } - } - - { - // mutation/insert.yaml line #125 - /* [{'foo':uuid()}] */ - List expected_ = r.array(r.hashMap("foo", uuid())); - /* tblpkey */ - logger.info("About to run line #125: tblpkey"); - Object obtained = runOrCatch(tblpkey, - new OptArgs() - ,conn); - try { - assertEquals(expected_, obtained); - logger.info("Finished running line #125"); - } catch (Throwable ae) { - logger.error("Whoops, got exception on line #125:" + ae.toString()); - if(obtained instanceof Throwable) { - ae.addSuppressed((Throwable) obtained); - } - throw ae; - } - } - - { - // mutation/insert.yaml line #129 - /* {'deleted':0,'replaced':0,'generated_keys':arrlen(1,uuid()),'unchanged':0,'errors':0,'skipped':0,'inserted':1} */ - Map expected_ = r.hashMap("deleted", 0L).with("replaced", 0L).with("generated_keys", arrlen(1L, uuid())).with("unchanged", 0L).with("errors", 0L).with("skipped", 0L).with("inserted", 1L); - /* tblpkey.insert({'b':20}, conflict='replace') */ - logger.info("About to run line #129: tblpkey.insert(r.hashMap('b', 20L)).optArg('conflict', 'replace')"); - Object obtained = runOrCatch(tblpkey.insert(r.hashMap("b", 20L)).optArg("conflict", "replace"), - new OptArgs() - ,conn); - try { - assertEquals(expected_, obtained); - logger.info("Finished running line #129"); - } catch (Throwable ae) { - logger.error("Whoops, got exception on line #129:" + ae.toString()); - if(obtained instanceof Throwable) { - ae.addSuppressed((Throwable) obtained); - } - throw ae; - } - } - - { - // mutation/insert.yaml line #135 - /* {'deleted':0,'replaced':0,'generated_keys':arrlen(1,uuid()),'unchanged':0,'errors':0,'skipped':0,'inserted':1} */ - Map expected_ = r.hashMap("deleted", 0L).with("replaced", 0L).with("generated_keys", arrlen(1L, uuid())).with("unchanged", 0L).with("errors", 0L).with("skipped", 0L).with("inserted", 1L); - /* tblpkey.insert({'b':20}, conflict='update') */ - logger.info("About to run line #135: tblpkey.insert(r.hashMap('b', 20L)).optArg('conflict', 'update')"); - Object obtained = runOrCatch(tblpkey.insert(r.hashMap("b", 20L)).optArg("conflict", "update"), - new OptArgs() - ,conn); - try { - assertEquals(expected_, obtained); - logger.info("Finished running line #135"); - } catch (Throwable ae) { - logger.error("Whoops, got exception on line #135:" + ae.toString()); - if(obtained instanceof Throwable) { - ae.addSuppressed((Throwable) obtained); - } - throw ae; - } - } - - { - // mutation/insert.yaml line #140 - /* partial({'tables_dropped':1}) */ - Partial expected_ = partial(r.hashMap("tables_dropped", 1L)); - /* r.db('test').table_drop('testpkey') */ - logger.info("About to run line #140: r.db('test').tableDrop('testpkey')"); - Object obtained = runOrCatch(r.db("test").tableDrop("testpkey"), - new OptArgs() - ,conn); - try { - assertEquals(expected_, obtained); - logger.info("Finished running line #140"); - } catch (Throwable ae) { - logger.error("Whoops, got exception on line #140:" + ae.toString()); - if(obtained instanceof Throwable) { - ae.addSuppressed((Throwable) obtained); - } - throw ae; - } - } - - { - // mutation/insert.yaml line #144 - /* {'deleted':0,'replaced':0,'unchanged':0,'errors':0,'skipped':0,'inserted':7} */ - Map expected_ = r.hashMap("deleted", 0L).with("replaced", 0L).with("unchanged", 0L).with("errors", 0L).with("skipped", 0L).with("inserted", 7L); - /* tbl.for_each(lambda row: tbl2.insert(row.merge({'id':row['id'] + 100 })) ) */ - logger.info("About to run line #144: tbl.forEach(row -> tbl2.insert(row.merge(r.hashMap('id', row.bracket('id').add(100L)))))"); - Object obtained = runOrCatch(tbl.forEach(row -> tbl2.insert(row.merge(r.hashMap("id", row.bracket("id").add(100L))))), - new OptArgs() - ,conn); - try { - assertEquals(expected_, obtained); - logger.info("Finished running line #144"); - } catch (Throwable ae) { - logger.error("Whoops, got exception on line #144:" + ae.toString()); - if(obtained instanceof Throwable) { - ae.addSuppressed((Throwable) obtained); - } - throw ae; - } - } - - { - // mutation/insert.yaml line #150 - /* partial({'errors':1,'first_error':'`r.minval` and `r.maxval` cannot be written to disk.'}) */ - Partial expected_ = partial(r.hashMap("errors", 1L).with("first_error", "`r.minval` and `r.maxval` cannot be written to disk.")); - /* tbl.insert({'value':r.minval}) */ - logger.info("About to run line #150: tbl.insert(r.hashMap('value', r.minval()))"); - Object obtained = runOrCatch(tbl.insert(r.hashMap("value", r.minval())), - new OptArgs() - ,conn); - try { - assertEquals(expected_, obtained); - logger.info("Finished running line #150"); - } catch (Throwable ae) { - logger.error("Whoops, got exception on line #150:" + ae.toString()); - if(obtained instanceof Throwable) { - ae.addSuppressed((Throwable) obtained); - } - throw ae; - } - } - - { - // mutation/insert.yaml line #154 - /* partial({'errors':1,'first_error':'`r.minval` and `r.maxval` cannot be written to disk.'}) */ - Partial expected_ = partial(r.hashMap("errors", 1L).with("first_error", "`r.minval` and `r.maxval` cannot be written to disk.")); - /* tbl.insert({'value':r.maxval}) */ - logger.info("About to run line #154: tbl.insert(r.hashMap('value', r.maxval()))"); - Object obtained = runOrCatch(tbl.insert(r.hashMap("value", r.maxval())), - new OptArgs() - ,conn); - try { - assertEquals(expected_, obtained); - logger.info("Finished running line #154"); - } catch (Throwable ae) { - logger.error("Whoops, got exception on line #154:" + ae.toString()); - if(obtained instanceof Throwable) { - ae.addSuppressed((Throwable) obtained); - } - throw ae; - } - } - - { - // mutation/insert.yaml line #159 - /* partial({'changes':[{'old_val': None, 'new_val': {'id': 100+i, 'ordered-num': i}} for i in range(1,100)] }) */ - Partial expected_ = partial(r.hashMap("changes", LongStream.range(1L, 100L).boxed().map(i -> r.hashMap("old_val", null).with("new_val", r.hashMap("id", 100L + i).with("ordered-num", i))).collect(Collectors.toList()))); - /* tbl.insert([{'id':100+i, 'ordered-num':i} for i in range(1,100)], return_changes="always") */ - logger.info("About to run line #159: tbl.insert(LongStream.range(1L, 100L).boxed().map(i -> r.hashMap('id', r.add(100L, i)).with('ordered-num', i)).collect(Collectors.toList())).optArg('return_changes', 'always')"); - Object obtained = runOrCatch(tbl.insert(LongStream.range(1L, 100L).boxed().map(i -> r.hashMap("id", r.add(100L, i)).with("ordered-num", i)).collect(Collectors.toList())).optArg("return_changes", "always"), - new OptArgs() - ,conn); - try { - assertEquals(expected_, obtained); - logger.info("Finished running line #159"); - } catch (Throwable ae) { - logger.error("Whoops, got exception on line #159:" + ae.toString()); - if(obtained instanceof Throwable) { - ae.addSuppressed((Throwable) obtained); - } - throw ae; - } - } - - { - // mutation/insert.yaml line #163 - /* partial({'changes':[{'old_val': None, 'new_val': {'id': [1,"blah", 200+i], 'ordered-num': i}} for i in range(1,100)] }) */ - Partial expected_ = partial(r.hashMap("changes", LongStream.range(1L, 100L).boxed().map(i -> r.hashMap("old_val", null).with("new_val", r.hashMap("id", r.array(1L, "blah", 200L + i)).with("ordered-num", i))).collect(Collectors.toList()))); - /* tbl.insert([{'id':[1, "blah", 200+i], 'ordered-num':i} for i in range(1,100)], return_changes="always") */ - logger.info("About to run line #163: tbl.insert(LongStream.range(1L, 100L).boxed().map(i -> r.hashMap('id', r.array(1L, 'blah', r.add(200L, i))).with('ordered-num', i)).collect(Collectors.toList())).optArg('return_changes', 'always')"); - Object obtained = runOrCatch(tbl.insert(LongStream.range(1L, 100L).boxed().map(i -> r.hashMap("id", r.array(1L, "blah", r.add(200L, i))).with("ordered-num", i)).collect(Collectors.toList())).optArg("return_changes", "always"), - new OptArgs() - ,conn); - try { - assertEquals(expected_, obtained); - logger.info("Finished running line #163"); - } catch (Throwable ae) { - logger.error("Whoops, got exception on line #163:" + ae.toString()); - if(obtained instanceof Throwable) { - ae.addSuppressed((Throwable) obtained); - } - throw ae; - } - } - - { - // mutation/insert.yaml line #167 - /* partial({'changes':[{'old_val': None, 'new_val': {'id': [1,"blah", 300+i], 'ordered-num': i}} for i in range(1,100)] }) */ - Partial expected_ = partial(r.hashMap("changes", LongStream.range(1L, 100L).boxed().map(i -> r.hashMap("old_val", null).with("new_val", r.hashMap("id", r.array(1L, "blah", 300L + i)).with("ordered-num", i))).collect(Collectors.toList()))); - /* tbl.insert([{'id':[1, "blah", 300+i], 'ordered-num':i} for i in range(1,100)], return_changes=true) */ - logger.info("About to run line #167: tbl.insert(LongStream.range(1L, 100L).boxed().map(i -> r.hashMap('id', r.array(1L, 'blah', r.add(300L, i))).with('ordered-num', i)).collect(Collectors.toList())).optArg('return_changes', true)"); - Object obtained = runOrCatch(tbl.insert(LongStream.range(1L, 100L).boxed().map(i -> r.hashMap("id", r.array(1L, "blah", r.add(300L, i))).with("ordered-num", i)).collect(Collectors.toList())).optArg("return_changes", true), - new OptArgs() - ,conn); - try { - assertEquals(expected_, obtained); - logger.info("Finished running line #167"); - } catch (Throwable ae) { - logger.error("Whoops, got exception on line #167:" + ae.toString()); - if(obtained instanceof Throwable) { - ae.addSuppressed((Throwable) obtained); - } - throw ae; - } - } - - { - // mutation/insert.yaml line #175 - /* partial({'changes':[]}) */ - Partial expected_ = partial(r.hashMap("changes", r.array())); - /* tbl.insert([{'id':100 + i, 'ordered-num':i} for i in range(1,100)], return_changes=true) */ - logger.info("About to run line #175: tbl.insert(LongStream.range(1L, 100L).boxed().map(i -> r.hashMap('id', r.add(100L, i)).with('ordered-num', i)).collect(Collectors.toList())).optArg('return_changes', true)"); - Object obtained = runOrCatch(tbl.insert(LongStream.range(1L, 100L).boxed().map(i -> r.hashMap("id", r.add(100L, i)).with("ordered-num", i)).collect(Collectors.toList())).optArg("return_changes", true), - new OptArgs() - ,conn); - try { - assertEquals(expected_, obtained); - logger.info("Finished running line #175"); - } catch (Throwable ae) { - logger.error("Whoops, got exception on line #175:" + ae.toString()); - if(obtained instanceof Throwable) { - ae.addSuppressed((Throwable) obtained); - } - throw ae; - } - } - - { - // mutation/insert.yaml line #178 - /* partial({'changes': [{'old_val': None, 'new_val': None, 'error': '`r.minval` and `r.maxval` cannot be written to disk.'}]}) */ - Partial expected_ = partial(r.hashMap("changes", r.array(r.hashMap("old_val", null).with("new_val", null).with("error", "`r.minval` and `r.maxval` cannot be written to disk.")))); - /* tbl.insert({'a':r.minval}, return_changes="always") */ - logger.info("About to run line #178: tbl.insert(r.hashMap('a', r.minval())).optArg('return_changes', 'always')"); - Object obtained = runOrCatch(tbl.insert(r.hashMap("a", r.minval())).optArg("return_changes", "always"), - new OptArgs() - ,conn); - try { - assertEquals(expected_, obtained); - logger.info("Finished running line #178"); - } catch (Throwable ae) { - logger.error("Whoops, got exception on line #178:" + ae.toString()); - if(obtained instanceof Throwable) { - ae.addSuppressed((Throwable) obtained); - } - throw ae; - } - } - - { - // mutation/insert.yaml line #184 - /* partial({'inserted':1}) */ - Partial expected_ = partial(r.hashMap("inserted", 1L)); - /* tbl.insert({'id':42, 'foo':1, 'bar':1}) */ - logger.info("About to run line #184: tbl.insert(r.hashMap('id', 42L).with('foo', 1L).with('bar', 1L))"); - Object obtained = runOrCatch(tbl.insert(r.hashMap("id", 42L).with("foo", 1L).with("bar", 1L)), - new OptArgs() - ,conn); - try { - assertEquals(expected_, obtained); - logger.info("Finished running line #184"); - } catch (Throwable ae) { - logger.error("Whoops, got exception on line #184:" + ae.toString()); - if(obtained instanceof Throwable) { - ae.addSuppressed((Throwable) obtained); - } - throw ae; - } - } - - { - // mutation/insert.yaml line #186 - /* partial({'replaced':1}) */ - Partial expected_ = partial(r.hashMap("replaced", 1L)); - /* tbl.insert({'id':42, 'foo':5, 'bar':5}, conflict=lambda id, old_row, new_row: old_row.merge(new_row.pluck("bar"))) */ - logger.info("About to run line #186: tbl.insert(r.hashMap('id', 42L).with('foo', 5L).with('bar', 5L)).optArg('conflict', (id, old_row, new_row) -> old_row.merge(new_row.pluck('bar')))"); - Object obtained = runOrCatch(tbl.insert(r.hashMap("id", 42L).with("foo", 5L).with("bar", 5L)).optArg("conflict", (id, old_row, new_row) -> old_row.merge(new_row.pluck("bar"))), - new OptArgs() - ,conn); - try { - assertEquals(expected_, obtained); - logger.info("Finished running line #186"); - } catch (Throwable ae) { - logger.error("Whoops, got exception on line #186:" + ae.toString()); - if(obtained instanceof Throwable) { - ae.addSuppressed((Throwable) obtained); - } - throw ae; - } - } - - { - // mutation/insert.yaml line #188 - /* {'id':42, 'foo':1, 'bar':5} */ - Map expected_ = r.hashMap("id", 42L).with("foo", 1L).with("bar", 5L); - /* tbl.get(42) */ - logger.info("About to run line #188: tbl.get(42L)"); - Object obtained = runOrCatch(tbl.get(42L), - new OptArgs() - ,conn); - try { - assertEquals(expected_, obtained); - logger.info("Finished running line #188"); - } catch (Throwable ae) { - logger.error("Whoops, got exception on line #188:" + ae.toString()); - if(obtained instanceof Throwable) { - ae.addSuppressed((Throwable) obtained); - } - throw ae; - } - } - - { - // mutation/insert.yaml line #200 - /* partial({'first_error': 'Inserted value must be an OBJECT (got NUMBER):\n2'}) */ - Partial expected_ = partial(r.hashMap("first_error", "Inserted value must be an OBJECT (got NUMBER):\n2")); - /* tbl.insert({'id':42, 'foo':1, 'bar':1}, conflict=lambda a,b,c: 2) */ - logger.info("About to run line #200: tbl.insert(r.hashMap('id', 42L).with('foo', 1L).with('bar', 1L)).optArg('conflict', (a, b, c) -> 2L)"); - Object obtained = runOrCatch(tbl.insert(r.hashMap("id", 42L).with("foo", 1L).with("bar", 1L)).optArg("conflict", (a, b, c) -> 2L), - new OptArgs() - ,conn); - try { - assertEquals(expected_, obtained); - logger.info("Finished running line #200"); - } catch (Throwable ae) { - logger.error("Whoops, got exception on line #200:" + ae.toString()); - if(obtained instanceof Throwable) { - ae.addSuppressed((Throwable) obtained); - } - throw ae; - } - } - - { - // mutation/insert.yaml line #204 - /* err("ReqlQueryLogicError", "The conflict function passed to `insert` should expect 3 arguments.") */ - Err expected_ = err("ReqlQueryLogicError", "The conflict function passed to `insert` should expect 3 arguments."); - /* tbl.insert({'id':42}, conflict=lambda a,b: a) */ - logger.info("About to run line #204: tbl.insert(r.hashMap('id', 42L)).optArg('conflict', (a, b) -> a)"); - Object obtained = runOrCatch(tbl.insert(r.hashMap("id", 42L)).optArg("conflict", (a, b) -> a), - new OptArgs() - ,conn); - try { - assertEquals(expected_, obtained); - logger.info("Finished running line #204"); - } catch (Throwable ae) { - logger.error("Whoops, got exception on line #204:" + ae.toString()); - if(obtained instanceof Throwable) { - ae.addSuppressed((Throwable) obtained); - } - throw ae; - } - } - - { - // mutation/insert.yaml line #208 - /* err("ReqlQueryLogicError", "The conflict function passed to `insert` must be deterministic.") */ - Err expected_ = err("ReqlQueryLogicError", "The conflict function passed to `insert` must be deterministic."); - /* tbl.insert({'id':42}, conflict=lambda a,b,c: tbl.get(42)) */ - logger.info("About to run line #208: tbl.insert(r.hashMap('id', 42L)).optArg('conflict', (a, b, c) -> tbl.get(42L))"); - Object obtained = runOrCatch(tbl.insert(r.hashMap("id", 42L)).optArg("conflict", (a, b, c) -> tbl.get(42L)), - new OptArgs() - ,conn); - try { - assertEquals(expected_, obtained); - logger.info("Finished running line #208"); - } catch (Throwable ae) { - logger.error("Whoops, got exception on line #208:" + ae.toString()); - if(obtained instanceof Throwable) { - ae.addSuppressed((Throwable) obtained); - } - throw ae; - } - } - - { - // mutation/insert.yaml line #211 - /* partial({'replaced': 1}) */ - Partial expected_ = partial(r.hashMap("replaced", 1L)); - /* tbl.insert({'id':42}, conflict=lambda a,b,c: {'id':42, 'num':'424'}) */ - logger.info("About to run line #211: tbl.insert(r.hashMap('id', 42L)).optArg('conflict', (a, b, c) -> r.hashMap('id', 42L).with('num', '424'))"); - Object obtained = runOrCatch(tbl.insert(r.hashMap("id", 42L)).optArg("conflict", (a, b, c) -> r.hashMap("id", 42L).with("num", "424")), - new OptArgs() - ,conn); - try { - assertEquals(expected_, obtained); - logger.info("Finished running line #211"); - } catch (Throwable ae) { - logger.error("Whoops, got exception on line #211:" + ae.toString()); - if(obtained instanceof Throwable) { - ae.addSuppressed((Throwable) obtained); - } - throw ae; - } - } - - { - // mutation/insert.yaml line #213 - /* {'id':42, 'num':'424'} */ - Map expected_ = r.hashMap("id", 42L).with("num", "424"); - /* tbl.get(42) */ - logger.info("About to run line #213: tbl.get(42L)"); - Object obtained = runOrCatch(tbl.get(42L), - new OptArgs() - ,conn); - try { - assertEquals(expected_, obtained); - logger.info("Finished running line #213"); - } catch (Throwable ae) { - logger.error("Whoops, got exception on line #213:" + ae.toString()); - if(obtained instanceof Throwable) { - ae.addSuppressed((Throwable) obtained); - } - throw ae; - } - } - - { - // mutation/insert.yaml line #217 - /* err('ReqlQueryLogicError','Cannot convert `r.minval` to JSON.') */ - Err expected_ = err("ReqlQueryLogicError", "Cannot convert `r.minval` to JSON."); - /* r.minval */ - logger.info("About to run line #217: r.minval()"); - Object obtained = runOrCatch(r.minval(), - new OptArgs() - ,conn); - try { - assertEquals(expected_, obtained); - logger.info("Finished running line #217"); - } catch (Throwable ae) { - logger.error("Whoops, got exception on line #217:" + ae.toString()); - if(obtained instanceof Throwable) { - ae.addSuppressed((Throwable) obtained); - } - throw ae; - } - } - - { - // mutation/insert.yaml line #220 - /* err('ReqlQueryLogicError','Cannot convert `r.maxval` to JSON.') */ - Err expected_ = err("ReqlQueryLogicError", "Cannot convert `r.maxval` to JSON."); - /* r.maxval */ - logger.info("About to run line #220: r.maxval()"); - Object obtained = runOrCatch(r.maxval(), - new OptArgs() - ,conn); - try { - assertEquals(expected_, obtained); - logger.info("Finished running line #220"); - } catch (Throwable ae) { - logger.error("Whoops, got exception on line #220:" + ae.toString()); - if(obtained instanceof Throwable) { - ae.addSuppressed((Throwable) obtained); - } - throw ae; - } - } - - { - // mutation/insert.yaml line #224 - /* partial({'tables_dropped':1}) */ - Partial expected_ = partial(r.hashMap("tables_dropped", 1L)); - /* r.db('test').table_drop('test2') */ - logger.info("About to run line #224: r.db('test').tableDrop('test2')"); - Object obtained = runOrCatch(r.db("test").tableDrop("test2"), - new OptArgs() - ,conn); - try { - assertEquals(expected_, obtained); - logger.info("Finished running line #224"); - } catch (Throwable ae) { - logger.error("Whoops, got exception on line #224:" + ae.toString()); - if(obtained instanceof Throwable) { - ae.addSuppressed((Throwable) obtained); - } - throw ae; - } - } - } -} diff --git a/drivers/java/src/test/java/com/rethinkdb/gen/MutationSync.java b/drivers/java/src/test/java/com/rethinkdb/gen/MutationSync.java deleted file mode 100644 index 38b7e107e16..00000000000 --- a/drivers/java/src/test/java/com/rethinkdb/gen/MutationSync.java +++ /dev/null @@ -1,320 +0,0 @@ -// Autogenerated by convert_tests.py and process_polyglot.py. -// Do not edit this file directly. -// The template for this file is located at: -// ../../../../../../../templates/Test.java -package com.rethinkdb.gen; - -import com.rethinkdb.RethinkDB; -import com.rethinkdb.gen.exc.*; -import com.rethinkdb.gen.ast.*; -import com.rethinkdb.ast.ReqlAst; -import com.rethinkdb.model.MapObject; -import com.rethinkdb.model.OptArgs; -import com.rethinkdb.net.Connection; -import com.rethinkdb.net.Cursor; -import junit.framework.TestCase; -import static org.junit.Assert.assertEquals; -import static org.junit.Assert.assertArrayEquals; -import org.slf4j.Logger; -import org.slf4j.LoggerFactory; - -import org.junit.*; -import org.junit.rules.ExpectedException; - -import java.util.Arrays; -import java.util.ArrayList; -import java.util.List; -import java.util.Map; -import java.util.Set; -import java.time.OffsetDateTime; -import java.time.ZoneOffset; -import java.time.Instant; -import java.util.stream.LongStream; -import java.util.stream.Collectors; -import java.util.stream.Stream; -import java.util.concurrent.TimeoutException; -import java.util.regex.Pattern; -import java.util.Collections; -import java.nio.charset.StandardCharsets; - -import static com.rethinkdb.TestingCommon.*; -import com.rethinkdb.TestingFramework; - -public class MutationSync { - // Tests syncing tables - Logger logger = LoggerFactory.getLogger(MutationSync.class); - public static final RethinkDB r = RethinkDB.r; - - Connection conn; - - @Before - public void setUp() throws Exception { - logger.info("Setting up."); - conn = TestingFramework.createConnection(); - try { - r.dbCreate("test").run(conn); - r.db("test").wait_().run(conn); - }catch (Exception e){} - } - - @After - public void tearDown() throws Exception { - logger.info("Tearing down."); - r.db("rethinkdb").table("_debug_scratch").delete().run(conn); - if(!conn.isOpen()){ - conn.close(); - conn = TestingFramework.createConnection(); - } - r.dbDrop("test").run(conn); - conn.close(false); - } - - // Autogenerated tests below - - @Test(timeout=120000) - public void test() throws Exception { - - { - // mutation/sync.yaml line #5 - /* partial({'tables_created':1}) */ - Partial expected_ = partial(r.hashMap("tables_created", 1L)); - /* r.db('test').table_create('test1') */ - logger.info("About to run line #5: r.db('test').tableCreate('test1')"); - Object obtained = runOrCatch(r.db("test").tableCreate("test1"), - new OptArgs() - ,conn); - try { - assertEquals(expected_, obtained); - logger.info("Finished running line #5"); - } catch (Throwable ae) { - logger.error("Whoops, got exception on line #5:" + ae.toString()); - if(obtained instanceof Throwable) { - ae.addSuppressed((Throwable) obtained); - } - throw ae; - } - } - - { - // mutation/sync.yaml line #7 - /* partial({'tables_created':1}) */ - Partial expected_ = partial(r.hashMap("tables_created", 1L)); - /* r.db('test').table_create('test1soft') */ - logger.info("About to run line #7: r.db('test').tableCreate('test1soft')"); - Object obtained = runOrCatch(r.db("test").tableCreate("test1soft"), - new OptArgs() - ,conn); - try { - assertEquals(expected_, obtained); - logger.info("Finished running line #7"); - } catch (Throwable ae) { - logger.error("Whoops, got exception on line #7:" + ae.toString()); - if(obtained instanceof Throwable) { - ae.addSuppressed((Throwable) obtained); - } - throw ae; - } - } - - { - // mutation/sync.yaml line #9 - /* {'skipped':0, 'deleted':0, 'unchanged':0, 'errors':0, 'replaced':1, 'inserted':0} */ - Map expected_ = r.hashMap("skipped", 0L).with("deleted", 0L).with("unchanged", 0L).with("errors", 0L).with("replaced", 1L).with("inserted", 0L); - /* r.db('test').table('test1soft').config().update({'durability':'soft'}) */ - logger.info("About to run line #9: r.db('test').table('test1soft').config().update(r.hashMap('durability', 'soft'))"); - Object obtained = runOrCatch(r.db("test").table("test1soft").config().update(r.hashMap("durability", "soft")), - new OptArgs() - ,conn); - try { - assertEquals(expected_, obtained); - logger.info("Finished running line #9"); - } catch (Throwable ae) { - logger.error("Whoops, got exception on line #9:" + ae.toString()); - if(obtained instanceof Throwable) { - ae.addSuppressed((Throwable) obtained); - } - throw ae; - } - } - - // mutation/sync.yaml line #11 - // tbl = r.db('test').table('test1') - logger.info("Possibly executing: Table tbl = (Table) (r.db('test').table('test1'));"); - Table tbl = (Table) (r.db("test").table("test1")); - - // mutation/sync.yaml line #12 - // tbl_soft = r.db('test').table('test1soft') - logger.info("Possibly executing: Table tbl_soft = (Table) (r.db('test').table('test1soft'));"); - Table tbl_soft = (Table) (r.db("test").table("test1soft")); - - { - // mutation/sync.yaml line #13 - /* partial({'created':1}) */ - Partial expected_ = partial(r.hashMap("created", 1L)); - /* tbl.index_create('x') */ - logger.info("About to run line #13: tbl.indexCreate('x')"); - Object obtained = runOrCatch(tbl.indexCreate("x"), - new OptArgs() - ,conn); - try { - assertEquals(expected_, obtained); - logger.info("Finished running line #13"); - } catch (Throwable ae) { - logger.error("Whoops, got exception on line #13:" + ae.toString()); - if(obtained instanceof Throwable) { - ae.addSuppressed((Throwable) obtained); - } - throw ae; - } - } - - { - // mutation/sync.yaml line #15 - /* [{'ready':True, 'index':'x'}] */ - List expected_ = r.array(r.hashMap("ready", true).with("index", "x")); - /* tbl.index_wait('x').pluck('index', 'ready') */ - logger.info("About to run line #15: tbl.indexWait('x').pluck('index', 'ready')"); - Object obtained = runOrCatch(tbl.indexWait("x").pluck("index", "ready"), - new OptArgs() - ,conn); - try { - assertEquals(expected_, obtained); - logger.info("Finished running line #15"); - } catch (Throwable ae) { - logger.error("Whoops, got exception on line #15:" + ae.toString()); - if(obtained instanceof Throwable) { - ae.addSuppressed((Throwable) obtained); - } - throw ae; - } - } - - { - // mutation/sync.yaml line #19 - /* {'synced':1} */ - Map expected_ = r.hashMap("synced", 1L); - /* tbl.sync() */ - logger.info("About to run line #19: tbl.sync()"); - Object obtained = runOrCatch(tbl.sync(), - new OptArgs() - ,conn); - try { - assertEquals(expected_, obtained); - logger.info("Finished running line #19"); - } catch (Throwable ae) { - logger.error("Whoops, got exception on line #19:" + ae.toString()); - if(obtained instanceof Throwable) { - ae.addSuppressed((Throwable) obtained); - } - throw ae; - } - } - - { - // mutation/sync.yaml line #21 - /* {'synced':1} */ - Map expected_ = r.hashMap("synced", 1L); - /* tbl_soft.sync() */ - logger.info("About to run line #21: tbl_soft.sync()"); - Object obtained = runOrCatch(tbl_soft.sync(), - new OptArgs() - ,conn); - try { - assertEquals(expected_, obtained); - logger.info("Finished running line #21"); - } catch (Throwable ae) { - logger.error("Whoops, got exception on line #21:" + ae.toString()); - if(obtained instanceof Throwable) { - ae.addSuppressed((Throwable) obtained); - } - throw ae; - } - } - - { - // mutation/sync.yaml line #23 - /* {'synced':1} */ - Map expected_ = r.hashMap("synced", 1L); - /* tbl.sync() */ - logger.info("About to run line #23: tbl.sync()"); - Object obtained = runOrCatch(tbl.sync(), - new OptArgs() - .with("durability", "soft") - ,conn); - try { - assertEquals(expected_, obtained); - logger.info("Finished running line #23"); - } catch (Throwable ae) { - logger.error("Whoops, got exception on line #23:" + ae.toString()); - if(obtained instanceof Throwable) { - ae.addSuppressed((Throwable) obtained); - } - throw ae; - } - } - - { - // mutation/sync.yaml line #27 - /* {'synced':1} */ - Map expected_ = r.hashMap("synced", 1L); - /* tbl.sync() */ - logger.info("About to run line #27: tbl.sync()"); - Object obtained = runOrCatch(tbl.sync(), - new OptArgs() - .with("durability", "hard") - ,conn); - try { - assertEquals(expected_, obtained); - logger.info("Finished running line #27"); - } catch (Throwable ae) { - logger.error("Whoops, got exception on line #27:" + ae.toString()); - if(obtained instanceof Throwable) { - ae.addSuppressed((Throwable) obtained); - } - throw ae; - } - } - - { - // mutation/sync.yaml line #48 - /* partial({'tables_dropped':1}) */ - Partial expected_ = partial(r.hashMap("tables_dropped", 1L)); - /* r.db('test').table_drop('test1') */ - logger.info("About to run line #48: r.db('test').tableDrop('test1')"); - Object obtained = runOrCatch(r.db("test").tableDrop("test1"), - new OptArgs() - ,conn); - try { - assertEquals(expected_, obtained); - logger.info("Finished running line #48"); - } catch (Throwable ae) { - logger.error("Whoops, got exception on line #48:" + ae.toString()); - if(obtained instanceof Throwable) { - ae.addSuppressed((Throwable) obtained); - } - throw ae; - } - } - - { - // mutation/sync.yaml line #50 - /* partial({'tables_dropped':1}) */ - Partial expected_ = partial(r.hashMap("tables_dropped", 1L)); - /* r.db('test').table_drop('test1soft') */ - logger.info("About to run line #50: r.db('test').tableDrop('test1soft')"); - Object obtained = runOrCatch(r.db("test").tableDrop("test1soft"), - new OptArgs() - ,conn); - try { - assertEquals(expected_, obtained); - logger.info("Finished running line #50"); - } catch (Throwable ae) { - logger.error("Whoops, got exception on line #50:" + ae.toString()); - if(obtained instanceof Throwable) { - ae.addSuppressed((Throwable) obtained); - } - throw ae; - } - } - } -} diff --git a/drivers/java/src/test/java/com/rethinkdb/gen/Polymorphism.java b/drivers/java/src/test/java/com/rethinkdb/gen/Polymorphism.java deleted file mode 100644 index 85cc9273fd1..00000000000 --- a/drivers/java/src/test/java/com/rethinkdb/gen/Polymorphism.java +++ /dev/null @@ -1,235 +0,0 @@ -// Autogenerated by convert_tests.py and process_polyglot.py. -// Do not edit this file directly. -// The template for this file is located at: -// ../../../../../../../templates/Test.java -package com.rethinkdb.gen; - -import com.rethinkdb.RethinkDB; -import com.rethinkdb.gen.exc.*; -import com.rethinkdb.gen.ast.*; -import com.rethinkdb.ast.ReqlAst; -import com.rethinkdb.model.MapObject; -import com.rethinkdb.model.OptArgs; -import com.rethinkdb.net.Connection; -import com.rethinkdb.net.Cursor; -import junit.framework.TestCase; -import static org.junit.Assert.assertEquals; -import static org.junit.Assert.assertArrayEquals; -import org.slf4j.Logger; -import org.slf4j.LoggerFactory; - -import org.junit.*; -import org.junit.rules.ExpectedException; - -import java.util.Arrays; -import java.util.ArrayList; -import java.util.List; -import java.util.Map; -import java.util.Set; -import java.time.OffsetDateTime; -import java.time.ZoneOffset; -import java.time.Instant; -import java.util.stream.LongStream; -import java.util.stream.Collectors; -import java.util.stream.Stream; -import java.util.concurrent.TimeoutException; -import java.util.regex.Pattern; -import java.util.Collections; -import java.nio.charset.StandardCharsets; - -import static com.rethinkdb.TestingCommon.*; -import com.rethinkdb.TestingFramework; - -public class Polymorphism { - // Tests that manipulation data in tables - Logger logger = LoggerFactory.getLogger(Polymorphism.class); - public static final RethinkDB r = RethinkDB.r; - public static final Table tbl = r.db("test").table("tbl"); - - Connection conn; - - @Before - public void setUp() throws Exception { - logger.info("Setting up."); - conn = TestingFramework.createConnection(); - try { - r.dbCreate("test").run(conn); - r.db("test").wait_().run(conn); - }catch (Exception e){} - try { - r.db("test").tableCreate("tbl").run(conn); - r.db("test").table(tbl).wait_().run(conn); - }catch (Exception e){} - } - - @After - public void tearDown() throws Exception { - logger.info("Tearing down."); - r.db("rethinkdb").table("_debug_scratch").delete().run(conn); - if(!conn.isOpen()){ - conn.close(); - conn = TestingFramework.createConnection(); - } - r.db("test").tableDrop("tbl").run(conn); - r.dbDrop("test").run(conn); - conn.close(false); - } - - // Autogenerated tests below - - @Test(timeout=120000) - public void test() throws Exception { - - // polymorphism.yaml line #5 - // obj = r.expr({'id':0,'a':0}) - logger.info("Possibly executing: MakeObj obj = (MakeObj) (r.expr(r.hashMap('id', 0L).with('a', 0L)));"); - MakeObj obj = (MakeObj) (r.expr(r.hashMap("id", 0L).with("a", 0L))); - - { - // polymorphism.yaml line #7 - /* ({'deleted':0,'replaced':0,'unchanged':0,'errors':0,'skipped':0,'inserted':3}) */ - Map expected_ = r.hashMap("deleted", 0L).with("replaced", 0L).with("unchanged", 0L).with("errors", 0L).with("skipped", 0L).with("inserted", 3L); - /* tbl.insert([{'id':i, 'a':i} for i in xrange(3)]) */ - logger.info("About to run line #7: tbl.insert(LongStream.range(0, 3L).boxed().map(i -> r.hashMap('id', i).with('a', i)).collect(Collectors.toList()))"); - Object obtained = runOrCatch(tbl.insert(LongStream.range(0, 3L).boxed().map(i -> r.hashMap("id", i).with("a", i)).collect(Collectors.toList())), - new OptArgs() - ,conn); - try { - assertEquals(expected_, obtained); - logger.info("Finished running line #7"); - } catch (Throwable ae) { - logger.error("Whoops, got exception on line #7:" + ae.toString()); - if(obtained instanceof Throwable) { - ae.addSuppressed((Throwable) obtained); - } - throw ae; - } - } - - { - // polymorphism.yaml line #21 - /* ({'id':0,'c':1,'a':0}) */ - Map expected_ = r.hashMap("id", 0L).with("c", 1L).with("a", 0L); - /* tbl.merge({'c':1}).nth(0) */ - logger.info("About to run line #21: tbl.merge(r.hashMap('c', 1L)).nth(0L)"); - Object obtained = runOrCatch(tbl.merge(r.hashMap("c", 1L)).nth(0L), - new OptArgs() - ,conn); - try { - assertEquals(expected_, obtained); - logger.info("Finished running line #21"); - } catch (Throwable ae) { - logger.error("Whoops, got exception on line #21:" + ae.toString()); - if(obtained instanceof Throwable) { - ae.addSuppressed((Throwable) obtained); - } - throw ae; - } - } - - { - // polymorphism.yaml line #22 - /* ({'id':0,'c':1,'a':0}) */ - Map expected_ = r.hashMap("id", 0L).with("c", 1L).with("a", 0L); - /* obj.merge({'c':1}) */ - logger.info("About to run line #22: obj.merge(r.hashMap('c', 1L))"); - Object obtained = runOrCatch(obj.merge(r.hashMap("c", 1L)), - new OptArgs() - ,conn); - try { - assertEquals(expected_, obtained); - logger.info("Finished running line #22"); - } catch (Throwable ae) { - logger.error("Whoops, got exception on line #22:" + ae.toString()); - if(obtained instanceof Throwable) { - ae.addSuppressed((Throwable) obtained); - } - throw ae; - } - } - - { - // polymorphism.yaml line #26 - /* ({'id':0}) */ - Map expected_ = r.hashMap("id", 0L); - /* tbl.without('a').nth(0) */ - logger.info("About to run line #26: tbl.without('a').nth(0L)"); - Object obtained = runOrCatch(tbl.without("a").nth(0L), - new OptArgs() - ,conn); - try { - assertEquals(expected_, obtained); - logger.info("Finished running line #26"); - } catch (Throwable ae) { - logger.error("Whoops, got exception on line #26:" + ae.toString()); - if(obtained instanceof Throwable) { - ae.addSuppressed((Throwable) obtained); - } - throw ae; - } - } - - { - // polymorphism.yaml line #27 - /* ({'id':0}) */ - Map expected_ = r.hashMap("id", 0L); - /* obj.without('a') */ - logger.info("About to run line #27: obj.without('a')"); - Object obtained = runOrCatch(obj.without("a"), - new OptArgs() - ,conn); - try { - assertEquals(expected_, obtained); - logger.info("Finished running line #27"); - } catch (Throwable ae) { - logger.error("Whoops, got exception on line #27:" + ae.toString()); - if(obtained instanceof Throwable) { - ae.addSuppressed((Throwable) obtained); - } - throw ae; - } - } - - { - // polymorphism.yaml line #31 - /* ({'a':0}) */ - Map expected_ = r.hashMap("a", 0L); - /* tbl.pluck('a').nth(0) */ - logger.info("About to run line #31: tbl.pluck('a').nth(0L)"); - Object obtained = runOrCatch(tbl.pluck("a").nth(0L), - new OptArgs() - ,conn); - try { - assertEquals(expected_, obtained); - logger.info("Finished running line #31"); - } catch (Throwable ae) { - logger.error("Whoops, got exception on line #31:" + ae.toString()); - if(obtained instanceof Throwable) { - ae.addSuppressed((Throwable) obtained); - } - throw ae; - } - } - - { - // polymorphism.yaml line #32 - /* ({'a':0}) */ - Map expected_ = r.hashMap("a", 0L); - /* obj.pluck('a') */ - logger.info("About to run line #32: obj.pluck('a')"); - Object obtained = runOrCatch(obj.pluck("a"), - new OptArgs() - ,conn); - try { - assertEquals(expected_, obtained); - logger.info("Finished running line #32"); - } catch (Throwable ae) { - logger.error("Whoops, got exception on line #32:" + ae.toString()); - if(obtained instanceof Throwable) { - ae.addSuppressed((Throwable) obtained); - } - throw ae; - } - } - } -} diff --git a/drivers/java/src/test/java/com/rethinkdb/gen/Random.java b/drivers/java/src/test/java/com/rethinkdb/gen/Random.java deleted file mode 100644 index b629465c5eb..00000000000 --- a/drivers/java/src/test/java/com/rethinkdb/gen/Random.java +++ /dev/null @@ -1,1462 +0,0 @@ -// Autogenerated by convert_tests.py and process_polyglot.py. -// Do not edit this file directly. -// The template for this file is located at: -// ../../../../../../../templates/Test.java -package com.rethinkdb.gen; - -import com.rethinkdb.RethinkDB; -import com.rethinkdb.gen.exc.*; -import com.rethinkdb.gen.ast.*; -import com.rethinkdb.ast.ReqlAst; -import com.rethinkdb.model.MapObject; -import com.rethinkdb.model.OptArgs; -import com.rethinkdb.net.Connection; -import com.rethinkdb.net.Cursor; -import junit.framework.TestCase; -import static org.junit.Assert.assertEquals; -import static org.junit.Assert.assertArrayEquals; -import org.slf4j.Logger; -import org.slf4j.LoggerFactory; - -import org.junit.*; -import org.junit.rules.ExpectedException; - -import java.util.Arrays; -import java.util.ArrayList; -import java.util.List; -import java.util.Map; -import java.util.Set; -import java.time.OffsetDateTime; -import java.time.ZoneOffset; -import java.time.Instant; -import java.util.stream.LongStream; -import java.util.stream.Collectors; -import java.util.stream.Stream; -import java.util.concurrent.TimeoutException; -import java.util.regex.Pattern; -import java.util.Collections; -import java.nio.charset.StandardCharsets; - -import static com.rethinkdb.TestingCommon.*; -import com.rethinkdb.TestingFramework; - -public class Random { - // Tests randomization functions - Logger logger = LoggerFactory.getLogger(Random.class); - public static final RethinkDB r = RethinkDB.r; - - Connection conn; - - @Before - public void setUp() throws Exception { - logger.info("Setting up."); - conn = TestingFramework.createConnection(); - try { - r.dbCreate("test").run(conn); - r.db("test").wait_().run(conn); - }catch (Exception e){} - } - - @After - public void tearDown() throws Exception { - logger.info("Tearing down."); - r.db("rethinkdb").table("_debug_scratch").delete().run(conn); - if(!conn.isOpen()){ - conn.close(); - conn = TestingFramework.createConnection(); - } - r.dbDrop("test").run(conn); - conn.close(false); - } - - // Autogenerated tests below - - @Test(timeout=120000) - public void test() throws Exception { - - { - // random.yaml line #5 - /* 3 */ - Long expected_ = 3L; - /* r.expr([1,2,3]).sample(3).distinct().count() */ - logger.info("About to run line #5: r.expr(r.array(1L, 2L, 3L)).sample(3L).distinct().count()"); - Object obtained = runOrCatch(r.expr(r.array(1L, 2L, 3L)).sample(3L).distinct().count(), - new OptArgs() - ,conn); - try { - assertEquals(expected_, obtained); - logger.info("Finished running line #5"); - } catch (Throwable ae) { - logger.error("Whoops, got exception on line #5:" + ae.toString()); - if(obtained instanceof Throwable) { - ae.addSuppressed((Throwable) obtained); - } - throw ae; - } - } - - { - // random.yaml line #7 - /* 3 */ - Long expected_ = 3L; - /* r.expr([1,2,3]).sample(3).count() */ - logger.info("About to run line #7: r.expr(r.array(1L, 2L, 3L)).sample(3L).count()"); - Object obtained = runOrCatch(r.expr(r.array(1L, 2L, 3L)).sample(3L).count(), - new OptArgs() - ,conn); - try { - assertEquals(expected_, obtained); - logger.info("Finished running line #7"); - } catch (Throwable ae) { - logger.error("Whoops, got exception on line #7:" + ae.toString()); - if(obtained instanceof Throwable) { - ae.addSuppressed((Throwable) obtained); - } - throw ae; - } - } - - { - // random.yaml line #9 - /* 3 */ - Long expected_ = 3L; - /* r.expr([1,2,3,4,5,6]).sample(3).distinct().count() */ - logger.info("About to run line #9: r.expr(r.array(1L, 2L, 3L, 4L, 5L, 6L)).sample(3L).distinct().count()"); - Object obtained = runOrCatch(r.expr(r.array(1L, 2L, 3L, 4L, 5L, 6L)).sample(3L).distinct().count(), - new OptArgs() - ,conn); - try { - assertEquals(expected_, obtained); - logger.info("Finished running line #9"); - } catch (Throwable ae) { - logger.error("Whoops, got exception on line #9:" + ae.toString()); - if(obtained instanceof Throwable) { - ae.addSuppressed((Throwable) obtained); - } - throw ae; - } - } - - { - // random.yaml line #11 - /* 3 */ - Long expected_ = 3L; - /* r.expr([1,2,3]).sample(4).distinct().count() */ - logger.info("About to run line #11: r.expr(r.array(1L, 2L, 3L)).sample(4L).distinct().count()"); - Object obtained = runOrCatch(r.expr(r.array(1L, 2L, 3L)).sample(4L).distinct().count(), - new OptArgs() - ,conn); - try { - assertEquals(expected_, obtained); - logger.info("Finished running line #11"); - } catch (Throwable ae) { - logger.error("Whoops, got exception on line #11:" + ae.toString()); - if(obtained instanceof Throwable) { - ae.addSuppressed((Throwable) obtained); - } - throw ae; - } - } - - { - // random.yaml line #15 - /* err('ReqlQueryLogicError', 'Number of items to sample must be non-negative, got `-1`.', [0]) */ - Err expected_ = err("ReqlQueryLogicError", "Number of items to sample must be non-negative, got `-1`.", r.array(0L)); - /* r.expr([1,2,3]).sample(-1) */ - logger.info("About to run line #15: r.expr(r.array(1L, 2L, 3L)).sample(-1L)"); - Object obtained = runOrCatch(r.expr(r.array(1L, 2L, 3L)).sample(-1L), - new OptArgs() - ,conn); - try { - assertEquals(expected_, obtained); - logger.info("Finished running line #15"); - } catch (Throwable ae) { - logger.error("Whoops, got exception on line #15:" + ae.toString()); - if(obtained instanceof Throwable) { - ae.addSuppressed((Throwable) obtained); - } - throw ae; - } - } - - { - // random.yaml line #17 - /* err('ReqlQueryLogicError', 'Cannot convert NUMBER to SEQUENCE', [0]) */ - Err expected_ = err("ReqlQueryLogicError", "Cannot convert NUMBER to SEQUENCE", r.array(0L)); - /* r.expr(1).sample(1) */ - logger.info("About to run line #17: r.expr(1L).sample(1L)"); - Object obtained = runOrCatch(r.expr(1L).sample(1L), - new OptArgs() - ,conn); - try { - assertEquals(expected_, obtained); - logger.info("Finished running line #17"); - } catch (Throwable ae) { - logger.error("Whoops, got exception on line #17:" + ae.toString()); - if(obtained instanceof Throwable) { - ae.addSuppressed((Throwable) obtained); - } - throw ae; - } - } - - { - // random.yaml line #19 - /* err('ReqlQueryLogicError', 'Cannot convert OBJECT to SEQUENCE', [0]) */ - Err expected_ = err("ReqlQueryLogicError", "Cannot convert OBJECT to SEQUENCE", r.array(0L)); - /* r.expr({}).sample(1) */ - logger.info("About to run line #19: r.expr(r.hashMap()).sample(1L)"); - Object obtained = runOrCatch(r.expr(r.hashMap()).sample(1L), - new OptArgs() - ,conn); - try { - assertEquals(expected_, obtained); - logger.info("Finished running line #19"); - } catch (Throwable ae) { - logger.error("Whoops, got exception on line #19:" + ae.toString()); - if(obtained instanceof Throwable) { - ae.addSuppressed((Throwable) obtained); - } - throw ae; - } - } - - { - // random.yaml line #25 - /* True */ - Boolean expected_ = true; - /* r.random().do(lambda x:r.and_(x.ge(0), x.lt(1))) */ - logger.info("About to run line #25: r.random().do_(x -> r.and(x.ge(0L), x.lt(1L)))"); - Object obtained = runOrCatch(r.random().do_(x -> r.and(x.ge(0L), x.lt(1L))), - new OptArgs() - ,conn); - try { - assertEquals(expected_, obtained); - logger.info("Finished running line #25"); - } catch (Throwable ae) { - logger.error("Whoops, got exception on line #25:" + ae.toString()); - if(obtained instanceof Throwable) { - ae.addSuppressed((Throwable) obtained); - } - throw ae; - } - } - - { - // random.yaml line #26 - /* True */ - Boolean expected_ = true; - /* r.random(1, float=True).do(lambda x:r.and_(x.ge(0), x.lt(1))) */ - logger.info("About to run line #26: r.random(1L).optArg('float', true).do_(x -> r.and(x.ge(0L), x.lt(1L)))"); - Object obtained = runOrCatch(r.random(1L).optArg("float", true).do_(x -> r.and(x.ge(0L), x.lt(1L))), - new OptArgs() - ,conn); - try { - assertEquals(expected_, obtained); - logger.info("Finished running line #26"); - } catch (Throwable ae) { - logger.error("Whoops, got exception on line #26:" + ae.toString()); - if(obtained instanceof Throwable) { - ae.addSuppressed((Throwable) obtained); - } - throw ae; - } - } - - { - // random.yaml line #27 - /* True */ - Boolean expected_ = true; - /* r.random(0, 1, float=True).do(lambda x:r.and_(x.ge(0), x.lt(1))) */ - logger.info("About to run line #27: r.random(0L, 1L).optArg('float', true).do_(x -> r.and(x.ge(0L), x.lt(1L)))"); - Object obtained = runOrCatch(r.random(0L, 1L).optArg("float", true).do_(x -> r.and(x.ge(0L), x.lt(1L))), - new OptArgs() - ,conn); - try { - assertEquals(expected_, obtained); - logger.info("Finished running line #27"); - } catch (Throwable ae) { - logger.error("Whoops, got exception on line #27:" + ae.toString()); - if(obtained instanceof Throwable) { - ae.addSuppressed((Throwable) obtained); - } - throw ae; - } - } - - { - // random.yaml line #28 - /* True */ - Boolean expected_ = true; - /* r.random(1, 0, float=True).do(lambda x:r.and_(x.le(1), x.gt(0))) */ - logger.info("About to run line #28: r.random(1L, 0L).optArg('float', true).do_(x -> r.and(x.le(1L), x.gt(0L)))"); - Object obtained = runOrCatch(r.random(1L, 0L).optArg("float", true).do_(x -> r.and(x.le(1L), x.gt(0L))), - new OptArgs() - ,conn); - try { - assertEquals(expected_, obtained); - logger.info("Finished running line #28"); - } catch (Throwable ae) { - logger.error("Whoops, got exception on line #28:" + ae.toString()); - if(obtained instanceof Throwable) { - ae.addSuppressed((Throwable) obtained); - } - throw ae; - } - } - - { - // random.yaml line #29 - /* True */ - Boolean expected_ = true; - /* r.random(r.expr(0), 1, float=True).do(lambda x:r.and_(x.ge(0), x.lt(1))) */ - logger.info("About to run line #29: r.random(r.expr(0L), 1L).optArg('float', true).do_(x -> r.and(x.ge(0L), x.lt(1L)))"); - Object obtained = runOrCatch(r.random(r.expr(0L), 1L).optArg("float", true).do_(x -> r.and(x.ge(0L), x.lt(1L))), - new OptArgs() - ,conn); - try { - assertEquals(expected_, obtained); - logger.info("Finished running line #29"); - } catch (Throwable ae) { - logger.error("Whoops, got exception on line #29:" + ae.toString()); - if(obtained instanceof Throwable) { - ae.addSuppressed((Throwable) obtained); - } - throw ae; - } - } - - { - // random.yaml line #30 - /* True */ - Boolean expected_ = true; - /* r.random(1, r.expr(0), float=True).do(lambda x:r.and_(x.le(1), x.gt(0))) */ - logger.info("About to run line #30: r.random(1L, r.expr(0L)).optArg('float', true).do_(x -> r.and(x.le(1L), x.gt(0L)))"); - Object obtained = runOrCatch(r.random(1L, r.expr(0L)).optArg("float", true).do_(x -> r.and(x.le(1L), x.gt(0L))), - new OptArgs() - ,conn); - try { - assertEquals(expected_, obtained); - logger.info("Finished running line #30"); - } catch (Throwable ae) { - logger.error("Whoops, got exception on line #30:" + ae.toString()); - if(obtained instanceof Throwable) { - ae.addSuppressed((Throwable) obtained); - } - throw ae; - } - } - - { - // random.yaml line #31 - /* True */ - Boolean expected_ = true; - /* r.random(r.expr(1), r.expr(0), float=True).do(lambda x:r.and_(x.le(1), x.gt(0))) */ - logger.info("About to run line #31: r.random(r.expr(1L), r.expr(0L)).optArg('float', true).do_(x -> r.and(x.le(1L), x.gt(0L)))"); - Object obtained = runOrCatch(r.random(r.expr(1L), r.expr(0L)).optArg("float", true).do_(x -> r.and(x.le(1L), x.gt(0L))), - new OptArgs() - ,conn); - try { - assertEquals(expected_, obtained); - logger.info("Finished running line #31"); - } catch (Throwable ae) { - logger.error("Whoops, got exception on line #31:" + ae.toString()); - if(obtained instanceof Throwable) { - ae.addSuppressed((Throwable) obtained); - } - throw ae; - } - } - - { - // random.yaml line #36 - /* True */ - Boolean expected_ = true; - /* r.random(0.495, float=True).do(lambda x:r.and_(x.ge(0), x.lt(0.495))) */ - logger.info("About to run line #36: r.random(0.495).optArg('float', true).do_(x -> r.and(x.ge(0L), x.lt(0.495)))"); - Object obtained = runOrCatch(r.random(0.495).optArg("float", true).do_(x -> r.and(x.ge(0L), x.lt(0.495))), - new OptArgs() - ,conn); - try { - assertEquals(expected_, obtained); - logger.info("Finished running line #36"); - } catch (Throwable ae) { - logger.error("Whoops, got exception on line #36:" + ae.toString()); - if(obtained instanceof Throwable) { - ae.addSuppressed((Throwable) obtained); - } - throw ae; - } - } - - { - // random.yaml line #37 - /* True */ - Boolean expected_ = true; - /* r.random(-0.495, float=True).do(lambda x:r.and_(x.le(0), x.gt(-0.495))) */ - logger.info("About to run line #37: r.random(-0.495).optArg('float', true).do_(x -> r.and(x.le(0L), x.gt(-0.495)))"); - Object obtained = runOrCatch(r.random(-0.495).optArg("float", true).do_(x -> r.and(x.le(0L), x.gt(-0.495))), - new OptArgs() - ,conn); - try { - assertEquals(expected_, obtained); - logger.info("Finished running line #37"); - } catch (Throwable ae) { - logger.error("Whoops, got exception on line #37:" + ae.toString()); - if(obtained instanceof Throwable) { - ae.addSuppressed((Throwable) obtained); - } - throw ae; - } - } - - { - // random.yaml line #38 - /* True */ - Boolean expected_ = true; - /* r.random(1823756.24, float=True).do(lambda x:r.and_(x.ge(0), x.lt(1823756.24))) */ - logger.info("About to run line #38: r.random(1823756.24).optArg('float', true).do_(x -> r.and(x.ge(0L), x.lt(1823756.24)))"); - Object obtained = runOrCatch(r.random(1823756.24).optArg("float", true).do_(x -> r.and(x.ge(0L), x.lt(1823756.24))), - new OptArgs() - ,conn); - try { - assertEquals(expected_, obtained); - logger.info("Finished running line #38"); - } catch (Throwable ae) { - logger.error("Whoops, got exception on line #38:" + ae.toString()); - if(obtained instanceof Throwable) { - ae.addSuppressed((Throwable) obtained); - } - throw ae; - } - } - - { - // random.yaml line #39 - /* True */ - Boolean expected_ = true; - /* r.random(-1823756.24, float=True).do(lambda x:r.and_(x.le(0), x.gt(-1823756.24))) */ - logger.info("About to run line #39: r.random(-1823756.24).optArg('float', true).do_(x -> r.and(x.le(0L), x.gt(-1823756.24)))"); - Object obtained = runOrCatch(r.random(-1823756.24).optArg("float", true).do_(x -> r.and(x.le(0L), x.gt(-1823756.24))), - new OptArgs() - ,conn); - try { - assertEquals(expected_, obtained); - logger.info("Finished running line #39"); - } catch (Throwable ae) { - logger.error("Whoops, got exception on line #39:" + ae.toString()); - if(obtained instanceof Throwable) { - ae.addSuppressed((Throwable) obtained); - } - throw ae; - } - } - - { - // random.yaml line #44 - /* True */ - Boolean expected_ = true; - /* r.random(10.5, 20.153, float=True).do(lambda x:r.and_(x.ge(10.5), x.lt(20.153))) */ - logger.info("About to run line #44: r.random(10.5, 20.153).optArg('float', true).do_(x -> r.and(x.ge(10.5), x.lt(20.153)))"); - Object obtained = runOrCatch(r.random(10.5, 20.153).optArg("float", true).do_(x -> r.and(x.ge(10.5), x.lt(20.153))), - new OptArgs() - ,conn); - try { - assertEquals(expected_, obtained); - logger.info("Finished running line #44"); - } catch (Throwable ae) { - logger.error("Whoops, got exception on line #44:" + ae.toString()); - if(obtained instanceof Throwable) { - ae.addSuppressed((Throwable) obtained); - } - throw ae; - } - } - - { - // random.yaml line #45 - /* True */ - Boolean expected_ = true; - /* r.random(20.153, 10.5, float=True).do(lambda x:r.and_(x.le(20.153), x.gt(10.5))) */ - logger.info("About to run line #45: r.random(20.153, 10.5).optArg('float', true).do_(x -> r.and(x.le(20.153), x.gt(10.5)))"); - Object obtained = runOrCatch(r.random(20.153, 10.5).optArg("float", true).do_(x -> r.and(x.le(20.153), x.gt(10.5))), - new OptArgs() - ,conn); - try { - assertEquals(expected_, obtained); - logger.info("Finished running line #45"); - } catch (Throwable ae) { - logger.error("Whoops, got exception on line #45:" + ae.toString()); - if(obtained instanceof Throwable) { - ae.addSuppressed((Throwable) obtained); - } - throw ae; - } - } - - { - // random.yaml line #46 - /* True */ - Boolean expected_ = true; - /* r.random(31415926.1, 31415926, float=True).do(lambda x:r.and_(x.le(31415926.1), x.gt(31415926))) */ - logger.info("About to run line #46: r.random(31415926.1, 31415926L).optArg('float', true).do_(x -> r.and(x.le(31415926.1), x.gt(31415926L)))"); - Object obtained = runOrCatch(r.random(31415926.1, 31415926L).optArg("float", true).do_(x -> r.and(x.le(31415926.1), x.gt(31415926L))), - new OptArgs() - ,conn); - try { - assertEquals(expected_, obtained); - logger.info("Finished running line #46"); - } catch (Throwable ae) { - logger.error("Whoops, got exception on line #46:" + ae.toString()); - if(obtained instanceof Throwable) { - ae.addSuppressed((Throwable) obtained); - } - throw ae; - } - } - - { - // random.yaml line #51 - /* True */ - Boolean expected_ = true; - /* r.random(-10.5, 20.153, float=True).do(lambda x:r.and_(x.ge(-10.5), x.lt(20.153))) */ - logger.info("About to run line #51: r.random(-10.5, 20.153).optArg('float', true).do_(x -> r.and(x.ge(-10.5), x.lt(20.153)))"); - Object obtained = runOrCatch(r.random(-10.5, 20.153).optArg("float", true).do_(x -> r.and(x.ge(-10.5), x.lt(20.153))), - new OptArgs() - ,conn); - try { - assertEquals(expected_, obtained); - logger.info("Finished running line #51"); - } catch (Throwable ae) { - logger.error("Whoops, got exception on line #51:" + ae.toString()); - if(obtained instanceof Throwable) { - ae.addSuppressed((Throwable) obtained); - } - throw ae; - } - } - - { - // random.yaml line #52 - /* True */ - Boolean expected_ = true; - /* r.random(-20.153, -10.5, float=True).do(lambda x:r.and_(x.ge(-20.153), x.lt(-10.5))) */ - logger.info("About to run line #52: r.random(-20.153, -10.5).optArg('float', true).do_(x -> r.and(x.ge(-20.153), x.lt(-10.5)))"); - Object obtained = runOrCatch(r.random(-20.153, -10.5).optArg("float", true).do_(x -> r.and(x.ge(-20.153), x.lt(-10.5))), - new OptArgs() - ,conn); - try { - assertEquals(expected_, obtained); - logger.info("Finished running line #52"); - } catch (Throwable ae) { - logger.error("Whoops, got exception on line #52:" + ae.toString()); - if(obtained instanceof Throwable) { - ae.addSuppressed((Throwable) obtained); - } - throw ae; - } - } - - { - // random.yaml line #53 - /* True */ - Boolean expected_ = true; - /* r.random(-31415926, -31415926.1, float=True).do(lambda x:r.and_(x.le(-31415926), x.gt(-31415926.1))) */ - logger.info("About to run line #53: r.random(-31415926L, -31415926.1).optArg('float', true).do_(x -> r.and(x.le(-31415926L), x.gt(-31415926.1)))"); - Object obtained = runOrCatch(r.random(-31415926L, -31415926.1).optArg("float", true).do_(x -> r.and(x.le(-31415926L), x.gt(-31415926.1))), - new OptArgs() - ,conn); - try { - assertEquals(expected_, obtained); - logger.info("Finished running line #53"); - } catch (Throwable ae) { - logger.error("Whoops, got exception on line #53:" + ae.toString()); - if(obtained instanceof Throwable) { - ae.addSuppressed((Throwable) obtained); - } - throw ae; - } - } - - { - // random.yaml line #58 - /* 2 */ - Long expected_ = 2L; - /* r.expr([r.random(), r.random()]).distinct().count() */ - logger.info("About to run line #58: r.expr(r.array(r.random(), r.random())).distinct().count()"); - Object obtained = runOrCatch(r.expr(r.array(r.random(), r.random())).distinct().count(), - new OptArgs() - ,conn); - try { - assertEquals(expected_, obtained); - logger.info("Finished running line #58"); - } catch (Throwable ae) { - logger.error("Whoops, got exception on line #58:" + ae.toString()); - if(obtained instanceof Throwable) { - ae.addSuppressed((Throwable) obtained); - } - throw ae; - } - } - - { - // random.yaml line #59 - /* 2 */ - Long expected_ = 2L; - /* r.expr([r.random(1, float=True), r.random(1, float=True)]).distinct().count() */ - logger.info("About to run line #59: r.expr(r.array(r.random(1L).optArg('float', true), r.random(1L).optArg('float', true))).distinct().count()"); - Object obtained = runOrCatch(r.expr(r.array(r.random(1L).optArg("float", true), r.random(1L).optArg("float", true))).distinct().count(), - new OptArgs() - ,conn); - try { - assertEquals(expected_, obtained); - logger.info("Finished running line #59"); - } catch (Throwable ae) { - logger.error("Whoops, got exception on line #59:" + ae.toString()); - if(obtained instanceof Throwable) { - ae.addSuppressed((Throwable) obtained); - } - throw ae; - } - } - - { - // random.yaml line #60 - /* 2 */ - Long expected_ = 2L; - /* r.expr([r.random(0, 1, float=True), r.random(0, 1, float=True)]).distinct().count() */ - logger.info("About to run line #60: r.expr(r.array(r.random(0L, 1L).optArg('float', true), r.random(0L, 1L).optArg('float', true))).distinct().count()"); - Object obtained = runOrCatch(r.expr(r.array(r.random(0L, 1L).optArg("float", true), r.random(0L, 1L).optArg("float", true))).distinct().count(), - new OptArgs() - ,conn); - try { - assertEquals(expected_, obtained); - logger.info("Finished running line #60"); - } catch (Throwable ae) { - logger.error("Whoops, got exception on line #60:" + ae.toString()); - if(obtained instanceof Throwable) { - ae.addSuppressed((Throwable) obtained); - } - throw ae; - } - } - - { - // random.yaml line #65 - /* True */ - Boolean expected_ = true; - /* r.random(0, float=True).eq(0) */ - logger.info("About to run line #65: r.random(0L).optArg('float', true).eq(0L)"); - Object obtained = runOrCatch(r.random(0L).optArg("float", true).eq(0L), - new OptArgs() - ,conn); - try { - assertEquals(expected_, obtained); - logger.info("Finished running line #65"); - } catch (Throwable ae) { - logger.error("Whoops, got exception on line #65:" + ae.toString()); - if(obtained instanceof Throwable) { - ae.addSuppressed((Throwable) obtained); - } - throw ae; - } - } - - { - // random.yaml line #66 - /* True */ - Boolean expected_ = true; - /* r.random(5, 5, float=True).eq(5) */ - logger.info("About to run line #66: r.random(5L, 5L).optArg('float', true).eq(5L)"); - Object obtained = runOrCatch(r.random(5L, 5L).optArg("float", true).eq(5L), - new OptArgs() - ,conn); - try { - assertEquals(expected_, obtained); - logger.info("Finished running line #66"); - } catch (Throwable ae) { - logger.error("Whoops, got exception on line #66:" + ae.toString()); - if(obtained instanceof Throwable) { - ae.addSuppressed((Throwable) obtained); - } - throw ae; - } - } - - { - // random.yaml line #67 - /* True */ - Boolean expected_ = true; - /* r.random(-499384756758, -499384756758, float=True).eq(-499384756758) */ - logger.info("About to run line #67: r.random(-499384756758L, -499384756758L).optArg('float', true).eq(-499384756758L)"); - Object obtained = runOrCatch(r.random(-499384756758L, -499384756758L).optArg("float", true).eq(-499384756758L), - new OptArgs() - ,conn); - try { - assertEquals(expected_, obtained); - logger.info("Finished running line #67"); - } catch (Throwable ae) { - logger.error("Whoops, got exception on line #67:" + ae.toString()); - if(obtained instanceof Throwable) { - ae.addSuppressed((Throwable) obtained); - } - throw ae; - } - } - - { - // random.yaml line #68 - /* True */ - Boolean expected_ = true; - /* r.random(-93.94757, -93.94757, float=True).eq(-93.94757) */ - logger.info("About to run line #68: r.random(-93.94757, -93.94757).optArg('float', true).eq(-93.94757)"); - Object obtained = runOrCatch(r.random(-93.94757, -93.94757).optArg("float", true).eq(-93.94757), - new OptArgs() - ,conn); - try { - assertEquals(expected_, obtained); - logger.info("Finished running line #68"); - } catch (Throwable ae) { - logger.error("Whoops, got exception on line #68:" + ae.toString()); - if(obtained instanceof Throwable) { - ae.addSuppressed((Throwable) obtained); - } - throw ae; - } - } - - { - // random.yaml line #69 - /* True */ - Boolean expected_ = true; - /* r.random(294.69148, 294.69148, float=True).eq(294.69148) */ - logger.info("About to run line #69: r.random(294.69148, 294.69148).optArg('float', true).eq(294.69148)"); - Object obtained = runOrCatch(r.random(294.69148, 294.69148).optArg("float", true).eq(294.69148), - new OptArgs() - ,conn); - try { - assertEquals(expected_, obtained); - logger.info("Finished running line #69"); - } catch (Throwable ae) { - logger.error("Whoops, got exception on line #69:" + ae.toString()); - if(obtained instanceof Throwable) { - ae.addSuppressed((Throwable) obtained); - } - throw ae; - } - } - - // random.yaml line #74 - // float_max = sys.float_info.max - logger.info("Possibly executing: Double float_max = (Double) (sys.floatInfo.max);"); - Double float_max = (Double) (sys.floatInfo.max); - - // random.yaml line #78 - // float_min = sys.float_info.min - logger.info("Possibly executing: Double float_min = (Double) (sys.floatInfo.min);"); - Double float_min = (Double) (sys.floatInfo.min); - - { - // random.yaml line #82 - /* True */ - Boolean expected_ = true; - /* r.random(-float_max, float_max, float=True).do(lambda x:r.and_(x.ge(-float_max), x.lt(float_max))) */ - logger.info("About to run line #82: r.random(-float_max, float_max).optArg('float', true).do_(x -> r.and(x.ge(-float_max), x.lt(float_max)))"); - Object obtained = runOrCatch(r.random(-float_max, float_max).optArg("float", true).do_(x -> r.and(x.ge(-float_max), x.lt(float_max))), - new OptArgs() - ,conn); - try { - assertEquals(expected_, obtained); - logger.info("Finished running line #82"); - } catch (Throwable ae) { - logger.error("Whoops, got exception on line #82:" + ae.toString()); - if(obtained instanceof Throwable) { - ae.addSuppressed((Throwable) obtained); - } - throw ae; - } - } - - { - // random.yaml line #83 - /* True */ - Boolean expected_ = true; - /* r.random(float_max, -float_max, float=True).do(lambda x:r.and_(x.le(float_max), x.gt(-float_max))) */ - logger.info("About to run line #83: r.random(float_max, -float_max).optArg('float', true).do_(x -> r.and(x.le(float_max), x.gt(-float_max)))"); - Object obtained = runOrCatch(r.random(float_max, -float_max).optArg("float", true).do_(x -> r.and(x.le(float_max), x.gt(-float_max))), - new OptArgs() - ,conn); - try { - assertEquals(expected_, obtained); - logger.info("Finished running line #83"); - } catch (Throwable ae) { - logger.error("Whoops, got exception on line #83:" + ae.toString()); - if(obtained instanceof Throwable) { - ae.addSuppressed((Throwable) obtained); - } - throw ae; - } - } - - { - // random.yaml line #84 - /* True */ - Boolean expected_ = true; - /* r.random(float_min, float_max, float=True).do(lambda x:r.and_(x.ge(float_min), x.lt(float_max))) */ - logger.info("About to run line #84: r.random(float_min, float_max).optArg('float', true).do_(x -> r.and(x.ge(float_min), x.lt(float_max)))"); - Object obtained = runOrCatch(r.random(float_min, float_max).optArg("float", true).do_(x -> r.and(x.ge(float_min), x.lt(float_max))), - new OptArgs() - ,conn); - try { - assertEquals(expected_, obtained); - logger.info("Finished running line #84"); - } catch (Throwable ae) { - logger.error("Whoops, got exception on line #84:" + ae.toString()); - if(obtained instanceof Throwable) { - ae.addSuppressed((Throwable) obtained); - } - throw ae; - } - } - - { - // random.yaml line #85 - /* True */ - Boolean expected_ = true; - /* r.random(float_min, -float_max, float=True).do(lambda x:r.and_(x.le(float_min), x.gt(-float_max))) */ - logger.info("About to run line #85: r.random(float_min, -float_max).optArg('float', true).do_(x -> r.and(x.le(float_min), x.gt(-float_max)))"); - Object obtained = runOrCatch(r.random(float_min, -float_max).optArg("float", true).do_(x -> r.and(x.le(float_min), x.gt(-float_max))), - new OptArgs() - ,conn); - try { - assertEquals(expected_, obtained); - logger.info("Finished running line #85"); - } catch (Throwable ae) { - logger.error("Whoops, got exception on line #85:" + ae.toString()); - if(obtained instanceof Throwable) { - ae.addSuppressed((Throwable) obtained); - } - throw ae; - } - } - - { - // random.yaml line #86 - /* True */ - Boolean expected_ = true; - /* r.random(-float_min, float_max, float=True).do(lambda x:r.and_(x.ge(-float_min), x.lt(float_max))) */ - logger.info("About to run line #86: r.random(-float_min, float_max).optArg('float', true).do_(x -> r.and(x.ge(-float_min), x.lt(float_max)))"); - Object obtained = runOrCatch(r.random(-float_min, float_max).optArg("float", true).do_(x -> r.and(x.ge(-float_min), x.lt(float_max))), - new OptArgs() - ,conn); - try { - assertEquals(expected_, obtained); - logger.info("Finished running line #86"); - } catch (Throwable ae) { - logger.error("Whoops, got exception on line #86:" + ae.toString()); - if(obtained instanceof Throwable) { - ae.addSuppressed((Throwable) obtained); - } - throw ae; - } - } - - { - // random.yaml line #87 - /* True */ - Boolean expected_ = true; - /* r.random(-float_min, -float_max, float=True).do(lambda x:r.and_(x.le(-float_min), x.gt(-float_max))) */ - logger.info("About to run line #87: r.random(-float_min, -float_max).optArg('float', true).do_(x -> r.and(x.le(-float_min), x.gt(-float_max)))"); - Object obtained = runOrCatch(r.random(-float_min, -float_max).optArg("float", true).do_(x -> r.and(x.le(-float_min), x.gt(-float_max))), - new OptArgs() - ,conn); - try { - assertEquals(expected_, obtained); - logger.info("Finished running line #87"); - } catch (Throwable ae) { - logger.error("Whoops, got exception on line #87:" + ae.toString()); - if(obtained instanceof Throwable) { - ae.addSuppressed((Throwable) obtained); - } - throw ae; - } - } - - // random.yaml line #92 - // upper_limit = 2**53 - 1 - logger.info("Possibly executing: Long upper_limit = (Long) (2L << 53L - 1L);"); - Long upper_limit = (Long) (2L << 53L - 1L); - - // random.yaml line #96 - // lower_limit = 1 - (2**53) - logger.info("Possibly executing: Long lower_limit = (Long) (1L - 2L << 53L);"); - Long lower_limit = (Long) (1L - 2L << 53L); - - { - // random.yaml line #101 - /* True */ - Boolean expected_ = true; - /* r.random(256).do(lambda x:r.and_(x.ge(0), x.lt(256))) */ - logger.info("About to run line #101: r.random(256L).do_(x -> r.and(x.ge(0L), x.lt(256L)))"); - Object obtained = runOrCatch(r.random(256L).do_(x -> r.and(x.ge(0L), x.lt(256L))), - new OptArgs() - ,conn); - try { - assertEquals(expected_, obtained); - logger.info("Finished running line #101"); - } catch (Throwable ae) { - logger.error("Whoops, got exception on line #101:" + ae.toString()); - if(obtained instanceof Throwable) { - ae.addSuppressed((Throwable) obtained); - } - throw ae; - } - } - - { - // random.yaml line #102 - /* True */ - Boolean expected_ = true; - /* r.random(0, 256).do(lambda x:r.and_(x.ge(0), x.lt(256))) */ - logger.info("About to run line #102: r.random(0L, 256L).do_(x -> r.and(x.ge(0L), x.lt(256L)))"); - Object obtained = runOrCatch(r.random(0L, 256L).do_(x -> r.and(x.ge(0L), x.lt(256L))), - new OptArgs() - ,conn); - try { - assertEquals(expected_, obtained); - logger.info("Finished running line #102"); - } catch (Throwable ae) { - logger.error("Whoops, got exception on line #102:" + ae.toString()); - if(obtained instanceof Throwable) { - ae.addSuppressed((Throwable) obtained); - } - throw ae; - } - } - - { - // random.yaml line #103 - /* True */ - Boolean expected_ = true; - /* r.random(r.expr(256)).do(lambda x:r.and_(x.ge(0), x.lt(256))) */ - logger.info("About to run line #103: r.random(r.expr(256L)).do_(x -> r.and(x.ge(0L), x.lt(256L)))"); - Object obtained = runOrCatch(r.random(r.expr(256L)).do_(x -> r.and(x.ge(0L), x.lt(256L))), - new OptArgs() - ,conn); - try { - assertEquals(expected_, obtained); - logger.info("Finished running line #103"); - } catch (Throwable ae) { - logger.error("Whoops, got exception on line #103:" + ae.toString()); - if(obtained instanceof Throwable) { - ae.addSuppressed((Throwable) obtained); - } - throw ae; - } - } - - { - // random.yaml line #104 - /* True */ - Boolean expected_ = true; - /* r.random(r.expr(0), 256).do(lambda x:r.and_(x.ge(0), x.lt(256))) */ - logger.info("About to run line #104: r.random(r.expr(0L), 256L).do_(x -> r.and(x.ge(0L), x.lt(256L)))"); - Object obtained = runOrCatch(r.random(r.expr(0L), 256L).do_(x -> r.and(x.ge(0L), x.lt(256L))), - new OptArgs() - ,conn); - try { - assertEquals(expected_, obtained); - logger.info("Finished running line #104"); - } catch (Throwable ae) { - logger.error("Whoops, got exception on line #104:" + ae.toString()); - if(obtained instanceof Throwable) { - ae.addSuppressed((Throwable) obtained); - } - throw ae; - } - } - - { - // random.yaml line #105 - /* True */ - Boolean expected_ = true; - /* r.random(0, r.expr(256)).do(lambda x:r.and_(x.ge(0), x.lt(256))) */ - logger.info("About to run line #105: r.random(0L, r.expr(256L)).do_(x -> r.and(x.ge(0L), x.lt(256L)))"); - Object obtained = runOrCatch(r.random(0L, r.expr(256L)).do_(x -> r.and(x.ge(0L), x.lt(256L))), - new OptArgs() - ,conn); - try { - assertEquals(expected_, obtained); - logger.info("Finished running line #105"); - } catch (Throwable ae) { - logger.error("Whoops, got exception on line #105:" + ae.toString()); - if(obtained instanceof Throwable) { - ae.addSuppressed((Throwable) obtained); - } - throw ae; - } - } - - { - // random.yaml line #106 - /* True */ - Boolean expected_ = true; - /* r.random(r.expr(0), r.expr(256)).do(lambda x:r.and_(x.ge(0), x.lt(256))) */ - logger.info("About to run line #106: r.random(r.expr(0L), r.expr(256L)).do_(x -> r.and(x.ge(0L), x.lt(256L)))"); - Object obtained = runOrCatch(r.random(r.expr(0L), r.expr(256L)).do_(x -> r.and(x.ge(0L), x.lt(256L))), - new OptArgs() - ,conn); - try { - assertEquals(expected_, obtained); - logger.info("Finished running line #106"); - } catch (Throwable ae) { - logger.error("Whoops, got exception on line #106:" + ae.toString()); - if(obtained instanceof Throwable) { - ae.addSuppressed((Throwable) obtained); - } - throw ae; - } - } - - { - // random.yaml line #111 - /* True */ - Boolean expected_ = true; - /* r.random(10, 20).do(lambda x:r.and_(x.ge(10), x.lt(20))) */ - logger.info("About to run line #111: r.random(10L, 20L).do_(x -> r.and(x.ge(10L), x.lt(20L)))"); - Object obtained = runOrCatch(r.random(10L, 20L).do_(x -> r.and(x.ge(10L), x.lt(20L))), - new OptArgs() - ,conn); - try { - assertEquals(expected_, obtained); - logger.info("Finished running line #111"); - } catch (Throwable ae) { - logger.error("Whoops, got exception on line #111:" + ae.toString()); - if(obtained instanceof Throwable) { - ae.addSuppressed((Throwable) obtained); - } - throw ae; - } - } - - { - // random.yaml line #112 - /* True */ - Boolean expected_ = true; - /* r.random(9347849, 120937493).do(lambda x:r.and_(x.ge(9347849), x.lt(120937493))) */ - logger.info("About to run line #112: r.random(9347849L, 120937493L).do_(x -> r.and(x.ge(9347849L), x.lt(120937493L)))"); - Object obtained = runOrCatch(r.random(9347849L, 120937493L).do_(x -> r.and(x.ge(9347849L), x.lt(120937493L))), - new OptArgs() - ,conn); - try { - assertEquals(expected_, obtained); - logger.info("Finished running line #112"); - } catch (Throwable ae) { - logger.error("Whoops, got exception on line #112:" + ae.toString()); - if(obtained instanceof Throwable) { - ae.addSuppressed((Throwable) obtained); - } - throw ae; - } - } - - { - // random.yaml line #123 - /* True */ - Boolean expected_ = true; - /* r.random(-10, 20).do(lambda x:r.and_(x.ge(-10), x.lt(20))) */ - logger.info("About to run line #123: r.random(-10L, 20L).do_(x -> r.and(x.ge(-10L), x.lt(20L)))"); - Object obtained = runOrCatch(r.random(-10L, 20L).do_(x -> r.and(x.ge(-10L), x.lt(20L))), - new OptArgs() - ,conn); - try { - assertEquals(expected_, obtained); - logger.info("Finished running line #123"); - } catch (Throwable ae) { - logger.error("Whoops, got exception on line #123:" + ae.toString()); - if(obtained instanceof Throwable) { - ae.addSuppressed((Throwable) obtained); - } - throw ae; - } - } - - { - // random.yaml line #124 - /* True */ - Boolean expected_ = true; - /* r.random(-20, -10).do(lambda x:r.and_(x.ge(-20), x.lt(-10))) */ - logger.info("About to run line #124: r.random(-20L, -10L).do_(x -> r.and(x.ge(-20L), x.lt(-10L)))"); - Object obtained = runOrCatch(r.random(-20L, -10L).do_(x -> r.and(x.ge(-20L), x.lt(-10L))), - new OptArgs() - ,conn); - try { - assertEquals(expected_, obtained); - logger.info("Finished running line #124"); - } catch (Throwable ae) { - logger.error("Whoops, got exception on line #124:" + ae.toString()); - if(obtained instanceof Throwable) { - ae.addSuppressed((Throwable) obtained); - } - throw ae; - } - } - - { - // random.yaml line #125 - /* True */ - Boolean expected_ = true; - /* r.random(-120937493, -9347849).do(lambda x:r.and_(x.ge(-120937493), x.lt(-9347849))) */ - logger.info("About to run line #125: r.random(-120937493L, -9347849L).do_(x -> r.and(x.ge(-120937493L), x.lt(-9347849L)))"); - Object obtained = runOrCatch(r.random(-120937493L, -9347849L).do_(x -> r.and(x.ge(-120937493L), x.lt(-9347849L))), - new OptArgs() - ,conn); - try { - assertEquals(expected_, obtained); - logger.info("Finished running line #125"); - } catch (Throwable ae) { - logger.error("Whoops, got exception on line #125:" + ae.toString()); - if(obtained instanceof Throwable) { - ae.addSuppressed((Throwable) obtained); - } - throw ae; - } - } - - { - // random.yaml line #137 - /* 2 */ - Long expected_ = 2L; - /* r.expr([r.random(upper_limit), r.random(upper_limit)]).distinct().count() */ - logger.info("About to run line #137: r.expr(r.array(r.random(upper_limit), r.random(upper_limit))).distinct().count()"); - Object obtained = runOrCatch(r.expr(r.array(r.random(upper_limit), r.random(upper_limit))).distinct().count(), - new OptArgs() - ,conn); - try { - assertEquals(expected_, obtained); - logger.info("Finished running line #137"); - } catch (Throwable ae) { - logger.error("Whoops, got exception on line #137:" + ae.toString()); - if(obtained instanceof Throwable) { - ae.addSuppressed((Throwable) obtained); - } - throw ae; - } - } - - { - // random.yaml line #139 - /* 2 */ - Long expected_ = 2L; - /* r.expr([upper_limit,upper_limit]).map(lambda x:r.random(x)).distinct().count() */ - logger.info("About to run line #139: r.expr(r.array(upper_limit, upper_limit)).map(x -> r.random(x)).distinct().count()"); - Object obtained = runOrCatch(r.expr(r.array(upper_limit, upper_limit)).map(x -> r.random(x)).distinct().count(), - new OptArgs() - ,conn); - try { - assertEquals(expected_, obtained); - logger.info("Finished running line #139"); - } catch (Throwable ae) { - logger.error("Whoops, got exception on line #139:" + ae.toString()); - if(obtained instanceof Throwable) { - ae.addSuppressed((Throwable) obtained); - } - throw ae; - } - } - - { - // random.yaml line #147 - /* err("ReqlQueryLogicError", "Upper bound (-0.5) could not be safely converted to an integer.", []) */ - Err expected_ = err("ReqlQueryLogicError", "Upper bound (-0.5) could not be safely converted to an integer.", r.array()); - /* r.random(-0.5) */ - logger.info("About to run line #147: r.random(-0.5)"); - Object obtained = runOrCatch(r.random(-0.5), - new OptArgs() - ,conn); - try { - assertEquals(expected_, obtained); - logger.info("Finished running line #147"); - } catch (Throwable ae) { - logger.error("Whoops, got exception on line #147:" + ae.toString()); - if(obtained instanceof Throwable) { - ae.addSuppressed((Throwable) obtained); - } - throw ae; - } - } - - { - // random.yaml line #149 - /* err("ReqlQueryLogicError", "Upper bound (0.25) could not be safely converted to an integer.", []) */ - Err expected_ = err("ReqlQueryLogicError", "Upper bound (0.25) could not be safely converted to an integer.", r.array()); - /* r.random(0.25) */ - logger.info("About to run line #149: r.random(0.25)"); - Object obtained = runOrCatch(r.random(0.25), - new OptArgs() - ,conn); - try { - assertEquals(expected_, obtained); - logger.info("Finished running line #149"); - } catch (Throwable ae) { - logger.error("Whoops, got exception on line #149:" + ae.toString()); - if(obtained instanceof Throwable) { - ae.addSuppressed((Throwable) obtained); - } - throw ae; - } - } - - { - // random.yaml line #151 - /* err("ReqlQueryLogicError", "Upper bound (0.75) could not be safely converted to an integer.", []) */ - Err expected_ = err("ReqlQueryLogicError", "Upper bound (0.75) could not be safely converted to an integer.", r.array()); - /* r.random(-10, 0.75) */ - logger.info("About to run line #151: r.random(-10L, 0.75)"); - Object obtained = runOrCatch(r.random(-10L, 0.75), - new OptArgs() - ,conn); - try { - assertEquals(expected_, obtained); - logger.info("Finished running line #151"); - } catch (Throwable ae) { - logger.error("Whoops, got exception on line #151:" + ae.toString()); - if(obtained instanceof Throwable) { - ae.addSuppressed((Throwable) obtained); - } - throw ae; - } - } - - { - // random.yaml line #153 - /* err("ReqlQueryLogicError", "Lower bound (-120549.25) could not be safely converted to an integer.", []) */ - Err expected_ = err("ReqlQueryLogicError", "Lower bound (-120549.25) could not be safely converted to an integer.", r.array()); - /* r.random(-120549.25, 39458) */ - logger.info("About to run line #153: r.random(-120549.25, 39458L)"); - Object obtained = runOrCatch(r.random(-120549.25, 39458L), - new OptArgs() - ,conn); - try { - assertEquals(expected_, obtained); - logger.info("Finished running line #153"); - } catch (Throwable ae) { - logger.error("Whoops, got exception on line #153:" + ae.toString()); - if(obtained instanceof Throwable) { - ae.addSuppressed((Throwable) obtained); - } - throw ae; - } - } - - { - // random.yaml line #155 - /* err("ReqlQueryLogicError", "Lower bound (-6.5) could not be safely converted to an integer.", []) */ - Err expected_ = err("ReqlQueryLogicError", "Lower bound (-6.5) could not be safely converted to an integer.", r.array()); - /* r.random(-6.5, 8.125) */ - logger.info("About to run line #155: r.random(-6.5, 8.125)"); - Object obtained = runOrCatch(r.random(-6.5, 8.125), - new OptArgs() - ,conn); - try { - assertEquals(expected_, obtained); - logger.info("Finished running line #155"); - } catch (Throwable ae) { - logger.error("Whoops, got exception on line #155:" + ae.toString()); - if(obtained instanceof Throwable) { - ae.addSuppressed((Throwable) obtained); - } - throw ae; - } - } - - { - // random.yaml line #159 - /* err("ReqlQueryLogicError", "Generating a random integer requires one or two bounds.", []) */ - Err expected_ = err("ReqlQueryLogicError", "Generating a random integer requires one or two bounds.", r.array()); - /* r.random(float=False) */ - logger.info("About to run line #159: r.random().optArg('float', false)"); - Object obtained = runOrCatch(r.random().optArg("float", false), - new OptArgs() - ,conn); - try { - assertEquals(expected_, obtained); - logger.info("Finished running line #159"); - } catch (Throwable ae) { - logger.error("Whoops, got exception on line #159:" + ae.toString()); - if(obtained instanceof Throwable) { - ae.addSuppressed((Throwable) obtained); - } - throw ae; - } - } - - { - // random.yaml line #165 - /* err("ReqlQueryLogicError", "Lower bound (0) is not less than upper bound (0).", []) */ - Err expected_ = err("ReqlQueryLogicError", "Lower bound (0) is not less than upper bound (0).", r.array()); - /* r.random(0) */ - logger.info("About to run line #165: r.random(0L)"); - Object obtained = runOrCatch(r.random(0L), - new OptArgs() - ,conn); - try { - assertEquals(expected_, obtained); - logger.info("Finished running line #165"); - } catch (Throwable ae) { - logger.error("Whoops, got exception on line #165:" + ae.toString()); - if(obtained instanceof Throwable) { - ae.addSuppressed((Throwable) obtained); - } - throw ae; - } - } - - { - // random.yaml line #167 - /* err("ReqlQueryLogicError", "Lower bound (0) is not less than upper bound (0).", []) */ - Err expected_ = err("ReqlQueryLogicError", "Lower bound (0) is not less than upper bound (0).", r.array()); - /* r.random(0, 0) */ - logger.info("About to run line #167: r.random(0L, 0L)"); - Object obtained = runOrCatch(r.random(0L, 0L), - new OptArgs() - ,conn); - try { - assertEquals(expected_, obtained); - logger.info("Finished running line #167"); - } catch (Throwable ae) { - logger.error("Whoops, got exception on line #167:" + ae.toString()); - if(obtained instanceof Throwable) { - ae.addSuppressed((Throwable) obtained); - } - throw ae; - } - } - - { - // random.yaml line #169 - /* err("ReqlQueryLogicError", "Lower bound (515) is not less than upper bound (515).", []) */ - Err expected_ = err("ReqlQueryLogicError", "Lower bound (515) is not less than upper bound (515).", r.array()); - /* r.random(515, 515) */ - logger.info("About to run line #169: r.random(515L, 515L)"); - Object obtained = runOrCatch(r.random(515L, 515L), - new OptArgs() - ,conn); - try { - assertEquals(expected_, obtained); - logger.info("Finished running line #169"); - } catch (Throwable ae) { - logger.error("Whoops, got exception on line #169:" + ae.toString()); - if(obtained instanceof Throwable) { - ae.addSuppressed((Throwable) obtained); - } - throw ae; - } - } - - { - // random.yaml line #171 - /* err("ReqlQueryLogicError", "Lower bound (-956) is not less than upper bound (-956).", []) */ - Err expected_ = err("ReqlQueryLogicError", "Lower bound (-956) is not less than upper bound (-956).", r.array()); - /* r.random(-956, -956) */ - logger.info("About to run line #171: r.random(-956L, -956L)"); - Object obtained = runOrCatch(r.random(-956L, -956L), - new OptArgs() - ,conn); - try { - assertEquals(expected_, obtained); - logger.info("Finished running line #171"); - } catch (Throwable ae) { - logger.error("Whoops, got exception on line #171:" + ae.toString()); - if(obtained instanceof Throwable) { - ae.addSuppressed((Throwable) obtained); - } - throw ae; - } - } - - { - // random.yaml line #173 - /* err("ReqlQueryLogicError", "Lower bound (0) is not less than upper bound (-10).", []) */ - Err expected_ = err("ReqlQueryLogicError", "Lower bound (0) is not less than upper bound (-10).", r.array()); - /* r.random(-10) */ - logger.info("About to run line #173: r.random(-10L)"); - Object obtained = runOrCatch(r.random(-10L), - new OptArgs() - ,conn); - try { - assertEquals(expected_, obtained); - logger.info("Finished running line #173"); - } catch (Throwable ae) { - logger.error("Whoops, got exception on line #173:" + ae.toString()); - if(obtained instanceof Throwable) { - ae.addSuppressed((Throwable) obtained); - } - throw ae; - } - } - - { - // random.yaml line #175 - /* err("ReqlQueryLogicError", "Lower bound (20) is not less than upper bound (2).", []) */ - Err expected_ = err("ReqlQueryLogicError", "Lower bound (20) is not less than upper bound (2).", r.array()); - /* r.random(20, 2) */ - logger.info("About to run line #175: r.random(20L, 2L)"); - Object obtained = runOrCatch(r.random(20L, 2L), - new OptArgs() - ,conn); - try { - assertEquals(expected_, obtained); - logger.info("Finished running line #175"); - } catch (Throwable ae) { - logger.error("Whoops, got exception on line #175:" + ae.toString()); - if(obtained instanceof Throwable) { - ae.addSuppressed((Throwable) obtained); - } - throw ae; - } - } - - { - // random.yaml line #177 - /* err("ReqlQueryLogicError", "Lower bound (2) is not less than upper bound (-20).", []) */ - Err expected_ = err("ReqlQueryLogicError", "Lower bound (2) is not less than upper bound (-20).", r.array()); - /* r.random(2, -20) */ - logger.info("About to run line #177: r.random(2L, -20L)"); - Object obtained = runOrCatch(r.random(2L, -20L), - new OptArgs() - ,conn); - try { - assertEquals(expected_, obtained); - logger.info("Finished running line #177"); - } catch (Throwable ae) { - logger.error("Whoops, got exception on line #177:" + ae.toString()); - if(obtained instanceof Throwable) { - ae.addSuppressed((Throwable) obtained); - } - throw ae; - } - } - - { - // random.yaml line #179 - /* err("ReqlQueryLogicError", "Lower bound (1456) is not less than upper bound (0).", []) */ - Err expected_ = err("ReqlQueryLogicError", "Lower bound (1456) is not less than upper bound (0).", r.array()); - /* r.random(1456, 0) */ - logger.info("About to run line #179: r.random(1456L, 0L)"); - Object obtained = runOrCatch(r.random(1456L, 0L), - new OptArgs() - ,conn); - try { - assertEquals(expected_, obtained); - logger.info("Finished running line #179"); - } catch (Throwable ae) { - logger.error("Whoops, got exception on line #179:" + ae.toString()); - if(obtained instanceof Throwable) { - ae.addSuppressed((Throwable) obtained); - } - throw ae; - } - } - } -} diff --git a/drivers/java/src/test/java/com/rethinkdb/gen/Range.java b/drivers/java/src/test/java/com/rethinkdb/gen/Range.java deleted file mode 100644 index a218d17931c..00000000000 --- a/drivers/java/src/test/java/com/rethinkdb/gen/Range.java +++ /dev/null @@ -1,413 +0,0 @@ -// Autogenerated by convert_tests.py and process_polyglot.py. -// Do not edit this file directly. -// The template for this file is located at: -// ../../../../../../../templates/Test.java -package com.rethinkdb.gen; - -import com.rethinkdb.RethinkDB; -import com.rethinkdb.gen.exc.*; -import com.rethinkdb.gen.ast.*; -import com.rethinkdb.ast.ReqlAst; -import com.rethinkdb.model.MapObject; -import com.rethinkdb.model.OptArgs; -import com.rethinkdb.net.Connection; -import com.rethinkdb.net.Cursor; -import junit.framework.TestCase; -import static org.junit.Assert.assertEquals; -import static org.junit.Assert.assertArrayEquals; -import org.slf4j.Logger; -import org.slf4j.LoggerFactory; - -import org.junit.*; -import org.junit.rules.ExpectedException; - -import java.util.Arrays; -import java.util.ArrayList; -import java.util.List; -import java.util.Map; -import java.util.Set; -import java.time.OffsetDateTime; -import java.time.ZoneOffset; -import java.time.Instant; -import java.util.stream.LongStream; -import java.util.stream.Collectors; -import java.util.stream.Stream; -import java.util.concurrent.TimeoutException; -import java.util.regex.Pattern; -import java.util.Collections; -import java.nio.charset.StandardCharsets; - -import static com.rethinkdb.TestingCommon.*; -import com.rethinkdb.TestingFramework; - -public class Range { - // Tests RQL range generation - Logger logger = LoggerFactory.getLogger(Range.class); - public static final RethinkDB r = RethinkDB.r; - - Connection conn; - - @Before - public void setUp() throws Exception { - logger.info("Setting up."); - conn = TestingFramework.createConnection(); - try { - r.dbCreate("test").run(conn); - r.db("test").wait_().run(conn); - }catch (Exception e){} - } - - @After - public void tearDown() throws Exception { - logger.info("Tearing down."); - r.db("rethinkdb").table("_debug_scratch").delete().run(conn); - if(!conn.isOpen()){ - conn.close(); - conn = TestingFramework.createConnection(); - } - r.dbDrop("test").run(conn); - conn.close(false); - } - - // Autogenerated tests below - - @Test(timeout=120000) - public void test() throws Exception { - - { - // range.yaml line #3 - /* 'STREAM' */ - String expected_ = "STREAM"; - /* r.range().type_of() */ - logger.info("About to run line #3: r.range().typeOf()"); - Object obtained = runOrCatch(r.range().typeOf(), - new OptArgs() - ,conn); - try { - assertEquals(expected_, obtained); - logger.info("Finished running line #3"); - } catch (Throwable ae) { - logger.error("Whoops, got exception on line #3:" + ae.toString()); - if(obtained instanceof Throwable) { - ae.addSuppressed((Throwable) obtained); - } - throw ae; - } - } - - { - // range.yaml line #6 - /* [0, 1, 2, 3] */ - List expected_ = r.array(0L, 1L, 2L, 3L); - /* r.range().limit(4) */ - logger.info("About to run line #6: r.range().limit(4L)"); - Object obtained = runOrCatch(r.range().limit(4L), - new OptArgs() - ,conn); - try { - assertEquals(expected_, obtained); - logger.info("Finished running line #6"); - } catch (Throwable ae) { - logger.error("Whoops, got exception on line #6:" + ae.toString()); - if(obtained instanceof Throwable) { - ae.addSuppressed((Throwable) obtained); - } - throw ae; - } - } - - { - // range.yaml line #9 - /* [0, 1, 2, 3] */ - List expected_ = r.array(0L, 1L, 2L, 3L); - /* r.range(4) */ - logger.info("About to run line #9: r.range(4L)"); - Object obtained = runOrCatch(r.range(4L), - new OptArgs() - ,conn); - try { - assertEquals(expected_, obtained); - logger.info("Finished running line #9"); - } catch (Throwable ae) { - logger.error("Whoops, got exception on line #9:" + ae.toString()); - if(obtained instanceof Throwable) { - ae.addSuppressed((Throwable) obtained); - } - throw ae; - } - } - - { - // range.yaml line #12 - /* [2, 3, 4] */ - List expected_ = r.array(2L, 3L, 4L); - /* r.range(2, 5) */ - logger.info("About to run line #12: r.range(2L, 5L)"); - Object obtained = runOrCatch(r.range(2L, 5L), - new OptArgs() - ,conn); - try { - assertEquals(expected_, obtained); - logger.info("Finished running line #12"); - } catch (Throwable ae) { - logger.error("Whoops, got exception on line #12:" + ae.toString()); - if(obtained instanceof Throwable) { - ae.addSuppressed((Throwable) obtained); - } - throw ae; - } - } - - { - // range.yaml line #15 - /* [] */ - List expected_ = r.array(); - /* r.range(0) */ - logger.info("About to run line #15: r.range(0L)"); - Object obtained = runOrCatch(r.range(0L), - new OptArgs() - ,conn); - try { - assertEquals(expected_, obtained); - logger.info("Finished running line #15"); - } catch (Throwable ae) { - logger.error("Whoops, got exception on line #15:" + ae.toString()); - if(obtained instanceof Throwable) { - ae.addSuppressed((Throwable) obtained); - } - throw ae; - } - } - - { - // range.yaml line #18 - /* [] */ - List expected_ = r.array(); - /* r.range(5, 2) */ - logger.info("About to run line #18: r.range(5L, 2L)"); - Object obtained = runOrCatch(r.range(5L, 2L), - new OptArgs() - ,conn); - try { - assertEquals(expected_, obtained); - logger.info("Finished running line #18"); - } catch (Throwable ae) { - logger.error("Whoops, got exception on line #18:" + ae.toString()); - if(obtained instanceof Throwable) { - ae.addSuppressed((Throwable) obtained); - } - throw ae; - } - } - - { - // range.yaml line #21 - /* [-5, -4, -3] */ - List expected_ = r.array(-5L, -4L, -3L); - /* r.range(-5, -2) */ - logger.info("About to run line #21: r.range(-5L, -2L)"); - Object obtained = runOrCatch(r.range(-5L, -2L), - new OptArgs() - ,conn); - try { - assertEquals(expected_, obtained); - logger.info("Finished running line #21"); - } catch (Throwable ae) { - logger.error("Whoops, got exception on line #21:" + ae.toString()); - if(obtained instanceof Throwable) { - ae.addSuppressed((Throwable) obtained); - } - throw ae; - } - } - - { - // range.yaml line #24 - /* [-5, -4, -3, -2, -1, 0, 1] */ - List expected_ = r.array(-5L, -4L, -3L, -2L, -1L, 0L, 1L); - /* r.range(-5, 2) */ - logger.info("About to run line #24: r.range(-5L, 2L)"); - Object obtained = runOrCatch(r.range(-5L, 2L), - new OptArgs() - ,conn); - try { - assertEquals(expected_, obtained); - logger.info("Finished running line #24"); - } catch (Throwable ae) { - logger.error("Whoops, got exception on line #24:" + ae.toString()); - if(obtained instanceof Throwable) { - ae.addSuppressed((Throwable) obtained); - } - throw ae; - } - } - - { - // range.yaml line #30 - /* err("ReqlQueryLogicError", "Expected type NUMBER but found STRING.", []) */ - Err expected_ = err("ReqlQueryLogicError", "Expected type NUMBER but found STRING.", r.array()); - /* r.range("foo") */ - logger.info("About to run line #30: r.range('foo')"); - Object obtained = runOrCatch(r.range("foo"), - new OptArgs() - ,conn); - try { - assertEquals(expected_, obtained); - logger.info("Finished running line #30"); - } catch (Throwable ae) { - logger.error("Whoops, got exception on line #30:" + ae.toString()); - if(obtained instanceof Throwable) { - ae.addSuppressed((Throwable) obtained); - } - throw ae; - } - } - - { - // range.yaml line #34 - /* err_regex("ReqlQueryLogicError", "Number not an integer \\(>2\\^53\\). 9007199254740994", []) */ - ErrRegex expected_ = err_regex("ReqlQueryLogicError", "Number not an integer \\(>2\\^53\\). 9007199254740994", r.array()); - /* r.range(9007199254740994) */ - logger.info("About to run line #34: r.range(9007199254740994L)"); - Object obtained = runOrCatch(r.range(9007199254740994L), - new OptArgs() - ,conn); - try { - assertEquals(expected_, obtained); - logger.info("Finished running line #34"); - } catch (Throwable ae) { - logger.error("Whoops, got exception on line #34:" + ae.toString()); - if(obtained instanceof Throwable) { - ae.addSuppressed((Throwable) obtained); - } - throw ae; - } - } - - { - // range.yaml line #37 - /* err_regex("ReqlQueryLogicError", "Number not an integer \\(<-2\\^53\\). -9007199254740994", []) */ - ErrRegex expected_ = err_regex("ReqlQueryLogicError", "Number not an integer \\(<-2\\^53\\). -9007199254740994", r.array()); - /* r.range(-9007199254740994) */ - logger.info("About to run line #37: r.range(-9007199254740994L)"); - Object obtained = runOrCatch(r.range(-9007199254740994L), - new OptArgs() - ,conn); - try { - assertEquals(expected_, obtained); - logger.info("Finished running line #37"); - } catch (Throwable ae) { - logger.error("Whoops, got exception on line #37:" + ae.toString()); - if(obtained instanceof Throwable) { - ae.addSuppressed((Throwable) obtained); - } - throw ae; - } - } - - { - // range.yaml line #40 - /* err_regex("ReqlQueryLogicError", "Number not an integer. 0\\.5", []) */ - ErrRegex expected_ = err_regex("ReqlQueryLogicError", "Number not an integer. 0\\.5", r.array()); - /* r.range(0.5) */ - logger.info("About to run line #40: r.range(0.5)"); - Object obtained = runOrCatch(r.range(0.5), - new OptArgs() - ,conn); - try { - assertEquals(expected_, obtained); - logger.info("Finished running line #40"); - } catch (Throwable ae) { - logger.error("Whoops, got exception on line #40:" + ae.toString()); - if(obtained instanceof Throwable) { - ae.addSuppressed((Throwable) obtained); - } - throw ae; - } - } - - { - // range.yaml line #43 - /* err("ReqlQueryLogicError", "Cannot use an infinite stream with an aggregation function (`reduce`, `count`, etc.) or coerce it to an array.", []) */ - Err expected_ = err("ReqlQueryLogicError", "Cannot use an infinite stream with an aggregation function (`reduce`, `count`, etc.) or coerce it to an array.", r.array()); - /* r.range().count() */ - logger.info("About to run line #43: r.range().count()"); - Object obtained = runOrCatch(r.range().count(), - new OptArgs() - ,conn); - try { - assertEquals(expected_, obtained); - logger.info("Finished running line #43"); - } catch (Throwable ae) { - logger.error("Whoops, got exception on line #43:" + ae.toString()); - if(obtained instanceof Throwable) { - ae.addSuppressed((Throwable) obtained); - } - throw ae; - } - } - - { - // range.yaml line #46 - /* err("ReqlQueryLogicError", "Cannot use an infinite stream with an aggregation function (`reduce`, `count`, etc.) or coerce it to an array.", []) */ - Err expected_ = err("ReqlQueryLogicError", "Cannot use an infinite stream with an aggregation function (`reduce`, `count`, etc.) or coerce it to an array.", r.array()); - /* r.range().coerce_to("ARRAY") */ - logger.info("About to run line #46: r.range().coerceTo('ARRAY')"); - Object obtained = runOrCatch(r.range().coerceTo("ARRAY"), - new OptArgs() - ,conn); - try { - assertEquals(expected_, obtained); - logger.info("Finished running line #46"); - } catch (Throwable ae) { - logger.error("Whoops, got exception on line #46:" + ae.toString()); - if(obtained instanceof Throwable) { - ae.addSuppressed((Throwable) obtained); - } - throw ae; - } - } - - { - // range.yaml line #49 - /* err("ReqlQueryLogicError", "Cannot use an infinite stream with an aggregation function (`reduce`, `count`, etc.) or coerce it to an array.", []) */ - Err expected_ = err("ReqlQueryLogicError", "Cannot use an infinite stream with an aggregation function (`reduce`, `count`, etc.) or coerce it to an array.", r.array()); - /* r.range().coerce_to("OBJECT") */ - logger.info("About to run line #49: r.range().coerceTo('OBJECT')"); - Object obtained = runOrCatch(r.range().coerceTo("OBJECT"), - new OptArgs() - ,conn); - try { - assertEquals(expected_, obtained); - logger.info("Finished running line #49"); - } catch (Throwable ae) { - logger.error("Whoops, got exception on line #49:" + ae.toString()); - if(obtained instanceof Throwable) { - ae.addSuppressed((Throwable) obtained); - } - throw ae; - } - } - - { - // range.yaml line #52 - /* 4 */ - Long expected_ = 4L; - /* r.range(4).count() */ - logger.info("About to run line #52: r.range(4L).count()"); - Object obtained = runOrCatch(r.range(4L).count(), - new OptArgs() - ,conn); - try { - assertEquals(expected_, obtained); - logger.info("Finished running line #52"); - } catch (Throwable ae) { - logger.error("Whoops, got exception on line #52:" + ae.toString()); - if(obtained instanceof Throwable) { - ae.addSuppressed((Throwable) obtained); - } - throw ae; - } - } - } -} diff --git a/drivers/java/src/test/java/com/rethinkdb/gen/SindexNullsinstrings.java b/drivers/java/src/test/java/com/rethinkdb/gen/SindexNullsinstrings.java deleted file mode 100644 index 11648aece24..00000000000 --- a/drivers/java/src/test/java/com/rethinkdb/gen/SindexNullsinstrings.java +++ /dev/null @@ -1,188 +0,0 @@ -// Autogenerated by convert_tests.py and process_polyglot.py. -// Do not edit this file directly. -// The template for this file is located at: -// ../../../../../../../templates/Test.java -package com.rethinkdb.gen; - -import com.rethinkdb.RethinkDB; -import com.rethinkdb.gen.exc.*; -import com.rethinkdb.gen.ast.*; -import com.rethinkdb.ast.ReqlAst; -import com.rethinkdb.model.MapObject; -import com.rethinkdb.model.OptArgs; -import com.rethinkdb.net.Connection; -import com.rethinkdb.net.Cursor; -import junit.framework.TestCase; -import static org.junit.Assert.assertEquals; -import static org.junit.Assert.assertArrayEquals; -import org.slf4j.Logger; -import org.slf4j.LoggerFactory; - -import org.junit.*; -import org.junit.rules.ExpectedException; - -import java.util.Arrays; -import java.util.ArrayList; -import java.util.List; -import java.util.Map; -import java.util.Set; -import java.time.OffsetDateTime; -import java.time.ZoneOffset; -import java.time.Instant; -import java.util.stream.LongStream; -import java.util.stream.Collectors; -import java.util.stream.Stream; -import java.util.concurrent.TimeoutException; -import java.util.regex.Pattern; -import java.util.Collections; -import java.nio.charset.StandardCharsets; - -import static com.rethinkdb.TestingCommon.*; -import com.rethinkdb.TestingFramework; - -public class SindexNullsinstrings { - // sindex nulls in strings - Logger logger = LoggerFactory.getLogger(SindexNullsinstrings.class); - public static final RethinkDB r = RethinkDB.r; - public static final Table tbl = r.db("test").table("tbl"); - - Connection conn; - - @Before - public void setUp() throws Exception { - logger.info("Setting up."); - conn = TestingFramework.createConnection(); - try { - r.dbCreate("test").run(conn); - r.db("test").wait_().run(conn); - }catch (Exception e){} - try { - r.db("test").tableCreate("tbl").run(conn); - r.db("test").table(tbl).wait_().run(conn); - }catch (Exception e){} - } - - @After - public void tearDown() throws Exception { - logger.info("Tearing down."); - r.db("rethinkdb").table("_debug_scratch").delete().run(conn); - if(!conn.isOpen()){ - conn.close(); - conn = TestingFramework.createConnection(); - } - r.db("test").tableDrop("tbl").run(conn); - r.dbDrop("test").run(conn); - conn.close(false); - } - - // Autogenerated tests below - - @Test(timeout=120000) - public void test() throws Exception { - - { - // sindex/nullsinstrings.yaml line #4 - /* ({"created":1}) */ - Map expected_ = r.hashMap("created", 1L); - /* tbl.index_create("key") */ - logger.info("About to run line #4: tbl.indexCreate('key')"); - Object obtained = runOrCatch(tbl.indexCreate("key"), - new OptArgs() - ,conn); - try { - assertEquals(expected_, obtained); - logger.info("Finished running line #4"); - } catch (Throwable ae) { - logger.error("Whoops, got exception on line #4:" + ae.toString()); - if(obtained instanceof Throwable) { - ae.addSuppressed((Throwable) obtained); - } - throw ae; - } - } - - { - // sindex/nullsinstrings.yaml line #6 - /* ([{"ready":true}]) */ - List expected_ = r.array(r.hashMap("ready", true)); - /* tbl.index_wait().pluck("ready") */ - logger.info("About to run line #6: tbl.indexWait().pluck('ready')"); - Object obtained = runOrCatch(tbl.indexWait().pluck("ready"), - new OptArgs() - ,conn); - try { - assertEquals(expected_, obtained); - logger.info("Finished running line #6"); - } catch (Throwable ae) { - logger.error("Whoops, got exception on line #6:" + ae.toString()); - if(obtained instanceof Throwable) { - ae.addSuppressed((Throwable) obtained); - } - throw ae; - } - } - - { - // sindex/nullsinstrings.yaml line #10 - /* ({"inserted":2}) */ - Map expected_ = r.hashMap("inserted", 2L); - /* tbl.insert([{"id":1,"key":["a","b"]},{"id":2,"key":["a\u0000Sb"]}]).pluck("inserted") */ - logger.info("About to run line #10: tbl.insert(r.array(r.hashMap('id', 1L).with('key', r.array('a', 'b')), r.hashMap('id', 2L).with('key', r.array('a\\u0000Sb')))).pluck('inserted')"); - Object obtained = runOrCatch(tbl.insert(r.array(r.hashMap("id", 1L).with("key", r.array("a", "b")), r.hashMap("id", 2L).with("key", r.array("a\u0000Sb")))).pluck("inserted"), - new OptArgs() - ,conn); - try { - assertEquals(expected_, obtained); - logger.info("Finished running line #10"); - } catch (Throwable ae) { - logger.error("Whoops, got exception on line #10:" + ae.toString()); - if(obtained instanceof Throwable) { - ae.addSuppressed((Throwable) obtained); - } - throw ae; - } - } - - { - // sindex/nullsinstrings.yaml line #13 - /* ([{"id":2}]) */ - List expected_ = r.array(r.hashMap("id", 2L)); - /* tbl.get_all(["a\u0000Sb"], index="key").pluck("id") */ - logger.info("About to run line #13: tbl.getAll(r.array('a\\u0000Sb')).optArg('index', 'key').pluck('id')"); - Object obtained = runOrCatch(tbl.getAll(r.array("a\u0000Sb")).optArg("index", "key").pluck("id"), - new OptArgs() - ,conn); - try { - assertEquals(expected_, obtained); - logger.info("Finished running line #13"); - } catch (Throwable ae) { - logger.error("Whoops, got exception on line #13:" + ae.toString()); - if(obtained instanceof Throwable) { - ae.addSuppressed((Throwable) obtained); - } - throw ae; - } - } - - { - // sindex/nullsinstrings.yaml line #18 - /* ([{"id":1}]) */ - List expected_ = r.array(r.hashMap("id", 1L)); - /* tbl.get_all(["a","b"], index="key").pluck("id") */ - logger.info("About to run line #18: tbl.getAll(r.array('a', 'b')).optArg('index', 'key').pluck('id')"); - Object obtained = runOrCatch(tbl.getAll(r.array("a", "b")).optArg("index", "key").pluck("id"), - new OptArgs() - ,conn); - try { - assertEquals(expected_, obtained); - logger.info("Finished running line #18"); - } catch (Throwable ae) { - logger.error("Whoops, got exception on line #18:" + ae.toString()); - if(obtained instanceof Throwable) { - ae.addSuppressed((Throwable) obtained); - } - throw ae; - } - } - } -} diff --git a/drivers/java/src/test/java/com/rethinkdb/gen/Timeout.java b/drivers/java/src/test/java/com/rethinkdb/gen/Timeout.java deleted file mode 100644 index 6501e013b4c..00000000000 --- a/drivers/java/src/test/java/com/rethinkdb/gen/Timeout.java +++ /dev/null @@ -1,245 +0,0 @@ -// Autogenerated by convert_tests.py and process_polyglot.py. -// Do not edit this file directly. -// The template for this file is located at: -// ../../../../../../../templates/Test.java -package com.rethinkdb.gen; - -import com.rethinkdb.RethinkDB; -import com.rethinkdb.gen.exc.*; -import com.rethinkdb.gen.ast.*; -import com.rethinkdb.ast.ReqlAst; -import com.rethinkdb.model.MapObject; -import com.rethinkdb.model.OptArgs; -import com.rethinkdb.net.Connection; -import com.rethinkdb.net.Cursor; -import junit.framework.TestCase; -import static org.junit.Assert.assertEquals; -import static org.junit.Assert.assertArrayEquals; -import org.slf4j.Logger; -import org.slf4j.LoggerFactory; - -import org.junit.*; -import org.junit.rules.ExpectedException; - -import java.util.Arrays; -import java.util.ArrayList; -import java.util.List; -import java.util.Map; -import java.util.Set; -import java.time.OffsetDateTime; -import java.time.ZoneOffset; -import java.time.Instant; -import java.util.stream.LongStream; -import java.util.stream.Collectors; -import java.util.stream.Stream; -import java.util.concurrent.TimeoutException; -import java.util.regex.Pattern; -import java.util.Collections; -import java.nio.charset.StandardCharsets; - -import static com.rethinkdb.TestingCommon.*; -import com.rethinkdb.TestingFramework; - -public class Timeout { - // Tests timeouts. - Logger logger = LoggerFactory.getLogger(Timeout.class); - public static final RethinkDB r = RethinkDB.r; - - Connection conn; - - @Before - public void setUp() throws Exception { - logger.info("Setting up."); - conn = TestingFramework.createConnection(); - try { - r.dbCreate("test").run(conn); - r.db("test").wait_().run(conn); - }catch (Exception e){} - } - - @After - public void tearDown() throws Exception { - logger.info("Tearing down."); - r.db("rethinkdb").table("_debug_scratch").delete().run(conn); - if(!conn.isOpen()){ - conn.close(); - conn = TestingFramework.createConnection(); - } - r.dbDrop("test").run(conn); - conn.close(false); - } - - // Autogenerated tests below - - @Test(timeout=120000) - public void test() throws Exception { - - { - // timeout.yaml line #5 - /* err("ReqlQueryLogicError", "JavaScript query `while(true) {}` timed out after 5.000 seconds.", [0]) */ - Err expected_ = err("ReqlQueryLogicError", "JavaScript query `while(true) {}` timed out after 5.000 seconds.", r.array(0L)); - /* r.js('while(true) {}') */ - logger.info("About to run line #5: r.js('while(true) {}')"); - Object obtained = runOrCatch(r.js("while(true) {}"), - new OptArgs() - ,conn); - try { - assertEquals(expected_, obtained); - logger.info("Finished running line #5"); - } catch (Throwable ae) { - logger.error("Whoops, got exception on line #5:" + ae.toString()); - if(obtained instanceof Throwable) { - ae.addSuppressed((Throwable) obtained); - } - throw ae; - } - } - - { - // timeout.yaml line #8 - /* err("ReqlQueryLogicError", "JavaScript query `while(true) {}` timed out after 1.300 seconds.", [0]) */ - Err expected_ = err("ReqlQueryLogicError", "JavaScript query `while(true) {}` timed out after 1.300 seconds.", r.array(0L)); - /* r.js('while(true) {}', timeout=1.3) */ - logger.info("About to run line #8: r.js('while(true) {}').optArg('timeout', 1.3)"); - Object obtained = runOrCatch(r.js("while(true) {}").optArg("timeout", 1.3), - new OptArgs() - ,conn); - try { - assertEquals(expected_, obtained); - logger.info("Finished running line #8"); - } catch (Throwable ae) { - logger.error("Whoops, got exception on line #8:" + ae.toString()); - if(obtained instanceof Throwable) { - ae.addSuppressed((Throwable) obtained); - } - throw ae; - } - } - - { - // timeout.yaml line #13 - /* err("ReqlQueryLogicError", "JavaScript query `while(true) {}` timed out after 8.000 seconds.", [0]) */ - Err expected_ = err("ReqlQueryLogicError", "JavaScript query `while(true) {}` timed out after 8.000 seconds.", r.array(0L)); - /* r.js('while(true) {}', timeout=8) */ - logger.info("About to run line #13: r.js('while(true) {}').optArg('timeout', 8L)"); - Object obtained = runOrCatch(r.js("while(true) {}").optArg("timeout", 8L), - new OptArgs() - ,conn); - try { - assertEquals(expected_, obtained); - logger.info("Finished running line #13"); - } catch (Throwable ae) { - logger.error("Whoops, got exception on line #13:" + ae.toString()); - if(obtained instanceof Throwable) { - ae.addSuppressed((Throwable) obtained); - } - throw ae; - } - } - - { - // timeout.yaml line #18 - /* err("ReqlQueryLogicError", "JavaScript query `(function(x) { while(true) {} })` timed out after 5.000 seconds.", [0]) */ - Err expected_ = err("ReqlQueryLogicError", "JavaScript query `(function(x) { while(true) {} })` timed out after 5.000 seconds.", r.array(0L)); - /* r.expr('foo').do(r.js('(function(x) { while(true) {} })')) */ - logger.info("About to run line #18: r.expr('foo').do_(r.js('(function(x) { while(true) {} })'))"); - Object obtained = runOrCatch(r.expr("foo").do_(r.js("(function(x) { while(true) {} })")), - new OptArgs() - ,conn); - try { - assertEquals(expected_, obtained); - logger.info("Finished running line #18"); - } catch (Throwable ae) { - logger.error("Whoops, got exception on line #18:" + ae.toString()); - if(obtained instanceof Throwable) { - ae.addSuppressed((Throwable) obtained); - } - throw ae; - } - } - - { - // timeout.yaml line #21 - /* err("ReqlQueryLogicError", "JavaScript query `(function(x) { while(true) {} })` timed out after 1.300 seconds.", [0]) */ - Err expected_ = err("ReqlQueryLogicError", "JavaScript query `(function(x) { while(true) {} })` timed out after 1.300 seconds.", r.array(0L)); - /* r.expr('foo').do(r.js('(function(x) { while(true) {} })', timeout=1.3)) */ - logger.info("About to run line #21: r.expr('foo').do_(r.js('(function(x) { while(true) {} })').optArg('timeout', 1.3))"); - Object obtained = runOrCatch(r.expr("foo").do_(r.js("(function(x) { while(true) {} })").optArg("timeout", 1.3)), - new OptArgs() - ,conn); - try { - assertEquals(expected_, obtained); - logger.info("Finished running line #21"); - } catch (Throwable ae) { - logger.error("Whoops, got exception on line #21:" + ae.toString()); - if(obtained instanceof Throwable) { - ae.addSuppressed((Throwable) obtained); - } - throw ae; - } - } - - { - // timeout.yaml line #26 - /* err("ReqlQueryLogicError", "JavaScript query `(function(x) { while(true) {} })` timed out after 8.000 seconds.", [0]) */ - Err expected_ = err("ReqlQueryLogicError", "JavaScript query `(function(x) { while(true) {} })` timed out after 8.000 seconds.", r.array(0L)); - /* r.expr('foo').do(r.js('(function(x) { while(true) {} })', timeout=8)) */ - logger.info("About to run line #26: r.expr('foo').do_(r.js('(function(x) { while(true) {} })').optArg('timeout', 8L))"); - Object obtained = runOrCatch(r.expr("foo").do_(r.js("(function(x) { while(true) {} })").optArg("timeout", 8L)), - new OptArgs() - ,conn); - try { - assertEquals(expected_, obtained); - logger.info("Finished running line #26"); - } catch (Throwable ae) { - logger.error("Whoops, got exception on line #26:" + ae.toString()); - if(obtained instanceof Throwable) { - ae.addSuppressed((Throwable) obtained); - } - throw ae; - } - } - - { - // timeout.yaml line #32 - /* err("ReqlNonExistenceError", "Error in HTTP GET of `httpbin.org/delay/10`:" + " timed out after 0.800 seconds.", []) */ - Err expected_ = err("ReqlNonExistenceError", "Error in HTTP GET of `httpbin.org/delay/10`:" + " timed out after 0.800 seconds.", r.array()); - /* r.http('httpbin.org/delay/10', timeout=0.8) */ - logger.info("About to run line #32: r.http('httpbin.org/delay/10').optArg('timeout', 0.8)"); - Object obtained = runOrCatch(r.http("httpbin.org/delay/10").optArg("timeout", 0.8), - new OptArgs() - ,conn); - try { - assertEquals(expected_, obtained); - logger.info("Finished running line #32"); - } catch (Throwable ae) { - logger.error("Whoops, got exception on line #32:" + ae.toString()); - if(obtained instanceof Throwable) { - ae.addSuppressed((Throwable) obtained); - } - throw ae; - } - } - - { - // timeout.yaml line #36 - /* err("ReqlNonExistenceError", "Error in HTTP PUT of `httpbin.org/delay/10`:" + " timed out after 0.000 seconds.", []) */ - Err expected_ = err("ReqlNonExistenceError", "Error in HTTP PUT of `httpbin.org/delay/10`:" + " timed out after 0.000 seconds.", r.array()); - /* r.http('httpbin.org/delay/10', method='PUT', timeout=0.0) */ - logger.info("About to run line #36: r.http('httpbin.org/delay/10').optArg('method', 'PUT').optArg('timeout', 0.0)"); - Object obtained = runOrCatch(r.http("httpbin.org/delay/10").optArg("method", "PUT").optArg("timeout", 0.0), - new OptArgs() - ,conn); - try { - assertEquals(expected_, obtained); - logger.info("Finished running line #36"); - } catch (Throwable ae) { - logger.error("Whoops, got exception on line #36:" + ae.toString()); - if(obtained instanceof Throwable) { - ae.addSuppressed((Throwable) obtained); - } - throw ae; - } - } - } -} diff --git a/drivers/java/src/test/java/com/rethinkdb/gen/TimesApi.java b/drivers/java/src/test/java/com/rethinkdb/gen/TimesApi.java deleted file mode 100644 index 4bf00564c0a..00000000000 --- a/drivers/java/src/test/java/com/rethinkdb/gen/TimesApi.java +++ /dev/null @@ -1,985 +0,0 @@ -// Autogenerated by convert_tests.py and process_polyglot.py. -// Do not edit this file directly. -// The template for this file is located at: -// ../../../../../../../templates/Test.java -package com.rethinkdb.gen; - -import com.rethinkdb.RethinkDB; -import com.rethinkdb.gen.exc.*; -import com.rethinkdb.gen.ast.*; -import com.rethinkdb.ast.ReqlAst; -import com.rethinkdb.model.MapObject; -import com.rethinkdb.model.OptArgs; -import com.rethinkdb.net.Connection; -import com.rethinkdb.net.Cursor; -import junit.framework.TestCase; -import static org.junit.Assert.assertEquals; -import static org.junit.Assert.assertArrayEquals; -import org.slf4j.Logger; -import org.slf4j.LoggerFactory; - -import org.junit.*; -import org.junit.rules.ExpectedException; - -import java.util.Arrays; -import java.util.ArrayList; -import java.util.List; -import java.util.Map; -import java.util.Set; -import java.time.OffsetDateTime; -import java.time.ZoneOffset; -import java.time.Instant; -import java.util.stream.LongStream; -import java.util.stream.Collectors; -import java.util.stream.Stream; -import java.util.concurrent.TimeoutException; -import java.util.regex.Pattern; -import java.util.Collections; -import java.nio.charset.StandardCharsets; - -import static com.rethinkdb.TestingCommon.*; -import com.rethinkdb.TestingFramework; - -public class TimesApi { - // date/time api (#977) - Logger logger = LoggerFactory.getLogger(TimesApi.class); - public static final RethinkDB r = RethinkDB.r; - - Connection conn; - - @Before - public void setUp() throws Exception { - logger.info("Setting up."); - conn = TestingFramework.createConnection(); - try { - r.dbCreate("test").run(conn); - r.db("test").wait_().run(conn); - }catch (Exception e){} - } - - @After - public void tearDown() throws Exception { - logger.info("Tearing down."); - r.db("rethinkdb").table("_debug_scratch").delete().run(conn); - if(!conn.isOpen()){ - conn.close(); - conn = TestingFramework.createConnection(); - } - r.dbDrop("test").run(conn); - conn.close(false); - } - - // Autogenerated tests below - - @Test(timeout=120000) - public void test() throws Exception { - - // times/api.yaml line #6 - // rt1 = 1375147296.6812 - logger.info("Possibly executing: Double rt1 = (Double) (1375147296.6812);"); - Double rt1 = (Double) (1375147296.6812); - - // times/api.yaml line #7 - // t1 = r.epoch_time(rt1) - logger.info("Possibly executing: EpochTime t1 = (EpochTime) (r.epochTime(rt1));"); - EpochTime t1 = (EpochTime) (r.epochTime(rt1)); - - // times/api.yaml line #8 - // t2 = r.epoch_time(rt1 + 1000) - logger.info("Possibly executing: EpochTime t2 = (EpochTime) (r.epochTime(r.add(rt1, 1000L)));"); - EpochTime t2 = (EpochTime) (r.epochTime(r.add(rt1, 1000L))); - - { - // times/api.yaml line #11 - /* (1375148296.681) */ - Double expected_ = 1375148296.681; - /* (t1 + 1000).to_epoch_time() */ - logger.info("About to run line #11: r.add(t1, 1000L).toEpochTime()"); - Object obtained = runOrCatch(r.add(t1, 1000L).toEpochTime(), - new OptArgs() - ,conn); - try { - assertEquals((double) expected_, - ((Number) obtained).doubleValue(), - 0.00000000001); - logger.info("Finished running line #11"); - } catch (Throwable ae) { - logger.error("Whoops, got exception on line #11:" + ae.toString()); - if(obtained instanceof Throwable) { - ae.addSuppressed((Throwable) obtained); - } - throw ae; - } - } - - { - // times/api.yaml line #14 - /* (1375146296.681) */ - Double expected_ = 1375146296.681; - /* (t1 - 1000).to_epoch_time() */ - logger.info("About to run line #14: r.sub(t1, 1000L).toEpochTime()"); - Object obtained = runOrCatch(r.sub(t1, 1000L).toEpochTime(), - new OptArgs() - ,conn); - try { - assertEquals((double) expected_, - ((Number) obtained).doubleValue(), - 0.00000000001); - logger.info("Finished running line #14"); - } catch (Throwable ae) { - logger.error("Whoops, got exception on line #14:" + ae.toString()); - if(obtained instanceof Throwable) { - ae.addSuppressed((Throwable) obtained); - } - throw ae; - } - } - - { - // times/api.yaml line #17 - /* 1000 */ - Long expected_ = 1000L; - /* (t1 - (t1 - 1000)) */ - logger.info("About to run line #17: r.sub(t1, r.sub(t1, 1000L))"); - Object obtained = runOrCatch(r.sub(t1, r.sub(t1, 1000L)), - new OptArgs() - ,conn); - try { - assertEquals(expected_, obtained); - logger.info("Finished running line #17"); - } catch (Throwable ae) { - logger.error("Whoops, got exception on line #17:" + ae.toString()); - if(obtained instanceof Throwable) { - ae.addSuppressed((Throwable) obtained); - } - throw ae; - } - } - - { - // times/api.yaml line #22 - /* false */ - Boolean expected_ = false; - /* (t1 < t1) */ - logger.info("About to run line #22: r.lt(t1, t1)"); - Object obtained = runOrCatch(r.lt(t1, t1), - new OptArgs() - ,conn); - try { - assertEquals(expected_, obtained); - logger.info("Finished running line #22"); - } catch (Throwable ae) { - logger.error("Whoops, got exception on line #22:" + ae.toString()); - if(obtained instanceof Throwable) { - ae.addSuppressed((Throwable) obtained); - } - throw ae; - } - } - - { - // times/api.yaml line #25 - /* true */ - Boolean expected_ = true; - /* (t1 <= t1) */ - logger.info("About to run line #25: r.le(t1, t1)"); - Object obtained = runOrCatch(r.le(t1, t1), - new OptArgs() - ,conn); - try { - assertEquals(expected_, obtained); - logger.info("Finished running line #25"); - } catch (Throwable ae) { - logger.error("Whoops, got exception on line #25:" + ae.toString()); - if(obtained instanceof Throwable) { - ae.addSuppressed((Throwable) obtained); - } - throw ae; - } - } - - { - // times/api.yaml line #29 - /* true */ - Boolean expected_ = true; - /* (t1 == t1) */ - logger.info("About to run line #29: r.eq(t1, t1)"); - Object obtained = runOrCatch(r.eq(t1, t1), - new OptArgs() - ,conn); - try { - assertEquals(expected_, obtained); - logger.info("Finished running line #29"); - } catch (Throwable ae) { - logger.error("Whoops, got exception on line #29:" + ae.toString()); - if(obtained instanceof Throwable) { - ae.addSuppressed((Throwable) obtained); - } - throw ae; - } - } - - { - // times/api.yaml line #32 - /* false */ - Boolean expected_ = false; - /* (t1 != t1) */ - logger.info("About to run line #32: r.ne(t1, t1)"); - Object obtained = runOrCatch(r.ne(t1, t1), - new OptArgs() - ,conn); - try { - assertEquals(expected_, obtained); - logger.info("Finished running line #32"); - } catch (Throwable ae) { - logger.error("Whoops, got exception on line #32:" + ae.toString()); - if(obtained instanceof Throwable) { - ae.addSuppressed((Throwable) obtained); - } - throw ae; - } - } - - { - // times/api.yaml line #34 - /* true */ - Boolean expected_ = true; - /* (t1 >= t1) */ - logger.info("About to run line #34: r.ge(t1, t1)"); - Object obtained = runOrCatch(r.ge(t1, t1), - new OptArgs() - ,conn); - try { - assertEquals(expected_, obtained); - logger.info("Finished running line #34"); - } catch (Throwable ae) { - logger.error("Whoops, got exception on line #34:" + ae.toString()); - if(obtained instanceof Throwable) { - ae.addSuppressed((Throwable) obtained); - } - throw ae; - } - } - - { - // times/api.yaml line #37 - /* false */ - Boolean expected_ = false; - /* (t1 > t1) */ - logger.info("About to run line #37: r.gt(t1, t1)"); - Object obtained = runOrCatch(r.gt(t1, t1), - new OptArgs() - ,conn); - try { - assertEquals(expected_, obtained); - logger.info("Finished running line #37"); - } catch (Throwable ae) { - logger.error("Whoops, got exception on line #37:" + ae.toString()); - if(obtained instanceof Throwable) { - ae.addSuppressed((Throwable) obtained); - } - throw ae; - } - } - - { - // times/api.yaml line #40 - /* true */ - Boolean expected_ = true; - /* (t1 < t2) */ - logger.info("About to run line #40: r.lt(t1, t2)"); - Object obtained = runOrCatch(r.lt(t1, t2), - new OptArgs() - ,conn); - try { - assertEquals(expected_, obtained); - logger.info("Finished running line #40"); - } catch (Throwable ae) { - logger.error("Whoops, got exception on line #40:" + ae.toString()); - if(obtained instanceof Throwable) { - ae.addSuppressed((Throwable) obtained); - } - throw ae; - } - } - - { - // times/api.yaml line #43 - /* true */ - Boolean expected_ = true; - /* (t1 <= t2) */ - logger.info("About to run line #43: r.le(t1, t2)"); - Object obtained = runOrCatch(r.le(t1, t2), - new OptArgs() - ,conn); - try { - assertEquals(expected_, obtained); - logger.info("Finished running line #43"); - } catch (Throwable ae) { - logger.error("Whoops, got exception on line #43:" + ae.toString()); - if(obtained instanceof Throwable) { - ae.addSuppressed((Throwable) obtained); - } - throw ae; - } - } - - { - // times/api.yaml line #47 - /* false */ - Boolean expected_ = false; - /* (t1 == t2) */ - logger.info("About to run line #47: r.eq(t1, t2)"); - Object obtained = runOrCatch(r.eq(t1, t2), - new OptArgs() - ,conn); - try { - assertEquals(expected_, obtained); - logger.info("Finished running line #47"); - } catch (Throwable ae) { - logger.error("Whoops, got exception on line #47:" + ae.toString()); - if(obtained instanceof Throwable) { - ae.addSuppressed((Throwable) obtained); - } - throw ae; - } - } - - { - // times/api.yaml line #50 - /* true */ - Boolean expected_ = true; - /* (t1 != t2) */ - logger.info("About to run line #50: r.ne(t1, t2)"); - Object obtained = runOrCatch(r.ne(t1, t2), - new OptArgs() - ,conn); - try { - assertEquals(expected_, obtained); - logger.info("Finished running line #50"); - } catch (Throwable ae) { - logger.error("Whoops, got exception on line #50:" + ae.toString()); - if(obtained instanceof Throwable) { - ae.addSuppressed((Throwable) obtained); - } - throw ae; - } - } - - { - // times/api.yaml line #52 - /* false */ - Boolean expected_ = false; - /* (t1 >= t2) */ - logger.info("About to run line #52: r.ge(t1, t2)"); - Object obtained = runOrCatch(r.ge(t1, t2), - new OptArgs() - ,conn); - try { - assertEquals(expected_, obtained); - logger.info("Finished running line #52"); - } catch (Throwable ae) { - logger.error("Whoops, got exception on line #52:" + ae.toString()); - if(obtained instanceof Throwable) { - ae.addSuppressed((Throwable) obtained); - } - throw ae; - } - } - - { - // times/api.yaml line #55 - /* false */ - Boolean expected_ = false; - /* (t1 > t2) */ - logger.info("About to run line #55: r.gt(t1, t2)"); - Object obtained = runOrCatch(r.gt(t1, t2), - new OptArgs() - ,conn); - try { - assertEquals(expected_, obtained); - logger.info("Finished running line #55"); - } catch (Throwable ae) { - logger.error("Whoops, got exception on line #55:" + ae.toString()); - if(obtained instanceof Throwable) { - ae.addSuppressed((Throwable) obtained); - } - throw ae; - } - } - - { - // times/api.yaml line #60 - /* true */ - Boolean expected_ = true; - /* t1.during(t1, t1 + 1000) */ - logger.info("About to run line #60: t1.during(t1, r.add(t1, 1000L))"); - Object obtained = runOrCatch(t1.during(t1, r.add(t1, 1000L)), - new OptArgs() - ,conn); - try { - assertEquals(expected_, obtained); - logger.info("Finished running line #60"); - } catch (Throwable ae) { - logger.error("Whoops, got exception on line #60:" + ae.toString()); - if(obtained instanceof Throwable) { - ae.addSuppressed((Throwable) obtained); - } - throw ae; - } - } - - { - // times/api.yaml line #64 - /* false */ - Boolean expected_ = false; - /* t1.during(t1, t1 + 1000, left_bound='open') */ - logger.info("About to run line #64: t1.during(t1, r.add(t1, 1000L)).optArg('left_bound', 'open')"); - Object obtained = runOrCatch(t1.during(t1, r.add(t1, 1000L)).optArg("left_bound", "open"), - new OptArgs() - ,conn); - try { - assertEquals(expected_, obtained); - logger.info("Finished running line #64"); - } catch (Throwable ae) { - logger.error("Whoops, got exception on line #64:" + ae.toString()); - if(obtained instanceof Throwable) { - ae.addSuppressed((Throwable) obtained); - } - throw ae; - } - } - - { - // times/api.yaml line #67 - /* false */ - Boolean expected_ = false; - /* t1.during(t1, t1) */ - logger.info("About to run line #67: t1.during(t1, t1)"); - Object obtained = runOrCatch(t1.during(t1, t1), - new OptArgs() - ,conn); - try { - assertEquals(expected_, obtained); - logger.info("Finished running line #67"); - } catch (Throwable ae) { - logger.error("Whoops, got exception on line #67:" + ae.toString()); - if(obtained instanceof Throwable) { - ae.addSuppressed((Throwable) obtained); - } - throw ae; - } - } - - { - // times/api.yaml line #70 - /* true */ - Boolean expected_ = true; - /* t1.during(t1, t1, right_bound='closed') */ - logger.info("About to run line #70: t1.during(t1, t1).optArg('right_bound', 'closed')"); - Object obtained = runOrCatch(t1.during(t1, t1).optArg("right_bound", "closed"), - new OptArgs() - ,conn); - try { - assertEquals(expected_, obtained); - logger.info("Finished running line #70"); - } catch (Throwable ae) { - logger.error("Whoops, got exception on line #70:" + ae.toString()); - if(obtained instanceof Throwable) { - ae.addSuppressed((Throwable) obtained); - } - throw ae; - } - } - - { - // times/api.yaml line #77 - /* 1375142400 */ - Long expected_ = 1375142400L; - /* t1.date().to_epoch_time() */ - logger.info("About to run line #77: t1.date().toEpochTime()"); - Object obtained = runOrCatch(t1.date().toEpochTime(), - new OptArgs() - ,conn); - try { - assertEquals(expected_, obtained); - logger.info("Finished running line #77"); - } catch (Throwable ae) { - logger.error("Whoops, got exception on line #77:" + ae.toString()); - if(obtained instanceof Throwable) { - ae.addSuppressed((Throwable) obtained); - } - throw ae; - } - } - - { - // times/api.yaml line #79 - /* (4896.681) */ - Double expected_ = 4896.681; - /* t1.time_of_day() */ - logger.info("About to run line #79: t1.timeOfDay()"); - Object obtained = runOrCatch(t1.timeOfDay(), - new OptArgs() - ,conn); - try { - assertEquals((double) expected_, - ((Number) obtained).doubleValue(), - 0.00000000001); - logger.info("Finished running line #79"); - } catch (Throwable ae) { - logger.error("Whoops, got exception on line #79:" + ae.toString()); - if(obtained instanceof Throwable) { - ae.addSuppressed((Throwable) obtained); - } - throw ae; - } - } - - { - // times/api.yaml line #81 - /* 2013 */ - Long expected_ = 2013L; - /* t1.year() */ - logger.info("About to run line #81: t1.year()"); - Object obtained = runOrCatch(t1.year(), - new OptArgs() - ,conn); - try { - assertEquals(expected_, obtained); - logger.info("Finished running line #81"); - } catch (Throwable ae) { - logger.error("Whoops, got exception on line #81:" + ae.toString()); - if(obtained instanceof Throwable) { - ae.addSuppressed((Throwable) obtained); - } - throw ae; - } - } - - { - // times/api.yaml line #83 - /* 7 */ - Long expected_ = 7L; - /* t1.month() */ - logger.info("About to run line #83: t1.month()"); - Object obtained = runOrCatch(t1.month(), - new OptArgs() - ,conn); - try { - assertEquals(expected_, obtained); - logger.info("Finished running line #83"); - } catch (Throwable ae) { - logger.error("Whoops, got exception on line #83:" + ae.toString()); - if(obtained instanceof Throwable) { - ae.addSuppressed((Throwable) obtained); - } - throw ae; - } - } - - { - // times/api.yaml line #85 - /* 30 */ - Long expected_ = 30L; - /* t1.day() */ - logger.info("About to run line #85: t1.day()"); - Object obtained = runOrCatch(t1.day(), - new OptArgs() - ,conn); - try { - assertEquals(expected_, obtained); - logger.info("Finished running line #85"); - } catch (Throwable ae) { - logger.error("Whoops, got exception on line #85:" + ae.toString()); - if(obtained instanceof Throwable) { - ae.addSuppressed((Throwable) obtained); - } - throw ae; - } - } - - { - // times/api.yaml line #87 - /* 2 */ - Long expected_ = 2L; - /* t1.day_of_week() */ - logger.info("About to run line #87: t1.dayOfWeek()"); - Object obtained = runOrCatch(t1.dayOfWeek(), - new OptArgs() - ,conn); - try { - assertEquals(expected_, obtained); - logger.info("Finished running line #87"); - } catch (Throwable ae) { - logger.error("Whoops, got exception on line #87:" + ae.toString()); - if(obtained instanceof Throwable) { - ae.addSuppressed((Throwable) obtained); - } - throw ae; - } - } - - { - // times/api.yaml line #89 - /* 211 */ - Long expected_ = 211L; - /* t1.day_of_year() */ - logger.info("About to run line #89: t1.dayOfYear()"); - Object obtained = runOrCatch(t1.dayOfYear(), - new OptArgs() - ,conn); - try { - assertEquals(expected_, obtained); - logger.info("Finished running line #89"); - } catch (Throwable ae) { - logger.error("Whoops, got exception on line #89:" + ae.toString()); - if(obtained instanceof Throwable) { - ae.addSuppressed((Throwable) obtained); - } - throw ae; - } - } - - { - // times/api.yaml line #91 - /* 1 */ - Long expected_ = 1L; - /* t1.hours() */ - logger.info("About to run line #91: t1.hours()"); - Object obtained = runOrCatch(t1.hours(), - new OptArgs() - ,conn); - try { - assertEquals(expected_, obtained); - logger.info("Finished running line #91"); - } catch (Throwable ae) { - logger.error("Whoops, got exception on line #91:" + ae.toString()); - if(obtained instanceof Throwable) { - ae.addSuppressed((Throwable) obtained); - } - throw ae; - } - } - - { - // times/api.yaml line #93 - /* 21 */ - Long expected_ = 21L; - /* t1.minutes() */ - logger.info("About to run line #93: t1.minutes()"); - Object obtained = runOrCatch(t1.minutes(), - new OptArgs() - ,conn); - try { - assertEquals(expected_, obtained); - logger.info("Finished running line #93"); - } catch (Throwable ae) { - logger.error("Whoops, got exception on line #93:" + ae.toString()); - if(obtained instanceof Throwable) { - ae.addSuppressed((Throwable) obtained); - } - throw ae; - } - } - - { - // times/api.yaml line #95 - /* 36.681 */ - Double expected_ = 36.681; - /* t1.seconds() */ - logger.info("About to run line #95: t1.seconds()"); - Object obtained = runOrCatch(t1.seconds(), - new OptArgs() - ,conn); - try { - assertEquals((double) expected_, - ((Number) obtained).doubleValue(), - 0.00000000001); - logger.info("Finished running line #95"); - } catch (Throwable ae) { - logger.error("Whoops, got exception on line #95:" + ae.toString()); - if(obtained instanceof Throwable) { - ae.addSuppressed((Throwable) obtained); - } - throw ae; - } - } - - { - // times/api.yaml line #99 - /* (1375165800.1) */ - Double expected_ = 1375165800.1; - /* r.time(2013, r.july, 29, 23, 30, 0.1, "-07:00").to_epoch_time() */ - logger.info("About to run line #99: r.time(2013L, r.july(), 29L, 23L, 30L, 0.1, '-07:00').toEpochTime()"); - Object obtained = runOrCatch(r.time(2013L, r.july(), 29L, 23L, 30L, 0.1, "-07:00").toEpochTime(), - new OptArgs() - ,conn); - try { - assertEquals((double) expected_, - ((Number) obtained).doubleValue(), - 0.00000000001); - logger.info("Finished running line #99"); - } catch (Throwable ae) { - logger.error("Whoops, got exception on line #99:" + ae.toString()); - if(obtained instanceof Throwable) { - ae.addSuppressed((Throwable) obtained); - } - throw ae; - } - } - - { - // times/api.yaml line #101 - /* ("-07:00") */ - String expected_ = "-07:00"; - /* r.time(2013, r.july, 29, 23, 30, 0.1, "-07:00").timezone() */ - logger.info("About to run line #101: r.time(2013L, r.july(), 29L, 23L, 30L, 0.1, '-07:00').timezone()"); - Object obtained = runOrCatch(r.time(2013L, r.july(), 29L, 23L, 30L, 0.1, "-07:00").timezone(), - new OptArgs() - ,conn); - try { - assertEquals(expected_, obtained); - logger.info("Finished running line #101"); - } catch (Throwable ae) { - logger.error("Whoops, got exception on line #101:" + ae.toString()); - if(obtained instanceof Throwable) { - ae.addSuppressed((Throwable) obtained); - } - throw ae; - } - } - - { - // times/api.yaml line #109 - /* err("ReqlQueryLogicError", "Expected type STRING but found NUMBER.", []) */ - Err expected_ = err("ReqlQueryLogicError", "Expected type STRING but found NUMBER.", r.array()); - /* r.time(2013, r.july, 29, 23).to_epoch_time() */ - logger.info("About to run line #109: r.time(2013L, r.july(), 29L, 23L).toEpochTime()"); - Object obtained = runOrCatch(r.time(2013L, r.july(), 29L, 23L).toEpochTime(), - new OptArgs() - ,conn); - try { - assertEquals(expected_, obtained); - logger.info("Finished running line #109"); - } catch (Throwable ae) { - logger.error("Whoops, got exception on line #109:" + ae.toString()); - if(obtained instanceof Throwable) { - ae.addSuppressed((Throwable) obtained); - } - throw ae; - } - } - - { - // times/api.yaml line #111 - /* 1375081200 */ - Long expected_ = 1375081200L; - /* r.time(2013, r.july, 29, "-07:00").to_epoch_time() */ - logger.info("About to run line #111: r.time(2013L, r.july(), 29L, '-07:00').toEpochTime()"); - Object obtained = runOrCatch(r.time(2013L, r.july(), 29L, "-07:00").toEpochTime(), - new OptArgs() - ,conn); - try { - assertEquals(expected_, obtained); - logger.info("Finished running line #111"); - } catch (Throwable ae) { - logger.error("Whoops, got exception on line #111:" + ae.toString()); - if(obtained instanceof Throwable) { - ae.addSuppressed((Throwable) obtained); - } - throw ae; - } - } - - { - // times/api.yaml line #113 - /* ("-07:00") */ - String expected_ = "-07:00"; - /* r.time(2013, r.july, 29, "-07:00").timezone() */ - logger.info("About to run line #113: r.time(2013L, r.july(), 29L, '-07:00').timezone()"); - Object obtained = runOrCatch(r.time(2013L, r.july(), 29L, "-07:00").timezone(), - new OptArgs() - ,conn); - try { - assertEquals(expected_, obtained); - logger.info("Finished running line #113"); - } catch (Throwable ae) { - logger.error("Whoops, got exception on line #113:" + ae.toString()); - if(obtained instanceof Throwable) { - ae.addSuppressed((Throwable) obtained); - } - throw ae; - } - } - - { - // times/api.yaml line #119 - /* 1375242965 */ - Long expected_ = 1375242965L; - /* r.iso8601("2013-07-30T20:56:05-07:00").to_epoch_time() */ - logger.info("About to run line #119: r.iso8601('2013-07-30T20:56:05-07:00').toEpochTime()"); - Object obtained = runOrCatch(r.iso8601("2013-07-30T20:56:05-07:00").toEpochTime(), - new OptArgs() - ,conn); - try { - assertEquals(expected_, obtained); - logger.info("Finished running line #119"); - } catch (Throwable ae) { - logger.error("Whoops, got exception on line #119:" + ae.toString()); - if(obtained instanceof Throwable) { - ae.addSuppressed((Throwable) obtained); - } - throw ae; - } - } - - { - // times/api.yaml line #122 - /* ("2013-07-30T20:56:05-07:00") */ - String expected_ = "2013-07-30T20:56:05-07:00"; - /* r.epoch_time(1375242965).in_timezone("-07:00").to_iso8601() */ - logger.info("About to run line #122: r.epochTime(1375242965L).inTimezone('-07:00').toIso8601()"); - Object obtained = runOrCatch(r.epochTime(1375242965L).inTimezone("-07:00").toIso8601(), - new OptArgs() - ,conn); - try { - assertEquals(expected_, obtained); - logger.info("Finished running line #122"); - } catch (Throwable ae) { - logger.error("Whoops, got exception on line #122:" + ae.toString()); - if(obtained instanceof Throwable) { - ae.addSuppressed((Throwable) obtained); - } - throw ae; - } - } - - { - // times/api.yaml line #125 - /* ("PTYPE