├── .dockerignore ├── .editorconfig ├── .github └── workflows │ └── crystal.yml ├── .gitignore ├── API_STATUS.md ├── CHANGELOG.md ├── Dockerfile ├── LICENSE ├── README.md ├── coverage.sh ├── shard.lock ├── shard.yml ├── spec ├── datum │ └── order_spec.cr ├── original_rethinkdb_testsuite │ ├── connections │ │ └── server_info.yaml │ ├── reql_spec.cr │ ├── reql_spec_generator.cr │ └── src │ │ ├── aggregation.yaml │ │ ├── arity.yaml │ │ ├── changefeeds │ │ ├── edge.yaml │ │ ├── geo.rb.yaml │ │ ├── idxcopy.yaml │ │ ├── include_states.yaml │ │ ├── now.py_one.yaml │ │ ├── point.yaml │ │ ├── sindex.yaml │ │ ├── squash.yaml │ │ └── table.yaml │ │ ├── control.yaml │ │ ├── datum │ │ ├── array.yaml │ │ ├── binary.yaml │ │ ├── bool.yaml │ │ ├── null.yaml │ │ ├── number.yaml │ │ ├── object.yaml │ │ ├── string.yaml │ │ ├── typeof.yaml │ │ └── uuid.yaml │ │ ├── default.yaml │ │ ├── geo │ │ ├── constructors.yaml │ │ ├── geojson.yaml │ │ ├── indexing.yaml │ │ ├── intersection_inclusion.yaml │ │ ├── operations.yaml │ │ └── primitives.yaml │ │ ├── joins.yaml │ │ ├── json.yaml │ │ ├── limits.yaml │ │ ├── match.yaml │ │ ├── math_logic │ │ ├── add.yaml │ │ ├── aliases.yaml │ │ ├── bit.yaml │ │ ├── comparison.yaml │ │ ├── div.yaml │ │ ├── floor_ceil_round.yaml │ │ ├── logic.yaml │ │ ├── math.yaml │ │ ├── mod.yaml │ │ ├── mul.yaml │ │ └── sub.yaml │ │ ├── meta │ │ ├── composite.py.yaml │ │ ├── dbs.yaml │ │ ├── grant.yaml │ │ └── table.yaml │ │ ├── mutation │ │ ├── atomic_get_set.yaml │ │ ├── delete.yaml │ │ ├── insert.yaml │ │ ├── replace.yaml │ │ ├── sync.yaml │ │ ├── update.yaml │ │ └── write_hook.yaml │ │ ├── polymorphism.yaml │ │ ├── random.yaml │ │ ├── range.yaml │ │ ├── regression │ │ ├── 1001.yaml │ │ ├── 1005.yaml │ │ ├── 1023.yaml │ │ ├── 1081.yaml │ │ ├── 1132.yaml │ │ ├── 1133.yaml │ │ ├── 1155.yaml │ │ ├── 1179.yaml │ │ ├── 1468.yaml │ │ ├── 1789.yaml │ │ ├── 2052.yaml │ │ ├── 2399.rb.yaml │ │ ├── 2639.rb.yaml │ │ ├── 2696.yaml │ │ ├── 2697.yaml │ │ ├── 2709.yaml │ │ ├── 2710.yaml │ │ ├── 2766.yaml │ │ ├── 2767.yaml │ │ ├── 2774.yaml │ │ ├── 2838.py.yaml │ │ ├── 2930.yaml │ │ ├── 3057.yaml │ │ ├── 3059.yaml │ │ ├── 309.yaml │ │ ├── 3444.yaml │ │ ├── 3449.js.yaml │ │ ├── 354.yaml │ │ ├── 3637.yaml │ │ ├── 370.yaml │ │ ├── 3745.yaml │ │ ├── 3759.yaml │ │ ├── 4030.yaml │ │ ├── 4063.js.yaml │ │ ├── 4132.yaml │ │ ├── 4146.yaml │ │ ├── 4431.yaml │ │ ├── 4462.yaml │ │ ├── 4465.py.yaml │ │ ├── 4501.yaml │ │ ├── 453.yaml │ │ ├── 4582.yaml │ │ ├── 4591.yaml │ │ ├── 46.yaml │ │ ├── 469.yaml │ │ ├── 4729.yaml │ │ ├── 5092.js.yaml │ │ ├── 5130.js.yaml │ │ ├── 522.py.yaml │ │ ├── 5222.py.yaml │ │ ├── 5241.yaml │ │ ├── 5383.rb.yaml │ │ ├── 5438.yaml │ │ ├── 545.yaml │ │ ├── 546.yaml │ │ ├── 5481.py.yaml │ │ ├── 5535.rb.yaml │ │ ├── 5542.py.yaml │ │ ├── 568.yaml │ │ ├── 578.yaml │ │ ├── 579.yaml │ │ ├── 5977.js_one.yaml │ │ ├── 6108.yaml │ │ ├── 619.yaml │ │ ├── 6191.py_one.yaml │ │ ├── 665.yaml │ │ ├── 678.yaml │ │ ├── 718.yaml │ │ ├── 730.yaml │ │ ├── 757.yaml │ │ ├── 763.js.yaml │ │ ├── 767.yaml │ │ └── 831.yaml │ │ ├── selection.yaml │ │ ├── sindex │ │ ├── api.yaml │ │ ├── nullsinstrings.yaml │ │ ├── status.yaml │ │ ├── trunc_array.rb.yaml │ │ └── truncation.rb.yaml │ │ ├── timeout.yaml │ │ ├── times │ │ ├── api.yaml │ │ ├── constructors.yaml │ │ ├── index.yaml │ │ ├── portions.yaml │ │ ├── shim.yaml │ │ ├── time_arith.yaml │ │ └── timezones.yaml │ │ ├── transform │ │ ├── array.yaml │ │ ├── fold.yaml │ │ ├── map.yaml │ │ ├── object.yaml │ │ ├── table.yaml │ │ └── unordered_map.yaml │ │ └── transformation.yaml └── reql │ ├── has_fields_spec.cr │ ├── index_spec.cr │ ├── inspect_spec.cr │ ├── map_spec.cr │ ├── nth_spec.cr │ ├── range_spec.cr │ ├── sample_spec.cr │ ├── set_difference_spec.cr │ ├── slice_spec.cr │ ├── table_spec.cr │ └── transform_spec.cr ├── src ├── crypto.cr ├── driver │ ├── connection.cr │ ├── dsl.cr │ ├── local_connection.cr │ └── remote_connection.cr ├── duktape.cr ├── main.cr ├── reql │ ├── error.cr │ ├── evaluator.cr │ ├── executor │ │ ├── abstract_value.cr │ │ ├── array_stream.cr │ │ ├── concat_map_stream.cr │ │ ├── datum.cr │ │ ├── db.cr │ │ ├── field_func.cr │ │ ├── filter_stream.cr │ │ ├── func.cr │ │ ├── get_all_stream.cr │ │ ├── group_stream.cr │ │ ├── infinite_range.cr │ │ ├── infinite_stream.cr │ │ ├── js_func.cr │ │ ├── limit_stream.cr │ │ ├── map_stream.cr │ │ ├── range.cr │ │ ├── reql_func.cr │ │ ├── row.cr │ │ ├── row_reference.cr │ │ ├── row_value.cr │ │ ├── skip_stream.cr │ │ ├── stream.cr │ │ └── table.cr │ ├── helpers │ │ ├── encoder.cr │ │ ├── object_selection.cr │ │ └── table_writer.cr │ ├── jobs │ │ ├── job.cr │ │ ├── job_manager.cr │ │ ├── query_job.cr │ │ └── table_scan_job.cr │ ├── term.cr │ ├── terms │ │ ├── append.cr │ │ ├── binary.cr │ │ ├── bracket.cr │ │ ├── branch.cr │ │ ├── change_at.cr │ │ ├── coerce_to.cr │ │ ├── concat_map.cr │ │ ├── contains.cr │ │ ├── count.cr │ │ ├── db.cr │ │ ├── db_create.cr │ │ ├── db_list.cr │ │ ├── default.cr │ │ ├── delete.cr │ │ ├── delete_at.cr │ │ ├── distinct.cr │ │ ├── do.cr │ │ ├── error.cr │ │ ├── filter.cr │ │ ├── floor_ceil_round.cr │ │ ├── for_each.cr │ │ ├── func.cr │ │ ├── get.cr │ │ ├── get_all.cr │ │ ├── group.cr │ │ ├── has_fields.cr │ │ ├── index_create.cr │ │ ├── index_list.cr │ │ ├── index_status.cr │ │ ├── index_wait.cr │ │ ├── info.cr │ │ ├── insert.cr │ │ ├── insert_at.cr │ │ ├── is_empty.cr │ │ ├── js.cr │ │ ├── limit.cr │ │ ├── logic.cr │ │ ├── map.cr │ │ ├── math.cr │ │ ├── max.cr │ │ ├── merge.cr │ │ ├── min.cr │ │ ├── minval_maxval.cr │ │ ├── now.cr │ │ ├── nth.cr │ │ ├── object.cr │ │ ├── order_by.cr │ │ ├── pluck.cr │ │ ├── random.cr │ │ ├── range.cr │ │ ├── sample.cr │ │ ├── set.cr │ │ ├── skip.cr │ │ ├── slice.cr │ │ ├── splice_at.cr │ │ ├── split.cr │ │ ├── sum.cr │ │ ├── table.cr │ │ ├── table_create.cr │ │ ├── table_list.cr │ │ ├── type_of.cr │ │ ├── ungroup.cr │ │ ├── upcase_downcase.cr │ │ ├── update.cr │ │ ├── uuid.cr │ │ ├── var.cr │ │ └── without.cr │ ├── transformers │ │ ├── base.cr │ │ ├── group_transformer.cr │ │ ├── simplify_variables_transformer.cr │ │ └── transformer.cr │ └── worker.cr ├── server │ ├── client.cr │ ├── driver_server.cr │ └── http_server.cr ├── storage │ ├── kv.cr │ ├── manager.cr │ ├── metrics.cr │ ├── migrations.cr │ └── table │ │ ├── abstract_table.cr │ │ ├── physical_table.cr │ │ ├── virtual_current_issues_table.cr │ │ ├── virtual_db_config_table.cr │ │ ├── virtual_jobs_table.cr │ │ ├── virtual_server_config_table.cr │ │ ├── virtual_server_status_table.cr │ │ ├── virtual_stats_table.cr │ │ ├── virtual_table.cr │ │ ├── virtual_table_config_table.cr │ │ └── virtual_table_status_table.cr └── utils │ └── wait_group.cr └── vendor └── rethinkdb-webui ├── .gitignore ├── README.md ├── bin └── serve.js ├── package-lock.json ├── package.json ├── public ├── favicon.ico ├── fonts │ ├── copse-regular-webfont.eot │ ├── copse-regular-webfont.svg │ ├── copse-regular-webfont.ttf │ ├── copse-regular-webfont.woff │ ├── copse_OFL.txt │ ├── generator_config.txt │ ├── ionicons.eot │ ├── ionicons.svg │ ├── ionicons.ttf │ ├── ionicons.woff │ ├── open-sans_LICENSE.txt │ ├── opensans-bold-webfont.eot │ ├── opensans-bold-webfont.svg │ ├── opensans-bold-webfont.ttf │ ├── opensans-bold-webfont.woff │ ├── opensans-bolditalic-webfont.eot │ ├── opensans-bolditalic-webfont.svg │ ├── opensans-bolditalic-webfont.ttf │ ├── opensans-bolditalic-webfont.woff │ ├── opensans-extrabold-webfont.eot │ ├── opensans-extrabold-webfont.svg │ ├── opensans-extrabold-webfont.ttf │ ├── opensans-extrabold-webfont.woff │ ├── opensans-extrabolditalic-webfont.eot │ ├── opensans-extrabolditalic-webfont.svg │ ├── opensans-extrabolditalic-webfont.ttf │ ├── opensans-extrabolditalic-webfont.woff │ ├── opensans-italic-webfont.eot │ ├── opensans-italic-webfont.svg │ ├── opensans-italic-webfont.ttf │ ├── opensans-italic-webfont.woff │ ├── opensans-light-webfont.eot │ ├── opensans-light-webfont.svg │ ├── opensans-light-webfont.ttf │ ├── opensans-light-webfont.woff │ ├── opensans-lightitalic-webfont.eot │ ├── opensans-lightitalic-webfont.svg │ ├── opensans-lightitalic-webfont.ttf │ ├── opensans-lightitalic-webfont.woff │ ├── opensans-regular-webfont.eot │ ├── opensans-regular-webfont.svg │ ├── opensans-regular-webfont.ttf │ ├── opensans-regular-webfont.woff │ ├── opensans-semibold-webfont.eot │ ├── opensans-semibold-webfont.svg │ ├── opensans-semibold-webfont.ttf │ ├── opensans-semibold-webfont.woff │ ├── opensans-semibolditalic-webfont.eot │ ├── opensans-semibolditalic-webfont.svg │ ├── opensans-semibolditalic-webfont.ttf │ ├── opensans-semibolditalic-webfont.woff │ └── stylesheet.css ├── images │ ├── ajax-loader.gif │ ├── arrow_down.png │ ├── arrow_right.png │ ├── bar-line-graph-icon.png │ ├── bars-icon.png │ ├── bars-icon_server-assignments.png │ ├── bars-icon_white.png │ ├── body_bg_tile.png │ ├── book_alt_16x16.png │ ├── clock-icon.png │ ├── clock-icon_alt.png │ ├── cog-icon.png │ ├── cog_16x16.png │ ├── cog_white_16x16.png │ ├── copy_to_clipboard_16x16.png │ ├── db.png │ ├── disk-icon.png │ ├── disk-slot-icon.png │ ├── document-icon.png │ ├── eye-icon_white.png │ ├── fullscreen_16x16.png │ ├── fullscreen_exit_16x16.png │ ├── globe-icon_white.png │ ├── graph-icon.png │ ├── green-light.png │ ├── green-light_glow.png │ ├── green-light_glow_small.png │ ├── grid-icon.png │ ├── icon-magnifying_glass.png │ ├── icon-pause.png │ ├── icon-play.png │ ├── layers-exclamation-icon.png │ ├── layers-icon.png │ ├── list-horiz-dash.png │ ├── list-square-bullet.png │ ├── list-vert-dash.png │ ├── live-icon.png │ ├── loading-feed.gif │ ├── navbar-active.png │ ├── pencil-icon.png │ ├── pencil-icon_big.png │ ├── push-arrow-left-icon.png │ ├── query_round_trip-icon.png │ ├── query_server_time-icon.png │ ├── query_shard_access-icon.png │ ├── red-light.png │ ├── red-light_glow.png │ ├── red-light_glow_small.png │ ├── resolve_issue-clock_icon.png │ ├── resolve_issue-danger_icon.png │ ├── resolve_issue-details_icon.png │ ├── resolve_issue-message_icon.png │ ├── resolve_issue-resolved_icon.png │ ├── server-icon-added.png │ ├── server-icon-removed.png │ ├── server-icon.png │ ├── server-icon_server-assignments.png │ ├── status-panel_bg_tile.png │ ├── status_panel-icon_1-error.png │ ├── status_panel-icon_1.png │ ├── status_panel-icon_2-error.png │ ├── status_panel-icon_2.png │ ├── status_panel-icon_3-error.png │ ├── status_panel-icon_3.png │ ├── status_panel-icon_4-error.png │ ├── status_panel-icon_4.png │ ├── thinker_on_hill.svg │ ├── trash_stroke_16x16.png │ ├── warning-icon.png │ └── yellow-light_glow.png ├── index.html └── js │ ├── ZeroClipboard.min.js │ ├── ZeroClipboard.swf │ ├── backbone-min.js │ ├── backbone.js │ ├── bootstrap │ ├── bootstrap-alert.js │ ├── bootstrap-button.js │ ├── bootstrap-collapse.js │ ├── bootstrap-dropdown.js │ ├── bootstrap-modal.js │ ├── bootstrap-popover.js │ ├── bootstrap-scrollspy.js │ ├── bootstrap-tooltip.js │ ├── bootstrap-transition.js │ ├── bootstrap-typeahead.js │ └── bootstrap-typeahead.js.fork.backup │ ├── chosen │ ├── chosen-sprite.png │ ├── chosen.css │ └── chosen.jquery.min.js │ ├── codemirror │ ├── ambiance.css │ ├── codemirror.css │ ├── codemirror.js │ ├── javascript.js │ └── matchbrackets.js │ ├── cubism.v1.js │ ├── d3.v2.min.js │ ├── date-en-US.js │ ├── handlebars.runtime-1.0.0.js │ ├── jquery-1.7.2.min.js │ ├── jquery.color.js │ ├── jquery.dataTables.min.js │ ├── jquery.form.js │ ├── jquery.lightbox_me.js │ ├── jquery.timeago.js │ ├── less-1.1.4.min.js │ ├── nanoscroller │ ├── jquery.nanoscroller.min.js │ └── nanoscroller.css │ ├── rdb_cubism.v1.js │ ├── reql_docs.js │ ├── underscore-min.js │ ├── underscore-min.map │ └── xdate.js └── src ├── coffee ├── app.coffee ├── body.coffee ├── dashboard │ ├── dashboard.coffee │ └── panels.coffee ├── dataexplorer.coffee ├── issues.coffee ├── log_view.coffee ├── modals.coffee ├── models.coffee ├── navbar.coffee ├── router.coffee ├── servers │ ├── index.coffee │ ├── profile.coffee │ ├── responsibilities.coffee │ └── server.coffee ├── tables │ ├── index.coffee │ ├── shard_assignments.coffee │ ├── shard_distribution.coffee │ └── table.coffee ├── topbar.coffee ├── ui_components │ ├── modals.coffee │ └── progressbar.coffee ├── util.coffee ├── vdom_util.coffee └── vis.coffee ├── handlebars ├── abstract-modal-outer.hbs ├── add_database-modal.hbs ├── add_table-modal.hbs ├── alert-connection_fail.hbs ├── alert_message.hbs ├── body-structure.hbs ├── confirmation_dialog.hbs ├── database.hbs ├── databases_container.hbs ├── dataexplorer-cursor_timed_out.hbs ├── dataexplorer-databases_suggestions.hbs ├── dataexplorer-description.hbs ├── dataexplorer-description_with_example.hbs ├── dataexplorer-error.hbs ├── dataexplorer-history.hbs ├── dataexplorer-option_page.hbs ├── dataexplorer-options.hbs ├── dataexplorer-query_error.hbs ├── dataexplorer-query_li.hbs ├── dataexplorer-reason_broken.hbs ├── dataexplorer-tables_suggestions.hbs ├── dataexplorer_input_query.hbs ├── dataexplorer_large_result_json_tree_container.hbs ├── dataexplorer_result_container.hbs ├── dataexplorer_result_empty.hbs ├── dataexplorer_result_json_table_container.hbs ├── dataexplorer_result_json_table_data_inline.hbs ├── dataexplorer_result_json_table_td_attr.hbs ├── dataexplorer_result_json_table_td_value.hbs ├── dataexplorer_result_json_table_td_value_content.hbs ├── dataexplorer_result_json_table_tr_attr.hbs ├── dataexplorer_result_json_table_tr_value.hbs ├── dataexplorer_result_json_tree_array.hbs ├── dataexplorer_result_json_tree_container.hbs ├── dataexplorer_result_json_tree_email.hbs ├── dataexplorer_result_json_tree_object.hbs ├── dataexplorer_result_json_tree_span.hbs ├── dataexplorer_result_json_tree_span_with_quotes.hbs ├── dataexplorer_result_json_tree_url.hbs ├── dataexplorer_result_profile.hbs ├── dataexplorer_result_raw.hbs ├── dataexplorer_result_table.hbs ├── dataexplorer_result_tree.hbs ├── dataexplorer_suggestion_name_li.hbs ├── dataexplorer_view.hbs ├── declare_server_dead-modal.hbs ├── delete-database-modal.hbs ├── element_view-not_found.hbs ├── empty_list.hbs ├── error-query.hbs ├── error_input.hbs ├── fail_solve_issue.hbs ├── has_update.hbs ├── is_disconnected.hbs ├── is_disconnected_message.hbs ├── loading_databases.hbs ├── loading_servers.hbs ├── log-entry.hbs ├── logs_container.hbs ├── navbar_view.hbs ├── no_databases.hbs ├── ops_plot.hbs ├── ops_plot_legend.hbs ├── options_view.hbs ├── progressbar.hbs ├── reconfigure-diff.hbs ├── reconfigure-modal.hbs ├── reconfigure.hbs ├── remove_table-modal.hbs ├── rename_item-modal.hbs ├── renamed_item-alert.hbs ├── replica_status.hbs ├── resolve_issues-resolved.hbs ├── responsibility.hbs ├── secondary_indexes-alert_msg.hbs ├── secondary_indexes-error.hbs ├── shard_distribution_container.hbs ├── sidebar-client_connection_status.hbs ├── sidebar-container.hbs ├── sidebar-issues.hbs ├── sidebar-issues_banner.hbs ├── sidebar-servers_connected.hbs ├── sidebar-tables_available.hbs ├── simple_progressbar.hbs ├── table-secondary_index.hbs ├── table-secondary_indexes.hbs ├── table.hbs ├── table_container.hbs ├── table_profile.hbs ├── table_status_indicator.hbs └── table_title.hbs └── less ├── _ionicons-icons.less ├── _ionicons-variables.less ├── bootstrap ├── README.forked.md ├── accordion.less ├── alerts.less ├── badges.less ├── bootstrap.less ├── breadcrumbs.less ├── button-groups.less ├── buttons.less ├── carousel.less ├── close.less ├── code.less ├── component-animations.less ├── dropdowns.less ├── forms.less ├── grid.less ├── hero-unit.less ├── labels.less ├── layouts.less ├── mixins.less ├── modals.less ├── navbar.less ├── navs.less ├── pager.less ├── pagination.less ├── popovers.less ├── progress-bars.less ├── reset.less ├── responsive.less ├── scaffolding.less ├── sprites.less ├── tables.less ├── thumbnails.less ├── tooltip.less ├── type.less ├── utilities.less ├── variables.less └── wells.less ├── flexbox-mixins.less ├── ionicons.less ├── lesshat.less ├── styles-new.less ├── styles.less └── vis.less /.dockerignore: -------------------------------------------------------------------------------- 1 | docs 2 | bin 3 | lib 4 | .shards 5 | .crystal 6 | 7 | data 8 | cov 9 | src/test.cr 10 | bench 11 | spec 12 | Dockerfile 13 | -------------------------------------------------------------------------------- /.editorconfig: -------------------------------------------------------------------------------- 1 | [*.cr] 2 | charset = utf-8 3 | end_of_line = lf 4 | insert_final_newline = true 5 | indent_style = space 6 | indent_size = 2 7 | trim_trailing_whitespace = true 8 | -------------------------------------------------------------------------------- /.gitignore: -------------------------------------------------------------------------------- 1 | docs 2 | lib 3 | bin 4 | .shards 5 | .crystal 6 | 7 | data 8 | cov 9 | src/test.cr 10 | test 11 | -------------------------------------------------------------------------------- /CHANGELOG.md: -------------------------------------------------------------------------------- 1 | # UNRELEASED (0.2.0) 2 | 3 | - Implement secondary indexes with `index_create`/`index_status`/`get_all`. 4 | - Implement table.update(). 5 | - Implement custom primary keys on tables and configurable durability setting. 6 | - Implement r.db("rethinkdb").table("db_config").insert({name: "aa"}) to create databases. 7 | - Replace storage engine with RocksDB, improving write performance by a factor of 2x. 8 | - Use `sock.sync = false` for socket IO, improving simple query performance by a factor of 15x. 9 | - Upgrade from Crystal 0.24.1 to Crystal 0.33.0. 10 | - Remove Datum::Type recursive type to improve code quality and avoid compiler bugs. Term::Type still needs to be removed. 11 | - Several bug fixes. 12 | 13 | # 0.1.0 - 2018-01-15 14 | 15 | - First release. 16 | -------------------------------------------------------------------------------- /LICENSE: -------------------------------------------------------------------------------- 1 | The MIT License (MIT) 2 | 3 | Copyright (c) 2017 Guilherme Bernal 4 | 5 | Permission is hereby granted, free of charge, to any person obtaining a copy 6 | of this software and associated documentation files (the "Software"), to deal 7 | in the Software without restriction, including without limitation the rights 8 | to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 9 | copies of the Software, and to permit persons to whom the Software is 10 | furnished to do so, subject to the following conditions: 11 | 12 | The above copyright notice and this permission notice shall be included in 13 | all copies or substantial portions of the Software. 14 | 15 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 16 | IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 17 | FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 18 | AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 19 | LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 20 | OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN 21 | THE SOFTWARE. 22 | -------------------------------------------------------------------------------- /coverage.sh: -------------------------------------------------------------------------------- 1 | #!/bin/sh 2 | set -e 3 | runner=$(mktemp) 4 | crystal build --debug -o $runner $(find spec -name '*.cr' ! -name '*generator.cr') 5 | rm -rf cov 6 | kcov --include-path=src --path-strip-level=1 cov $runner 7 | rm $runner 8 | xdg-open cov/index.html 9 | -------------------------------------------------------------------------------- /shard.lock: -------------------------------------------------------------------------------- 1 | version: 2.0 2 | shards: 3 | future: 4 | git: https://github.com/crystal-community/future.cr.git 5 | version: 1.0.0 6 | 7 | rocksdb: 8 | git: https://github.com/lbguilherme/rocksdb-crystal.git 9 | version: 0.1.0+git.commit.1a6237b620a5a0c711abb1f07754ba56c33c465c 10 | 11 | -------------------------------------------------------------------------------- /shard.yml: -------------------------------------------------------------------------------- 1 | name: rethinkdb-lite 2 | version: 0.1.0 3 | 4 | authors: 5 | - Guilherme Bernal 6 | 7 | targets: 8 | rethinkdb-lite: 9 | main: src/main.cr 10 | 11 | dependencies: 12 | rocksdb: 13 | github: lbguilherme/rocksdb-crystal 14 | branch: master 15 | future: 16 | github: crystal-community/future.cr 17 | 18 | crystal: ">= 1.0, < 2.0" 19 | 20 | license: MIT 21 | -------------------------------------------------------------------------------- /spec/original_rethinkdb_testsuite/connections/server_info.yaml: -------------------------------------------------------------------------------- 1 | desc: conn.server() tests 2 | tests: 3 | - cd: conn.server() 4 | ot: {"id": uuid(), "name": regex('.+'), "proxy": false} 5 | -------------------------------------------------------------------------------- /spec/original_rethinkdb_testsuite/src/changefeeds/geo.rb.yaml: -------------------------------------------------------------------------------- 1 | desc: Geo indexed changefeed operations 2 | table_variable_name: tbl 3 | tests: 4 | - rb: tbl.index_create('L', {geo: true}) 5 | ot: partial({'created': 1}) 6 | 7 | - rb: tbl.index_wait().count 8 | ot: 1 9 | 10 | - def: obj11 = {id: "11", L: r.point(1,1)} 11 | - def: obj12 = {id: "12", L: r.point(1,2)} 12 | - def: obj21 = {id: "21", L: r.point(2,1)} 13 | - def: obj22 = {id: "22", L: r.point(2,2)} 14 | 15 | # A distance of 130,000 meters from 1,1 is enough to cover 1,2 and 2,1 (~110km 16 | # distance) but not 2,2 (~150km distance.) 17 | # 18 | # This is useful because the S2LatLngRect bounding box passed to the shards contains 19 | # 2,2 yet it should not be returned in the changefeed results. 20 | - rb: feed = tbl.get_intersecting(r.circle(r.point(1,1), 130000), {index: "L"}).get_field("id").changes(include_initial: true) 21 | 22 | - rb: tbl.insert([obj11, obj12, obj21, obj22]) 23 | ot: partial({'errors': 0, 'inserted': 4}) 24 | 25 | - rb: fetch(feed, 3) 26 | ot: bag([{"new_val" => "11", "old_val" => nil}, {"new_val" => "12", "old_val" => nil}, {"new_val" => "21", "old_val" => nil}]) 27 | 28 | -------------------------------------------------------------------------------- /spec/original_rethinkdb_testsuite/src/changefeeds/now.py_one.yaml: -------------------------------------------------------------------------------- 1 | desc: Test that r.now() is allowed before changes(), disallowed after. 2 | table_variable_name: tbl 3 | tests: 4 | 5 | - py: tbl.changes().merge({'a': r.now()}) 6 | ot: err('ReqlQueryLogicError') 7 | 8 | - py: tbl.merge({'a': r.now()}).changes() 9 | -------------------------------------------------------------------------------- /spec/original_rethinkdb_testsuite/src/datum/bool.yaml: -------------------------------------------------------------------------------- 1 | desc: Tests of conversion to and from the RQL bool type 2 | tests: 3 | - py: r.expr(True) 4 | js: 5 | - r.expr(true) 6 | - r(true) 7 | rb: r true 8 | ot: true 9 | 10 | - py: r.expr(False) 11 | js: 12 | - r.expr(false) 13 | - r(false) 14 | rb: r false 15 | ot: false 16 | 17 | - cd: r.expr(False).type_of() 18 | ot: 'BOOL' 19 | 20 | # test coercions 21 | - cd: r.expr(True).coerce_to('string') 22 | ot: 'true' 23 | 24 | - cd: r.expr(True).coerce_to('bool') 25 | ot: True 26 | 27 | - cd: r.expr(False).coerce_to('bool') 28 | ot: False 29 | 30 | - cd: r.expr(null).coerce_to('bool') 31 | ot: False 32 | 33 | - cd: r.expr(0).coerce_to('bool') 34 | ot: True 35 | 36 | - cd: r.expr('false').coerce_to('bool') 37 | ot: True 38 | 39 | - cd: r.expr('foo').coerce_to('bool') 40 | ot: True 41 | 42 | - cd: r.expr([]).coerce_to('bool') 43 | ot: True 44 | 45 | - cd: r.expr({}).coerce_to('bool') 46 | ot: True 47 | 48 | -------------------------------------------------------------------------------- /spec/original_rethinkdb_testsuite/src/datum/null.yaml: -------------------------------------------------------------------------------- 1 | desc: Tests of conversion to and from the RQL null type 2 | tests: 3 | - cd: 4 | - r(null) 5 | - r.expr(null) 6 | py: r.expr(null) 7 | ot: (null) 8 | 9 | - cd: r.expr(null).type_of() 10 | rb: r(null).type_of() 11 | ot: 'NULL' 12 | 13 | # test coercions 14 | - cd: r.expr(null).coerce_to('string') 15 | ot: 'null' 16 | 17 | - cd: r.expr(null).coerce_to('null') 18 | ot: null 19 | -------------------------------------------------------------------------------- /spec/original_rethinkdb_testsuite/src/datum/typeof.yaml: -------------------------------------------------------------------------------- 1 | desc: These tests test the type of command 2 | tests: 3 | 4 | # Method form 5 | - cd: r.expr(null).type_of() 6 | ot: 'NULL' 7 | 8 | # Prefix form 9 | - cd: r.type_of(null) 10 | ot: 'NULL' 11 | 12 | # Error cases 13 | - js: r(null).typeOf(1) 14 | ot: err('ReqlCompileError', 'Expected 1 argument but found 2.', [0]) 15 | -------------------------------------------------------------------------------- /spec/original_rethinkdb_testsuite/src/datum/uuid.yaml: -------------------------------------------------------------------------------- 1 | desc: Test that UUIDs work 2 | tests: 3 | - cd: r.uuid() 4 | ot: uuid() 5 | - cd: r.expr(r.uuid()) 6 | ot: uuid() 7 | - cd: r.type_of(r.uuid()) 8 | ot: 'STRING' 9 | - cd: r.uuid().ne(r.uuid()) 10 | ot: true 11 | - cd: r.uuid('magic') 12 | ot: ('97dd10a5-4fc4-554f-86c5-0d2c2e3d5330') 13 | - cd: r.uuid('magic').eq(r.uuid('magic')) 14 | ot: true 15 | - cd: r.uuid('magic').ne(r.uuid('beans')) 16 | ot: true 17 | - py: r.expr([1,2,3,4,5,6,7,8,9,10]).map(lambda u:r.uuid()).distinct().count() 18 | js: r([1,2,3,4,5,6,7,8,9,10]).map(function(u) {return r.uuid();}).distinct().count() 19 | rb: r.expr([1,2,3,4,5,6,7,8,9,10]).map {|u| r.uuid()}.distinct().count() 20 | ot: 10 21 | -------------------------------------------------------------------------------- /spec/original_rethinkdb_testsuite/src/math_logic/math.yaml: -------------------------------------------------------------------------------- 1 | desc: Tests of nested arithmetic expressions 2 | tests: 3 | 4 | - py: (((4 + 2 * (r.expr(26) % 18)) / 5) - 3) 5 | js: r(4).add(r(2).mul(r(26).mod(18))).div(5).sub(3) 6 | rb: 7 | - ((((r 4) + (r 2) * ((r 26) % 18)) / 5) -3) 8 | - (((4 + 2 * ((r 26) % 18)) / 5) -3) 9 | ot: 1 10 | 11 | # Prescedence set by host langauge 12 | -------------------------------------------------------------------------------- /spec/original_rethinkdb_testsuite/src/math_logic/mod.yaml: -------------------------------------------------------------------------------- 1 | desc: Tests for the basic usage of the mod operation 2 | tests: 3 | 4 | - cd: r.expr(10).mod(3) 5 | py: 6 | - r.expr(10) % 3 7 | - 10 % r.expr(3) 8 | - r.expr(10).mod(3) 9 | rb: 10 | - (r 10) % 3 11 | - r(10).mod 3 12 | - 10 % (r 3) 13 | ot: 1 14 | 15 | - cd: r.expr(-10).mod(-3) 16 | py: r.expr(-10) % -3 17 | rb: (r -10) % -3 18 | ot: -1 19 | 20 | # Type errors 21 | - cd: r.expr(4).mod('a') 22 | py: r.expr(4) % 'a' 23 | rb: r(4) % 'a' 24 | ot: err('ReqlQueryLogicError', 'Expected type NUMBER but found STRING.', [1]) 25 | 26 | - cd: r.expr('a').mod(1) 27 | py: r.expr('a') % 1 28 | rb: r('a') % 1 29 | ot: err('ReqlQueryLogicError', 'Expected type NUMBER but found STRING.', [0]) 30 | 31 | - cd: r.expr('a').mod('b') 32 | py: r.expr('a') % 'b' 33 | rb: r('a') % 'b' 34 | ot: err('ReqlQueryLogicError', 'Expected type NUMBER but found STRING.', [0]) 35 | -------------------------------------------------------------------------------- /spec/original_rethinkdb_testsuite/src/math_logic/sub.yaml: -------------------------------------------------------------------------------- 1 | desc: Tests for basic usage of the subtraction operation 2 | tests: 3 | 4 | - cd: r.expr(1).sub(1) 5 | py: 6 | - r.expr(1) - 1 7 | - 1 - r.expr(1) 8 | - r.expr(1).sub(1) 9 | rb: 10 | - (r 1) - 1 11 | - 1 - (r 1) 12 | - r(1).sub(1) 13 | - r.expr(1).sub(1) 14 | ot: 0 15 | 16 | - cd: r.expr(-1).sub(1) 17 | py: r.expr(-1) - 1 18 | rb: (r -1) - 1 19 | ot: -2 20 | 21 | - cd: r.expr(1.75).sub(8.5) 22 | py: r.expr(1.75) - 8.5 23 | rb: (r 1.75) - 8.5 24 | ot: -6.75 25 | 26 | - cd: r.expr(1).sub(2,3,4,5) 27 | ot: -13 28 | 29 | # Type errors 30 | - cd: r.expr('a').sub(0.8) 31 | ot: err('ReqlQueryLogicError', 'Expected type NUMBER but found STRING.', [0]) 32 | 33 | - cd: r.expr(1).sub('a') 34 | ot: err('ReqlQueryLogicError', 'Expected type NUMBER but found STRING.', [1]) 35 | 36 | - cd: r.expr('b').sub('a') 37 | ot: err('ReqlQueryLogicError', 'Expected type NUMBER but found STRING.', [0]) 38 | -------------------------------------------------------------------------------- /spec/original_rethinkdb_testsuite/src/meta/composite.py.yaml: -------------------------------------------------------------------------------- 1 | desc: Tests meta operations in composite queries 2 | tests: 3 | 4 | - py: r.expr([1,2,3]).for_each(r.db_create('db_' + r.row.coerce_to('string'))) 5 | ot: ({'dbs_created':3,'config_changes':arrlen(3)}) 6 | 7 | - py: | 8 | r.db_list().set_difference(["rethinkdb", "test"]).for_each(lambda db_name: 9 | r.expr([1,2,3]).for_each(lambda i: 10 | r.db(db_name).table_create('tbl_' + i.coerce_to('string')))) 11 | ot: partial({'tables_created':9}) 12 | 13 | - py: r.db_list().set_difference(["rethinkdb", "test"]).for_each(r.db_drop(r.row)) 14 | ot: partial({'dbs_dropped':3,'tables_dropped':9}) 15 | -------------------------------------------------------------------------------- /spec/original_rethinkdb_testsuite/src/polymorphism.yaml: -------------------------------------------------------------------------------- 1 | desc: Tests that manipulation data in tables 2 | table_variable_name: tbl 3 | tests: 4 | 5 | - def: obj = r.expr({'id':0,'a':0}) 6 | 7 | - py: tbl.insert([{'id':i, 'a':i} for i in xrange(3)]) 8 | js: | 9 | tbl.insert(function(){ 10 | var res = [] 11 | for (var i = 0; i < 3; i++) { 12 | res.push({id:i, 'a':i}); 13 | } 14 | return res; 15 | }()) 16 | rb: tbl.insert((0..2).map{ |i| { :id => i, :a => i } }) 17 | ot: ({'deleted':0,'replaced':0,'unchanged':0,'errors':0,'skipped':0,'inserted':3}) 18 | 19 | # Polymorphism 20 | - cd: 21 | - tbl.merge({'c':1}).nth(0) 22 | - obj.merge({'c':1}) 23 | ot: ({'id':0,'c':1,'a':0}) 24 | 25 | - cd: 26 | - tbl.without('a').nth(0) 27 | - obj.without('a') 28 | ot: ({'id':0}) 29 | 30 | - cd: 31 | - tbl.pluck('a').nth(0) 32 | - obj.pluck('a') 33 | ot: ({'a':0}) 34 | -------------------------------------------------------------------------------- /spec/original_rethinkdb_testsuite/src/regression/1001.yaml: -------------------------------------------------------------------------------- 1 | desc: 1001 (null + between + sindexes) 2 | table_variable_name: tbl 3 | tests: 4 | - cd: tbl.insert({'a':null}) 5 | rb: tbl.insert({:a => null}) 6 | - cd: tbl.index_create('a') 7 | - cd: tbl.index_create('b') 8 | - cd: tbl.index_wait().pluck('index', 'ready') 9 | 10 | - cd: tbl.between(r.minval, r.maxval).count() 11 | ot: 1 12 | - py: tbl.between(r.minval, r.maxval, index='a').count() 13 | js: tbl.between(r.minval, r.maxval, {index:'a'}).count() 14 | rb: tbl.between(r.minval, r.maxval, :index => 'a').count() 15 | ot: 0 16 | - py: tbl.between(r.minval, r.maxval, index='b').count() 17 | js: tbl.between(r.minval, r.maxval, {index:'b'}).count() 18 | rb: tbl.between(r.minval, r.maxval, :index => 'b').count() 19 | ot: 0 20 | 21 | -------------------------------------------------------------------------------- /spec/original_rethinkdb_testsuite/src/regression/1005.yaml: -------------------------------------------------------------------------------- 1 | desc: Regression test for issue #1005. 2 | tests: 3 | - py: r.expr(str(r.table_list())) 4 | ot: "r.table_list()" 5 | 6 | - py: r.expr(str(r.table_create('a'))) 7 | ot: "r.table_create('a')" 8 | 9 | - py: r.expr(str(r.table_drop('a'))) 10 | ot: "r.table_drop('a')" 11 | 12 | - py: r.expr(str(r.db('a').table_list())) 13 | ot: "r.db('a').table_list()" 14 | 15 | - py: r.expr(str(r.db('a').table_create('a'))) 16 | ot: "r.db('a').table_create('a')" 17 | 18 | - py: r.expr(str(r.db('a').table_drop('a'))) 19 | ot: "r.db('a').table_drop('a')" 20 | -------------------------------------------------------------------------------- /spec/original_rethinkdb_testsuite/src/regression/1132.yaml: -------------------------------------------------------------------------------- 1 | desc: 1132 JSON duplicate key 2 | tests: 3 | - cd: r.json('{"a":1,"a":2}') 4 | ot: err("ReqlQueryLogicError", "Duplicate key \"a\" in JSON.", []) 5 | -------------------------------------------------------------------------------- /spec/original_rethinkdb_testsuite/src/regression/1133.yaml: -------------------------------------------------------------------------------- 1 | desc: Regression tests for issue #1133, which concerns circular references in the drivers. 2 | 3 | tests: 4 | - def: a = {} 5 | - def: b = {'a':a} 6 | - def: a['b'] = b 7 | 8 | - cd: r.expr(a) 9 | ot: 10 | cd: err('ReqlDriverCompileError', 'Nesting depth limit exceeded.', []) 11 | rb: err('ReqlDriverCompileError', 'Maximum expression depth exceeded (you can override this with `r.expr(X, MAX_DEPTH)`).', []) 12 | 13 | - cd: r.expr({'a':{'a':{'a':{'a':{'a':{'a':{'a':{}}}}}}}}, 7) 14 | ot: 15 | cd: err('ReqlDriverCompileError', 'Nesting depth limit exceeded.', []) 16 | rb: err('ReqlDriverCompileError', 'Maximum expression depth exceeded (you can override this with `r.expr(X, MAX_DEPTH)`).', []) 17 | 18 | - cd: r.expr({'a':{'a':{'a':{'a':{'a':{'a':{'a':{}}}}}}}}, 10) 19 | ot: ({'a':{'a':{'a':{'a':{'a':{'a':{'a':{}}}}}}}}) 20 | -------------------------------------------------------------------------------- /spec/original_rethinkdb_testsuite/src/regression/1155.yaml: -------------------------------------------------------------------------------- 1 | desc: 1155 -- Empty batched_replaces_t constructed 2 | table_variable_name: tbl 3 | tests: 4 | - rb: tbl.insert([{:id => '2'}, {:id => '4'}])['inserted'] 5 | ot: 2 6 | -------------------------------------------------------------------------------- /spec/original_rethinkdb_testsuite/src/regression/1468.yaml: -------------------------------------------------------------------------------- 1 | desc: 1468 -- Empty batched_replaces_t constructed 2 | table_variable_name: tbl 3 | tests: 4 | - rb: tbl.insert([{}, {}, {}])['inserted'] 5 | ot: (3) 6 | - rb: tbl.replace(non_atomic:'true'){|row| r.js("{}")} 7 | ot: ({"unchanged"=>0,"skipped"=>0,"replaced"=>0,"inserted"=>0,"first_error"=>"Cannot convert javascript `undefined` to ql::datum_t.","errors"=>3,"deleted"=>0}) 8 | -------------------------------------------------------------------------------- /spec/original_rethinkdb_testsuite/src/regression/1789.yaml: -------------------------------------------------------------------------------- 1 | desc: 1789 -- deleting a secondary index on a table that contains non-inline stored documents corrupts db 2 | table_variable_name: tbl 3 | tests: 4 | - rb: tbl.insert({:foo => 'a', :data => "AAAAAAAAAAAAAAAAAA 5 | AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA 6 | AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA 7 | AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA 8 | AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA"}).pluck('inserted') 9 | ot: ({'inserted':1}) 10 | 11 | - rb: tbl.index_create('foo') 12 | ot: ({'created':1}) 13 | 14 | - rb: tbl.index_wait('foo').pluck('index', 'ready') 15 | ot: ([{'index':'foo', 'ready':true}]) 16 | 17 | - rb: tbl.index_drop('foo') 18 | ot: ({'dropped':1}) 19 | 20 | - rb: tbl.coerce_to('ARRAY').count() 21 | ot: (1) 22 | 23 | -------------------------------------------------------------------------------- /spec/original_rethinkdb_testsuite/src/regression/2052.yaml: -------------------------------------------------------------------------------- 1 | desc: 2052 -- Verify that the server rejects bogus global options. 2 | tests: 3 | - cd: r.expr(1) 4 | runopts: 5 | array_limit: 16 6 | ot: 1 7 | - cd: r.expr(1) 8 | runopts: 9 | obviously_bogus: 16 10 | ot: err("ReqlCompileError", "Unrecognized global optional argument `obviously_bogus`.", []) 11 | -------------------------------------------------------------------------------- /spec/original_rethinkdb_testsuite/src/regression/2696.yaml: -------------------------------------------------------------------------------- 1 | desc: Regression test for issue 2696, delete_at with end bounds. 2 | tests: 3 | - cd: r.expr([1,2,3,4]).delete_at(4,4) 4 | ot: [1,2,3,4] 5 | - cd: r.expr([]).delete_at(0,0) 6 | ot: [] 7 | -------------------------------------------------------------------------------- /spec/original_rethinkdb_testsuite/src/regression/2709.yaml: -------------------------------------------------------------------------------- 1 | desc: 2709 -- Guarantee failed with [max_els >= min_els] 2 | table_variable_name: tbl 3 | tests: 4 | - py: tbl.insert([{'result':i} for i in range(1,1000)]).pluck('first_error', 'inserted') 5 | runopts: 6 | min_batch_rows: 10 7 | max_batch_rows: 13 8 | ot: ({'inserted':999}) 9 | 10 | - py: tbl.map(lambda thing:'key').count() 11 | runopts: 12 | min_batch_rows: 10 13 | max_batch_rows: 13 14 | ot: (999) 15 | 16 | - py: tbl.map(lambda thing:'key').count() 17 | runopts: 18 | min_batch_rows: 10 19 | max_batch_rows: 13 20 | ot: (999) 21 | 22 | -------------------------------------------------------------------------------- /spec/original_rethinkdb_testsuite/src/regression/2710.yaml: -------------------------------------------------------------------------------- 1 | desc: Test pseudo literal strings in JSON. 2 | tests: 3 | - js: r.expr({"a":{"b":1, "c":2}}).merge(r.json('{"a":{"$reql_'+'type$":"LITERAL", "value":{"b":2}}}')) 4 | py: r.expr({"a":{"b":1, "c":2}}).merge(r.json('{"a":{"$reql_type$":"LITERAL", "value":{"b":2}}}')) 5 | rb: r.expr({:a => {:b => 1, :c => 2}}).merge(r.json('{"a":{"$reql_type$":"LITERAL", "value":{"b":2}}}')) 6 | ot: ({'a':{'b':2}}) 7 | -------------------------------------------------------------------------------- /spec/original_rethinkdb_testsuite/src/regression/2767.yaml: -------------------------------------------------------------------------------- 1 | desc: 2767 -- Evaulate secondary index function with pristine env. 2 | table_variable_name: tbl 3 | tests: 4 | - py: tbl.index_create('foo', lambda x:(x['a']+[1,2,3,4,5]+[6,7,8,9,10]).count()) 5 | runopts: 6 | array_limit: 6 7 | ot: {'created':1} 8 | - py: tbl.index_wait() 9 | - py: tbl.insert({'id':1,'a':[1,2,3,4,5]}) 10 | runopts: 11 | array_limit: 6 12 | ot: {'deleted':0,'replaced':0,'unchanged':0,'errors':0,'skipped':0,'inserted':1} 13 | - py: tbl.coerce_to('array') 14 | ot: [{'id':1,'a':[1,2,3,4,5]}] 15 | - py: tbl.get_all(15, index='foo').coerce_to('array') 16 | ot: [{'id':1,'a':[1,2,3,4,5]}] 17 | - py: tbl.get_all(15, index='foo').coerce_to('array') 18 | runopts: 19 | array_limit: 6 20 | ot: [{'id':1,'a':[1,2,3,4,5]}] 21 | -------------------------------------------------------------------------------- /spec/original_rethinkdb_testsuite/src/regression/2838.py.yaml: -------------------------------------------------------------------------------- 1 | desc: Test that return_changes fails gracefully. 2 | table_variable_name: tbl 3 | tests: 4 | - py: tbl.insert([{'result':i} for i in range(1,100)]).pluck('first_error', 'inserted') 5 | ot: {'inserted':99} 6 | 7 | - py: tbl.update({'foo':'bar'}, return_changes=True)['changes'].count() 8 | runopts: 9 | array_limit: 40 10 | ot: 40 11 | 12 | - py: tbl.update({'foo':'quux'}, return_changes=True)['warnings'] 13 | runopts: 14 | array_limit: 40 15 | ot: ['Too many changes, array truncated to 40.'] 16 | 17 | -------------------------------------------------------------------------------- /spec/original_rethinkdb_testsuite/src/regression/2930.yaml: -------------------------------------------------------------------------------- 1 | desc: Avoid misleading array limit error message 2 | table_variable_name: tbl 3 | tests: 4 | - py: tbl.insert([{'id':i,'mod':i%5,'foo':5} for i in range(1,1000)]).pluck('first_error', 'inserted') 5 | ot: ({'inserted':999}) 6 | - py: tbl.coerce_to('array') 7 | runopts: 8 | array_limit: 500 9 | ot: err("ReqlResourceLimitError", "Array over size limit `500`. To raise the number of allowed elements, modify the `array_limit` option to `.run` (not available in the Data Explorer), or use an index.", [0]) 10 | - py: tbl.group('mod').coerce_to('array') 11 | runopts: 12 | array_limit: 500 13 | ot: err("ReqlResourceLimitError", "Grouped data over size limit `500`. Try putting a reduction (like `.reduce` or `.count`) on the end.", [0]) 14 | - py: tbl.group('foo').coerce_to('array') 15 | runopts: 16 | array_limit: 500 17 | ot: err("ReqlResourceLimitError", "Grouped data over size limit `500`. Try putting a reduction (like `.reduce` or `.count`) on the end.", [0]) 18 | -------------------------------------------------------------------------------- /spec/original_rethinkdb_testsuite/src/regression/3057.yaml: -------------------------------------------------------------------------------- 1 | desc: Test empty polygon special cases 2 | tests: 3 | - cd: r.polygon([0,0], [0,10], [10, 10], [10, 0]).polygon_sub(r.polygon([0,0], [0,10], [10, 10], [10, 0])).intersects(r.point(0,0)) 4 | ot: (false) 5 | - cd: r.polygon([0,0], [0,10], [10, 10], [10, 0]).polygon_sub(r.polygon([0,0], [0,10], [10, 10], [10, 0])).intersects(r.polygon([0,0], [0,10], [10, 10], [10, 0])) 6 | ot: (false) 7 | - cd: r.polygon([0,0], [0,10], [10, 10], [10, 0]).polygon_sub(r.polygon([0,0], [0,10], [10, 10], [10, 0])).intersects(r.line([0,0], [0,10])) 8 | ot: (false) 9 | - cd: r.polygon([0,0], [0,10], [10, 10], [10, 0]).intersects(r.polygon([0,0], [0,10], [10, 10], [10, 0]).polygon_sub(r.polygon([0,0], [0,10], [10, 10], [10, 0]))) 10 | ot: (false) 11 | -------------------------------------------------------------------------------- /spec/original_rethinkdb_testsuite/src/regression/3059.yaml: -------------------------------------------------------------------------------- 1 | desc: Use pseudotype name properly in `info` 2 | tests: 3 | - cd: r.point(0, 1).type_of() 4 | ot: ("PTYPE") 5 | - cd: r.point(0, 1).info()['type'] 6 | js: r.point(0, 1).info()('type') 7 | ot: ("PTYPE") 8 | -------------------------------------------------------------------------------- /spec/original_rethinkdb_testsuite/src/regression/309.yaml: -------------------------------------------------------------------------------- 1 | desc: Regression tests for issue #309, using 'union' on an array and a stream doesn't seem to work 2 | table_variable_name: t 3 | tests: 4 | 5 | # Set up a stream 6 | 7 | - cd: t.insert([{'id':0}, {'id':1}]) 8 | 9 | # Try to union to an array 10 | - cd: t.union([2,3,4]) 11 | ot: bag([{'id':0}, {'id':1}, 2, 3, 4]) 12 | 13 | - cd: r.expr([2,3,4]).union(t) 14 | ot: bag([{'id':0}, {'id':1}, 2, 3, 4]) 15 | 16 | -------------------------------------------------------------------------------- /spec/original_rethinkdb_testsuite/src/regression/3449.js.yaml: -------------------------------------------------------------------------------- 1 | desc: 3449 -- test openness and closedness of range limits under descending ordering 2 | table_variable_name: tbl 3 | tests: 4 | - js: tbl.insert([{id: 0}, {id: 1}, {id: 2}, {id: 3}]) 5 | ot: {'skipped':0, 'deleted':0, 'unchanged':0, 'errors':0, 'replaced':0, 'inserted':4} 6 | 7 | # Test ascending ordering as well for completeness 8 | - js: tbl.between(1, 3).orderBy({index: r.asc('id')}) 9 | ot: [{id:1}, {id:2}] 10 | - js: tbl.between(1, 3).orderBy({index: r.desc('id')}) 11 | ot: [{id:2}, {id:1}] 12 | 13 | - js: tbl.between(1, 3, {left_bound: 'open'}).orderBy({index: r.asc('id')}) 14 | ot: [{id:2}] 15 | - js: tbl.between(1, 3, {left_bound: 'open'}).orderBy({index: r.desc('id')}) 16 | ot: [{id:2}] 17 | 18 | - js: tbl.between(1, 3, {left_bound: 'open', right_bound: 'closed'}).orderBy({index: r.asc('id')}) 19 | ot: [{id:2}, {id:3}] 20 | - js: tbl.between(1, 3, {left_bound: 'open', right_bound: 'closed'}).orderBy({index: r.desc('id')}) 21 | ot: [{id:3}, {id:2}] 22 | -------------------------------------------------------------------------------- /spec/original_rethinkdb_testsuite/src/regression/354.yaml: -------------------------------------------------------------------------------- 1 | desc: Regression tests for issue #354, Skip and limit should throw and error 2 | tests: 3 | 4 | - def: arr = r.expr([1,2,3,4,5]) 5 | 6 | # Correct behavior 7 | - cd: arr.skip(2) 8 | ot: [3,4,5] 9 | 10 | - cd: arr.skip('a') 11 | ot: err("ReqlQueryLogicError", "Expected type NUMBER but found STRING.", [1]) 12 | 13 | - cd: arr.skip([1,2,3]) 14 | ot: err("ReqlQueryLogicError", "Expected type NUMBER but found ARRAY.", [1]) 15 | 16 | - cd: arr.skip({}).count() 17 | ot: err("ReqlQueryLogicError", "Expected type NUMBER but found OBJECT.", [0, 1]) 18 | 19 | - cd: arr.skip(null) 20 | ot: err("ReqlNonExistenceError", "Expected type NUMBER but found NULL.", [1]) 21 | -------------------------------------------------------------------------------- /spec/original_rethinkdb_testsuite/src/regression/370.yaml: -------------------------------------------------------------------------------- 1 | desc: Regression tests for issue #370, calling `map` after `db_list` or `table_list` 2 | tests: 3 | 4 | # Set up a stream 5 | - cd: r.db('test').table_create('t370') 6 | def: d = r.db('test') 7 | 8 | # Map after db_list 9 | - cd: r.db_list().map(r.row) 10 | rb: r.db_list.map{|row| row} 11 | ot: (['rethinkdb', 'test']) 12 | 13 | # Map after table_list 14 | - cd: d.table_list().map(r.row) 15 | rb: d.table_list.map{|row| row} 16 | ot: (['t370']) 17 | 18 | # clean up 19 | - cd: r.db('test').table_drop('t370') 20 | -------------------------------------------------------------------------------- /spec/original_rethinkdb_testsuite/src/regression/3745.yaml: -------------------------------------------------------------------------------- 1 | desc: Test that we do not crash on an error during a function called at unsharding 2 | table_variable_name: tbl 3 | tests: 4 | - cd: tbl.insert([ {'id':0, 'a':5}, {'id':1, 'a':6} ]) 5 | ot: partial({'inserted':2}) 6 | 7 | # Test bare reduce 8 | - rb: tbl.reduce{|x,y| r.object('a', r.add(x['a'], y['a']))} 9 | py: tbl.reduce(lambda x,y:r.object('a', r.add(x['a'], y['a']))) 10 | js: tbl.reduce(function(x,y){return r.object('a', r.add(x('a'), y('a')));}) 11 | ot: ({'a':11}) 12 | 13 | # Test reduce with a function that errors 14 | - rb: tbl.reduce{|x,y| r.expr(0)[0]} 15 | py: tbl.reduce(lambda x,y:r.expr(0)[0]) 16 | js: tbl.reduce(function(x,y){return r.expr(0)(0);}) 17 | ot: err('ReqlQueryLogicError','Cannot convert NUMBER to SEQUENCE') 18 | -------------------------------------------------------------------------------- /spec/original_rethinkdb_testsuite/src/regression/3759.yaml: -------------------------------------------------------------------------------- 1 | desc: Test cleanup of cursors on the server 2 | table_variable_name: tbl 3 | tests: 4 | # The JS test driver doesn't support noreply wait, so only test with Python and Ruby 5 | 6 | - py: r.db('rethinkdb').table('jobs').map(lambda:1) 7 | rb: r.db('rethinkdb').table('jobs').map{|x| 1} 8 | ot: [1] 9 | 10 | - py: r.db('rethinkdb').table('jobs').map(lambda:1) 11 | rb: r.db('rethinkdb').table('jobs').map{|x| 1} 12 | runopts: 13 | noreply: true 14 | ot: null 15 | 16 | - py: r.db('rethinkdb').table('jobs').map(lambda:1) 17 | rb: r.db('rethinkdb').table('jobs').map{|x| 1} 18 | runopts: 19 | noreply: true 20 | testopts: 21 | noreply_wait: true 22 | ot: null 23 | 24 | - py: r.db('rethinkdb').table('jobs').map(lambda:1) 25 | rb: r.db('rethinkdb').table('jobs').map{|x| 1} 26 | ot: [1] 27 | -------------------------------------------------------------------------------- /spec/original_rethinkdb_testsuite/src/regression/4063.js.yaml: -------------------------------------------------------------------------------- 1 | desc: Changefeeds on geo intersection filter 2 | table_variable_name: tbl 3 | tests: 4 | - js: changefeed = tbl.filter(function(d){ return d("l").intersects(r.polygon([1,2],[2,2],[2,1],[1,1])) }).changes() 5 | 6 | - js: tbl.insert([{"l":r.point(1.5,1.5), "id":1}]) 7 | ot: partial({'errors':0, 'inserted':1}) 8 | - js: fetch(changefeed, 1) 9 | ot: [{"new_val":{"l":{"$reql_type$":"GEOMETRY","coordinates":[1.5,1.5],"type":"Point"}, "id":1}, "old_val":null}] 10 | -------------------------------------------------------------------------------- /spec/original_rethinkdb_testsuite/src/regression/4132.yaml: -------------------------------------------------------------------------------- 1 | desc: Regression tests for issue 4132 2 | table_variable_name: tbl 3 | tests: 4 | - cd: r.and() 5 | py: r.and_() 6 | ot: true 7 | - cd: r.or() 8 | py: r.or_() 9 | ot: false 10 | - cd: r.expr(false).or(nil) 11 | py: r.expr(false).or_(nil) 12 | ot: nil 13 | -------------------------------------------------------------------------------- /spec/original_rethinkdb_testsuite/src/regression/4146.yaml: -------------------------------------------------------------------------------- 1 | desc: Test that multi indexes ignore values that cannot be indexed, still indexing the remaining values 2 | table_variable_name: tbl 3 | tests: 4 | # This is testing a property of the server, so a single language (in this case JS) 5 | # is enough. 6 | - js: tbl.indexCreate("multi_idx", function(x) { return [x("a"), x("b")] }, {multi:true}) 7 | ot: {created: 1} 8 | - js: tbl.indexWait("multi_idx") 9 | 10 | - js: tbl.insert([{a:"a", b:null}, {a:"a", b:r.point(0,0)}])("inserted") 11 | ot: 2 12 | 13 | - js: tbl.getAll("a", {index:"multi_idx"}).count() 14 | ot: 2 15 | -------------------------------------------------------------------------------- /spec/original_rethinkdb_testsuite/src/regression/4431.yaml: -------------------------------------------------------------------------------- 1 | desc: 4431 -- detect `use_outdated` optarg 2 | tests: 3 | - cd: r.table('test') 4 | runopts: 5 | use_outdated: true 6 | ot: err('ReqlQueryLogicError', 'The `use_outdated` optarg is no longer supported. Use the `read_mode` optarg instead.') 7 | 8 | - py: r.table('test', use_outdated=True) 9 | cd: r.table('test', {use_outdated:true}) 10 | ot: err('ReqlQueryLogicError', 'The `use_outdated` optarg is no longer supported. Use the `read_mode` optarg instead.') -------------------------------------------------------------------------------- /spec/original_rethinkdb_testsuite/src/regression/4462.yaml: -------------------------------------------------------------------------------- 1 | desc: 4462 -- Coroutine stacks should not overflow during datum serialization 2 | table_variable_name: tbl 3 | tests: 4 | # Create a deeply nested array 5 | - js: tbl.insert({id:1,arr:[]})('inserted') 6 | ot: 1 7 | - js: r.range(1000).forEach(function(i) { return tbl.get(1).update(function(x) { return {arr:[x('arr')]} }, {durability:'soft'})})('replaced') 8 | ot: 1000 9 | # We don't care about the actual contents here. We just want to make sure the server 10 | # doesn't crash when sending the document over. 11 | - js: tbl.get(1) 12 | ot: partial({}) 13 | - js: tbl.get(1).delete()('deleted') 14 | ot: 1 15 | 16 | # A similar test with a nested object 17 | - js: tbl.insert({id:1,obj:{}})('inserted') 18 | ot: 1 19 | - js: r.range(1000).forEach(function(i) { return tbl.get(1).update(function(x) { return {obj:{a:x('obj')}} }, {durability:'soft'})})('replaced') 20 | ot: 1000 21 | - js: tbl.get(1) 22 | ot: partial({}) 23 | - js: tbl.get(1).delete()('deleted') 24 | ot: 1 25 | -------------------------------------------------------------------------------- /spec/original_rethinkdb_testsuite/src/regression/4465.py.yaml: -------------------------------------------------------------------------------- 1 | desc: 4465 (Delete tables from table_config) 2 | table_variable_name: blah 3 | tests: 4 | - py: r.db("rethinkdb").table("db_config").delete() 5 | ot: {"deleted":1,"errors":0,"inserted":0,"replaced":0,"skipped":0,"unchanged":0} 6 | 7 | - py: r.db("rethinkdb").table("table_status") 8 | ot: [] -------------------------------------------------------------------------------- /spec/original_rethinkdb_testsuite/src/regression/4501.yaml: -------------------------------------------------------------------------------- 1 | desc: index_wait should throw on missing indexes. 2 | table_variable_name: tbl 3 | tests: 4 | - cd: tbl.index_wait("missing") 5 | ot: err_regex('ReqlOpFailedError', 'Index `missing` was not found on table `[a-zA-Z0-9_]+.[a-zA-Z0-9_]+`[.]', [0]) 6 | -------------------------------------------------------------------------------- /spec/original_rethinkdb_testsuite/src/regression/453.yaml: -------------------------------------------------------------------------------- 1 | desc: Sanity Check Fails, with r.table() expression inside a map (#453) 2 | table_variable_name: tbl 3 | tests: 4 | 5 | - cd: tbl.insert([{'a':1},{'a':2}]) 6 | ot: partial({'inserted':2}) 7 | 8 | - js: tbl.map(function(x) { return tbl; }) 9 | py: tbl.map(lambda x: tbl) 10 | rb: tbl.map{ |x| tbl } 11 | ot: err("ReqlQueryLogicError", 'Expected type DATUM but found TABLE:', [0]) 12 | 13 | - js: tbl.map(function(x) { return tbl.coerceTo('array'); }).count() 14 | py: tbl.map(lambda x: tbl.coerce_to('array')).count() 15 | rb: tbl.map{ |x| tbl.coerce_to('array') }.count 16 | ot: 2 17 | -------------------------------------------------------------------------------- /spec/original_rethinkdb_testsuite/src/regression/4582.yaml: -------------------------------------------------------------------------------- 1 | desc: 4582 -- non-deterministic arguments to `replace` and `update`. 2 | table_variable_name: tbl 3 | tests: 4 | - cd: tbl.get(0).replace(tbl.get(0)) 5 | ot: err('ReqlQueryLogicError','Could not prove argument deterministic. Maybe you want to use the non_atomic flag?') 6 | - cd: tbl.get(0).update(tbl.get(0)) 7 | ot: err('ReqlQueryLogicError','Could not prove argument deterministic. Maybe you want to use the non_atomic flag?') 8 | - cd: tbl.replace(r.args([tbl.get(0)])) 9 | ot: err('ReqlQueryLogicError','Could not prove argument deterministic. Maybe you want to use the non_atomic flag?') -------------------------------------------------------------------------------- /spec/original_rethinkdb_testsuite/src/regression/4591.yaml: -------------------------------------------------------------------------------- 1 | desc: Test that using r.args with order_by doesn't crash the server. 2 | tests: 3 | - cd: r.expr([{"x":2},{"x":1}]).order_by(r.args(["x","y"])) 4 | ot: err('ReqlQueryLogicError','r.args is not supported in an order_by or union command yet.') 5 | -------------------------------------------------------------------------------- /spec/original_rethinkdb_testsuite/src/regression/46.yaml: -------------------------------------------------------------------------------- 1 | desc: Issue #46 -- bare table_create and table_drop 2 | tests: 3 | 4 | - cd: r.table_create('46') 5 | ot: partial({'tables_created':1}) 6 | 7 | - cd: r.table_list() 8 | ot: ['46'] 9 | 10 | - cd: r.table_drop('46') 11 | ot: partial({'tables_dropped':1}) 12 | -------------------------------------------------------------------------------- /spec/original_rethinkdb_testsuite/src/regression/4729.yaml: -------------------------------------------------------------------------------- 1 | desc: 4729 read mode for changefeeds 2 | table_variable_name: tbl 3 | tests: 4 | - rb: r.table_create('test_4729')['tables_created'] 5 | ot: 1 6 | - rb: r.table('test_4729', read_mode:'outdated').get_all('').changes(include_initial:true, include_states:true).limit(1) 7 | ot: [{"state"=>"initializing"}] 8 | - rb: r.table('test_4729', read_mode:'majority').get_all('').changes(include_initial:true, include_states:true).limit(1) 9 | ot: [{"state"=>"initializing"}] 10 | - rb: r.table('test_4729', read_mode:'single').get_all('').changes(include_initial:true, include_states:true).limit(1) 11 | ot: [{"state"=>"initializing"}] 12 | - rb: r.table('test_4729', read_mode:'_debug_direct').get_all('').changes(include_initial:true, include_states:true).limit(1) 13 | ot: err('RqlQueryLogicError','DEBUG_DIRECT is not a legal read mode for this operation (an up-to-date read mode is required).') 14 | -------------------------------------------------------------------------------- /spec/original_rethinkdb_testsuite/src/regression/5092.js.yaml: -------------------------------------------------------------------------------- 1 | desc: 5092 -- r.uuid with a string argument is deterministic 2 | table_variable_name: tbl 3 | tests: 4 | - js: tbl.get(0).update({a:r.uuid()}) 5 | ot: err('ReqlQueryLogicError','Could not prove argument deterministic. Maybe you want to use the non_atomic flag?') 6 | - js: tbl.get(0).update({a:r.uuid(r.args([]))}) 7 | ot: err('ReqlQueryLogicError','Could not prove argument deterministic. Maybe you want to use the non_atomic flag?') 8 | # We are more cautious than necessary when it comes to `r.args`: 9 | - js: tbl.get(0).update({a:r.uuid(r.args(["test"]))}) 10 | ot: err('ReqlQueryLogicError','Could not prove argument deterministic. Maybe you want to use the non_atomic flag?') 11 | - js: tbl.get(0).update({a:r.uuid("test")}) 12 | ot: partial({skipped:1}) 13 | - js: tbl.get(0).update({a:r.uuid(r.uuid())}) 14 | ot: err('ReqlQueryLogicError','Could not prove argument deterministic. Maybe you want to use the non_atomic flag?') 15 | -------------------------------------------------------------------------------- /spec/original_rethinkdb_testsuite/src/regression/5130.js.yaml: -------------------------------------------------------------------------------- 1 | desc: 5130 -- Incorrect determinism calculation of r.point 2 | table_variable_name: tbl 3 | tests: 4 | - js: tbl.indexCreate("a", function (o) { return r.point(tbl.get(0)('x'), 1); }) 5 | ot: err("ReqlQueryLogicError", "Could not prove function deterministic. Index functions must be deterministic.") 6 | -------------------------------------------------------------------------------- /spec/original_rethinkdb_testsuite/src/regression/522.py.yaml: -------------------------------------------------------------------------------- 1 | desc: Skip after orderby causes use-after-free (#522) 2 | table_variable_name: tbl 3 | tests: 4 | - cd: tbl.insert([{'id':0}, {'id':1}, {'id':2}]) 5 | 6 | - py: tbl.order_by('id').skip(1) 7 | ot: [{'id':1}, {'id':2}] 8 | -------------------------------------------------------------------------------- /spec/original_rethinkdb_testsuite/src/regression/5222.py.yaml: -------------------------------------------------------------------------------- 1 | desc: Can't store r.minval or r.maxval in a secondary index, even when they're in an array. 2 | table_variable_name: tbl 3 | tests: 4 | - py: tbl.index_create("min", lambda x: r.minval) 5 | ot: {"created": 1} 6 | - py: tbl.index_create("max", lambda x: r.maxval) 7 | ot: {"created": 1} 8 | - py: tbl.index_create("min_arr", lambda x: [r.minval]) 9 | ot: {"created": 1} 10 | - py: tbl.index_create("max_arr", lambda x: [r.maxval]) 11 | ot: {"created": 1} 12 | - py: tbl.index_wait("min", "max", "min_arr", "max_arr") 13 | - py: tbl.insert({"id": 1}) 14 | ot: partial({"inserted": 1}) 15 | - py: tbl.order_by(index="min").count() 16 | ot: 0 17 | - py: tbl.order_by(index="max").count() 18 | ot: 0 19 | - py: tbl.order_by(index="min_arr").count() 20 | ot: 0 21 | - py: tbl.order_by(index="max_arr").count() 22 | ot: 0 23 | 24 | -------------------------------------------------------------------------------- /spec/original_rethinkdb_testsuite/src/regression/5241.yaml: -------------------------------------------------------------------------------- 1 | desc: Fix transformations and states on artificial tables. 2 | table_variable_name: tbl 3 | tests: 4 | - def: dtbl = r.db('rethinkdb').table('_debug_scratch') 5 | 6 | - rb: dtbl.changes(include_states: true).limit(1) 7 | ot: [{'state':'ready'}] 8 | 9 | - rb: dtbl.changes(include_initial: true, include_states: true).limit(2) 10 | ot: [{'state':'initializing'},{'state':'ready'}] 11 | 12 | - rb: dtbl.insert({})['inserted'] 13 | ot: 1 14 | 15 | - rb: dtbl.filter{false}.changes(include_states: true).limit(1) 16 | ot: [{'state':'ready'}] 17 | 18 | - rb: dtbl.filter{false}.changes(include_initial: true, include_states: true).limit(2) 19 | ot: [{'state':'initializing'},{'state':'ready'}] 20 | 21 | - rb: dtbl.map{1}.changes(include_states: true).limit(1) 22 | ot: [{'state':'ready'}] 23 | 24 | - rb: dtbl.map{1}.changes(include_initial: true).limit(1) 25 | ot: [{'new_val':1}] 26 | 27 | - rb: dtbl.map{1}.changes(include_initial: true, include_states: true).limit(3) 28 | ot: [{'state':'initializing'},{'new_val':1},{'state':'ready'}] 29 | -------------------------------------------------------------------------------- /spec/original_rethinkdb_testsuite/src/regression/5383.rb.yaml: -------------------------------------------------------------------------------- 1 | desc: 5383 include_offsets problems 2 | table_variable_name: tbl 3 | tests: 4 | - rb: tbl.index_create('datetime') 5 | ot: partial({'created':1}) 6 | - rb: tbl.index_wait('datetime') 7 | ot: [partial({'index':'datetime', 'ready':True})] 8 | - rb: tbl.insert([{id:1, datetime:0}, {id:2, datetime:0}, {id:3, datetime:0}])['inserted'] 9 | ot: 3 10 | - rb: c = tbl.order_by(index: 'datetime').limit(3).changes(include_initial: true) 11 | - rb: c.next 12 | ot: {'new_val':{'id':1, 'datetime':0}} 13 | - rb: tbl.get(1).update({datetime: 1})['replaced'] 14 | ot: 1 15 | - rb: c.next 16 | ot: {'new_val':{'id':2, 'datetime':0}} 17 | - rb: c.next 18 | ot: {'new_val':{'id':3, 'datetime':0}} 19 | - rb: c.next 20 | ot: {'new_val':{'id':1, 'datetime':1}, 'old_val':{'id':1, 'datetime':0}} 21 | -------------------------------------------------------------------------------- /spec/original_rethinkdb_testsuite/src/regression/5438.yaml: -------------------------------------------------------------------------------- 1 | desc: Regression test for issue 5438 2 | table_variable_name: tbl 3 | tests: 4 | - rb: tbl.index_create('a')['created'] 5 | ot: 1 6 | - rb: tbl.index_wait('a')['ready'] 7 | ot: [true] 8 | - rb: ch = tbl.get_all(1, index: 'a').filter({b: 1}).changes 9 | - rb: tbl.insert({id: 0, a: 0, b: 0})['inserted'] 10 | ot: 1 11 | - rb: tbl.get(0).update({a: 1})['replaced'] 12 | ot: 1 13 | - rb: tbl.get(0).update({b: 1})['replaced'] 14 | ot: 1 15 | - rb: fetch(ch, 1) 16 | ot: [{"new_val"=>{"a"=>1, "b"=>1, "id"=>0}, "old_val"=>nil}] -------------------------------------------------------------------------------- /spec/original_rethinkdb_testsuite/src/regression/545.yaml: -------------------------------------------------------------------------------- 1 | desc: r.js inside reduce crashes server (#545) 2 | table_variable_name: tbl 3 | tests: 4 | 5 | - cd: tbl.insert([{'id':0}, {'id':1}, {'id':2}]) 6 | 7 | - js: tbl.reduce(r.js("(function(x,y){return 1;})")) 8 | py: tbl.reduce(r.js("(function(x,y){return 1;})")) 9 | rb: tbl.reduce(r.js("(function(x,y){return 1;})")) 10 | ot: 1 11 | 12 | - js: tbl.reduce(r.js("(function(x,y){return {id:x[\"id\"] + y[\"id\"]};})")) 13 | py: tbl.reduce(r.js("(function(x,y){return {id:x[\"id\"] + y[\"id\"]};})")) 14 | rb: tbl.reduce(r.js("(function(x,y){return {id:x[\"id\"] + y[\"id\"]};})")) 15 | ot: ({'id':3}) 16 | -------------------------------------------------------------------------------- /spec/original_rethinkdb_testsuite/src/regression/546.yaml: -------------------------------------------------------------------------------- 1 | desc: Regression tests for issue #546, variable shadowing 2 | tests: 3 | 4 | # Just a single nesting level, for sanity 5 | - js: r(1).do(function(a) { return a; }) 6 | py: r.expr(1).do(lambda a:a) 7 | ot: 1 8 | 9 | # Nested but returning the inner var 10 | - js: |- 11 | r(1).do(function(a) { 12 | return r(2).do(function(b) { 13 | return b; 14 | }); 15 | }) 16 | py: r.expr(1).do(lambda a:r.expr(2).do(lambda b:b)) 17 | ot: 2 18 | 19 | # Nested but returning the outer var (this was the problem in 546) 20 | - js: |- 21 | r(1).do(function(a) { 22 | return r(2).do(function(b) { 23 | return a; 24 | }); 25 | }) 26 | py: r.expr(1).do(lambda a:r.expr(2).do(lambda b:a)) 27 | ot: 1 28 | -------------------------------------------------------------------------------- /spec/original_rethinkdb_testsuite/src/regression/5481.py.yaml: -------------------------------------------------------------------------------- 1 | desc: multi-stream map works even if one of the streams is empty from the beginning 2 | table_variable_name: tbl 3 | tests: 4 | - py: r.range(100).map(tbl, lambda x, y: nil) 5 | ot: [] 6 | -------------------------------------------------------------------------------- /spec/original_rethinkdb_testsuite/src/regression/5535.rb.yaml: -------------------------------------------------------------------------------- 1 | desc: Regression test for issue 5535 2 | table_variable_name: tbl 3 | tests: 4 | - rb: tbl.insert([{id: 0, a: nil}, {id: 1, a: 1}])['inserted'] 5 | ot: 2 6 | - rb: ch = tbl['a'].changes(include_initial: true, include_states: true) 7 | - rb: fetch(ch, 3) 8 | ot: [{"state"=>"initializing"},{"new_val"=>1},{"state"=>"ready"}] 9 | - rb: tbl.get(0).update({a: 2})['replaced'] 10 | ot: 1 11 | - rb: fetch(ch, 1) 12 | ot: [{"new_val"=>2, "old_val"=>nil}] -------------------------------------------------------------------------------- /spec/original_rethinkdb_testsuite/src/regression/5542.py.yaml: -------------------------------------------------------------------------------- 1 | desc: r.minval can't be confused with an empty array. This used to crash. 2 | table_variable_name: tbl 3 | tests: 4 | - py: tbl.index_create("v") 5 | ot: {"created": 1} 6 | - py: tbl.index_wait("v") 7 | - py: tbl.insert({"id": 1, "v": []}) 8 | ot: partial({"inserted": 1}) 9 | - py: tbl.between([r.minval], [r.maxval], left_bound="open", index="v").count() 10 | ot: 0 11 | 12 | -------------------------------------------------------------------------------- /spec/original_rethinkdb_testsuite/src/regression/568.yaml: -------------------------------------------------------------------------------- 1 | desc: concatmap that doesn't return stream crashes server (#568) 2 | table_variable_name: tbl 3 | tests: 4 | 5 | - cd: tbl.insert({'name':'Jim Brown'}) 6 | 7 | - js: tbl.concatMap(function(rec){return rec("name")}) 8 | py: tbl.concat_map(lambda rec:rec["name"]) 9 | rb: tbl.concat_map {|rec| rec[:name]} 10 | ot: err("ReqlQueryLogicError", "Cannot convert STRING to SEQUENCE", []) 11 | -------------------------------------------------------------------------------- /spec/original_rethinkdb_testsuite/src/regression/578.yaml: -------------------------------------------------------------------------------- 1 | desc: Catch obvious sindex creation/dropping errors (#578) 2 | table_variable_name: tbl 3 | tests: 4 | 5 | - js: tbl.index_create("578", function(rec){return 1}) 6 | py: tbl.index_create("578", lambda rec:1) 7 | rb: tbl.index_create("578") {|rec| 1} 8 | ot: {'created':1} 9 | - cd: tbl.index_wait("578").pluck('index', 'ready') 10 | ot: [{'ready':True, 'index':'578'}] 11 | 12 | - js: tbl.index_create("578", function(rec){return 1}) 13 | py: tbl.index_create("578", lambda rec:1) 14 | rb: tbl.index_create("578") {|rec| 1} 15 | ot: err_regex("ReqlOpFailedError", "Index `578` already exists on table `[a-zA-Z0-9_]+.[a-zA-Z0-9_]+`[.]", []) 16 | 17 | - js: tbl.index_drop("578") 18 | py: tbl.index_drop("578") 19 | rb: tbl.index_drop("578") 20 | ot: {'dropped':1} 21 | 22 | - js: tbl.index_drop("578") 23 | py: tbl.index_drop("578") 24 | rb: tbl.index_drop("578") 25 | ot: err_regex("ReqlOpFailedError", "Index `578` does not exist on table `[a-zA-Z0-9_]+.[a-zA-Z0-9_]+`[.]", []) 26 | -------------------------------------------------------------------------------- /spec/original_rethinkdb_testsuite/src/regression/579.yaml: -------------------------------------------------------------------------------- 1 | desc: reject non-deterministic secondary indexes (#579) 2 | table_variable_name: tbl 3 | tests: 4 | 5 | - cd: tbl.insert({'name':'Jim Brown'}) 6 | 7 | - js: tbl.index_create("579", function(rec){return r.js("1")}) 8 | py: tbl.index_create("579", lambda rec:r.js("1")) 9 | rb: tbl.index_create("579") {|rec| r.js("1")} 10 | ot: err("ReqlQueryLogicError", "Could not prove function deterministic. Index functions must be deterministic.", []) 11 | 12 | - js: tbl.index_create("579", function(rec){return tbl.get(0)}) 13 | py: tbl.index_create("579", lambda rec:tbl.get(0)) 14 | rb: tbl.index_create("579") {|rec| tbl.get(0)} 15 | ot: err("ReqlQueryLogicError", "Could not prove function deterministic. Index functions must be deterministic.", []) 16 | -------------------------------------------------------------------------------- /spec/original_rethinkdb_testsuite/src/regression/5977.js_one.yaml: -------------------------------------------------------------------------------- 1 | desc: 5977 -- Make sure r.literal gets stripped from merged values 2 | table_variable_name: tbl 3 | tests: 4 | - js: r.expr({data: 'flat_value'}).merge({data: {nested: r.literal("a")}}) 5 | ot: {data: {nested: "a"}} 6 | -------------------------------------------------------------------------------- /spec/original_rethinkdb_testsuite/src/regression/6108.yaml: -------------------------------------------------------------------------------- 1 | desc: Test eqJoin on artificial tables 2 | tests: 3 | - cd: r.db('rethinkdb').table('table_status', identifier_format='uuid').eq_join('raft_leader', r.db('rethinkdb').table('server_status')) 4 | 5 | -------------------------------------------------------------------------------- /spec/original_rethinkdb_testsuite/src/regression/619.yaml: -------------------------------------------------------------------------------- 1 | desc: Regression test for issue #619 "Python driver doesn't support inserting objects w/ 'self' as a key" 2 | 3 | tests: 4 | 5 | - py: r.expr({"self":"foo"}) 6 | ot: ({'self':'foo'}) 7 | 8 | - py: r.expr(1).do(lambda x:{'self':x}) 9 | ot: ({'self':1}) 10 | 11 | - py: r.expr({"a":{"self":1}}) 12 | ot: ({"a":{"self":1}}) 13 | 14 | - py: r.expr({"self":{"self":{"self":1}}}) 15 | ot: ({"self":{"self":{"self":1}}}) 16 | -------------------------------------------------------------------------------- /spec/original_rethinkdb_testsuite/src/regression/6191.py_one.yaml: -------------------------------------------------------------------------------- 1 | desc: 6191 (bug in PR, order-by disallowed deterministic r.now()) 2 | tests: 3 | - py: r.expr([1, 2]).order_by(lambda x: r.now()) 4 | ot: [1, 2] 5 | 6 | -------------------------------------------------------------------------------- /spec/original_rethinkdb_testsuite/src/regression/665.yaml: -------------------------------------------------------------------------------- 1 | desc: Regression tests for issue #665. Makes sharding not depend on operation's region. 2 | tests: 3 | # Create a table and do an insertion. 4 | - cd: r.db('test').table_create('t665') 5 | def: t = r.db('test').table('t665') 6 | 7 | # Keys 1 and 4 are sharded to hash shards that, of the four hash 8 | # shards, are not adjacent. 9 | - cd: t.insert([{'id':1}, {'id':4}]) 10 | ot: ({'unchanged':0, 11 | 'skipped':0, 12 | 'replaced':0, 13 | 'inserted':2, 14 | 'errors':0, 15 | 'deleted':0 16 | }) 17 | 18 | # clean up 19 | - cd: r.db('test').table_drop('t665') 20 | -------------------------------------------------------------------------------- /spec/original_rethinkdb_testsuite/src/regression/678.yaml: -------------------------------------------------------------------------------- 1 | desc: fix type of `limit` and `zip` on streams (#678) 2 | table_variable_name: tbl 3 | tests: 4 | 5 | - rb: tbl.map{|x| x}.limit(1).typeof 6 | ot: ("STREAM") 7 | 8 | - rb: r([1]).map{|x| x}.limit(1).typeof 9 | ot: ("ARRAY") 10 | 11 | -------------------------------------------------------------------------------- /spec/original_rethinkdb_testsuite/src/regression/718.yaml: -------------------------------------------------------------------------------- 1 | desc: 718 -- another lazy crashing bug -- changed as of #1328 to allow referencing external variables 2 | table_variable_name: tbl 3 | tests: 4 | 5 | - rb: r(4).do{|x| tbl.index_create('718') {|row| row[:id] % x}} 6 | ot: ({'created':1}) 7 | 8 | -------------------------------------------------------------------------------- /spec/original_rethinkdb_testsuite/src/regression/730.yaml: -------------------------------------------------------------------------------- 1 | desc: Regression tests for issue #730 (unbound ruby functions) 2 | tests: 3 | - rb: r.table_Create 4 | ot: err_regex("NoMethodError", "undefined method `table_Create'") 5 | -------------------------------------------------------------------------------- /spec/original_rethinkdb_testsuite/src/regression/757.yaml: -------------------------------------------------------------------------------- 1 | desc: 757 -- another lazy crashing bug 2 | tests: 3 | - rb: r.db('test').table_create('metadata', {:primary_key => 'pagename'}) 4 | - rb: r.table('metadata').insert({'pagename' => 'homepage', 'versions' => [1]}) 5 | 6 | - rb: r.branch(r.table('metadata').get('homepage').has_fields('versions'), r.table('metadata').get('homepage'), r(false)) 7 | ot: ({'pagename':'homepage', 'versions':[1]}) 8 | 9 | - rb: r.db('test').table_drop('metadata') 10 | -------------------------------------------------------------------------------- /spec/original_rethinkdb_testsuite/src/regression/767.yaml: -------------------------------------------------------------------------------- 1 | desc: 767 -- better NaN checking 2 | tests: 3 | - js: r({a:NaN}) 4 | ot: builtin_err("TypeError", "Illegal non-finite number `NaN`.") 5 | - js: r({a:Infinity}) 6 | ot: builtin_err("TypeError", "Illegal non-finite number `Infinity`.") 7 | - py: r.expr(float('NaN')) 8 | ot: err_regex('ValueError', 'Out of range float values are not JSON compliant.*') 9 | - py: r.expr(float('Infinity')) 10 | ot: err_regex('ValueError', 'Out of range float values are not JSON compliant.*') 11 | -------------------------------------------------------------------------------- /spec/original_rethinkdb_testsuite/src/regression/831.yaml: -------------------------------------------------------------------------------- 1 | desc: 831 -- Empty batched_replaces_t constructed 2 | table_variable_name: tbl 3 | tests: 4 | - py: tbl.insert([True, True]) 5 | ot: ({'first_error':'Expected type OBJECT but found BOOL.', 'skipped':0, 'deleted':0, 'unchanged':0, 'errors':2, 'replaced':0, 'inserted':0}) 6 | -------------------------------------------------------------------------------- /spec/original_rethinkdb_testsuite/src/sindex/nullsinstrings.yaml: -------------------------------------------------------------------------------- 1 | desc: sindex nulls in strings 2 | table_variable_name: tbl 3 | tests: 4 | - cd: tbl.index_create("key") 5 | ot: ({"created":1}) 6 | - cd: tbl.index_wait().pluck("ready") 7 | ot: ([{"ready":true}]) 8 | 9 | # if nulls aren't escaped properly, these two "key" arrays map to the same sindex btree key 10 | - cd: tbl.insert([{"id":1,"key":["a","b"]},{"id":2,"key":["a\u0000Sb"]}]).pluck("inserted") 11 | ot: ({"inserted":2}) 12 | 13 | - py: tbl.get_all(["a\u0000Sb"], index="key").pluck("id") 14 | rb: tbl.get_all(["a\u0000Sb"], :index => "key").pluck("id") 15 | js: tbl.get_all(["a\u0000Sb"], {"index":"key"}).pluck("id") 16 | ot: ([{"id":2}]) 17 | 18 | - py: tbl.get_all(["a","b"], index="key").pluck("id") 19 | rb: tbl.get_all(["a","b"], :index => "key").pluck("id") 20 | js: tbl.get_all(["a","b"], {"index":"key"}).pluck("id") 21 | ot: ([{"id":1}]) 22 | -------------------------------------------------------------------------------- /spec/original_rethinkdb_testsuite/src/times/shim.yaml: -------------------------------------------------------------------------------- 1 | desc: Test the native shims. 2 | tests: 3 | - def: 4 | cd: t = 1375147296.68 5 | js: t = 1375147296.68 * 1000 6 | 7 | - rb: r(Time.at(t).getlocal('-07:00')).to_iso8601 8 | py: r.expr(datetime.fromtimestamp(t, PacificTimeZone())).to_iso8601() 9 | js: r(new Date(t)).inTimezone("-07:00").toISO8601() 10 | ot: ("2013-07-29T18:21:36.680-07:00") 11 | - rb: r(Time.at(t).utc).to_iso8601 12 | py: r.expr(datetime.fromtimestamp(t, UTCTimeZone())).to_iso8601() 13 | js: r(new Date(t)).toISO8601() 14 | ot: ("2013-07-30T01:21:36.680+00:00") 15 | - rb: r(Time.at(t)).to_epoch_time 16 | py: r.expr(datetime.fromtimestamp(t, PacificTimeZone())).to_epoch_time() 17 | js: r(new Date(t)).toEpochTime() 18 | ot: (1375147296.68) 19 | - rb: r(Time.at(t).utc).to_epoch_time 20 | py: r.expr(datetime.fromtimestamp(t, UTCTimeZone())).to_epoch_time() 21 | js: r(new Date(t)).toEpochTime() 22 | ot: (1375147296.68) 23 | -------------------------------------------------------------------------------- /spec/original_rethinkdb_testsuite/src/transform/table.yaml: -------------------------------------------------------------------------------- 1 | desc: Tests manipulation operations on tables 2 | table_variable_name: tbl 3 | tests: 4 | # Add some data 5 | - cd: tbl.insert([{"a":["k1","v1"]},{"a":["k2","v2"]}]) 6 | 7 | # Coerce to an object (after map) 8 | - js: tbl.map(r.row("a")).coerce_to("object") 9 | rb: tbl.map{|row| row["a"]}.coerce_to("object") 10 | py: tbl.map(r.row["a"]).coerce_to("object") 11 | ot: {"k1":"v1","k2":"v2"} 12 | 13 | # Coerce to an array 14 | # - cd: tbl.limit(1).type_of() 15 | # ot: "SELECTION" 16 | 17 | - cd: tbl.limit(1).coerce_to('array').type_of() 18 | ot: "ARRAY" 19 | 20 | -------------------------------------------------------------------------------- /spec/reql/inspect_spec.cr: -------------------------------------------------------------------------------- 1 | require "../../src/driver/*" 2 | require "spec" 3 | require "file_utils" 4 | include RethinkDB::DSL 5 | 6 | macro inspect_check(expr) 7 | {{expr.id}}.inspect.should eq {{expr}} 8 | end 9 | 10 | describe RethinkDB do 11 | it "inspects r.table().get()" do 12 | inspect_check %{r.table("test").get(nil)} 13 | inspect_check %{r.table("test").get(123)} 14 | inspect_check %{r.table("test").get("123")} 15 | inspect_check %{r.table("test").get([1, 2, "aa"])} 16 | inspect_check %{r.table("test").get(1.5)} 17 | inspect_check %{r.table("test").get({"x" => 5})} 18 | end 19 | 20 | it "inspects r.table().insert()" do 21 | inspect_check %{r.table("test").insert({"x" => 5})} 22 | end 23 | 24 | it "inspects r.table().count()" do 25 | inspect_check %{r.table("test").count()} 26 | end 27 | 28 | it "inspects r.range()" do 29 | inspect_check %{r.range()} 30 | inspect_check %{r.range(10)} 31 | inspect_check %{r.range(5, 30)} 32 | end 33 | 34 | # it "inspects r.map()" do 35 | # R.reset_next_var_i 36 | # r.range(10).map { |x| x }.inspect.should eq "r.range(10).map(var_1 => var_1)" 37 | # end 38 | end 39 | -------------------------------------------------------------------------------- /spec/reql/set_difference_spec.cr: -------------------------------------------------------------------------------- 1 | require "../../src/driver/*" 2 | require "spec" 3 | require "file_utils" 4 | include RethinkDB::DSL 5 | 6 | path = "/tmp/rethinkdb-lite/spec-temp-tables/#{Random::Secure.hex}" 7 | FileUtils.rm_rf path 8 | conn = r.local_database(path) 9 | 10 | describe RethinkDB do 11 | describe "set_difference" do 12 | it "returns an array without duplicates" do 13 | r([1, 1, 2]).set_difference([2, 3, 3]).run(conn).datum.array.map(&.int32).sort.should eq [1] 14 | end 15 | end 16 | end 17 | 18 | Spec.after_suite { conn.close } 19 | -------------------------------------------------------------------------------- /src/crypto.cr: -------------------------------------------------------------------------------- 1 | require "openssl" 2 | require "openssl/*" 3 | 4 | lib LibCrypto 5 | fun pkcs5_pbkdf2_hmac = PKCS5_PBKDF2_HMAC( 6 | pass : LibC::Char*, passlen : LibC::Int, 7 | salt : UInt8*, saltlen : LibC::Int, 8 | iter : LibC::Int, 9 | digest : EVP_MD, 10 | keylen : LibC::Int, out : UInt8* 11 | ) : LibC::Int 12 | end 13 | 14 | def pbkdf2_hmac_sha256(password, salt, iter) 15 | hash = Bytes.new(32) 16 | 17 | LibCrypto.pkcs5_pbkdf2_hmac( 18 | password, password.size, 19 | salt, salt.size, 20 | iter, 21 | LibCrypto.evp_sha256, 22 | hash.size, hash 23 | ) 24 | 25 | hash 26 | end 27 | 28 | def hmac_sha256(data, key) 29 | OpenSSL::HMAC.digest(:sha256, data, key) 30 | end 31 | 32 | def sha256(data) 33 | digest = OpenSSL::Digest.new("SHA256") 34 | digest.update(data) 35 | digest.final 36 | end 37 | -------------------------------------------------------------------------------- /src/reql/error.cr: -------------------------------------------------------------------------------- 1 | module ReQL 2 | class ClientError < Exception 3 | end 4 | 5 | class CompileError < Exception 6 | end 7 | 8 | class DriverCompileError < CompileError 9 | end 10 | 11 | class RuntimeError < Exception 12 | end 13 | 14 | class InternalError < RuntimeError 15 | end 16 | 17 | class ResourceLimitError < RuntimeError 18 | end 19 | 20 | class QueryLogicError < RuntimeError 21 | end 22 | 23 | class NonExistenceError < RuntimeError 24 | end 25 | 26 | class OpFailedError < RuntimeError 27 | end 28 | 29 | class OpIndeterminateError < RuntimeError 30 | end 31 | 32 | class UserError < RuntimeError 33 | end 34 | 35 | class PermissionError < RuntimeError 36 | end 37 | end 38 | -------------------------------------------------------------------------------- /src/reql/executor/array_stream.cr: -------------------------------------------------------------------------------- 1 | require "./stream" 2 | 3 | module ReQL 4 | struct ArrayStream < Stream 5 | def initialize(@array : Array(Datum)) 6 | @index = 0 7 | end 8 | 9 | def count(max) 10 | Math.max(@array.size, max) 11 | end 12 | 13 | def skip(count) 14 | @index += count 15 | end 16 | 17 | def start_reading 18 | @index = 0 19 | end 20 | 21 | def next_val 22 | if @index < @array.size 23 | val = @array[@index] 24 | @index += 1 25 | val 26 | else 27 | nil 28 | end 29 | end 30 | 31 | def finish_reading 32 | end 33 | end 34 | end 35 | -------------------------------------------------------------------------------- /src/reql/executor/concat_map_stream.cr: -------------------------------------------------------------------------------- 1 | require "./stream" 2 | 3 | module ReQL 4 | struct ConcatMapStream < Stream 5 | @stream : Box(Stream) 6 | @current : Iterator(Datum) | Nil = nil 7 | 8 | def initialize(stream : Stream, @func : Datum -> Datum) 9 | @stream = Box(Stream).new(stream) 10 | end 11 | 12 | # def count(max) 13 | # @stream.object.count(max) 14 | # end 15 | 16 | def start_reading 17 | @stream.object.start_reading 18 | end 19 | 20 | def next_val 21 | case current = @current 22 | when Iterator(Datum) 23 | val = current.next 24 | if val.is_a? Iterator::Stop 25 | @current = nil 26 | next_val 27 | else 28 | val 29 | end 30 | else 31 | if val = @stream.object.next_val 32 | @current = @func.call(val.as_datum).array_or_set_value.each 33 | next_val 34 | else 35 | nil 36 | end 37 | end 38 | end 39 | 40 | def finish_reading 41 | @stream.object.finish_reading 42 | end 43 | end 44 | end 45 | -------------------------------------------------------------------------------- /src/reql/executor/db.cr: -------------------------------------------------------------------------------- 1 | require "./stream" 2 | 3 | module ReQL 4 | struct Db < AbstractValue 5 | getter name 6 | 7 | def reql_type 8 | "DATABASE" 9 | end 10 | 11 | def initialize(@name : String) 12 | end 13 | 14 | def value : Type 15 | raise QueryLogicError.new "Query result must be of type DATUM, GROUPED_DATA, or STREAM (got DATABASE)" 16 | end 17 | 18 | def as_database 19 | self 20 | end 21 | 22 | def as_datum 23 | raise QueryLogicError.new("Expected type DATUM but found DATABASE.") 24 | end 25 | end 26 | end 27 | -------------------------------------------------------------------------------- /src/reql/executor/field_func.cr: -------------------------------------------------------------------------------- 1 | require "./func" 2 | 3 | module ReQL 4 | struct FieldFunc < Func 5 | def reql_type 6 | "FUNCTION" 7 | end 8 | 9 | def initialize(@field : String) 10 | end 11 | 12 | def inspect(io) 13 | io << "row => row(" 14 | @field.inspect(io) 15 | io << ")" 16 | end 17 | 18 | def eval(evaluator : Evaluator, args) 19 | if args.size < 1 20 | raise QueryLogicError.new("Function expects 1 arguments, but only #{args.size} available") 21 | end 22 | 23 | obj = args[0].as_datum.hash_value 24 | 25 | if obj.has_key? @field 26 | obj[@field] 27 | else 28 | raise NonExistenceError.new("No attribute `#{@field}` in object: #{JSON.build(4) { |builder| obj.to_json(builder) }}") 29 | end 30 | end 31 | 32 | def encode : Bytes 33 | io = IO::Memory.new 34 | io.write_bytes(2u8) 35 | io.write_bytes(@field.bytesize.to_u32, IO::ByteFormat::LittleEndian) 36 | io.write(@field.to_slice) 37 | io.to_slice 38 | end 39 | end 40 | end 41 | -------------------------------------------------------------------------------- /src/reql/executor/filter_stream.cr: -------------------------------------------------------------------------------- 1 | require "./stream" 2 | 3 | module ReQL 4 | struct FilterStream < Stream 5 | @stream : Box(Stream) 6 | 7 | def initialize(stream : Stream, @func : Datum -> Datum) 8 | @stream = Box(Stream).new(stream) 9 | end 10 | 11 | def start_reading 12 | @stream.object.start_reading 13 | end 14 | 15 | def next_val 16 | if val = @stream.object.next_val 17 | if @func.call(val.as_datum).value 18 | val 19 | else 20 | next_val 21 | end 22 | else 23 | nil 24 | end 25 | end 26 | 27 | def finish_reading 28 | @stream.object.finish_reading 29 | end 30 | end 31 | end 32 | -------------------------------------------------------------------------------- /src/reql/executor/group_stream.cr: -------------------------------------------------------------------------------- 1 | require "./stream" 2 | 3 | module ReQL 4 | struct GroupStream < Stream 5 | class InternalData 6 | property channel = Channel(Datum?).new(16) 7 | property started = false 8 | end 9 | 10 | def initialize 11 | @internal = InternalData.new 12 | end 13 | 14 | def <<(value) 15 | @internal.channel.send(value) 16 | end 17 | 18 | def start_reading 19 | raise QueryLogicError.new "Cannot consume group stream more than once" if @internal.started 20 | @internal.started = true 21 | end 22 | 23 | def next_val : Datum? 24 | @internal.channel.receive 25 | end 26 | 27 | def finish_reading 28 | @internal.channel.close 29 | end 30 | end 31 | end 32 | -------------------------------------------------------------------------------- /src/reql/executor/infinite_range.cr: -------------------------------------------------------------------------------- 1 | require "./infinite_stream" 2 | 3 | module ReQL 4 | struct InfiniteRange < InfiniteStream 5 | def initialize 6 | @value = 0i64 7 | end 8 | 9 | def start_reading 10 | @value = 0i64 11 | end 12 | 13 | def next_val 14 | v = @value 15 | @value += 1 16 | return Datum.new(v) 17 | end 18 | 19 | def finish_reading 20 | end 21 | end 22 | end 23 | -------------------------------------------------------------------------------- /src/reql/executor/infinite_stream.cr: -------------------------------------------------------------------------------- 1 | require "./stream" 2 | 3 | module ReQL 4 | abstract struct InfiniteStream < Stream 5 | def reql_type 6 | "STREAM" 7 | end 8 | 9 | private def err 10 | raise QueryLogicError.new "Cannot use an infinite stream with an aggregation function (`reduce`, `count`, etc.) or coerce it to an array." 11 | end 12 | 13 | def value 14 | err 15 | end 16 | 17 | def count(max) 18 | err 19 | end 20 | 21 | def each 22 | err 23 | end 24 | end 25 | end 26 | -------------------------------------------------------------------------------- /src/reql/executor/js_func.cr: -------------------------------------------------------------------------------- 1 | require "../../duktape" 2 | require "./func" 3 | 4 | module ReQL 5 | struct JsFunc < Func 6 | def reql_type 7 | "FUNCTION" 8 | end 9 | 10 | def initialize(@bytecode : Bytes) 11 | end 12 | 13 | def inspect(io) 14 | io << "r.js(\"/* compiled bytecode (#{@bytecode.size} bytes)*/\")" 15 | end 16 | 17 | def eval(evaluator : Evaluator, args) 18 | ctx = Duktape::Context.new 19 | data = LibDuktape.push_buffer_raw(ctx, 0, LibDuktape::BUF_FLAG_DYNAMIC | LibDuktape::BUF_FLAG_EXTERNAL) 20 | LibDuktape.config_buffer(ctx, -1, @bytecode.to_unsafe, @bytecode.size) 21 | LibDuktape.load_function(ctx) 22 | args.each do |arg| 23 | ctx.push_datum arg.as_datum 24 | end 25 | LibDuktape.call(ctx, args.size) 26 | 27 | return ctx.get_datum 28 | end 29 | 30 | def encode : Bytes 31 | io = IO::Memory.new 32 | io.write_bytes(3u8) 33 | io.write_bytes(@bytecode.size.to_u32, IO::ByteFormat::LittleEndian) 34 | io.write(@bytecode) 35 | io.to_slice 36 | end 37 | end 38 | end 39 | -------------------------------------------------------------------------------- /src/reql/executor/limit_stream.cr: -------------------------------------------------------------------------------- 1 | require "./stream" 2 | 3 | module ReQL 4 | struct LimitStream < Stream 5 | @stream : Box(Stream) 6 | 7 | def initialize(stream : Stream, @size : Int64) 8 | @stream = Box(Stream).new(stream) 9 | end 10 | 11 | def count(max) 12 | @stream.object.count(Math.min(max, @size)) 13 | end 14 | 15 | def skip(count) 16 | @stream.object.skip(count) 17 | @size -= count 18 | end 19 | 20 | def start_reading 21 | @stream.object.start_reading 22 | end 23 | 24 | def next_val 25 | if @size == 0 26 | return nil 27 | else 28 | @size -= 1i64 29 | @stream.object.next_val 30 | end 31 | end 32 | 33 | def finish_reading 34 | @stream.object.finish_reading 35 | end 36 | end 37 | end 38 | -------------------------------------------------------------------------------- /src/reql/executor/range.cr: -------------------------------------------------------------------------------- 1 | require "./stream" 2 | 3 | module ReQL 4 | struct Range < Stream 5 | def initialize(@from : Int64, @to : Int64) 6 | @value = 0i64 7 | end 8 | 9 | def count(max) 10 | Math.min(max, Math.max(0i64, @to - @from)) 11 | end 12 | 13 | def skip(count) 14 | @value += count 15 | end 16 | 17 | def start_reading 18 | @value = @from 19 | end 20 | 21 | def next_val 22 | if @value >= @to 23 | return nil 24 | else 25 | v = @value 26 | @value += 1 27 | return Datum.new(v) 28 | end 29 | end 30 | 31 | def finish_reading 32 | end 33 | end 34 | end 35 | -------------------------------------------------------------------------------- /src/reql/executor/row.cr: -------------------------------------------------------------------------------- 1 | require "./abstract_value" 2 | 3 | module ReQL 4 | abstract struct Row < AbstractValue 5 | def reql_type 6 | "ROW" 7 | end 8 | 9 | def initialize(@table : Storage::AbstractTable) 10 | end 11 | 12 | def as_row 13 | self 14 | end 15 | 16 | abstract def key : Datum 17 | 18 | def table : Storage::AbstractTable 19 | @table 20 | end 21 | end 22 | end 23 | -------------------------------------------------------------------------------- /src/reql/executor/row_reference.cr: -------------------------------------------------------------------------------- 1 | require "./row" 2 | 3 | module ReQL 4 | struct RowReference < Row 5 | @key : Box(Datum) 6 | 7 | def initialize(table : Storage::AbstractTable, key : Datum) 8 | super(table) 9 | @key = Box(Datum).new(key) 10 | end 11 | 12 | def value : Type 13 | @table.get(@key.object) 14 | end 15 | 16 | def key : Datum 17 | @key.object 18 | end 19 | end 20 | end 21 | -------------------------------------------------------------------------------- /src/reql/executor/row_value.cr: -------------------------------------------------------------------------------- 1 | require "./row" 2 | 3 | module ReQL 4 | struct RowValue < Row 5 | @value : Box(Hash(String, ReQL::Datum)) 6 | 7 | def initialize(table : Storage::AbstractTable, value : Hash(String, ReQL::Datum)) 8 | super(table) 9 | @value = Box(Hash(String, ReQL::Datum)).new(value) 10 | end 11 | 12 | def value : Type 13 | @value.object 14 | end 15 | 16 | def key : Datum 17 | @value.object[@table.primary_key] 18 | end 19 | end 20 | end 21 | -------------------------------------------------------------------------------- /src/reql/executor/skip_stream.cr: -------------------------------------------------------------------------------- 1 | require "./stream" 2 | 3 | module ReQL 4 | struct SkipStream < Stream 5 | @stream : Box(Stream) 6 | 7 | def initialize(stream : Stream, @skip : Int64) 8 | @stream = Box(Stream).new(stream) 9 | end 10 | 11 | def count(max) 12 | Math.max(0i64, @stream.object.count(max + @skip) - @skip) 13 | end 14 | 15 | def skip(count) 16 | @stream.object.skip(count) 17 | end 18 | 19 | def start_reading 20 | @stream.object.start_reading 21 | @stream.object.skip(@skip) 22 | end 23 | 24 | def next_val 25 | @stream.object.next_val 26 | end 27 | 28 | def finish_reading 29 | @stream.object.finish_reading 30 | end 31 | end 32 | end 33 | -------------------------------------------------------------------------------- /src/reql/executor/stream.cr: -------------------------------------------------------------------------------- 1 | require "./abstract_value" 2 | 3 | module ReQL 4 | abstract struct Stream < AbstractValue 5 | def reql_type 6 | "STREAM" 7 | end 8 | 9 | def value : Type 10 | start_reading 11 | begin 12 | arr = [] of Datum 13 | while val = next_val 14 | arr << val.as_datum 15 | end 16 | arr 17 | ensure 18 | finish_reading 19 | end 20 | end 21 | 22 | def count(max) 23 | start_reading 24 | begin 25 | count = 0i64 26 | while count < max && next_val 27 | count += 1i64 28 | end 29 | count 30 | ensure 31 | finish_reading 32 | end 33 | end 34 | 35 | def skip(count) 36 | count.times { next_val } 37 | end 38 | 39 | def each 40 | start_reading 41 | begin 42 | while val = next_val 43 | yield val 44 | end 45 | ensure 46 | finish_reading 47 | end 48 | end 49 | end 50 | end 51 | -------------------------------------------------------------------------------- /src/reql/jobs/job.cr: -------------------------------------------------------------------------------- 1 | require "uuid" 2 | 3 | abstract class ReQL::Job 4 | getter id = UUID.random 5 | getter start_time = Time.utc 6 | getter running = true 7 | 8 | def initialize(@job_manager : JobManager) 9 | @job_manager.lock.synchronize do 10 | @job_manager.jobs[@id] = self 11 | end 12 | end 13 | 14 | def finish_job 15 | @running = false 16 | @job_manager.lock.synchronize do 17 | @job_manager.jobs.delete(@id) 18 | end 19 | end 20 | 21 | abstract def type : String 22 | end 23 | -------------------------------------------------------------------------------- /src/reql/jobs/job_manager.cr: -------------------------------------------------------------------------------- 1 | require "./job" 2 | 3 | class ReQL::JobManager 4 | getter jobs = Hash(UUID, Job).new 5 | getter lock = Mutex.new 6 | end 7 | -------------------------------------------------------------------------------- /src/reql/jobs/table_scan_job.cr: -------------------------------------------------------------------------------- 1 | require "./job" 2 | require "../executor/row_value" 3 | 4 | class ReQL::TableScanJob < ReQL::Job 5 | struct FinishedScan 6 | end 7 | 8 | @channel = Channel(RowValue | FinishedScan | Exception).new(64) 9 | getter table 10 | 11 | def initialize(job_manager, @table : Storage::AbstractTable) 12 | super(job_manager) 13 | spawn worker 14 | end 15 | 16 | def receive 17 | raise QueryLogicError.new "Table scan terminated." unless @running 18 | @channel.receive 19 | end 20 | 21 | private def worker 22 | @table.scan do |row| 23 | @channel.send RowValue.new(@table, row) 24 | unless @running 25 | return 26 | end 27 | end 28 | @channel.send FinishedScan.new 29 | rescue Channel::ClosedError 30 | rescue error 31 | @channel.send error 32 | end 33 | 34 | def type : String 35 | "table_scan" 36 | end 37 | end 38 | -------------------------------------------------------------------------------- /src/reql/terms/append.cr: -------------------------------------------------------------------------------- 1 | require "../term" 2 | 3 | module ReQL 4 | class AppendTerm < Term 5 | infix_inspect "append" 6 | 7 | def check 8 | expect_args 2 9 | end 10 | end 11 | 12 | class Evaluator 13 | def eval_term(term : AppendTerm) 14 | arr = eval(term.args[0]).array_value.dup 15 | val = eval(term.args[1]).as_datum 16 | arr.push(val) 17 | Datum.new(arr) 18 | end 19 | end 20 | end 21 | -------------------------------------------------------------------------------- /src/reql/terms/binary.cr: -------------------------------------------------------------------------------- 1 | require "../term" 2 | 3 | module ReQL 4 | class BinaryTerm < Term 5 | prefix_inspect "binary" 6 | 7 | def check 8 | expect_args 1 9 | end 10 | end 11 | 12 | class Evaluator 13 | def eval_term(term : BinaryTerm) 14 | data = eval(term.args[0]) 15 | 16 | if data.is_bytes? 17 | return data 18 | end 19 | 20 | Datum.new(data.string_value.to_slice) 21 | end 22 | end 23 | end 24 | -------------------------------------------------------------------------------- /src/reql/terms/branch.cr: -------------------------------------------------------------------------------- 1 | require "../term" 2 | 3 | module ReQL 4 | class BranchTerm < Term 5 | infix_inspect "branch" 6 | 7 | def check 8 | expect_args_at_least 3 9 | if @args.size % 2 == 0 10 | raise QueryLogicError.new "Cannot call `branch` term with an even number of arguments." 11 | end 12 | end 13 | end 14 | 15 | class Evaluator 16 | def eval_term(term : BranchTerm) 17 | (term.args.size//2).times do |i| 18 | cond = eval(term.args[2*i]).as_datum 19 | if cond.value 20 | return eval(term.args[2*i + 1]) 21 | end 22 | end 23 | 24 | return eval(term.args.last) 25 | end 26 | end 27 | end 28 | -------------------------------------------------------------------------------- /src/reql/terms/change_at.cr: -------------------------------------------------------------------------------- 1 | require "../term" 2 | 3 | module ReQL 4 | class ChangeAtTerm < Term 5 | infix_inspect "change_at" 6 | 7 | def check 8 | expect_args 3 9 | end 10 | end 11 | 12 | class Evaluator 13 | def eval_term(term : ChangeAtTerm) 14 | arr = eval(term.args[0]).array_value 15 | 16 | idx_datum = eval(term.args[1]) 17 | unless idx_datum.value.is_a? Number 18 | raise NonExistenceError.new("Expected type NUMBER but found #{idx_datum.reql_type}.") 19 | end 20 | idx = idx_datum.int64_value 21 | 22 | if idx >= arr.size 23 | raise NonExistenceError.new "Index `#{idx}` out of bounds for array of size: `#{arr.size}`." 24 | end 25 | 26 | if idx < 0 27 | old_idx = idx 28 | idx += arr.size 29 | 30 | if idx < 0 || idx >= arr.size 31 | raise NonExistenceError.new "Index out of bounds: #{old_idx}" 32 | end 33 | end 34 | 35 | val = eval(term.args[2]).as_datum 36 | 37 | arr = arr.dup 38 | arr[idx] = val 39 | Datum.new(arr) 40 | end 41 | end 42 | end 43 | -------------------------------------------------------------------------------- /src/reql/terms/concat_map.cr: -------------------------------------------------------------------------------- 1 | require "../term" 2 | 3 | module ReQL 4 | class ConcatMapTerm < Term 5 | infix_inspect "concat_map" 6 | 7 | def check 8 | expect_args 2 9 | end 10 | end 11 | 12 | class Evaluator 13 | def eval_term(term : ConcatMapTerm) 14 | target = eval(term.args[0]) 15 | func = eval(term.args[1]).as_function 16 | 17 | case 18 | when target.is_a? Stream 19 | ConcatMapStream.new(target, ->(val : Datum) { 20 | return func.eval(self, {val}).as_datum 21 | }) 22 | when array = target.array_or_set_value? 23 | Datum.new(array.flat_map do |val| 24 | func.eval(self, {val}).array_value 25 | end) 26 | else 27 | raise QueryLogicError.new("Cannot convert #{target.reql_type} to SEQUENCE") 28 | end 29 | end 30 | end 31 | end 32 | -------------------------------------------------------------------------------- /src/reql/terms/contains.cr: -------------------------------------------------------------------------------- 1 | require "../term" 2 | 3 | module ReQL 4 | class ContainsTerm < Term 5 | infix_inspect "contains" 6 | 7 | def check 8 | expect_args_at_least 2 9 | end 10 | end 11 | 12 | class Evaluator 13 | def eval_term(term : ContainsTerm) 14 | target = eval(term.args[0]) 15 | 16 | predicates = term.args[1..-1].map { |arg| eval(arg) } 17 | found = predicates.map { false } 18 | count_found = 0 19 | 20 | target.each do |val| 21 | val = val.as_datum 22 | predicates.each_with_index do |predicate, index| 23 | next if found[index] 24 | 25 | if predicate.is_a?(Func) ? predicate.eval(self, {val}) : predicate.as_datum == val 26 | found[index] = true 27 | count_found += 1 28 | end 29 | end 30 | break if count_found == predicates.size 31 | end 32 | 33 | Datum.new(count_found == predicates.size) 34 | end 35 | end 36 | end 37 | -------------------------------------------------------------------------------- /src/reql/terms/count.cr: -------------------------------------------------------------------------------- 1 | require "../term" 2 | 3 | module ReQL 4 | class CountTerm < Term 5 | infix_inspect "count" 6 | 7 | def check 8 | expect_args 1, 2 9 | end 10 | end 11 | 12 | class Evaluator 13 | def eval_term(term : CountTerm) 14 | target = eval(term.args[0]) 15 | 16 | if term.args.size == 1 17 | case 18 | when target.is_a? Stream 19 | Datum.new(target.count(Int32::MAX.to_i64)) 20 | when array = target.array_or_set_value? 21 | Datum.new(array.size.to_i64) 22 | when string = target.string_value? 23 | Datum.new(string.size.to_i64) 24 | when bytes = target.bytes_value? 25 | Datum.new(bytes.size.to_i64) 26 | else 27 | raise QueryLogicError.new("Cannot convert #{target.reql_type} to SEQUENCE") 28 | end 29 | else 30 | check = eval(term.args[1]).as_function 31 | count = 0 32 | target.each do |val| 33 | if check.eval(self, {val.as_datum}).value 34 | count += 1 35 | end 36 | end 37 | Datum.new(count) 38 | end 39 | end 40 | end 41 | end 42 | -------------------------------------------------------------------------------- /src/reql/terms/db.cr: -------------------------------------------------------------------------------- 1 | require "../term" 2 | 3 | module ReQL 4 | class DbTerm < Term 5 | def inspect(io) 6 | io << "r.db(" 7 | @args.each_with_index do |e, i| 8 | e.inspect(io) 9 | io << ", " unless i == @args.size - 1 10 | end 11 | io << ")" 12 | end 13 | 14 | def check 15 | expect_args 1 16 | end 17 | end 18 | 19 | class Evaluator 20 | def eval_term(term : DbTerm) 21 | name = eval(term.args[0]).string_value 22 | 23 | unless name =~ /\A[A-Za-z0-9_-]+\Z/ 24 | raise QueryLogicError.new "Database name `#{name}` invalid (Use A-Z, a-z, 0-9, _ and - only)." 25 | end 26 | 27 | Db.new(name) 28 | end 29 | end 30 | end 31 | -------------------------------------------------------------------------------- /src/reql/terms/db_create.cr: -------------------------------------------------------------------------------- 1 | require "../term" 2 | 3 | module ReQL 4 | class DbCreateTerm < Term 5 | prefix_inspect "db_create" 6 | 7 | def check 8 | expect_args 1 9 | end 10 | end 11 | 12 | class Evaluator 13 | def eval_term(term : DbCreateTerm) 14 | name = eval(term.args[0]).string_value 15 | 16 | unless name =~ /\A[A-Za-z0-9_-]+\Z/ 17 | raise QueryLogicError.new "Database name `#{name}` invalid (Use A-Z, a-z, 0-9, _ and - only)." 18 | end 19 | 20 | db_config = @manager.get_table("rethinkdb", "db_config").not_nil! 21 | 22 | perform_writes do |writer| 23 | writer.insert(db_config, { 24 | "name" => Datum.new(name), 25 | }) 26 | end 27 | 28 | Datum.new(Hash(String, Datum::Type).new) 29 | end 30 | end 31 | end 32 | -------------------------------------------------------------------------------- /src/reql/terms/db_list.cr: -------------------------------------------------------------------------------- 1 | require "../term" 2 | 3 | module ReQL 4 | class DbListTerm < Term 5 | prefix_inspect "db_list" 6 | 7 | def check 8 | expect_args 0 9 | end 10 | end 11 | 12 | class Evaluator 13 | def eval_term(term : DbListTerm) 14 | Datum.new(@manager.databases.keys) 15 | end 16 | end 17 | end 18 | -------------------------------------------------------------------------------- /src/reql/terms/default.cr: -------------------------------------------------------------------------------- 1 | require "../term" 2 | 3 | module ReQL 4 | class DefaultTerm < Term 5 | infix_inspect "default" 6 | 7 | def check 8 | expect_args 2 9 | end 10 | end 11 | 12 | class Evaluator 13 | def eval_term(term : DefaultTerm) 14 | base = begin 15 | eval(term.args[0]) 16 | rescue ex : NonExistenceError | UserError 17 | Datum.new(nil) 18 | end 19 | 20 | if base.is_a? Datum && !base.value 21 | eval(term.args[1]) 22 | else 23 | base 24 | end 25 | end 26 | end 27 | end 28 | -------------------------------------------------------------------------------- /src/reql/terms/delete.cr: -------------------------------------------------------------------------------- 1 | require "uuid" 2 | require "../term" 3 | 4 | module ReQL 5 | class DeleteTerm < Term 6 | infix_inspect "delete" 7 | 8 | def check 9 | expect_args 1 10 | end 11 | end 12 | 13 | class Evaluator 14 | def eval_term(term : DeleteTerm) 15 | source = eval(term.args[0]) 16 | 17 | perform_writes do |writer, worker| 18 | if source.is_array? 19 | wait_group = WaitGroup.new 20 | source.each do |obj| 21 | row = obj.as_row 22 | wait_group.add 23 | worker.delete(wait_group, writer, row.table, row.key) 24 | end 25 | wait_group.wait 26 | else 27 | row = source.as_row 28 | writer.delete(row.table, row.key) 29 | end 30 | end 31 | end 32 | end 33 | end 34 | 35 | private def start_deleter_worker(channel, wait_group, writer) 36 | while pair = channel.receive? 37 | writer.delete(pair[0], pair[1]) 38 | wait_group.done 39 | end 40 | end 41 | -------------------------------------------------------------------------------- /src/reql/terms/distinct.cr: -------------------------------------------------------------------------------- 1 | require "../term" 2 | 3 | module ReQL 4 | class DistinctTerm < Term 5 | infix_inspect "distinct" 6 | 7 | def check 8 | expect_args 1 9 | end 10 | end 11 | 12 | class Evaluator 13 | def eval_term(term : DistinctTerm) 14 | target = eval(term.args[0]) 15 | 16 | if array = target.array_or_set_value? 17 | Datum.new(array.to_set) 18 | else 19 | raise QueryLogicError.new("Cannot convert #{target.reql_type} to SEQUENCE") 20 | end 21 | end 22 | end 23 | end 24 | -------------------------------------------------------------------------------- /src/reql/terms/do.cr: -------------------------------------------------------------------------------- 1 | require "../term" 2 | 3 | module ReQL 4 | class DoTerm < Term 5 | infix_inspect "do" 6 | 7 | def check 8 | expect_args_at_least 1 9 | end 10 | end 11 | 12 | class Evaluator 13 | def eval_term(term : DoTerm) 14 | func = eval(term.args[-1]) 15 | args = term.args[0..-2].map { |arg| eval(arg) } 16 | if func.is_a? Func 17 | func.eval(self, args) 18 | else 19 | return func 20 | end 21 | end 22 | end 23 | end 24 | -------------------------------------------------------------------------------- /src/reql/terms/error.cr: -------------------------------------------------------------------------------- 1 | require "../term" 2 | 3 | module ReQL 4 | class ErrorTerm < Term 5 | prefix_inspect "error" 6 | 7 | def check 8 | expect_args 1 9 | end 10 | end 11 | 12 | class Evaluator 13 | def eval_term(term : ErrorTerm) 14 | message = eval(term.args[0]) 15 | raise UserError.new message.string_value 16 | end 17 | end 18 | end 19 | -------------------------------------------------------------------------------- /src/reql/terms/floor_ceil_round.cr: -------------------------------------------------------------------------------- 1 | require "../term" 2 | 3 | module ReQL 4 | class FloorTerm < Term 5 | infix_inspect "floor" 6 | 7 | def check 8 | expect_args 1 9 | end 10 | end 11 | 12 | class CeilTerm < Term 13 | infix_inspect "ceil" 14 | 15 | def check 16 | expect_args 1 17 | end 18 | end 19 | 20 | class RoundTerm < Term 21 | infix_inspect "round" 22 | 23 | def check 24 | expect_args 1 25 | end 26 | end 27 | 28 | class Evaluator 29 | def eval_term(term : FloorTerm) 30 | target = eval(term.args[0]) 31 | Datum.new(target.number_value.floor) 32 | end 33 | 34 | def eval_term(term : CeilTerm) 35 | target = eval(term.args[0]) 36 | Datum.new(target.number_value.ceil) 37 | end 38 | 39 | def eval_term(term : RoundTerm) 40 | target = eval(term.args[0]) 41 | Datum.new(target.number_value.round(:ties_away)) 42 | end 43 | end 44 | end 45 | -------------------------------------------------------------------------------- /src/reql/terms/for_each.cr: -------------------------------------------------------------------------------- 1 | require "../term" 2 | 3 | module ReQL 4 | class ForEachTerm < Term 5 | infix_inspect "for_each" 6 | 7 | def check 8 | expect_args 2 9 | end 10 | end 11 | 12 | class Evaluator 13 | def eval_term(term : ForEachTerm) 14 | target = eval(term.args[0]) 15 | func = eval(term.args[1]).as_function 16 | 17 | perform_writes do 18 | target.each do |e| 19 | func.eval(self, {e.as_datum}) 20 | end 21 | end 22 | end 23 | end 24 | end 25 | -------------------------------------------------------------------------------- /src/reql/terms/get.cr: -------------------------------------------------------------------------------- 1 | require "../term" 2 | 3 | module ReQL 4 | class GetTerm < Term 5 | infix_inspect "get" 6 | 7 | def check 8 | expect_args 2 9 | end 10 | end 11 | 12 | class Evaluator 13 | def eval_term(term : GetTerm) 14 | table = eval(term.args[0]).as_table 15 | key = eval(term.args[1]).as_datum 16 | table.get(key) 17 | end 18 | end 19 | end 20 | -------------------------------------------------------------------------------- /src/reql/terms/get_all.cr: -------------------------------------------------------------------------------- 1 | require "../term" 2 | 3 | module ReQL 4 | class GetAllTerm < Term 5 | infix_inspect "get_all" 6 | 7 | def check 8 | expect_args_at_least 2 9 | expect_maybe_options "index" 10 | end 11 | end 12 | 13 | class Evaluator 14 | def eval_term(term : GetAllTerm) 15 | table = eval(term.args[0]).as_table 16 | keys = term.args[1..-1].map { |arg| eval(arg).as_datum } 17 | 18 | storage = table.storage 19 | 20 | index = term.options["index"]?.try { |x| Datum.new(x).string_value } || storage.primary_key 21 | 22 | GetAllStream.new(storage, keys, index) 23 | end 24 | end 25 | end 26 | -------------------------------------------------------------------------------- /src/reql/terms/index_create.cr: -------------------------------------------------------------------------------- 1 | require "uuid" 2 | require "../term" 3 | 4 | module ReQL 5 | class IndexCreateTerm < Term 6 | infix_inspect "index_create" 7 | 8 | def check 9 | expect_args 2, 3 10 | expect_maybe_options "multi" 11 | end 12 | end 13 | 14 | class Evaluator 15 | def eval_term(term : IndexCreateTerm) 16 | table = eval(term.args[0]).as_table 17 | storage = table.storage 18 | 19 | name = eval(term.args[1]).string_value 20 | 21 | function = if term.args.size == 3 22 | eval(term.args[2]).as_function 23 | else 24 | FieldFunc.new(name) 25 | end 26 | 27 | unless storage.is_a? Storage::PhysicalTable 28 | raise QueryLogicError.new("Database `rethinkdb` is special; you can't create secondary indexes on the tables in it") 29 | end 30 | 31 | multi = false 32 | if term.options.has_key? "multi" 33 | multi = Datum.new(term.options["multi"]).bool_value 34 | end 35 | 36 | perform_writes do |writer| 37 | writer.create_index(storage, name, function, multi) 38 | end 39 | end 40 | end 41 | end 42 | -------------------------------------------------------------------------------- /src/reql/terms/index_list.cr: -------------------------------------------------------------------------------- 1 | require "uuid" 2 | require "../term" 3 | 4 | module ReQL 5 | class IndexListTerm < Term 6 | infix_inspect "index_list" 7 | 8 | def check 9 | expect_args 1 10 | end 11 | end 12 | 13 | class Evaluator 14 | def eval_term(term : IndexListTerm) 15 | table = eval(term.args[0]).as_table 16 | storage = table.storage 17 | 18 | if storage.is_a? Storage::PhysicalTable 19 | storage.get_index_list 20 | else 21 | Datum.new([] of Datum) 22 | end 23 | end 24 | end 25 | end 26 | -------------------------------------------------------------------------------- /src/reql/terms/index_status.cr: -------------------------------------------------------------------------------- 1 | require "uuid" 2 | require "../term" 3 | 4 | module ReQL 5 | class IndexStatusTerm < Term 6 | infix_inspect "index_status" 7 | 8 | def check 9 | expect_args 1, 2 10 | end 11 | end 12 | 13 | class Evaluator 14 | def eval_term(term : IndexStatusTerm) 15 | table = eval(term.args[0]).as_table 16 | storage = table.storage 17 | 18 | if term.args.size == 1 19 | if storage.is_a? Storage::PhysicalTable 20 | storage.get_all_indices_status 21 | else 22 | Datum.new([] of Datum) 23 | end 24 | else 25 | Datum.new(term.args[1..-1].map { |arg| eval(arg) }.map do |name| 26 | name = name.string_value 27 | result = if storage.is_a? Storage::PhysicalTable 28 | storage.get_index_status(name) 29 | else 30 | nil 31 | end 32 | 33 | if result.nil? 34 | raise QueryLogicError.new("Index `#{name}` was not found on table `#{table.db.name}.#{table.name}`") 35 | end 36 | 37 | result 38 | end) 39 | end 40 | end 41 | end 42 | end 43 | -------------------------------------------------------------------------------- /src/reql/terms/info.cr: -------------------------------------------------------------------------------- 1 | require "../term" 2 | 3 | module ReQL 4 | class InfoTerm < Term 5 | infix_inspect "info" 6 | 7 | def check 8 | expect_args 1 9 | end 10 | end 11 | 12 | class Evaluator 13 | def eval_term(term : InfoTerm) 14 | target = eval(term.args[0]) 15 | 16 | case target.reql_type 17 | when "TABLE" 18 | table = target.as_table 19 | storage = table.storage 20 | 21 | Datum.new({ 22 | "db" => { 23 | "id" => "", # TODO 24 | "name" => table.db.name, 25 | "type" => "DB", 26 | }, 27 | "doc_count_estimates" => [ 28 | storage.is_a?(Storage::PhysicalTable) ? storage.estimated_count : 0, 29 | ], 30 | "id" => "", # TODO 31 | "indexes" => storage.is_a?(Storage::PhysicalTable) ? storage.get_index_list : [] of String, 32 | "name" => table.name, 33 | "primary_key" => storage.primary_key, 34 | "type" => "TABLE", 35 | }) 36 | else 37 | raise "BUG: .info() not implemented for #{target.reql_type}" 38 | end 39 | end 40 | end 41 | end 42 | -------------------------------------------------------------------------------- /src/reql/terms/insert_at.cr: -------------------------------------------------------------------------------- 1 | require "../term" 2 | 3 | module ReQL 4 | class InsertAtTerm < Term 5 | infix_inspect "insert_at" 6 | 7 | def check 8 | expect_args 3 9 | end 10 | end 11 | 12 | class Evaluator 13 | def eval_term(term : InsertAtTerm) 14 | arr = eval(term.args[0]).array_value 15 | 16 | idx_datum = eval(term.args[1]) 17 | unless idx_datum.value.is_a? Number 18 | raise NonExistenceError.new("Expected type NUMBER but found #{idx_datum.reql_type}.") 19 | end 20 | idx = idx_datum.int64_value 21 | 22 | if idx > arr.size 23 | raise NonExistenceError.new "Index `#{idx}` out of bounds for array of size: `#{arr.size}`." 24 | end 25 | 26 | if idx < 0 27 | old_idx = idx 28 | idx += arr.size + 1 29 | 30 | if idx < 0 || idx > arr.size 31 | raise NonExistenceError.new "Index out of bounds: #{old_idx}" 32 | end 33 | end 34 | 35 | val = eval(term.args[2]).as_datum 36 | 37 | Datum.new(arr.dup.insert(idx, val)) 38 | end 39 | end 40 | end 41 | -------------------------------------------------------------------------------- /src/reql/terms/is_empty.cr: -------------------------------------------------------------------------------- 1 | require "../term" 2 | 3 | module ReQL 4 | class IsEmptyTerm < Term 5 | infix_inspect "is_empty" 6 | 7 | def check 8 | expect_args 1 9 | end 10 | end 11 | 12 | class Evaluator 13 | def eval_term(term : IsEmptyTerm) 14 | target = eval(term.args[0]) 15 | 16 | if target.is_a? Stream 17 | target.start_reading 18 | begin 19 | return Datum.new(target.next_val.nil?) 20 | ensure 21 | target.finish_reading 22 | end 23 | end 24 | 25 | datum = target.as_datum 26 | 27 | if str = target.string_value? 28 | return Datum.new(str.empty?) 29 | end 30 | 31 | if hsh = target.hash_value? 32 | return Datum.new(hsh.empty?) 33 | end 34 | 35 | if bytes = target.bytes_value? 36 | return Datum.new(bytes.empty?) 37 | end 38 | 39 | return Datum.new(target.array_or_set_value.empty?) 40 | end 41 | end 42 | end 43 | -------------------------------------------------------------------------------- /src/reql/terms/js.cr: -------------------------------------------------------------------------------- 1 | require "../../duktape" 2 | require "../term" 3 | 4 | module ReQL 5 | class JsTerm < Term 6 | prefix_inspect "js" 7 | 8 | def check 9 | expect_args 1 10 | end 11 | end 12 | 13 | class Evaluator 14 | def eval_term(term : JsTerm) 15 | code = eval(term.args[0]).string_value 16 | 17 | ctx = Duktape::Context.new 18 | 19 | flags = LibDuktape::COMPILE_EVAL | LibDuktape::COMPILE_NOSOURCE | LibDuktape::COMPILE_NOFILENAME | LibDuktape::COMPILE_SAFE 20 | if LibDuktape.eval_raw(ctx, code, code.bytesize, flags) != 0 21 | raise QueryLogicError.new String.new(LibDuktape.safe_to_lstring(ctx, -1, nil)) 22 | end 23 | 24 | return ctx.get_datum 25 | end 26 | end 27 | end 28 | -------------------------------------------------------------------------------- /src/reql/terms/limit.cr: -------------------------------------------------------------------------------- 1 | require "../term" 2 | 3 | module ReQL 4 | class LimitTerm < Term 5 | infix_inspect "limit" 6 | 7 | def check 8 | expect_args 2 9 | end 10 | end 11 | 12 | class Evaluator 13 | def eval_term(term : LimitTerm) 14 | target = eval(term.args[0]) 15 | limit = eval(term.args[1]).int64_value 16 | 17 | case 18 | when target.is_a? Stream 19 | LimitStream.new(target, limit) 20 | when array = target.array_value? 21 | Datum.new(array[0, limit]) 22 | else 23 | raise QueryLogicError.new("Cannot convert #{target.reql_type} to SEQUENCE") 24 | end 25 | end 26 | end 27 | end 28 | -------------------------------------------------------------------------------- /src/reql/terms/map.cr: -------------------------------------------------------------------------------- 1 | require "../term" 2 | 3 | module ReQL 4 | class MapTerm < Term 5 | infix_inspect "map" 6 | 7 | def check 8 | expect_args_at_least 2 9 | end 10 | end 11 | 12 | class Evaluator 13 | def eval_term(term : MapTerm) 14 | targets = term.args[0..-2].map { |arg| eval(arg) } 15 | func = eval(term.args[-1]).as_function 16 | 17 | if targets.any? &.is_a? Stream 18 | streams = targets.map { |target| target.is_a?(Stream) ? target : ArrayStream.new(target.array_value) } 19 | MapStream.new(streams, ->(vals : Array(Datum)) { 20 | return func.eval(self, vals).as_datum 21 | }) 22 | else 23 | arrays = targets.map &.array_value 24 | result = [] of Datum 25 | i = 0 26 | while arrays.all? { |array| i < array.size } 27 | result << func.eval(self, arrays.map(&.[i])).as_datum 28 | i += 1 29 | end 30 | Datum.new(result) 31 | end 32 | end 33 | end 34 | end 35 | -------------------------------------------------------------------------------- /src/reql/terms/max.cr: -------------------------------------------------------------------------------- 1 | require "../term" 2 | 3 | module ReQL 4 | class MaxTerm < Term 5 | infix_inspect "max" 6 | 7 | def check 8 | expect_args 1, 2 9 | end 10 | end 11 | 12 | class Evaluator 13 | def eval_term(term : MaxTerm) 14 | target = eval(term.args[0]) 15 | func = term.args.size == 2 ? eval(term.args[1]).as_function : nil 16 | best = {value: nil, computed: nil} 17 | target.each do |e| 18 | computed = func ? func.eval(self, {e.as_datum}) : e.as_datum 19 | best = {computed: computed, value: e} if best[:computed].nil? || computed > best[:computed] 20 | end 21 | if best[:computed] == nil 22 | raise QueryLogicError.new("Cannot take the max of an empty stream.") 23 | end 24 | Datum.new(best[:value]) 25 | end 26 | end 27 | end 28 | -------------------------------------------------------------------------------- /src/reql/terms/min.cr: -------------------------------------------------------------------------------- 1 | require "../term" 2 | 3 | module ReQL 4 | class MinTerm < Term 5 | infix_inspect "min" 6 | 7 | def check 8 | expect_args 1, 2 9 | end 10 | end 11 | 12 | class Evaluator 13 | def eval_term(term : MinTerm) 14 | target = eval(term.args[0]) 15 | func = term.args.size == 2 ? eval(term.args[1]).as_function : nil 16 | best = {value: nil, computed: nil} 17 | target.each do |e| 18 | computed = func ? func.eval(self, {e.as_datum}) : e.as_datum 19 | best = {computed: computed, value: e} if best[:computed].nil? || computed < best[:computed] 20 | end 21 | if best[:computed] == nil 22 | raise QueryLogicError.new("Cannot take the min of an empty stream.") 23 | end 24 | Datum.new(best[:value]) 25 | end 26 | end 27 | end 28 | -------------------------------------------------------------------------------- /src/reql/terms/minval_maxval.cr: -------------------------------------------------------------------------------- 1 | require "../term" 2 | 3 | module ReQL 4 | class MinvalTerm < Term 5 | prefix_inspect "minval" 6 | 7 | def check 8 | expect_args 0 9 | end 10 | end 11 | 12 | class MaxvalTerm < Term 13 | prefix_inspect "maxval" 14 | 15 | def check 16 | expect_args 0 17 | end 18 | end 19 | 20 | class Evaluator 21 | def eval_term(term : MinvalTerm) 22 | Datum.new(Minval.new) 23 | end 24 | 25 | def eval_term(term : MaxvalTerm) 26 | Datum.new(Maxval.new) 27 | end 28 | end 29 | end 30 | -------------------------------------------------------------------------------- /src/reql/terms/now.cr: -------------------------------------------------------------------------------- 1 | require "../term" 2 | 3 | module ReQL 4 | class NowTerm < Term 5 | infix_inspect "now" 6 | 7 | def check 8 | expect_args 0 9 | end 10 | end 11 | 12 | class Evaluator 13 | def eval_term(term : NowTerm) 14 | p Datum.new(@now).to_json 15 | Datum.new(@now) 16 | end 17 | end 18 | end 19 | -------------------------------------------------------------------------------- /src/reql/terms/object.cr: -------------------------------------------------------------------------------- 1 | require "../term" 2 | 3 | module ReQL 4 | class ObjectTerm < Term 5 | prefix_inspect "object" 6 | 7 | def check 8 | if @args.size % 2 != 0 9 | raise QueryLogicError.new "OBJECT expects an even number of arguments (but found #{@args.size})." 10 | end 11 | end 12 | end 13 | 14 | class Evaluator 15 | def eval_term(term : ObjectTerm) 16 | obj = Hash(String, Datum).new 17 | 18 | (term.args.size // 2).times do |i| 19 | key = eval(term.args[2 * i]).string_value 20 | value = eval(term.args[2 * i + 1]).as_datum 21 | 22 | if obj.has_key? key 23 | raise QueryLogicError.new "Duplicate key \"#{key}\" in object. (got #{obj[key]} and #{value} as values)" 24 | end 25 | 26 | obj[key] = value 27 | end 28 | 29 | Datum.new(obj) 30 | end 31 | end 32 | end 33 | -------------------------------------------------------------------------------- /src/reql/terms/random.cr: -------------------------------------------------------------------------------- 1 | require "../term" 2 | 3 | module ReQL 4 | class RandomTerm < Term 5 | prefix_inspect "random" 6 | 7 | def check 8 | expect_args 0, 2 9 | expect_maybe_options "float" 10 | end 11 | end 12 | 13 | class Evaluator 14 | def eval_term(term : RandomTerm) 15 | is_float = (term.options.has_key? "float") && term.options["float"] 16 | case term.args.size 17 | when 0 18 | Datum.new(Random.rand) 19 | when 1 20 | if is_float 21 | max = eval(term.args[0]).float64_value 22 | Datum.new(Random.rand(max)) 23 | else 24 | max = eval(term.args[0]).int64_value 25 | Datum.new(Random.rand(max)) 26 | end 27 | when 2 28 | if is_float 29 | min = eval(term.args[0]).float64_value 30 | max = eval(term.args[1]).float64_value 31 | Datum.new(Random.rand(min...max)) 32 | else 33 | min = eval(term.args[0]).int64_value 34 | max = eval(term.args[1]).int64_value 35 | Datum.new(Random.rand(min...max)) 36 | end 37 | else 38 | raise "BUG: Wrong number of arguments" 39 | end 40 | end 41 | end 42 | end 43 | -------------------------------------------------------------------------------- /src/reql/terms/range.cr: -------------------------------------------------------------------------------- 1 | require "../term" 2 | 3 | module ReQL 4 | class RangeTerm < Term 5 | prefix_inspect "range" 6 | 7 | def check 8 | expect_args 0, 2 9 | end 10 | end 11 | 12 | class Evaluator 13 | def eval_term(term : RangeTerm) 14 | case term.args.size 15 | when 0 16 | InfiniteRange.new 17 | when 1 18 | to = eval(term.args[0]).int64_value 19 | Range.new(0i64, to) 20 | when 2 21 | from = eval(term.args[0]).int64_value 22 | to = eval(term.args[1]).int64_value 23 | Range.new(from, to) 24 | else 25 | raise "BUG: args should be 0..2" 26 | end 27 | end 28 | end 29 | end 30 | -------------------------------------------------------------------------------- /src/reql/terms/sample.cr: -------------------------------------------------------------------------------- 1 | require "../term" 2 | 3 | module ReQL 4 | class SampleTerm < Term 5 | infix_inspect "sample" 6 | 7 | def check 8 | expect_args 2 9 | end 10 | end 11 | 12 | class Evaluator 13 | def eval_term(term : SampleTerm) 14 | target = eval(term.args[0]) 15 | count = eval(term.args[1]).int64_value.to_i 16 | 17 | result = [] of Datum 18 | i = 0 19 | target.each do |val| 20 | if i < count 21 | result << val.as_datum 22 | else 23 | j = rand(i + 1) 24 | result[j] = val.as_datum if j < count 25 | end 26 | i += 1 27 | end 28 | 29 | Datum.new(result.shuffle) 30 | end 31 | end 32 | end 33 | -------------------------------------------------------------------------------- /src/reql/terms/set.cr: -------------------------------------------------------------------------------- 1 | require "../term" 2 | 3 | module ReQL 4 | class SetDifferenceTerm < Term 5 | infix_inspect "set_difference" 6 | 7 | def check 8 | expect_args 2 9 | end 10 | end 11 | 12 | class SetUnionTerm < Term 13 | infix_inspect "set_union" 14 | 15 | def check 16 | expect_args 2 17 | end 18 | end 19 | 20 | class Evaluator 21 | def eval_term(term : SetDifferenceTerm) 22 | arr1 = eval(term.args[0]).set_value 23 | arr2 = eval(term.args[1]).set_value 24 | 25 | Datum.new(arr1 - arr2) 26 | end 27 | 28 | def eval_term(term : SetUnionTerm) 29 | arr1 = eval(term.args[0]).set_value 30 | arr2 = eval(term.args[1]).set_value 31 | 32 | Datum.new(arr1 + arr2) 33 | end 34 | end 35 | end 36 | -------------------------------------------------------------------------------- /src/reql/terms/skip.cr: -------------------------------------------------------------------------------- 1 | require "../term" 2 | 3 | module ReQL 4 | class SkipTerm < Term 5 | infix_inspect "skip" 6 | 7 | def check 8 | expect_args 2 9 | end 10 | end 11 | 12 | class Evaluator 13 | def eval_term(term : SkipTerm) 14 | target = eval(term.args[0]) 15 | skip = eval(term.args[1]).int64_value 16 | 17 | case 18 | when target.is_a? Stream 19 | SkipStream.new(target, skip) 20 | when array = target.array_value? 21 | Datum.new(array.size > skip ? array[skip..-1] : [] of Datum) 22 | else 23 | raise QueryLogicError.new("Cannot convert #{target.reql_type} to SEQUENCE") 24 | end 25 | end 26 | end 27 | end 28 | -------------------------------------------------------------------------------- /src/reql/terms/splice_at.cr: -------------------------------------------------------------------------------- 1 | require "../term" 2 | 3 | module ReQL 4 | class SpliceAtTerm < Term 5 | infix_inspect "splice_at" 6 | 7 | def check 8 | expect_args 3 9 | end 10 | end 11 | 12 | class Evaluator 13 | def eval_term(term : SpliceAtTerm) 14 | arr = eval(term.args[0]).array_value 15 | 16 | idx_datum = eval(term.args[1]) 17 | unless idx_datum.value.is_a? Number 18 | raise NonExistenceError.new("Expected type NUMBER but found #{idx_datum.reql_type}.") 19 | end 20 | idx = idx_datum.int64_value 21 | 22 | if idx > arr.size 23 | raise NonExistenceError.new "Index `#{idx}` out of bounds for array of size: `#{arr.size}`." 24 | end 25 | 26 | if idx < 0 27 | old_idx = idx 28 | idx += arr.size + 1 29 | 30 | if idx < 0 || idx > arr.size 31 | raise NonExistenceError.new "Index out of bounds: #{old_idx}" 32 | end 33 | end 34 | 35 | vals = eval(term.args[2]).array_value 36 | 37 | arr = arr.dup 38 | vals.each_with_index do |val, i| 39 | arr.insert(idx + i, val) 40 | end 41 | 42 | Datum.new(arr) 43 | end 44 | end 45 | end 46 | -------------------------------------------------------------------------------- /src/reql/terms/sum.cr: -------------------------------------------------------------------------------- 1 | require "../term" 2 | 3 | module ReQL 4 | class SumTerm < Term 5 | infix_inspect "sum" 6 | 7 | def check 8 | expect_args 1, 2 9 | end 10 | end 11 | 12 | class Evaluator 13 | def eval_term(term : SumTerm) 14 | target = eval(term.args[0]) 15 | 16 | sum = 0i64 17 | if term.args.size == 1 18 | target.each do |e| 19 | sum += e.number_value 20 | end 21 | elsif term.args.size == 2 22 | func = eval(term.args[1]).as_function 23 | target.each do |e| 24 | sum += func.eval(self, {e.as_datum}).number_value 25 | end 26 | end 27 | 28 | Datum.new(sum) 29 | end 30 | end 31 | end 32 | -------------------------------------------------------------------------------- /src/reql/terms/table_list.cr: -------------------------------------------------------------------------------- 1 | require "../term" 2 | 3 | module ReQL 4 | class TableListTerm < Term 5 | prefix_inspect "table_list" 6 | 7 | def check 8 | expect_args 0, 1 9 | end 10 | end 11 | 12 | class Evaluator 13 | def eval_term(term : TableListTerm) 14 | db_name = nil 15 | 16 | case term.args.size 17 | when 0 18 | # TODO: Get default database name from connection / runopts 19 | db_name = "test" 20 | when 1 21 | db_name = eval(term.args[0]).as_database.name 22 | else 23 | raise "BUG: Wrong number of arguments" 24 | end 25 | 26 | if db_name == "rethinkdb" 27 | Datum.new([ 28 | "server_config", 29 | "server_status", 30 | "db_config", 31 | "table_config", 32 | "table_status", 33 | "stats", 34 | "current_issues", 35 | "jobs", 36 | ]) 37 | else 38 | db = @manager.databases[db_name]? 39 | unless db 40 | raise QueryLogicError.new "Database `#{db_name}` does not exist." 41 | end 42 | 43 | Datum.new(db.tables.keys) 44 | end 45 | end 46 | end 47 | end 48 | -------------------------------------------------------------------------------- /src/reql/terms/type_of.cr: -------------------------------------------------------------------------------- 1 | require "../term" 2 | 3 | module ReQL 4 | class TypeOfTerm < Term 5 | infix_inspect "type_of" 6 | 7 | def check 8 | expect_args 1 9 | end 10 | end 11 | 12 | class Evaluator 13 | def eval_term(term : TypeOfTerm) 14 | target = eval(term.args[0]) 15 | Datum.new(target.reql_type) 16 | end 17 | end 18 | end 19 | -------------------------------------------------------------------------------- /src/reql/terms/ungroup.cr: -------------------------------------------------------------------------------- 1 | require "../term" 2 | 3 | module ReQL 4 | class UngroupTerm < Term 5 | infix_inspect "ungroup" 6 | 7 | def check 8 | expect_args 1 9 | end 10 | end 11 | 12 | class Evaluator 13 | def eval_term(term : UngroupTerm) 14 | if term.args[0].is_a? GroupTerm 15 | eval(term.args[0]) 16 | else 17 | raise QueryLogicError.new("Cannot ungroup() something that is not a group()") 18 | end 19 | end 20 | end 21 | end 22 | -------------------------------------------------------------------------------- /src/reql/terms/upcase_downcase.cr: -------------------------------------------------------------------------------- 1 | require "../term" 2 | 3 | module ReQL 4 | class UpcaseTerm < Term 5 | infix_inspect "upcase" 6 | 7 | def check 8 | expect_args 1 9 | end 10 | end 11 | 12 | class DowncaseTerm < Term 13 | infix_inspect "downcase" 14 | 15 | def check 16 | expect_args 1 17 | end 18 | end 19 | 20 | class Evaluator 21 | def eval_term(term : UpcaseTerm) 22 | target = eval(term.args[0]).string_value 23 | Datum.new(target.upcase) 24 | end 25 | 26 | def eval_term(term : DowncaseTerm) 27 | target = eval(term.args[0]).string_value 28 | Datum.new(target.downcase) 29 | end 30 | end 31 | end 32 | -------------------------------------------------------------------------------- /src/reql/terms/update.cr: -------------------------------------------------------------------------------- 1 | require "uuid" 2 | require "../term" 3 | 4 | module ReQL 5 | class UpdateTerm < Term 6 | infix_inspect "update" 7 | 8 | def check 9 | expect_args 2 10 | end 11 | end 12 | 13 | class Evaluator 14 | def eval_term(term : UpdateTerm) 15 | source = eval(term.args[0]) 16 | value = eval(term.args[1]) 17 | 18 | perform_writes do |writer| 19 | if source.is_array? 20 | source.each do |obj| 21 | row = obj.as_row 22 | writer.atomic_update(row.table, row.key) do |old| 23 | if value.is_a?(Func) 24 | value.eval(self, {Datum.new(old)}).hash_value 25 | else 26 | value.hash_value 27 | end 28 | end 29 | end 30 | else 31 | row = source.as_row 32 | writer.atomic_update(row.table, row.key) do |old| 33 | if value.is_a?(Func) 34 | value.eval(self, {Datum.new(old)}).hash_value 35 | else 36 | value.hash_value 37 | end 38 | end 39 | end 40 | end 41 | end 42 | end 43 | end 44 | -------------------------------------------------------------------------------- /src/reql/terms/uuid.cr: -------------------------------------------------------------------------------- 1 | require "digest/sha1" 2 | require "../term" 3 | 4 | module ReQL 5 | class UuidTerm < Term 6 | prefix_inspect "uuid" 7 | 8 | UUID_NAMESPACE = UUID.new("91461c99-f89d-49d2-af96-d8e2e14e9b58").bytes 9 | 10 | def check 11 | expect_args(0, 1) 12 | end 13 | end 14 | 15 | class Evaluator 16 | def eval_term(term : UuidTerm) 17 | if term.args.size == 0 18 | Datum.new(UUID.random.to_s) 19 | else 20 | seed = eval(term.args[0]).string_value 21 | 22 | bytes = Digest::SHA1.digest do |ctx| 23 | ctx.update UuidTerm::UUID_NAMESPACE 24 | ctx.update seed 25 | end 26 | 27 | bytes[6] = ((bytes[6] & 0x0f) | 0x50) 28 | bytes[8] = ((bytes[8] & 0x3f) | 0x80) 29 | 30 | Datum.new(UUID.new(bytes.to_slice[0, 16]).to_s) 31 | end 32 | end 33 | end 34 | end 35 | -------------------------------------------------------------------------------- /src/reql/terms/var.cr: -------------------------------------------------------------------------------- 1 | require "../term" 2 | 3 | module ReQL 4 | class VarTerm < Term 5 | def inspect(io) 6 | io << "var_" << @args[0] 7 | end 8 | 9 | def check 10 | expect_args 1 11 | end 12 | end 13 | 14 | class Evaluator 15 | def eval_term(term : VarTerm) 16 | @vars[term.args[0].as(Int64)] 17 | end 18 | end 19 | end 20 | -------------------------------------------------------------------------------- /src/reql/transformers/group_transformer.cr: -------------------------------------------------------------------------------- 1 | require "../term" 2 | require "./base" 3 | 4 | struct ReQL::GroupTransformer < ReQL::Transformer 5 | protected def should_transform(term : ReQL::GroupTerm) 6 | true 7 | end 8 | 9 | protected def transform(term : ReQL::Term) : ReQL::Term::Type 10 | term = super(term) 11 | 12 | if term.is_a? ReQL::UngroupTerm 13 | return term 14 | end 15 | 16 | idx = term.args.index { |arg| arg.is_a? ReQL::GroupTerm } 17 | return term unless idx 18 | 19 | group = term.args[idx].as(ReQL::GroupTerm) 20 | 21 | if group.args.size == 2 22 | var = R.make_var_i 23 | term.args[idx] = ReQL::VarTerm.new([var.as(ReQL::Term::Type)]) 24 | group.args << ReQL::FuncTerm.new([ 25 | ReQL::MakeArrayTerm.new([var.as(ReQL::Term::Type)]).as(ReQL::Term::Type), 26 | term.as(ReQL::Term::Type), 27 | ]).as(ReQL::Term::Type) 28 | 29 | return group 30 | elsif group.args.size == 3 && (func = group.args[2].as?(ReQL::FuncTerm)) 31 | term.args[idx] = func.args[1] 32 | func.args[1] = term 33 | 34 | return group 35 | else 36 | return term 37 | end 38 | end 39 | end 40 | -------------------------------------------------------------------------------- /src/reql/transformers/simplify_variables_transformer.cr: -------------------------------------------------------------------------------- 1 | require "../term" 2 | require "./base" 3 | 4 | struct ReQL::SimplifyVariablesTransformer < ReQL::Transformer 5 | @next_value = 0i64 6 | @mapping : Hash(Int64, Int64) 7 | @transformed_vars = Set(ReQL::VarTerm).new 8 | 9 | def initialize(root_term : ReQL::Term::Type) 10 | super(root_term) 11 | @mapping = Hash(Int64, Int64).new { |h, k| h[k] = (@next_value += 1) } 12 | end 13 | 14 | protected def should_transform(term : ReQL::FuncTerm) 15 | true 16 | end 17 | 18 | protected def transform(term : ReQL::VarTerm) : ReQL::Term::Type 19 | return term if @transformed_vars.includes?(term) 20 | term.args[0] = @mapping[term.args[0].as(Int64)] 21 | @transformed_vars << term 22 | term 23 | end 24 | 25 | protected def transform(term : ReQL::FuncTerm) : ReQL::Term::Type 26 | term = super(term).as(ReQL::FuncTerm) 27 | term.args[0].as(MakeArrayTerm).args.map! { |arg| @mapping[arg.as(Int64)] } 28 | term 29 | end 30 | end 31 | -------------------------------------------------------------------------------- /src/reql/transformers/transformer.cr: -------------------------------------------------------------------------------- 1 | require "./*" 2 | 3 | abstract struct ReQL::Transformer 4 | def self.transform(term : ReQL::Term::Type) 5 | term = ReQL::GroupTransformer.new(term).transform 6 | # FIXME: 7 | # term = ReQL::SimplifyVariablesTransformer.new(term).transform 8 | end 9 | end 10 | -------------------------------------------------------------------------------- /src/storage/metrics.cr: -------------------------------------------------------------------------------- 1 | class PerSecondMetric 2 | @current = Atomic(Int64).new(0i64) 3 | @previous = Atomic(Int64).new(0i64) 4 | @delta_nanoseconds = Atomic(Int64).new(1i64) 5 | @total = Atomic(Int64).new(0i64) 6 | @last_timer = Time.monotonic 7 | @finished = false 8 | 9 | def initialize 10 | spawn do 11 | until @finished 12 | sleep 1 13 | 14 | current = @current.swap(0i64) 15 | @previous.set(current) 16 | @total.add(current) 17 | timer = Time.monotonic 18 | @delta_nanoseconds.set((timer - @last_timer).total_nanoseconds.to_i64) 19 | @last_timer = timer 20 | end 21 | end 22 | end 23 | 24 | def add(value : Int) 25 | @current.add(value.to_i64) 26 | end 27 | 28 | def per_second 29 | (@previous.get / @delta_nanoseconds.get * Time::NANOSECONDS_PER_SECOND).ceil 30 | end 31 | 32 | def total 33 | @total.get 34 | end 35 | 36 | def close 37 | @finished = true 38 | end 39 | end 40 | -------------------------------------------------------------------------------- /src/storage/migrations.cr: -------------------------------------------------------------------------------- 1 | module Storage 2 | class KeyValueStore 3 | private def migrate 4 | if @system_info.data_version == 0 5 | migrate_v0_to_v1 6 | end 7 | end 8 | 9 | private def migrate_v0_to_v1 10 | @system_info.data_version = 1 11 | @rocksdb.put(KeyValueStore.key_for_system_info, @system_info.serialize) 12 | end 13 | end 14 | end 15 | -------------------------------------------------------------------------------- /src/storage/table/abstract_table.cr: -------------------------------------------------------------------------------- 1 | module Storage 2 | abstract struct AbstractTable 3 | def close 4 | end 5 | 6 | def get(key) 7 | result = nil 8 | scan do |row| 9 | if row["id"] == key 10 | result = row 11 | end 12 | end 13 | result 14 | end 15 | 16 | abstract def replace(key : ReQL::Datum, durability : ReQL::Durability? = nil, &block : Hash(String, ReQL::Datum)? -> Hash(String, ReQL::Datum)?) 17 | abstract def scan(&block : Hash(String, ReQL::Datum) ->) 18 | 19 | def primary_key 20 | "id" 21 | end 22 | 23 | abstract def index_scan(index_name : String, index_value_start : ReQL::Datum, index_value_end : ReQL::Datum, &block : Hash(String, ReQL::Datum) ->) 24 | 25 | abstract def name : String 26 | abstract def db_name : String 27 | end 28 | end 29 | -------------------------------------------------------------------------------- /src/storage/table/virtual_current_issues_table.cr: -------------------------------------------------------------------------------- 1 | require "./virtual_table" 2 | 3 | module Storage 4 | struct VirtualCurrentIssuesTable < VirtualTable 5 | def initialize(manager : Manager) 6 | super("current_issues", manager) 7 | end 8 | 9 | def get(key) 10 | nil 11 | end 12 | 13 | def scan(&block : Hash(String, ReQL::Datum) ->) 14 | end 15 | end 16 | end 17 | -------------------------------------------------------------------------------- /src/storage/table/virtual_server_config_table.cr: -------------------------------------------------------------------------------- 1 | require "./virtual_table" 2 | 3 | module Storage 4 | struct VirtualServerConfigTable < VirtualTable 5 | def initialize(manager : Manager) 6 | super("server_config", manager) 7 | end 8 | 9 | private def encode(info : KeyValueStore::SystemInfo) 10 | ReQL::Datum.new({ 11 | "cache_size_mb" => "auto", 12 | "id" => @manager.system_info.id.to_s, 13 | "name" => @manager.system_info.name, 14 | "tags" => [ 15 | "default", 16 | ], 17 | }).hash_value 18 | end 19 | 20 | def get(key) 21 | info = @manager.system_info 22 | id = UUID.new(key.string_value) rescue return nil 23 | encode(info.id == id ? info : nil) 24 | end 25 | 26 | def scan 27 | yield encode(@manager.system_info) 28 | end 29 | end 30 | end 31 | -------------------------------------------------------------------------------- /src/utils/wait_group.cr: -------------------------------------------------------------------------------- 1 | class WaitGroup 2 | @pending = Atomic(Int32).new(0) 3 | @channel = Atomic(Channel(Nil)?).new(nil) 4 | 5 | def add(count : Int32 = 1) : Nil 6 | pending = @pending.add(count) + count 7 | 8 | if pending < 0 9 | raise "wait group has a negative number of pending jobs" 10 | end 11 | 12 | if pending == 0 13 | @channel.get.try &.close 14 | end 15 | end 16 | 17 | def done : Nil 18 | add(-1) 19 | end 20 | 21 | def wait : Nil 22 | return if @pending.get == 0 23 | new_ch = Channel(Nil).new 24 | old_ch = @channel.compare_and_set(nil, new_ch)[0] 25 | ch = old_ch || new_ch 26 | 27 | # Note that another thread might zero @pending after the first check but 28 | # before the channel is set. Because of this we need to check again here. 29 | if @pending.get == 0 30 | ch.close 31 | return 32 | end 33 | 34 | ch.receive? 35 | end 36 | end 37 | -------------------------------------------------------------------------------- /vendor/rethinkdb-webui/.gitignore: -------------------------------------------------------------------------------- 1 | *.pyc 2 | *.DS_Store 3 | *.swp 4 | node_modules 5 | dist 6 | -------------------------------------------------------------------------------- /vendor/rethinkdb-webui/bin/serve.js: -------------------------------------------------------------------------------- 1 | var express = require('express'); 2 | var proxyServer = require('http-route-proxy'); 3 | 4 | rethinkdbWeb = process.argv[2] || 'localhost:8080'; 5 | 6 | var app = express(); 7 | 8 | app.use(express.static('dist')); 9 | 10 | app.use(proxyServer.connect({ 11 | to: rethinkdbWeb, 12 | route: ['/ajax'] 13 | })); 14 | 15 | app.listen(3000, function () { 16 | console.log('Listening on port 3000!'); 17 | }); 18 | -------------------------------------------------------------------------------- /vendor/rethinkdb-webui/public/favicon.ico: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/lbguilherme/rethinkdb-lite/fbc95c4ef2aa9cf19c17400b94befa52e1f0e8e6/vendor/rethinkdb-webui/public/favicon.ico -------------------------------------------------------------------------------- /vendor/rethinkdb-webui/public/fonts/copse-regular-webfont.eot: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/lbguilherme/rethinkdb-lite/fbc95c4ef2aa9cf19c17400b94befa52e1f0e8e6/vendor/rethinkdb-webui/public/fonts/copse-regular-webfont.eot -------------------------------------------------------------------------------- /vendor/rethinkdb-webui/public/fonts/copse-regular-webfont.ttf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/lbguilherme/rethinkdb-lite/fbc95c4ef2aa9cf19c17400b94befa52e1f0e8e6/vendor/rethinkdb-webui/public/fonts/copse-regular-webfont.ttf -------------------------------------------------------------------------------- /vendor/rethinkdb-webui/public/fonts/copse-regular-webfont.woff: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/lbguilherme/rethinkdb-lite/fbc95c4ef2aa9cf19c17400b94befa52e1f0e8e6/vendor/rethinkdb-webui/public/fonts/copse-regular-webfont.woff -------------------------------------------------------------------------------- /vendor/rethinkdb-webui/public/fonts/generator_config.txt: -------------------------------------------------------------------------------- 1 | # Font Squirrel Font-face Generator Configuration File 2 | # Upload this file to the generator to recreate the settings 3 | # you used to create these fonts. 4 | 5 | {"mode":"optimal","formats":["ttf","woff","eotz"],"tt_instructor":"default","fix_vertical_metrics":"Y","fix_gasp":"xy","add_spaces":"Y","add_hyphens":"Y","fallback":"none","fallback_custom":"100","options_subset":"basic","subset_custom":"","subset_custom_range":"","css_stylesheet":"stylesheet.css","filename_suffix":"-webfont","emsquare":"2048","spacing_adjustment":"0"} -------------------------------------------------------------------------------- /vendor/rethinkdb-webui/public/fonts/ionicons.eot: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/lbguilherme/rethinkdb-lite/fbc95c4ef2aa9cf19c17400b94befa52e1f0e8e6/vendor/rethinkdb-webui/public/fonts/ionicons.eot -------------------------------------------------------------------------------- /vendor/rethinkdb-webui/public/fonts/ionicons.ttf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/lbguilherme/rethinkdb-lite/fbc95c4ef2aa9cf19c17400b94befa52e1f0e8e6/vendor/rethinkdb-webui/public/fonts/ionicons.ttf -------------------------------------------------------------------------------- /vendor/rethinkdb-webui/public/fonts/ionicons.woff: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/lbguilherme/rethinkdb-lite/fbc95c4ef2aa9cf19c17400b94befa52e1f0e8e6/vendor/rethinkdb-webui/public/fonts/ionicons.woff -------------------------------------------------------------------------------- /vendor/rethinkdb-webui/public/fonts/opensans-bold-webfont.eot: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/lbguilherme/rethinkdb-lite/fbc95c4ef2aa9cf19c17400b94befa52e1f0e8e6/vendor/rethinkdb-webui/public/fonts/opensans-bold-webfont.eot -------------------------------------------------------------------------------- /vendor/rethinkdb-webui/public/fonts/opensans-bold-webfont.ttf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/lbguilherme/rethinkdb-lite/fbc95c4ef2aa9cf19c17400b94befa52e1f0e8e6/vendor/rethinkdb-webui/public/fonts/opensans-bold-webfont.ttf -------------------------------------------------------------------------------- /vendor/rethinkdb-webui/public/fonts/opensans-bold-webfont.woff: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/lbguilherme/rethinkdb-lite/fbc95c4ef2aa9cf19c17400b94befa52e1f0e8e6/vendor/rethinkdb-webui/public/fonts/opensans-bold-webfont.woff -------------------------------------------------------------------------------- /vendor/rethinkdb-webui/public/fonts/opensans-bolditalic-webfont.eot: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/lbguilherme/rethinkdb-lite/fbc95c4ef2aa9cf19c17400b94befa52e1f0e8e6/vendor/rethinkdb-webui/public/fonts/opensans-bolditalic-webfont.eot -------------------------------------------------------------------------------- /vendor/rethinkdb-webui/public/fonts/opensans-bolditalic-webfont.ttf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/lbguilherme/rethinkdb-lite/fbc95c4ef2aa9cf19c17400b94befa52e1f0e8e6/vendor/rethinkdb-webui/public/fonts/opensans-bolditalic-webfont.ttf -------------------------------------------------------------------------------- /vendor/rethinkdb-webui/public/fonts/opensans-bolditalic-webfont.woff: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/lbguilherme/rethinkdb-lite/fbc95c4ef2aa9cf19c17400b94befa52e1f0e8e6/vendor/rethinkdb-webui/public/fonts/opensans-bolditalic-webfont.woff -------------------------------------------------------------------------------- /vendor/rethinkdb-webui/public/fonts/opensans-extrabold-webfont.eot: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/lbguilherme/rethinkdb-lite/fbc95c4ef2aa9cf19c17400b94befa52e1f0e8e6/vendor/rethinkdb-webui/public/fonts/opensans-extrabold-webfont.eot -------------------------------------------------------------------------------- /vendor/rethinkdb-webui/public/fonts/opensans-extrabold-webfont.ttf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/lbguilherme/rethinkdb-lite/fbc95c4ef2aa9cf19c17400b94befa52e1f0e8e6/vendor/rethinkdb-webui/public/fonts/opensans-extrabold-webfont.ttf -------------------------------------------------------------------------------- /vendor/rethinkdb-webui/public/fonts/opensans-extrabold-webfont.woff: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/lbguilherme/rethinkdb-lite/fbc95c4ef2aa9cf19c17400b94befa52e1f0e8e6/vendor/rethinkdb-webui/public/fonts/opensans-extrabold-webfont.woff -------------------------------------------------------------------------------- /vendor/rethinkdb-webui/public/fonts/opensans-extrabolditalic-webfont.eot: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/lbguilherme/rethinkdb-lite/fbc95c4ef2aa9cf19c17400b94befa52e1f0e8e6/vendor/rethinkdb-webui/public/fonts/opensans-extrabolditalic-webfont.eot -------------------------------------------------------------------------------- /vendor/rethinkdb-webui/public/fonts/opensans-extrabolditalic-webfont.ttf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/lbguilherme/rethinkdb-lite/fbc95c4ef2aa9cf19c17400b94befa52e1f0e8e6/vendor/rethinkdb-webui/public/fonts/opensans-extrabolditalic-webfont.ttf -------------------------------------------------------------------------------- /vendor/rethinkdb-webui/public/fonts/opensans-extrabolditalic-webfont.woff: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/lbguilherme/rethinkdb-lite/fbc95c4ef2aa9cf19c17400b94befa52e1f0e8e6/vendor/rethinkdb-webui/public/fonts/opensans-extrabolditalic-webfont.woff -------------------------------------------------------------------------------- /vendor/rethinkdb-webui/public/fonts/opensans-italic-webfont.eot: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/lbguilherme/rethinkdb-lite/fbc95c4ef2aa9cf19c17400b94befa52e1f0e8e6/vendor/rethinkdb-webui/public/fonts/opensans-italic-webfont.eot -------------------------------------------------------------------------------- /vendor/rethinkdb-webui/public/fonts/opensans-italic-webfont.ttf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/lbguilherme/rethinkdb-lite/fbc95c4ef2aa9cf19c17400b94befa52e1f0e8e6/vendor/rethinkdb-webui/public/fonts/opensans-italic-webfont.ttf -------------------------------------------------------------------------------- /vendor/rethinkdb-webui/public/fonts/opensans-italic-webfont.woff: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/lbguilherme/rethinkdb-lite/fbc95c4ef2aa9cf19c17400b94befa52e1f0e8e6/vendor/rethinkdb-webui/public/fonts/opensans-italic-webfont.woff -------------------------------------------------------------------------------- /vendor/rethinkdb-webui/public/fonts/opensans-light-webfont.eot: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/lbguilherme/rethinkdb-lite/fbc95c4ef2aa9cf19c17400b94befa52e1f0e8e6/vendor/rethinkdb-webui/public/fonts/opensans-light-webfont.eot -------------------------------------------------------------------------------- /vendor/rethinkdb-webui/public/fonts/opensans-light-webfont.ttf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/lbguilherme/rethinkdb-lite/fbc95c4ef2aa9cf19c17400b94befa52e1f0e8e6/vendor/rethinkdb-webui/public/fonts/opensans-light-webfont.ttf -------------------------------------------------------------------------------- /vendor/rethinkdb-webui/public/fonts/opensans-light-webfont.woff: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/lbguilherme/rethinkdb-lite/fbc95c4ef2aa9cf19c17400b94befa52e1f0e8e6/vendor/rethinkdb-webui/public/fonts/opensans-light-webfont.woff -------------------------------------------------------------------------------- /vendor/rethinkdb-webui/public/fonts/opensans-lightitalic-webfont.eot: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/lbguilherme/rethinkdb-lite/fbc95c4ef2aa9cf19c17400b94befa52e1f0e8e6/vendor/rethinkdb-webui/public/fonts/opensans-lightitalic-webfont.eot -------------------------------------------------------------------------------- /vendor/rethinkdb-webui/public/fonts/opensans-lightitalic-webfont.ttf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/lbguilherme/rethinkdb-lite/fbc95c4ef2aa9cf19c17400b94befa52e1f0e8e6/vendor/rethinkdb-webui/public/fonts/opensans-lightitalic-webfont.ttf -------------------------------------------------------------------------------- /vendor/rethinkdb-webui/public/fonts/opensans-lightitalic-webfont.woff: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/lbguilherme/rethinkdb-lite/fbc95c4ef2aa9cf19c17400b94befa52e1f0e8e6/vendor/rethinkdb-webui/public/fonts/opensans-lightitalic-webfont.woff -------------------------------------------------------------------------------- /vendor/rethinkdb-webui/public/fonts/opensans-regular-webfont.eot: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/lbguilherme/rethinkdb-lite/fbc95c4ef2aa9cf19c17400b94befa52e1f0e8e6/vendor/rethinkdb-webui/public/fonts/opensans-regular-webfont.eot -------------------------------------------------------------------------------- /vendor/rethinkdb-webui/public/fonts/opensans-regular-webfont.ttf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/lbguilherme/rethinkdb-lite/fbc95c4ef2aa9cf19c17400b94befa52e1f0e8e6/vendor/rethinkdb-webui/public/fonts/opensans-regular-webfont.ttf -------------------------------------------------------------------------------- /vendor/rethinkdb-webui/public/fonts/opensans-regular-webfont.woff: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/lbguilherme/rethinkdb-lite/fbc95c4ef2aa9cf19c17400b94befa52e1f0e8e6/vendor/rethinkdb-webui/public/fonts/opensans-regular-webfont.woff -------------------------------------------------------------------------------- /vendor/rethinkdb-webui/public/fonts/opensans-semibold-webfont.eot: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/lbguilherme/rethinkdb-lite/fbc95c4ef2aa9cf19c17400b94befa52e1f0e8e6/vendor/rethinkdb-webui/public/fonts/opensans-semibold-webfont.eot -------------------------------------------------------------------------------- /vendor/rethinkdb-webui/public/fonts/opensans-semibold-webfont.ttf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/lbguilherme/rethinkdb-lite/fbc95c4ef2aa9cf19c17400b94befa52e1f0e8e6/vendor/rethinkdb-webui/public/fonts/opensans-semibold-webfont.ttf -------------------------------------------------------------------------------- /vendor/rethinkdb-webui/public/fonts/opensans-semibold-webfont.woff: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/lbguilherme/rethinkdb-lite/fbc95c4ef2aa9cf19c17400b94befa52e1f0e8e6/vendor/rethinkdb-webui/public/fonts/opensans-semibold-webfont.woff -------------------------------------------------------------------------------- /vendor/rethinkdb-webui/public/fonts/opensans-semibolditalic-webfont.eot: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/lbguilherme/rethinkdb-lite/fbc95c4ef2aa9cf19c17400b94befa52e1f0e8e6/vendor/rethinkdb-webui/public/fonts/opensans-semibolditalic-webfont.eot -------------------------------------------------------------------------------- /vendor/rethinkdb-webui/public/fonts/opensans-semibolditalic-webfont.ttf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/lbguilherme/rethinkdb-lite/fbc95c4ef2aa9cf19c17400b94befa52e1f0e8e6/vendor/rethinkdb-webui/public/fonts/opensans-semibolditalic-webfont.ttf -------------------------------------------------------------------------------- /vendor/rethinkdb-webui/public/fonts/opensans-semibolditalic-webfont.woff: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/lbguilherme/rethinkdb-lite/fbc95c4ef2aa9cf19c17400b94befa52e1f0e8e6/vendor/rethinkdb-webui/public/fonts/opensans-semibolditalic-webfont.woff -------------------------------------------------------------------------------- /vendor/rethinkdb-webui/public/images/ajax-loader.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/lbguilherme/rethinkdb-lite/fbc95c4ef2aa9cf19c17400b94befa52e1f0e8e6/vendor/rethinkdb-webui/public/images/ajax-loader.gif -------------------------------------------------------------------------------- /vendor/rethinkdb-webui/public/images/arrow_down.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/lbguilherme/rethinkdb-lite/fbc95c4ef2aa9cf19c17400b94befa52e1f0e8e6/vendor/rethinkdb-webui/public/images/arrow_down.png -------------------------------------------------------------------------------- /vendor/rethinkdb-webui/public/images/arrow_right.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/lbguilherme/rethinkdb-lite/fbc95c4ef2aa9cf19c17400b94befa52e1f0e8e6/vendor/rethinkdb-webui/public/images/arrow_right.png -------------------------------------------------------------------------------- /vendor/rethinkdb-webui/public/images/bar-line-graph-icon.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/lbguilherme/rethinkdb-lite/fbc95c4ef2aa9cf19c17400b94befa52e1f0e8e6/vendor/rethinkdb-webui/public/images/bar-line-graph-icon.png -------------------------------------------------------------------------------- /vendor/rethinkdb-webui/public/images/bars-icon.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/lbguilherme/rethinkdb-lite/fbc95c4ef2aa9cf19c17400b94befa52e1f0e8e6/vendor/rethinkdb-webui/public/images/bars-icon.png -------------------------------------------------------------------------------- /vendor/rethinkdb-webui/public/images/bars-icon_server-assignments.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/lbguilherme/rethinkdb-lite/fbc95c4ef2aa9cf19c17400b94befa52e1f0e8e6/vendor/rethinkdb-webui/public/images/bars-icon_server-assignments.png -------------------------------------------------------------------------------- /vendor/rethinkdb-webui/public/images/bars-icon_white.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/lbguilherme/rethinkdb-lite/fbc95c4ef2aa9cf19c17400b94befa52e1f0e8e6/vendor/rethinkdb-webui/public/images/bars-icon_white.png -------------------------------------------------------------------------------- /vendor/rethinkdb-webui/public/images/body_bg_tile.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/lbguilherme/rethinkdb-lite/fbc95c4ef2aa9cf19c17400b94befa52e1f0e8e6/vendor/rethinkdb-webui/public/images/body_bg_tile.png -------------------------------------------------------------------------------- /vendor/rethinkdb-webui/public/images/book_alt_16x16.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/lbguilherme/rethinkdb-lite/fbc95c4ef2aa9cf19c17400b94befa52e1f0e8e6/vendor/rethinkdb-webui/public/images/book_alt_16x16.png -------------------------------------------------------------------------------- /vendor/rethinkdb-webui/public/images/clock-icon.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/lbguilherme/rethinkdb-lite/fbc95c4ef2aa9cf19c17400b94befa52e1f0e8e6/vendor/rethinkdb-webui/public/images/clock-icon.png -------------------------------------------------------------------------------- /vendor/rethinkdb-webui/public/images/clock-icon_alt.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/lbguilherme/rethinkdb-lite/fbc95c4ef2aa9cf19c17400b94befa52e1f0e8e6/vendor/rethinkdb-webui/public/images/clock-icon_alt.png -------------------------------------------------------------------------------- /vendor/rethinkdb-webui/public/images/cog-icon.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/lbguilherme/rethinkdb-lite/fbc95c4ef2aa9cf19c17400b94befa52e1f0e8e6/vendor/rethinkdb-webui/public/images/cog-icon.png -------------------------------------------------------------------------------- /vendor/rethinkdb-webui/public/images/cog_16x16.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/lbguilherme/rethinkdb-lite/fbc95c4ef2aa9cf19c17400b94befa52e1f0e8e6/vendor/rethinkdb-webui/public/images/cog_16x16.png -------------------------------------------------------------------------------- /vendor/rethinkdb-webui/public/images/cog_white_16x16.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/lbguilherme/rethinkdb-lite/fbc95c4ef2aa9cf19c17400b94befa52e1f0e8e6/vendor/rethinkdb-webui/public/images/cog_white_16x16.png -------------------------------------------------------------------------------- /vendor/rethinkdb-webui/public/images/copy_to_clipboard_16x16.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/lbguilherme/rethinkdb-lite/fbc95c4ef2aa9cf19c17400b94befa52e1f0e8e6/vendor/rethinkdb-webui/public/images/copy_to_clipboard_16x16.png -------------------------------------------------------------------------------- /vendor/rethinkdb-webui/public/images/db.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/lbguilherme/rethinkdb-lite/fbc95c4ef2aa9cf19c17400b94befa52e1f0e8e6/vendor/rethinkdb-webui/public/images/db.png -------------------------------------------------------------------------------- /vendor/rethinkdb-webui/public/images/disk-icon.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/lbguilherme/rethinkdb-lite/fbc95c4ef2aa9cf19c17400b94befa52e1f0e8e6/vendor/rethinkdb-webui/public/images/disk-icon.png -------------------------------------------------------------------------------- /vendor/rethinkdb-webui/public/images/disk-slot-icon.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/lbguilherme/rethinkdb-lite/fbc95c4ef2aa9cf19c17400b94befa52e1f0e8e6/vendor/rethinkdb-webui/public/images/disk-slot-icon.png -------------------------------------------------------------------------------- /vendor/rethinkdb-webui/public/images/document-icon.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/lbguilherme/rethinkdb-lite/fbc95c4ef2aa9cf19c17400b94befa52e1f0e8e6/vendor/rethinkdb-webui/public/images/document-icon.png -------------------------------------------------------------------------------- /vendor/rethinkdb-webui/public/images/eye-icon_white.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/lbguilherme/rethinkdb-lite/fbc95c4ef2aa9cf19c17400b94befa52e1f0e8e6/vendor/rethinkdb-webui/public/images/eye-icon_white.png -------------------------------------------------------------------------------- /vendor/rethinkdb-webui/public/images/fullscreen_16x16.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/lbguilherme/rethinkdb-lite/fbc95c4ef2aa9cf19c17400b94befa52e1f0e8e6/vendor/rethinkdb-webui/public/images/fullscreen_16x16.png -------------------------------------------------------------------------------- /vendor/rethinkdb-webui/public/images/fullscreen_exit_16x16.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/lbguilherme/rethinkdb-lite/fbc95c4ef2aa9cf19c17400b94befa52e1f0e8e6/vendor/rethinkdb-webui/public/images/fullscreen_exit_16x16.png -------------------------------------------------------------------------------- /vendor/rethinkdb-webui/public/images/globe-icon_white.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/lbguilherme/rethinkdb-lite/fbc95c4ef2aa9cf19c17400b94befa52e1f0e8e6/vendor/rethinkdb-webui/public/images/globe-icon_white.png -------------------------------------------------------------------------------- /vendor/rethinkdb-webui/public/images/graph-icon.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/lbguilherme/rethinkdb-lite/fbc95c4ef2aa9cf19c17400b94befa52e1f0e8e6/vendor/rethinkdb-webui/public/images/graph-icon.png -------------------------------------------------------------------------------- /vendor/rethinkdb-webui/public/images/green-light.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/lbguilherme/rethinkdb-lite/fbc95c4ef2aa9cf19c17400b94befa52e1f0e8e6/vendor/rethinkdb-webui/public/images/green-light.png -------------------------------------------------------------------------------- /vendor/rethinkdb-webui/public/images/green-light_glow.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/lbguilherme/rethinkdb-lite/fbc95c4ef2aa9cf19c17400b94befa52e1f0e8e6/vendor/rethinkdb-webui/public/images/green-light_glow.png -------------------------------------------------------------------------------- /vendor/rethinkdb-webui/public/images/green-light_glow_small.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/lbguilherme/rethinkdb-lite/fbc95c4ef2aa9cf19c17400b94befa52e1f0e8e6/vendor/rethinkdb-webui/public/images/green-light_glow_small.png -------------------------------------------------------------------------------- /vendor/rethinkdb-webui/public/images/grid-icon.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/lbguilherme/rethinkdb-lite/fbc95c4ef2aa9cf19c17400b94befa52e1f0e8e6/vendor/rethinkdb-webui/public/images/grid-icon.png -------------------------------------------------------------------------------- /vendor/rethinkdb-webui/public/images/icon-magnifying_glass.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/lbguilherme/rethinkdb-lite/fbc95c4ef2aa9cf19c17400b94befa52e1f0e8e6/vendor/rethinkdb-webui/public/images/icon-magnifying_glass.png -------------------------------------------------------------------------------- /vendor/rethinkdb-webui/public/images/icon-pause.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/lbguilherme/rethinkdb-lite/fbc95c4ef2aa9cf19c17400b94befa52e1f0e8e6/vendor/rethinkdb-webui/public/images/icon-pause.png -------------------------------------------------------------------------------- /vendor/rethinkdb-webui/public/images/icon-play.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/lbguilherme/rethinkdb-lite/fbc95c4ef2aa9cf19c17400b94befa52e1f0e8e6/vendor/rethinkdb-webui/public/images/icon-play.png -------------------------------------------------------------------------------- /vendor/rethinkdb-webui/public/images/layers-exclamation-icon.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/lbguilherme/rethinkdb-lite/fbc95c4ef2aa9cf19c17400b94befa52e1f0e8e6/vendor/rethinkdb-webui/public/images/layers-exclamation-icon.png -------------------------------------------------------------------------------- /vendor/rethinkdb-webui/public/images/layers-icon.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/lbguilherme/rethinkdb-lite/fbc95c4ef2aa9cf19c17400b94befa52e1f0e8e6/vendor/rethinkdb-webui/public/images/layers-icon.png -------------------------------------------------------------------------------- /vendor/rethinkdb-webui/public/images/list-horiz-dash.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/lbguilherme/rethinkdb-lite/fbc95c4ef2aa9cf19c17400b94befa52e1f0e8e6/vendor/rethinkdb-webui/public/images/list-horiz-dash.png -------------------------------------------------------------------------------- /vendor/rethinkdb-webui/public/images/list-square-bullet.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/lbguilherme/rethinkdb-lite/fbc95c4ef2aa9cf19c17400b94befa52e1f0e8e6/vendor/rethinkdb-webui/public/images/list-square-bullet.png -------------------------------------------------------------------------------- /vendor/rethinkdb-webui/public/images/list-vert-dash.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/lbguilherme/rethinkdb-lite/fbc95c4ef2aa9cf19c17400b94befa52e1f0e8e6/vendor/rethinkdb-webui/public/images/list-vert-dash.png -------------------------------------------------------------------------------- /vendor/rethinkdb-webui/public/images/live-icon.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/lbguilherme/rethinkdb-lite/fbc95c4ef2aa9cf19c17400b94befa52e1f0e8e6/vendor/rethinkdb-webui/public/images/live-icon.png -------------------------------------------------------------------------------- /vendor/rethinkdb-webui/public/images/loading-feed.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/lbguilherme/rethinkdb-lite/fbc95c4ef2aa9cf19c17400b94befa52e1f0e8e6/vendor/rethinkdb-webui/public/images/loading-feed.gif -------------------------------------------------------------------------------- /vendor/rethinkdb-webui/public/images/navbar-active.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/lbguilherme/rethinkdb-lite/fbc95c4ef2aa9cf19c17400b94befa52e1f0e8e6/vendor/rethinkdb-webui/public/images/navbar-active.png -------------------------------------------------------------------------------- /vendor/rethinkdb-webui/public/images/pencil-icon.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/lbguilherme/rethinkdb-lite/fbc95c4ef2aa9cf19c17400b94befa52e1f0e8e6/vendor/rethinkdb-webui/public/images/pencil-icon.png -------------------------------------------------------------------------------- /vendor/rethinkdb-webui/public/images/pencil-icon_big.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/lbguilherme/rethinkdb-lite/fbc95c4ef2aa9cf19c17400b94befa52e1f0e8e6/vendor/rethinkdb-webui/public/images/pencil-icon_big.png -------------------------------------------------------------------------------- /vendor/rethinkdb-webui/public/images/push-arrow-left-icon.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/lbguilherme/rethinkdb-lite/fbc95c4ef2aa9cf19c17400b94befa52e1f0e8e6/vendor/rethinkdb-webui/public/images/push-arrow-left-icon.png -------------------------------------------------------------------------------- /vendor/rethinkdb-webui/public/images/query_round_trip-icon.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/lbguilherme/rethinkdb-lite/fbc95c4ef2aa9cf19c17400b94befa52e1f0e8e6/vendor/rethinkdb-webui/public/images/query_round_trip-icon.png -------------------------------------------------------------------------------- /vendor/rethinkdb-webui/public/images/query_server_time-icon.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/lbguilherme/rethinkdb-lite/fbc95c4ef2aa9cf19c17400b94befa52e1f0e8e6/vendor/rethinkdb-webui/public/images/query_server_time-icon.png -------------------------------------------------------------------------------- /vendor/rethinkdb-webui/public/images/query_shard_access-icon.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/lbguilherme/rethinkdb-lite/fbc95c4ef2aa9cf19c17400b94befa52e1f0e8e6/vendor/rethinkdb-webui/public/images/query_shard_access-icon.png -------------------------------------------------------------------------------- /vendor/rethinkdb-webui/public/images/red-light.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/lbguilherme/rethinkdb-lite/fbc95c4ef2aa9cf19c17400b94befa52e1f0e8e6/vendor/rethinkdb-webui/public/images/red-light.png -------------------------------------------------------------------------------- /vendor/rethinkdb-webui/public/images/red-light_glow.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/lbguilherme/rethinkdb-lite/fbc95c4ef2aa9cf19c17400b94befa52e1f0e8e6/vendor/rethinkdb-webui/public/images/red-light_glow.png -------------------------------------------------------------------------------- /vendor/rethinkdb-webui/public/images/red-light_glow_small.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/lbguilherme/rethinkdb-lite/fbc95c4ef2aa9cf19c17400b94befa52e1f0e8e6/vendor/rethinkdb-webui/public/images/red-light_glow_small.png -------------------------------------------------------------------------------- /vendor/rethinkdb-webui/public/images/resolve_issue-clock_icon.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/lbguilherme/rethinkdb-lite/fbc95c4ef2aa9cf19c17400b94befa52e1f0e8e6/vendor/rethinkdb-webui/public/images/resolve_issue-clock_icon.png -------------------------------------------------------------------------------- /vendor/rethinkdb-webui/public/images/resolve_issue-danger_icon.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/lbguilherme/rethinkdb-lite/fbc95c4ef2aa9cf19c17400b94befa52e1f0e8e6/vendor/rethinkdb-webui/public/images/resolve_issue-danger_icon.png -------------------------------------------------------------------------------- /vendor/rethinkdb-webui/public/images/resolve_issue-details_icon.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/lbguilherme/rethinkdb-lite/fbc95c4ef2aa9cf19c17400b94befa52e1f0e8e6/vendor/rethinkdb-webui/public/images/resolve_issue-details_icon.png -------------------------------------------------------------------------------- /vendor/rethinkdb-webui/public/images/resolve_issue-message_icon.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/lbguilherme/rethinkdb-lite/fbc95c4ef2aa9cf19c17400b94befa52e1f0e8e6/vendor/rethinkdb-webui/public/images/resolve_issue-message_icon.png -------------------------------------------------------------------------------- /vendor/rethinkdb-webui/public/images/resolve_issue-resolved_icon.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/lbguilherme/rethinkdb-lite/fbc95c4ef2aa9cf19c17400b94befa52e1f0e8e6/vendor/rethinkdb-webui/public/images/resolve_issue-resolved_icon.png -------------------------------------------------------------------------------- /vendor/rethinkdb-webui/public/images/server-icon-added.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/lbguilherme/rethinkdb-lite/fbc95c4ef2aa9cf19c17400b94befa52e1f0e8e6/vendor/rethinkdb-webui/public/images/server-icon-added.png -------------------------------------------------------------------------------- /vendor/rethinkdb-webui/public/images/server-icon-removed.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/lbguilherme/rethinkdb-lite/fbc95c4ef2aa9cf19c17400b94befa52e1f0e8e6/vendor/rethinkdb-webui/public/images/server-icon-removed.png -------------------------------------------------------------------------------- /vendor/rethinkdb-webui/public/images/server-icon.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/lbguilherme/rethinkdb-lite/fbc95c4ef2aa9cf19c17400b94befa52e1f0e8e6/vendor/rethinkdb-webui/public/images/server-icon.png -------------------------------------------------------------------------------- /vendor/rethinkdb-webui/public/images/server-icon_server-assignments.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/lbguilherme/rethinkdb-lite/fbc95c4ef2aa9cf19c17400b94befa52e1f0e8e6/vendor/rethinkdb-webui/public/images/server-icon_server-assignments.png -------------------------------------------------------------------------------- /vendor/rethinkdb-webui/public/images/status-panel_bg_tile.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/lbguilherme/rethinkdb-lite/fbc95c4ef2aa9cf19c17400b94befa52e1f0e8e6/vendor/rethinkdb-webui/public/images/status-panel_bg_tile.png -------------------------------------------------------------------------------- /vendor/rethinkdb-webui/public/images/status_panel-icon_1-error.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/lbguilherme/rethinkdb-lite/fbc95c4ef2aa9cf19c17400b94befa52e1f0e8e6/vendor/rethinkdb-webui/public/images/status_panel-icon_1-error.png -------------------------------------------------------------------------------- /vendor/rethinkdb-webui/public/images/status_panel-icon_1.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/lbguilherme/rethinkdb-lite/fbc95c4ef2aa9cf19c17400b94befa52e1f0e8e6/vendor/rethinkdb-webui/public/images/status_panel-icon_1.png -------------------------------------------------------------------------------- /vendor/rethinkdb-webui/public/images/status_panel-icon_2-error.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/lbguilherme/rethinkdb-lite/fbc95c4ef2aa9cf19c17400b94befa52e1f0e8e6/vendor/rethinkdb-webui/public/images/status_panel-icon_2-error.png -------------------------------------------------------------------------------- /vendor/rethinkdb-webui/public/images/status_panel-icon_2.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/lbguilherme/rethinkdb-lite/fbc95c4ef2aa9cf19c17400b94befa52e1f0e8e6/vendor/rethinkdb-webui/public/images/status_panel-icon_2.png -------------------------------------------------------------------------------- /vendor/rethinkdb-webui/public/images/status_panel-icon_3-error.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/lbguilherme/rethinkdb-lite/fbc95c4ef2aa9cf19c17400b94befa52e1f0e8e6/vendor/rethinkdb-webui/public/images/status_panel-icon_3-error.png -------------------------------------------------------------------------------- /vendor/rethinkdb-webui/public/images/status_panel-icon_3.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/lbguilherme/rethinkdb-lite/fbc95c4ef2aa9cf19c17400b94befa52e1f0e8e6/vendor/rethinkdb-webui/public/images/status_panel-icon_3.png -------------------------------------------------------------------------------- /vendor/rethinkdb-webui/public/images/status_panel-icon_4-error.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/lbguilherme/rethinkdb-lite/fbc95c4ef2aa9cf19c17400b94befa52e1f0e8e6/vendor/rethinkdb-webui/public/images/status_panel-icon_4-error.png -------------------------------------------------------------------------------- /vendor/rethinkdb-webui/public/images/status_panel-icon_4.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/lbguilherme/rethinkdb-lite/fbc95c4ef2aa9cf19c17400b94befa52e1f0e8e6/vendor/rethinkdb-webui/public/images/status_panel-icon_4.png -------------------------------------------------------------------------------- /vendor/rethinkdb-webui/public/images/trash_stroke_16x16.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/lbguilherme/rethinkdb-lite/fbc95c4ef2aa9cf19c17400b94befa52e1f0e8e6/vendor/rethinkdb-webui/public/images/trash_stroke_16x16.png -------------------------------------------------------------------------------- /vendor/rethinkdb-webui/public/images/warning-icon.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/lbguilherme/rethinkdb-lite/fbc95c4ef2aa9cf19c17400b94befa52e1f0e8e6/vendor/rethinkdb-webui/public/images/warning-icon.png -------------------------------------------------------------------------------- /vendor/rethinkdb-webui/public/images/yellow-light_glow.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/lbguilherme/rethinkdb-lite/fbc95c4ef2aa9cf19c17400b94befa52e1f0e8e6/vendor/rethinkdb-webui/public/images/yellow-light_glow.png -------------------------------------------------------------------------------- /vendor/rethinkdb-webui/public/js/ZeroClipboard.swf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/lbguilherme/rethinkdb-lite/fbc95c4ef2aa9cf19c17400b94befa52e1f0e8e6/vendor/rethinkdb-webui/public/js/ZeroClipboard.swf -------------------------------------------------------------------------------- /vendor/rethinkdb-webui/public/js/chosen/chosen-sprite.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/lbguilherme/rethinkdb-lite/fbc95c4ef2aa9cf19c17400b94befa52e1f0e8e6/vendor/rethinkdb-webui/public/js/chosen/chosen-sprite.png -------------------------------------------------------------------------------- /vendor/rethinkdb-webui/src/handlebars/abstract-modal-outer.hbs: -------------------------------------------------------------------------------- 1 | 2 | {{! Outer template for the abstract modal dialog }} 3 | 20 | 21 | 22 | -------------------------------------------------------------------------------- /vendor/rethinkdb-webui/src/handlebars/add_database-modal.hbs: -------------------------------------------------------------------------------- 1 | 2 |
3 |
4 |
5 | 6 |
7 | 8 |
9 |
10 |
11 |
12 | 13 | 14 | -------------------------------------------------------------------------------- /vendor/rethinkdb-webui/src/handlebars/alert-connection_fail.hbs: -------------------------------------------------------------------------------- 1 | 2 |
3 | × 4 |

The connection to the server failed. Try running the query again.

5 |
6 | 7 | 8 | -------------------------------------------------------------------------------- /vendor/rethinkdb-webui/src/handlebars/alert_message.hbs: -------------------------------------------------------------------------------- 1 | 2 |
3 | × 4 |

{{print_safe message}}

5 |
6 | 7 | 8 | -------------------------------------------------------------------------------- /vendor/rethinkdb-webui/src/handlebars/confirmation_dialog.hbs: -------------------------------------------------------------------------------- 1 | 2 | {{! Template for the confirmation dialog }} 3 |
4 |

{{print_safe message}}

5 | 6 | 7 | -------------------------------------------------------------------------------- /vendor/rethinkdb-webui/src/handlebars/database.hbs: -------------------------------------------------------------------------------- 1 |
2 |
Database
3 |

{{name}}

4 |
5 | 6 |
8 |
9 |
10 | -------------------------------------------------------------------------------- /vendor/rethinkdb-webui/src/handlebars/databases_container.hbs: -------------------------------------------------------------------------------- 1 |
2 | 3 | 4 |
5 |

Tables in the cluster

6 |
7 |
8 | -------------------------------------------------------------------------------- /vendor/rethinkdb-webui/src/handlebars/dataexplorer-cursor_timed_out.hbs: -------------------------------------------------------------------------------- 1 | 2 | No more data available, the cursor timed out. Re-execute the query to retrieve more results. 3 | 4 | 5 | 6 | -------------------------------------------------------------------------------- /vendor/rethinkdb-webui/src/handlebars/dataexplorer-databases_suggestions.hbs: -------------------------------------------------------------------------------- 1 | 2 |

3 | {{#if no_database}} 4 | No database found. Use dbCreate() to create a new database first. 5 | {{else}} 6 | List of databases available: {{comma_separated_simple databases_available}} 7 | {{/if}} 8 |

9 |
10 | 11 | -------------------------------------------------------------------------------- /vendor/rethinkdb-webui/src/handlebars/dataexplorer-description.hbs: -------------------------------------------------------------------------------- 1 | 2 |

{{name}}{{#if args}}{{args}}{{/if}}

3 | {{print_safe description}} 4 | 5 | 6 | 7 | -------------------------------------------------------------------------------- /vendor/rethinkdb-webui/src/handlebars/dataexplorer-description_with_example.hbs: -------------------------------------------------------------------------------- 1 | 2 |

{{print_safe description}}

3 | {{#if grouped_data}}

Note: Commands chained after group will operate on each reduction. Call ungroup to operate on the array of groups.

{{/if}} 4 |
5 |
6 | {{print_safe example}} 7 | 8 | 9 | -------------------------------------------------------------------------------- /vendor/rethinkdb-webui/src/handlebars/dataexplorer-error.hbs: -------------------------------------------------------------------------------- 1 | 2 |

Error

3 |

4 | {{#if js_error}} 5 | JavaScript error: 6 | {{else}} 7 | Server error: 8 | {{/if}} 9 |

10 |
{{error}}
11 | 12 | {{#if query}} 13 |

The query that returned an error is:

14 |
{{query}}
15 | {{/if}} 16 | 17 | 18 | 19 | 20 | -------------------------------------------------------------------------------- /vendor/rethinkdb-webui/src/handlebars/dataexplorer-history.hbs: -------------------------------------------------------------------------------- 1 | 2 |
    3 | 4 | 5 | -------------------------------------------------------------------------------- /vendor/rethinkdb-webui/src/handlebars/dataexplorer-option_page.hbs: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | -------------------------------------------------------------------------------- /vendor/rethinkdb-webui/src/handlebars/dataexplorer-query_error.hbs: -------------------------------------------------------------------------------- 1 | 2 | {{! Spacing maters, this content goes in a pre tag}} 3 | {{#if found_run}}You should remove .run() from your queries when using the Data Explorer (as of RethinkDB 1.4). The query will be built and sent by the Data Explorer itself.{{/if}} 4 | {{#if last_non_query}}Last query was not a RethinkDB query.{{/if}} 5 | {{#if no_query}}No query found{{/if}} 6 | {{#if syntax_error}}Syntax error, missing opening bracket for {{bracket}} (line {{line}}, position {{position}}).{{/if}} 7 | 8 | 9 | 10 | -------------------------------------------------------------------------------- /vendor/rethinkdb-webui/src/handlebars/dataexplorer-query_li.hbs: -------------------------------------------------------------------------------- 1 | {{#if no_query}} 2 |
  • No history available
  • 3 | {{else}} 4 |
  • 5 |
    6 |
    [{{num}}]
    7 |
    {{query}}
    8 |
    9 | {{#if broken_query}} 10 | 12 | {{/if}} 13 | 14 | 15 |
    16 |
    17 |
  • 18 | {{/if}} 19 | -------------------------------------------------------------------------------- /vendor/rethinkdb-webui/src/handlebars/dataexplorer-reason_broken.hbs: -------------------------------------------------------------------------------- 1 | 2 | {{#if is_internet_explorer}} 3 | Sorry, the data explorer does not support Internet Explorer. See the supported browsers. 4 | {{else}} 5 | {{#if no_driver}} 6 | JavaScript driver not found. 7 | {{else}} 8 | Sorry, the data explorer does not support your browser. Please upgrade it. See the supported browsers. 9 | {{/if}} 10 | {{/if}} 11 | 12 | 13 | -------------------------------------------------------------------------------- /vendor/rethinkdb-webui/src/handlebars/dataexplorer-tables_suggestions.hbs: -------------------------------------------------------------------------------- 1 | 2 |

    3 | {{#if error}} 4 | The database specified in db() was not found. 5 | {{else}} 6 | {{#if no_table}} 7 | {{#if database_name}} 8 | No table found in {{database_name}}. Use tableCreate() to create a new table first. 9 | {{else}} 10 | You need to create a database then a table first. 11 | {{/if}} 12 | {{else}} 13 | List of tables{{#if database_name}} in {{database_name}}{{/if}}: {{comma_separated_simple tables_available}} 14 | {{/if}} 15 | {{/if}} 16 |

    17 |
    18 | 19 | 20 | -------------------------------------------------------------------------------- /vendor/rethinkdb-webui/src/handlebars/dataexplorer_input_query.hbs: -------------------------------------------------------------------------------- 1 | 2 |
    3 |
    4 |
    5 |
      6 |
      7 |
      8 |
      9 |
      10 |
      11 | 12 |
      13 | 14 | 15 | 16 |
      17 |
      18 |
      19 | 20 |
      21 | 22 | 23 | -------------------------------------------------------------------------------- /vendor/rethinkdb-webui/src/handlebars/dataexplorer_large_result_json_tree_container.hbs: -------------------------------------------------------------------------------- 1 | {{#if too_many_datums}} 2 |
      3 | × 4 |

      Syntax highlighting is disabled because of the amount of data returned by the query.

      5 |
      6 | {{/if}} 7 | 8 |
      9 | 10 | 11 | ... 12 |
      13 | {{json_data}} 14 |
      15 |
      16 | 17 | 18 | 19 | -------------------------------------------------------------------------------- /vendor/rethinkdb-webui/src/handlebars/dataexplorer_result_empty.hbs: -------------------------------------------------------------------------------- 1 | {{#if ended}} 2 | {{#if at_beginning}} 3 |

      No results were returned for this query

      4 | {{else}} 5 |

      No more results were returned for this query

      6 | {{/if}} 7 | {{else}} 8 |

      Waiting for more results

      9 | {{/if}} 10 | -------------------------------------------------------------------------------- /vendor/rethinkdb-webui/src/handlebars/dataexplorer_result_json_table_container.hbs: -------------------------------------------------------------------------------- 1 |
      2 | 3 | {{print_safe table_attr}} 4 | {{print_safe table_data}} 5 |
      6 |
      7 | -------------------------------------------------------------------------------- /vendor/rethinkdb-webui/src/handlebars/dataexplorer_result_json_table_data_inline.hbs: -------------------------------------------------------------------------------- 1 | 2 | {{#if data_to_expand}} 3 | 4 | 5 | {{#unless is_inline}}{{/unless}} 6 | {{print_safe value}} 7 | {{#if need_comma}}, {{/if}} 8 | 9 | {{else}} 10 | {{print_safe value}}{{#if need_comma}}, {{/if}} 11 | {{/if}} 12 | 13 | -------------------------------------------------------------------------------- /vendor/rethinkdb-webui/src/handlebars/dataexplorer_result_json_table_td_attr.hbs: -------------------------------------------------------------------------------- 1 | 2 | 3 |
      4 |
      {{key}}
      5 |
      6 | 7 | 8 | 9 | -------------------------------------------------------------------------------- /vendor/rethinkdb-webui/src/handlebars/dataexplorer_result_json_table_td_value.hbs: -------------------------------------------------------------------------------- 1 | 2 | 3 | {{print_safe cell_content}} 4 | 5 | 6 | 7 | -------------------------------------------------------------------------------- /vendor/rethinkdb-webui/src/handlebars/dataexplorer_result_json_table_td_value_content.hbs: -------------------------------------------------------------------------------- 1 | 2 |
      3 | {{#if data_to_expand}} 4 |
      5 | 6 | 7 | {{print_safe value}} 8 | 9 |
      10 | {{else}}{{#if is_object}} 11 |
      12 | {...} 13 |
      14 | 15 | {{else}} 16 |
      {{value}}
      17 | {{/if}}{{/if}} 18 |
      19 | 20 | 21 | -------------------------------------------------------------------------------- /vendor/rethinkdb-webui/src/handlebars/dataexplorer_result_json_table_tr_attr.hbs: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | {{#each attr}} 6 | 7 |
      8 | {{#if is_primitive}} 9 |
      {{prefix_str}} value
      10 | {{else}} 11 |
      {{prefix_str}}{{key}}
      12 | {{/if}} 13 |
      14 | 15 | {{/each}} 16 | 17 | 18 | 19 | -------------------------------------------------------------------------------- /vendor/rethinkdb-webui/src/handlebars/dataexplorer_result_json_table_tr_value.hbs: -------------------------------------------------------------------------------- 1 | 2 | {{#each document}} 3 | 4 |
      {{record}}
      5 | {{#each cells}} 6 | {{print_safe this}} 7 | {{/each}} 8 | 9 | {{/each}} 10 | 11 | 12 | -------------------------------------------------------------------------------- /vendor/rethinkdb-webui/src/handlebars/dataexplorer_result_json_tree_array.hbs: -------------------------------------------------------------------------------- 1 | 2 | 3 | {{#if no_value}} 4 | [ ] 5 | {{else}} 6 | 7 | [ 8 | ... 9 |
        10 | {{#each values}} 11 |
      • 12 | {{print_safe value}}{{#unless no_comma}}, {{/unless}} 13 |
      • 14 | {{/each}} 15 |
      16 | ]{{/if}} 17 | 18 | -------------------------------------------------------------------------------- /vendor/rethinkdb-webui/src/handlebars/dataexplorer_result_json_tree_container.hbs: -------------------------------------------------------------------------------- 1 | 2 |
      {{print_safe tree}}
      3 | 4 | -------------------------------------------------------------------------------- /vendor/rethinkdb-webui/src/handlebars/dataexplorer_result_json_tree_email.hbs: -------------------------------------------------------------------------------- 1 | 2 | {{email}}, 3 | » 4 | 5 | -------------------------------------------------------------------------------- /vendor/rethinkdb-webui/src/handlebars/dataexplorer_result_json_tree_object.hbs: -------------------------------------------------------------------------------- 1 | 2 | {{#if no_value}} 3 | { } 4 | {{else}} 5 | 6 | { 7 | ... 8 |
        9 | {{#each values}} 10 |
      • 11 | "{{this.key}}": {{print_safe this.value}}{{#unless no_comma}}, {{/unless}} 12 |
      • 13 | {{/each}} 14 |
      15 | } 16 | {{/if}} 17 | 18 | 19 | -------------------------------------------------------------------------------- /vendor/rethinkdb-webui/src/handlebars/dataexplorer_result_json_tree_span.hbs: -------------------------------------------------------------------------------- 1 | 2 | {{value}} 3 | 4 | -------------------------------------------------------------------------------- /vendor/rethinkdb-webui/src/handlebars/dataexplorer_result_json_tree_span_with_quotes.hbs: -------------------------------------------------------------------------------- 1 | 2 | "{{value}}" 3 | 4 | -------------------------------------------------------------------------------- /vendor/rethinkdb-webui/src/handlebars/dataexplorer_result_json_tree_url.hbs: -------------------------------------------------------------------------------- 1 | 2 | {{url}}, 3 | » 4 | 5 | -------------------------------------------------------------------------------- /vendor/rethinkdb-webui/src/handlebars/dataexplorer_result_profile.hbs: -------------------------------------------------------------------------------- 1 |
      2 | {{#with profile}} 3 |
      4 |
      5 |
      6 |
      7 |

      {{total_duration}} round-trip time

      8 |
      9 |
      10 |

      {{server_duration}} server time

      11 |
      12 |
      13 |

      {{num_shard_accesses}} shard accesses

      14 |
      15 |
      16 |
      17 |
      18 | 21 |
      {{{tree}}}
      22 | {{/with}} 23 | {{#unless profile}} 24 |
      25 |

      Enable the query profiler (developer preview) and re-run the query.

      26 |
      27 | {{/unless}} 28 |
      29 | -------------------------------------------------------------------------------- /vendor/rethinkdb-webui/src/handlebars/dataexplorer_result_raw.hbs: -------------------------------------------------------------------------------- 1 |
      2 | 3 |
      4 | -------------------------------------------------------------------------------- /vendor/rethinkdb-webui/src/handlebars/dataexplorer_result_table.hbs: -------------------------------------------------------------------------------- 1 |
      2 | {{{content}}} 3 |
      4 | -------------------------------------------------------------------------------- /vendor/rethinkdb-webui/src/handlebars/dataexplorer_result_tree.hbs: -------------------------------------------------------------------------------- 1 |
      2 |
      3 | {{{tree}}} 4 |
      5 |
      6 | -------------------------------------------------------------------------------- /vendor/rethinkdb-webui/src/handlebars/dataexplorer_suggestion_name_li.hbs: -------------------------------------------------------------------------------- 1 | 2 |
    • {{suggestion}}
    • 3 | 4 | 5 | -------------------------------------------------------------------------------- /vendor/rethinkdb-webui/src/handlebars/delete-database-modal.hbs: -------------------------------------------------------------------------------- 1 | 2 |
      3 | This name doesn't match the name of the database you're trying to delete. 4 |
      5 |
      Deleting the database will delete all the tables in it.
      This action cannot be undone.
      6 |
      7 |

      Please type in the name of the database to confirm.

      8 |
      9 | 10 |
      11 | 12 | 13 | -------------------------------------------------------------------------------- /vendor/rethinkdb-webui/src/handlebars/element_view-not_found.hbs: -------------------------------------------------------------------------------- 1 | 2 |
      3 |

      Error

      4 |

      {{capitalize type}} {{id}} could not be found or is unavailable.

      5 |

      You can try to refresh or see a list of all {{pluralize_noun type 2}}.

      6 |
      7 | 8 | 9 | 10 | -------------------------------------------------------------------------------- /vendor/rethinkdb-webui/src/handlebars/empty_list.hbs: -------------------------------------------------------------------------------- 1 | 2 |
      3 |
      There are no {{element}}s in this {{container}}.
      4 |
      5 | 6 | 7 | 8 | -------------------------------------------------------------------------------- /vendor/rethinkdb-webui/src/handlebars/error-query.hbs: -------------------------------------------------------------------------------- 1 | 2 |
      3 |

      Error

      4 |

      The request to retrieve data failed. You can try to refresh.

      5 |

      Error:

      6 | {{#if error}}
      {{error}}
      {{/if}} 7 |
      8 | 9 | 10 | -------------------------------------------------------------------------------- /vendor/rethinkdb-webui/src/handlebars/fail_solve_issue.hbs: -------------------------------------------------------------------------------- 1 | 2 | Sorry, something went wrong. The issue might not be up to date, please refresh. 3 | 4 | 5 | -------------------------------------------------------------------------------- /vendor/rethinkdb-webui/src/handlebars/has_update.hbs: -------------------------------------------------------------------------------- 1 | 2 | × 3 |

      Update found: A new version of RethinkDB is available (version {{last_version}}): see the release announcement for details.

      4 | 5 | 6 | -------------------------------------------------------------------------------- /vendor/rethinkdb-webui/src/handlebars/is_disconnected.hbs: -------------------------------------------------------------------------------- 1 | 2 | 14 | 15 | 16 | -------------------------------------------------------------------------------- /vendor/rethinkdb-webui/src/handlebars/is_disconnected_message.hbs: -------------------------------------------------------------------------------- 1 | 2 | Failed to reconnect. Trying again 3 | 4 | 5 | 6 | -------------------------------------------------------------------------------- /vendor/rethinkdb-webui/src/handlebars/loading_databases.hbs: -------------------------------------------------------------------------------- 1 | 2 |
      3 |
      4 |
      Loading tables...
      5 |
      6 |
      7 | 8 | 9 | -------------------------------------------------------------------------------- /vendor/rethinkdb-webui/src/handlebars/loading_servers.hbs: -------------------------------------------------------------------------------- 1 |
      2 |
      3 |
      Loading servers...
      4 |
      5 |
      6 | -------------------------------------------------------------------------------- /vendor/rethinkdb-webui/src/handlebars/log-entry.hbs: -------------------------------------------------------------------------------- 1 |
      2 |
      3 | {{message}} 4 |

      Posted by 5 | {{server}} 6 |

      7 |
      8 |
      9 | 10 |
      11 |
      12 | -------------------------------------------------------------------------------- /vendor/rethinkdb-webui/src/handlebars/logs_container.hbs: -------------------------------------------------------------------------------- 1 |

      Log entries

      2 |
      3 |
      4 |
      5 |

      No log entries to show

      6 |

      No more log entries to show

      7 |

      8 | Older log entries » 9 |

      10 |
      11 |
      12 | -------------------------------------------------------------------------------- /vendor/rethinkdb-webui/src/handlebars/navbar_view.hbs: -------------------------------------------------------------------------------- 1 | 2 | 11 |
      12 |
      13 | 16 |
      17 | 18 | -------------------------------------------------------------------------------- /vendor/rethinkdb-webui/src/handlebars/no_databases.hbs: -------------------------------------------------------------------------------- 1 | 2 |
      3 |
      4 | You need to create a database before creating a table. 5 |
      6 |
      7 |
      There are no databases in this cluster.
      8 |
      9 |
      10 | 11 | 12 | -------------------------------------------------------------------------------- /vendor/rethinkdb-webui/src/handlebars/ops_plot.hbs: -------------------------------------------------------------------------------- 1 | 2 |
      3 | {{#if cluster}}

      Cluster performance

      {{/if}} 4 |
      5 |
      6 |
      7 | 8 | 9 | -------------------------------------------------------------------------------- /vendor/rethinkdb-webui/src/handlebars/ops_plot_legend.hbs: -------------------------------------------------------------------------------- 1 | 2 |
      3 |
      4 |

      Reads/sec: {{read_count}}

      5 |
      6 |
      7 |
      8 |

      Writes/sec: {{write_count}}

      9 |
      10 | 11 | -------------------------------------------------------------------------------- /vendor/rethinkdb-webui/src/handlebars/progressbar.hbs: -------------------------------------------------------------------------------- 1 | {{#if operation_active}} 2 |
      3 |
      4 | {{#if starting}} 5 |

      Started

      6 | {{/if}} 7 | {{#if processing}} 8 |

      Started

      9 |

      Processing

      10 | {{/if}} 11 | {{#if finished}} 12 |

      Started

      13 |

      Processed

      14 | {{/if}} 15 |
      16 | {{#if starting}} 17 |

      0/{{new_value}} completed

      18 | {{else}} 19 |

      {{current_value}}/{{max_value}} completed

      20 | {{/if}} 21 |
      22 |
      23 | {{else}} 24 |

      {{current_value}}/{{max_value}} connected

      25 | {{/if}} 26 | -------------------------------------------------------------------------------- /vendor/rethinkdb-webui/src/handlebars/reconfigure.hbs: -------------------------------------------------------------------------------- 1 |

      Sharding and replication

      2 |
      3 |
      4 | {{num_shards}} 5 | {{pluralize_noun "shard" num_shards}} 6 |
      7 |
      8 | {{num_replicas_per_shard}} 9 | {{pluralize_noun "replica" num_replicas_per_shard}} per shard 10 |
      11 | 12 |
      13 |
      14 | -------------------------------------------------------------------------------- /vendor/rethinkdb-webui/src/handlebars/remove_table-modal.hbs: -------------------------------------------------------------------------------- 1 | 2 |
      Deleting a table will delete all its data. This action cannot be reversed.
      3 |
      4 | {{#if single_delete}} 5 |

      Are you sure you want to delete this table:

      6 | {{else}} 7 |

      Are you sure you want to delete these tables:

      8 | {{/if}} 9 | 14 | 15 | -------------------------------------------------------------------------------- /vendor/rethinkdb-webui/src/handlebars/rename_item-modal.hbs: -------------------------------------------------------------------------------- 1 | {{! Template for the rename item dialog }} 2 |
      3 |
      4 |

      5 | {{type}} id: 6 | {{#if is_database}} 7 | {{id}} 8 | {{else}} 9 | {{id}} 11 | {{/if}} 12 |

      13 | 14 |
      15 | 16 |
      17 |
      18 | -------------------------------------------------------------------------------- /vendor/rethinkdb-webui/src/handlebars/renamed_item-alert.hbs: -------------------------------------------------------------------------------- 1 | {{! Confirmation dialog alert }} 2 |
      3 | × 4 |

      You successfully renamed {{type}} {{old_name}} to {{new_name}}.

      5 |
      6 | -------------------------------------------------------------------------------- /vendor/rethinkdb-webui/src/handlebars/replica_status.hbs: -------------------------------------------------------------------------------- 1 | {{#if operation_active}} 2 |
      3 |
      4 | {{#if starting}} 5 |

      Started

      6 | {{/if}} 7 | {{#if processing}} 8 |

      Started

      9 |

      Table reconfiguring

      10 | {{/if}} 11 | {{#if finished}} 12 |

      Started

      13 |

      Table reconfigured

      14 | {{/if}} 15 |
      16 | {{#if starting}} 17 |

      0/{{new_value}} replicas completed

      18 | {{else}} 19 |

      20 | {{current_value}}/{{max_value}} {{pluralize_noun "replica" num_replicas}}{{#if total_blocks}}, 21 | {{! Keep the if above so we do not have an extra space before the comma}} 22 | {{replicated_blocks}}/{{total_blocks}} blocks copied 23 | {{else}} 24 | up to date 25 | {{/if}} 26 |

      27 | {{/if}} 28 |
      29 |
      30 | {{/if}} 31 | -------------------------------------------------------------------------------- /vendor/rethinkdb-webui/src/handlebars/resolve_issues-resolved.hbs: -------------------------------------------------------------------------------- 1 |
      2 | × 3 | {{#if name_conflict}} 4 |

      You successfully solved the name conflict.

      5 | {{/if}} 6 | {{#if server_dead}} 7 |

      You successfully removed the server {{server_name}}.

      8 | {{/if}} 9 |
      10 | -------------------------------------------------------------------------------- /vendor/rethinkdb-webui/src/handlebars/responsibility.hbs: -------------------------------------------------------------------------------- 1 | 2 | {{#if is_table}} 3 |
    • 4 |
      5 |
      6 |

      Table {{db}}.{{table}}

      7 |
      8 |
    • 9 |
        10 |
      11 | {{/if}} 12 | {{#if is_shard}} 13 |
    • 14 |
      15 |
      16 |

      Shard {{index}}/{{num_shards}}

      17 |

      Role {{role}}

      18 |
      19 |
    • 20 | {{/if}} 21 | 22 | 23 | -------------------------------------------------------------------------------- /vendor/rethinkdb-webui/src/handlebars/secondary_indexes-alert_msg.hbs: -------------------------------------------------------------------------------- 1 | 2 | {{#if delete_ok}} 3 |

      You successfully deleted the secondary index {{name}}.

      4 | {{/if}} 5 | {{#if create_ok}} 6 |

      You successfully created the secondary index {{name}}.

      7 | {{/if}} 8 | 9 | 10 | -------------------------------------------------------------------------------- /vendor/rethinkdb-webui/src/handlebars/secondary_indexes-error.hbs: -------------------------------------------------------------------------------- 1 | {{#if connect_fail}} 2 |

      An error occurred: Could not open a connection. Try again.

      3 | {{/if}} 4 | {{#if index_list_fail}} 5 |

      An error occurred: could not retrieve secondary indexes. Try again.

      6 | {{/if}} 7 | {{#if create_fail}} 8 |

      The secondary index could not be created:

      9 |
      10 | {{print_safe message}} 11 |
      12 | {{/if}} 13 | {{#if delete_fail}} 14 |

      The secondary index could not be deleted:

      15 |
      16 | {{print_safe message}} 17 |
      18 | {{/if}} 19 | -------------------------------------------------------------------------------- /vendor/rethinkdb-webui/src/handlebars/shard_distribution_container.hbs: -------------------------------------------------------------------------------- 1 |

      Data distribution

      2 |
      3 |

      4 | Distribution data cannot be updated while not enough replicas are available. 5 |

      6 |
      7 |
      8 |
      9 | The distribution may be slightly outdated
      10 |
      11 | 12 | 13 | 14 | 15 |
      16 |
      17 | -------------------------------------------------------------------------------- /vendor/rethinkdb-webui/src/handlebars/sidebar-client_connection_status.hbs: -------------------------------------------------------------------------------- 1 |
      2 | {{#if disconnected}} 3 |

      Disconnected

      4 | {{else}} 5 |
      Connected to
      6 |

      7 | {{#if me}} 8 | {{me}} 9 | {{else}} 10 | <Unknown> 11 | {{/if}} 12 |

      13 | {{/if}} 14 |
      15 | 16 | -------------------------------------------------------------------------------- /vendor/rethinkdb-webui/src/handlebars/sidebar-container.hbs: -------------------------------------------------------------------------------- 1 |
      2 |
      3 |
      4 |
      5 |
      6 |
      7 |
      8 |
      9 | -------------------------------------------------------------------------------- /vendor/rethinkdb-webui/src/handlebars/sidebar-issues.hbs: -------------------------------------------------------------------------------- 1 |
      2 |
      Issues
      3 | {{#if num_issues}} 4 |
      5 |

      {{num_issues}} {{pluralize_noun "issue" num_issues}}

      6 | {{else}} 7 |

      No issues

      8 | {{/if}} 9 |
      10 | 11 | -------------------------------------------------------------------------------- /vendor/rethinkdb-webui/src/handlebars/sidebar-servers_connected.hbs: -------------------------------------------------------------------------------- 1 |
      2 |
      Servers
      3 |

      {{num_servers}} connected

      4 |
      5 | -------------------------------------------------------------------------------- /vendor/rethinkdb-webui/src/handlebars/sidebar-tables_available.hbs: -------------------------------------------------------------------------------- 1 | 2 |
      3 |
      Tables
      4 |

      {{num_available_tables}}/{{num_tables}} ready

      5 |
      6 | 7 | -------------------------------------------------------------------------------- /vendor/rethinkdb-webui/src/handlebars/simple_progressbar.hbs: -------------------------------------------------------------------------------- 1 | 2 | {{#if operation_active}} 3 |
      4 |
      5 | {{#if starting}} 6 |

      Started

      7 | {{/if}} 8 | {{#if processing}} 9 |

      Processing

      10 | {{/if}} 11 | {{#if finished}} 12 |

      Processed

      13 | {{/if}} 14 |
      15 |
      16 |
      17 | {{/if}} 18 | 19 | -------------------------------------------------------------------------------- /vendor/rethinkdb-webui/src/handlebars/table-secondary_index.hbs: -------------------------------------------------------------------------------- 1 | 2 |
      {{#if is_empty}}[empty string]{{else}}{{name}}{{/if}}delete
      3 |
      4 | {{#if ready}}Ready to use{{else}}building{{/if}} 5 |
      6 |
      7 |
      8 |
      9 | Are you sure you want to delete the secondary index {{#if is_empty}}[empty string]{{else}}{{name}}{{/if}}?
      10 | 11 |
      12 |
      13 |
      14 | 15 | 16 | -------------------------------------------------------------------------------- /vendor/rethinkdb-webui/src/handlebars/table-secondary_indexes.hbs: -------------------------------------------------------------------------------- 1 |

      Secondary indexes

      2 |
      3 | × 4 |
      5 |
      6 |
      7 | × 8 |
      9 |
      10 |
      11 |
      12 |

      13 | Secondary indexes cannot be updated while a primary replica is unavailable. 14 |

      15 |
      16 |
      17 |
        18 |
      • No secondary indexes found.
      • 19 |
      20 |
        21 |
      22 |
        23 |
      • 24 |
      25 | 27 |
      28 | -------------------------------------------------------------------------------- /vendor/rethinkdb-webui/src/handlebars/table.hbs: -------------------------------------------------------------------------------- 1 | 2 |
      3 | 4 |
      5 |
      6 |

      {{name}}

      7 |

      8 | {{shards}} {{pluralize_noun "shard" shards}}, {{replicas}} {{pluralize_noun "replica" replicas}} 9 |

      10 | {{humanize_table_readiness status replicas_ready replicas}} 11 |
      12 | 13 | -------------------------------------------------------------------------------- /vendor/rethinkdb-webui/src/handlebars/table_profile.hbs: -------------------------------------------------------------------------------- 1 |
      2 |
      3 |

      4 | {{!-- availability svg gets inserted here --}} 5 | {{humanize_table_status status}} 6 | {{#if parenthetical}} 7 | (some replicas missing) 8 | {{/if}} 9 |

      10 |
      11 |
      12 |

      13 | 14 | {{#if_defined total_keys}} 15 | About {{approximate_count total_keys}} 16 | {{else}} 17 | Unknown 18 | {{/if_defined}} 19 | documents

      20 |
      21 |
      22 |

      {{num_primary_replicas}}/{{num_shards}} primary replicas

      23 |
      24 |
      25 |

      26 | {{num_available_replicas}}/{{num_replicas}} replicas available

      27 |
      28 |
      29 | -------------------------------------------------------------------------------- /vendor/rethinkdb-webui/src/handlebars/table_title.hbs: -------------------------------------------------------------------------------- 1 | 2 |

      Table overview for {{db}}.{{name}}

      3 | 4 | 5 | -------------------------------------------------------------------------------- /vendor/rethinkdb-webui/src/less/bootstrap/accordion.less: -------------------------------------------------------------------------------- 1 | // Copyright 2010-2012 RethinkDB, all rights reserved. 2 | // ACCORDION 3 | // --------- 4 | 5 | 6 | // Parent container 7 | .accordion { 8 | margin-bottom: @baseLineHeight; 9 | } 10 | 11 | // Group == heading + body 12 | .accordion-group { 13 | margin-bottom: 2px; 14 | border: 1px solid #e5e5e5; 15 | .border-radius(4px); 16 | } 17 | .accordion-heading { 18 | border-bottom: 0; 19 | } 20 | .accordion-heading .accordion-toggle { 21 | display: block; 22 | padding: 8px 15px; 23 | } 24 | 25 | // Inner needs the styles because you can't animate properly with any styles on the element 26 | .accordion-inner { 27 | padding: 9px 15px; 28 | border-top: 1px solid #e5e5e5; 29 | } 30 | -------------------------------------------------------------------------------- /vendor/rethinkdb-webui/src/less/bootstrap/badges.less: -------------------------------------------------------------------------------- 1 | // Copyright 2010-2012 RethinkDB, all rights reserved. 2 | // BADGES 3 | // ------ 4 | 5 | // Base 6 | .badge { 7 | padding: 1px 9px 2px; 8 | font-size: @baseFontSize * .925; 9 | font-weight: bold; 10 | white-space: nowrap; 11 | color: @white; 12 | background-color: @grayLight; 13 | .border-radius(9px); 14 | } 15 | 16 | // Hover state 17 | .badge:hover { 18 | color: @white; 19 | text-decoration: none; 20 | cursor: pointer; 21 | } 22 | 23 | // Colors 24 | .badge-error { background-color: @errorText; } 25 | .badge-error:hover { background-color: darken(@errorText, 10%); } 26 | 27 | .badge-warning { background-color: @orange; } 28 | .badge-warning:hover { background-color: darken(@orange, 10%); } 29 | 30 | .badge-success { background-color: @successText; } 31 | .badge-success:hover { background-color: darken(@successText, 10%); } 32 | 33 | .badge-info { background-color: @infoText; } 34 | .badge-info:hover { background-color: darken(@infoText, 10%); } 35 | 36 | .badge-inverse { background-color: @grayDark; } 37 | .badge-inverse:hover { background-color: darken(@grayDark, 10%); } -------------------------------------------------------------------------------- /vendor/rethinkdb-webui/src/less/bootstrap/breadcrumbs.less: -------------------------------------------------------------------------------- 1 | // Copyright 2010-2012 RethinkDB, all rights reserved. 2 | // BREADCRUMBS 3 | // ----------- 4 | 5 | .breadcrumb { 6 | padding: 7px 14px; 7 | margin: 0 0 @baseLineHeight; 8 | list-style: none; 9 | #gradient > .vertical(@white, #f5f5f5); 10 | border: 1px solid #ddd; 11 | .border-radius(3px); 12 | .box-shadow(inset 0 1px 0 @white); 13 | li { 14 | display: inline-block; 15 | .ie7-inline-block(); 16 | text-shadow: 0 1px 0 @white; 17 | } 18 | .divider { 19 | padding: 0 5px; 20 | color: @grayLight; 21 | } 22 | .active a { 23 | color: @grayDark; 24 | } 25 | } 26 | -------------------------------------------------------------------------------- /vendor/rethinkdb-webui/src/less/bootstrap/close.less: -------------------------------------------------------------------------------- 1 | // Copyright 2010-2012 RethinkDB, all rights reserved. 2 | // CLOSE ICONS 3 | // ----------- 4 | 5 | .close { 6 | float: right; 7 | font-size: 20px; 8 | font-weight: bold; 9 | line-height: @baseLineHeight; 10 | color: @black; 11 | text-shadow: 0 1px 0 rgba(255,255,255,1); 12 | .opacity(20); 13 | &:hover { 14 | color: @black; 15 | text-decoration: none; 16 | .opacity(40); 17 | cursor: pointer; 18 | } 19 | } 20 | -------------------------------------------------------------------------------- /vendor/rethinkdb-webui/src/less/bootstrap/component-animations.less: -------------------------------------------------------------------------------- 1 | // Copyright 2010-2012 RethinkDB, all rights reserved. 2 | // COMPONENT ANIMATIONS 3 | // -------------------- 4 | 5 | .fade { 6 | .transition(opacity .15s linear); 7 | opacity: 0; 8 | &.in { 9 | opacity: 1; 10 | } 11 | } 12 | 13 | .collapse { 14 | .transition(height .35s ease); 15 | position:relative; 16 | overflow:hidden; 17 | height: 0; 18 | &.in { 19 | height: auto; 20 | } 21 | } -------------------------------------------------------------------------------- /vendor/rethinkdb-webui/src/less/bootstrap/grid.less: -------------------------------------------------------------------------------- 1 | // Copyright 2010-2012 RethinkDB, all rights reserved. 2 | // Fixed (940px) 3 | #grid > .core(@gridColumnWidth, @gridGutterWidth); 4 | 5 | // Fluid (940px) 6 | #grid > .fluid(@fluidGridColumnWidth, @fluidGridGutterWidth); -------------------------------------------------------------------------------- /vendor/rethinkdb-webui/src/less/bootstrap/hero-unit.less: -------------------------------------------------------------------------------- 1 | // Copyright 2010-2012 RethinkDB, all rights reserved. 2 | // HERO UNIT 3 | // --------- 4 | 5 | .hero-unit { 6 | padding: 60px; 7 | margin-bottom: 30px; 8 | background-color: @heroUnitBackground; 9 | .border-radius(6px); 10 | h1 { 11 | margin-bottom: 0; 12 | font-size: 60px; 13 | line-height: 1; 14 | color: @heroUnitHeadingColor; 15 | letter-spacing: -1px; 16 | } 17 | p { 18 | font-size: 18px; 19 | font-weight: 200; 20 | line-height: @baseLineHeight * 1.5; 21 | color: @heroUnitLeadColor; 22 | } 23 | } 24 | -------------------------------------------------------------------------------- /vendor/rethinkdb-webui/src/less/bootstrap/layouts.less: -------------------------------------------------------------------------------- 1 | // Copyright 2010-2012 RethinkDB, all rights reserved. 2 | // 3 | // Layouts 4 | // Fixed-width and fluid (with sidebar) layouts 5 | // -------------------------------------------- 6 | 7 | 8 | // Container (centered, fixed-width layouts) 9 | .container { 10 | .container-fixed(); 11 | } 12 | 13 | // Fluid layouts (left aligned, with sidebar, min- & max-width content) 14 | .container-fluid { 15 | padding-left: @gridGutterWidth; 16 | padding-right: @gridGutterWidth; 17 | .clearfix(); 18 | } -------------------------------------------------------------------------------- /vendor/rethinkdb-webui/src/less/bootstrap/pager.less: -------------------------------------------------------------------------------- 1 | // Copyright 2010-2012 RethinkDB, all rights reserved. 2 | // PAGER 3 | // ----- 4 | 5 | .pager { 6 | margin-left: 0; 7 | margin-bottom: @baseLineHeight; 8 | list-style: none; 9 | text-align: center; 10 | .clearfix(); 11 | } 12 | .pager li { 13 | display: inline; 14 | } 15 | .pager a { 16 | display: inline-block; 17 | padding: 5px 14px; 18 | background-color: #fff; 19 | border: 1px solid #ddd; 20 | .border-radius(15px); 21 | } 22 | .pager a:hover { 23 | text-decoration: none; 24 | background-color: #f5f5f5; 25 | } 26 | .pager .next a { 27 | float: right; 28 | } 29 | .pager .previous a { 30 | float: left; 31 | } 32 | .pager .disabled a, 33 | .pager .disabled a:hover { 34 | color: @grayLight; 35 | background-color: #fff; 36 | cursor: default; 37 | } -------------------------------------------------------------------------------- /vendor/rethinkdb-webui/src/less/bootstrap/scaffolding.less: -------------------------------------------------------------------------------- 1 | // Copyright 2010-2012 RethinkDB, all rights reserved. 2 | // Scaffolding 3 | // Basic and global styles for generating a grid system, structural layout, and page templates 4 | // ------------------------------------------------------------------------------------------- 5 | 6 | 7 | // Body reset 8 | // ---------- 9 | 10 | body { 11 | margin: 0; 12 | font-family: @baseFontFamily; 13 | font-size: @baseFontSize; 14 | line-height: @baseLineHeight; 15 | color: @textColor; 16 | background-color: @bodyBackground; 17 | } 18 | 19 | 20 | // Links 21 | // ----- 22 | 23 | a { 24 | color: @linkColor; 25 | text-decoration: none; 26 | } 27 | a:hover { 28 | color: @linkColorHover; 29 | text-decoration: underline; 30 | } 31 | -------------------------------------------------------------------------------- /vendor/rethinkdb-webui/src/less/bootstrap/thumbnails.less: -------------------------------------------------------------------------------- 1 | // Copyright 2010-2012 RethinkDB, all rights reserved. 2 | // THUMBNAILS 3 | // ---------- 4 | 5 | .thumbnails { 6 | margin-left: -@gridGutterWidth; 7 | list-style: none; 8 | .clearfix(); 9 | } 10 | .thumbnails > li { 11 | float: left; 12 | margin: 0 0 @baseLineHeight @gridGutterWidth; 13 | } 14 | .thumbnail { 15 | display: block; 16 | padding: 4px; 17 | line-height: 1; 18 | border: 1px solid #ddd; 19 | .border-radius(4px); 20 | .box-shadow(0 1px 1px rgba(0,0,0,.075)); 21 | } 22 | // Add a hover state for linked versions only 23 | a.thumbnail:hover { 24 | border-color: @linkColor; 25 | .box-shadow(0 1px 4px rgba(0,105,214,.25)); 26 | } 27 | // Images and captions 28 | .thumbnail > img { 29 | display: block; 30 | max-width: 100%; 31 | margin-left: auto; 32 | margin-right: auto; 33 | } 34 | .thumbnail .caption { 35 | padding: 9px; 36 | } 37 | -------------------------------------------------------------------------------- /vendor/rethinkdb-webui/src/less/bootstrap/utilities.less: -------------------------------------------------------------------------------- 1 | // Copyright 2010-2012 RethinkDB, all rights reserved. 2 | // UTILITY CLASSES 3 | // --------------- 4 | 5 | // Quick floats 6 | .pull-right { 7 | float: right; 8 | } 9 | .pull-left { 10 | float: left; 11 | } 12 | 13 | // Toggling content 14 | .hide { 15 | display: none; 16 | } 17 | .show { 18 | display: block; 19 | } 20 | 21 | // Visibility 22 | .invisible { 23 | visibility: hidden; 24 | } 25 | -------------------------------------------------------------------------------- /vendor/rethinkdb-webui/src/less/bootstrap/wells.less: -------------------------------------------------------------------------------- 1 | // Copyright 2010-2012 RethinkDB, all rights reserved. 2 | // WELLS 3 | // ----- 4 | 5 | .well { 6 | min-height: 20px; 7 | padding: 19px; 8 | margin-bottom: 20px; 9 | background-color: #f5f5f5; 10 | border: 1px solid #eee; 11 | border: 1px solid rgba(0,0,0,.05); 12 | .border-radius(4px); 13 | .box-shadow(inset 0 1px 1px rgba(0,0,0,.05)); 14 | blockquote { 15 | border-color: #ddd; 16 | border-color: rgba(0,0,0,.15); 17 | } 18 | } 19 | 20 | // Sizes 21 | .well-large { 22 | padding: 24px; 23 | .border-radius(6px); 24 | } 25 | .well-small { 26 | padding: 9px; 27 | .border-radius(3px); 28 | } 29 | -------------------------------------------------------------------------------- /vendor/rethinkdb-webui/src/less/ionicons.less: -------------------------------------------------------------------------------- 1 | @import "_ionicons-variables"; 2 | @import "_ionicons-icons"; 3 | --------------------------------------------------------------------------------