1
0
Fork 0

added derived files

This commit is contained in:
Jan Steemann 2014-09-08 10:59:07 +02:00
parent 6f9376e264
commit 4fe43c5b49
22 changed files with 82 additions and 58 deletions

View File

@ -1,3 +1,4 @@
/*jshint maxlen: 200 */
/*global require */ /*global require */
//////////////////////////////////////////////////////////////////////////////// ////////////////////////////////////////////////////////////////////////////////
@ -5,6 +6,7 @@
//////////////////////////////////////////////////////////////////////////////// ////////////////////////////////////////////////////////////////////////////////
(function () { (function () {
"use strict";
var internal = require("internal"); var internal = require("internal");
internal.errors = { internal.errors = {

View File

@ -1,3 +1,4 @@
/*jshint -W051: true */
/*global require, SYS_GETLINE, SYS_LOG, jqconsole */ /*global require, SYS_GETLINE, SYS_LOG, jqconsole */
//////////////////////////////////////////////////////////////////////////////// ////////////////////////////////////////////////////////////////////////////////
@ -28,8 +29,7 @@
//////////////////////////////////////////////////////////////////////////////// ////////////////////////////////////////////////////////////////////////////////
(function () { (function () {
// cannot use strict here as we are going to delete globals /*jshint strict: false */
var exports = require("console"); var exports = require("console");
var sprintf = require("internal").sprintf; var sprintf = require("internal").sprintf;
@ -112,7 +112,7 @@
else if (arg === null) { else if (arg === null) {
arg = "null"; arg = "null";
} }
else if (arg.__proto__ === Object.prototype || Array.isArray(arg)) { else if (Object.prototype.isPrototypeOf(arg) || Array.isArray(arg)) {
arg = inspect(arg, {prettyPrint: false}); arg = inspect(arg, {prettyPrint: false});
} }
} }

View File

@ -1,3 +1,5 @@
/*jshint strict: false */
//////////////////////////////////////////////////////////////////////////////// ////////////////////////////////////////////////////////////////////////////////
/// @brief monkey-patches to built-in prototypes /// @brief monkey-patches to built-in prototypes
/// ///

View File

@ -1,4 +1,5 @@
/*global require, ArangoConnection, print, SYS_ARANGO, window */ /*jshint strict: false, -W051: true */
/*global require, ArangoConnection, SYS_ARANGO, window */
//////////////////////////////////////////////////////////////////////////////// ////////////////////////////////////////////////////////////////////////////////
/// @brief module "internal" /// @brief module "internal"
@ -309,7 +310,7 @@
var i = 0; var i = 0;
return format.replace(/%[dfs]/, function (match) { return format.replace(/%[dfs]/, function () {
return String(arguments[++i]); return String(arguments[++i]);
}); });
}; };

View File

@ -1,4 +1,5 @@
/*global require, console, IS_EXECUTE_SCRIPT, IS_EXECUTE_STRING, IS_CHECK_SCRIPT, IS_UNIT_TESTS, IS_JS_LINT */ /*jshint unused: false, -W051: true */
/*global require, console: true, IS_EXECUTE_SCRIPT, IS_EXECUTE_STRING, IS_CHECK_SCRIPT, IS_UNIT_TESTS, IS_JS_LINT */
//////////////////////////////////////////////////////////////////////////////// ////////////////////////////////////////////////////////////////////////////////
/// @brief ArangoShell client API /// @brief ArangoShell client API
@ -36,6 +37,7 @@
//////////////////////////////////////////////////////////////////////////////// ////////////////////////////////////////////////////////////////////////////////
function start_pager () { function start_pager () {
"use strict";
var internal = require("internal"); var internal = require("internal");
internal.startPager(); internal.startPager();
} }
@ -45,6 +47,7 @@ function start_pager () {
//////////////////////////////////////////////////////////////////////////////// ////////////////////////////////////////////////////////////////////////////////
function stop_pager () { function stop_pager () {
"use strict";
var internal = require("internal"); var internal = require("internal");
internal.stopPager(); internal.stopPager();
} }
@ -54,6 +57,7 @@ function stop_pager () {
//////////////////////////////////////////////////////////////////////////////// ////////////////////////////////////////////////////////////////////////////////
function help () { function help () {
"use strict";
var internal = require("internal"); var internal = require("internal");
var arangodb = require("org/arangodb"); var arangodb = require("org/arangodb");
var arangosh = require("org/arangodb/arangosh"); var arangosh = require("org/arangodb/arangosh");
@ -71,6 +75,7 @@ function help () {
//////////////////////////////////////////////////////////////////////////////// ////////////////////////////////////////////////////////////////////////////////
function clear () { function clear () {
"use strict";
var internal = require("internal"); var internal = require("internal");
var i; var i;
var result = ''; var result = '';
@ -85,8 +90,8 @@ function clear () {
/// @brief global 'console' /// @brief global 'console'
//////////////////////////////////////////////////////////////////////////////// ////////////////////////////////////////////////////////////////////////////////
if (console === undefined) { if (typeof console === 'undefined') {
var console = require("console"); console = require("console");
} }
//////////////////////////////////////////////////////////////////////////////// ////////////////////////////////////////////////////////////////////////////////
@ -134,6 +139,7 @@ var tutorial = require("org/arangodb/tutorial");
//////////////////////////////////////////////////////////////////////////////// ////////////////////////////////////////////////////////////////////////////////
(function() { (function() {
"use strict";
var internal = require("internal"); var internal = require("internal");
var arangosh = require("org/arangodb/arangosh"); var arangosh = require("org/arangodb/arangosh");
var special; var special;
@ -168,6 +174,7 @@ var tutorial = require("org/arangodb/tutorial");
//////////////////////////////////////////////////////////////////////////////// ////////////////////////////////////////////////////////////////////////////////
(function () { (function () {
/*jshint strict: false */
var __special__; var __special__;
try { try {
@ -185,6 +192,7 @@ var tutorial = require("org/arangodb/tutorial");
var __rcf__ = __fs__.join(__fs__.home(), ".arangosh.rc"); var __rcf__ = __fs__.join(__fs__.home(), ".arangosh.rc");
if (__fs__.exists(__rcf__)) { if (__fs__.exists(__rcf__)) {
/*jshint evil: true */
var __content__ = __fs__.read(__rcf__); var __content__ = __fs__.read(__rcf__);
eval(__content__); eval(__content__);
} }

View File

@ -1,4 +1,5 @@
module.define("org/arangodb/aql/functions", function(exports, module) { module.define("org/arangodb/aql/functions", function(exports, module) {
/*jshint strict: false */
/*global require, exports */ /*global require, exports */
//////////////////////////////////////////////////////////////////////////////// ////////////////////////////////////////////////////////////////////////////////

View File

@ -1,4 +1,5 @@
module.define("org/arangodb/arango-collection-common", function(exports, module) { module.define("org/arangodb/arango-collection-common", function(exports, module) {
/*jshint strict: false, unused: false */
/*global require */ /*global require */
//////////////////////////////////////////////////////////////////////////////// ////////////////////////////////////////////////////////////////////////////////

View File

@ -1,4 +1,5 @@
module.define("org/arangodb/arango-collection", function(exports, module) { module.define("org/arangodb/arango-collection", function(exports, module) {
/*jshint strict: false */
/*global require, exports */ /*global require, exports */
//////////////////////////////////////////////////////////////////////////////// ////////////////////////////////////////////////////////////////////////////////
@ -159,7 +160,7 @@ ArangoCollection.prototype._documenturl = function (id) {
/// @brief return the base url for collection index usage /// @brief return the base url for collection index usage
//////////////////////////////////////////////////////////////////////////////// ////////////////////////////////////////////////////////////////////////////////
ArangoCollection.prototype._indexurl = function (suffix) { ArangoCollection.prototype._indexurl = function () {
return this._prefixurl("/_api/index?collection=" + encodeURIComponent(this.name())); return this._prefixurl("/_api/index?collection=" + encodeURIComponent(this.name()));
}; };

View File

@ -1,4 +1,5 @@
module.define("org/arangodb/arango-database", function(exports, module) { module.define("org/arangodb/arango-database", function(exports, module) {
/*jshint strict: false */
/*global require, exports */ /*global require, exports */
//////////////////////////////////////////////////////////////////////////////// ////////////////////////////////////////////////////////////////////////////////

View File

@ -1,4 +1,5 @@
module.define("org/arangodb/arango-query-cursor", function(exports, module) { module.define("org/arangodb/arango-query-cursor", function(exports, module) {
/*jshint strict: false */
/*global require, exports */ /*global require, exports */
//////////////////////////////////////////////////////////////////////////////// ////////////////////////////////////////////////////////////////////////////////

View File

@ -1,5 +1,6 @@
module.define("org/arangodb/arango-statement-common", function(exports, module) { module.define("org/arangodb/arango-statement-common", function(exports, module) {
/*global require, exports */ /*jshint strict: false */
/*global exports */
//////////////////////////////////////////////////////////////////////////////// ////////////////////////////////////////////////////////////////////////////////
/// @brief Arango statements /// @brief Arango statements
@ -190,7 +191,7 @@ ArangoStatement.prototype.setOptions = function (value) {
//////////////////////////////////////////////////////////////////////////////// ////////////////////////////////////////////////////////////////////////////////
ArangoStatement.prototype.setQuery = function (query) { ArangoStatement.prototype.setQuery = function (query) {
this._query = query; this._query = (query && typeof query.toAQL === 'function') ? query.toAQL() : query;
}; };
//////////////////////////////////////////////////////////////////////////////// ////////////////////////////////////////////////////////////////////////////////

View File

@ -1,4 +1,5 @@
module.define("org/arangodb/arango-statement", function(exports, module) { module.define("org/arangodb/arango-statement", function(exports, module) {
/*jshint strict: false */
/*global require, exports */ /*global require, exports */
//////////////////////////////////////////////////////////////////////////////// ////////////////////////////////////////////////////////////////////////////////

View File

@ -1,4 +1,5 @@
module.define("org/arangodb/arangosh", function(exports, module) { module.define("org/arangodb/arangosh", function(exports, module) {
/*jshint strict: false */
/*global require, exports */ /*global require, exports */
//////////////////////////////////////////////////////////////////////////////// ////////////////////////////////////////////////////////////////////////////////

View File

@ -1,5 +1,6 @@
module.define("org/arangodb/general-graph", function(exports, module) { module.define("org/arangodb/general-graph", function(exports, module) {
/*global require, exports, Graph, ArangoClusterComm, arguments */ /*jshint strict: false */
/*global require, exports, ArangoClusterComm */
//////////////////////////////////////////////////////////////////////////////// ////////////////////////////////////////////////////////////////////////////////
/// @brief Graph functionality /// @brief Graph functionality
@ -1721,7 +1722,7 @@ var _create = function (graphName, edgeDefinitions, orphanCollections, options)
); );
try { try {
var g = gdb.document(graphName); gdb.document(graphName);
} catch (e) { } catch (e) {
if (e.errorNum !== errors.ERROR_ARANGO_DOCUMENT_NOT_FOUND.code) { if (e.errorNum !== errors.ERROR_ARANGO_DOCUMENT_NOT_FOUND.code) {
throw e; throw e;

View File

@ -1,4 +1,5 @@
module.define("org/arangodb/graph-blueprint", function(exports, module) { module.define("org/arangodb/graph-blueprint", function(exports, module) {
/*jshint strict: false */
/*global require, exports */ /*global require, exports */
//////////////////////////////////////////////////////////////////////////////// ////////////////////////////////////////////////////////////////////////////////

View File

@ -1,4 +1,5 @@
module.define("org/arangodb/graph-common", function(exports, module) { module.define("org/arangodb/graph-common", function(exports, module) {
/*jshint strict: false */
/*global require, exports */ /*global require, exports */
//////////////////////////////////////////////////////////////////////////////// ////////////////////////////////////////////////////////////////////////////////

View File

@ -1,4 +1,5 @@
module.define("org/arangodb/graph", function(exports, module) { module.define("org/arangodb/graph", function(exports, module) {
/*jshint strict: false */
/*global require, exports */ /*global require, exports */
//////////////////////////////////////////////////////////////////////////////// ////////////////////////////////////////////////////////////////////////////////

View File

@ -1,4 +1,5 @@
module.define("org/arangodb/graph/traversal", function(exports, module) { module.define("org/arangodb/graph/traversal", function(exports, module) {
/*jshint strict: false, unused: false */
/*global require, exports, ArangoClusterComm */ /*global require, exports, ArangoClusterComm */
//////////////////////////////////////////////////////////////////////////////// ////////////////////////////////////////////////////////////////////////////////

View File

@ -1,5 +1,5 @@
module.define("org/arangodb/is", function(exports, module) { module.define("org/arangodb/is", function(exports, module) {
/*global require, exports */ /*global exports */
//////////////////////////////////////////////////////////////////////////////// ////////////////////////////////////////////////////////////////////////////////
/// @brief Check if something is something /// @brief Check if something is something
@ -31,8 +31,7 @@ module.define("org/arangodb/is", function(exports, module) {
// Check if a value is not undefined or null // Check if a value is not undefined or null
var existy = function (x) { var existy = function (x) {
"use strict"; "use strict";
// This is != on purpose to also check for undefined return x !== null && x !== undefined;
return x != null;
}; };
// Check if a value is undefined or null // Check if a value is undefined or null

View File

@ -1,4 +1,5 @@
module.define("org/arangodb/simple-query-common", function(exports, module) { module.define("org/arangodb/simple-query-common", function(exports, module) {
/*jshint strict: false */
/*global require, exports */ /*global require, exports */
//////////////////////////////////////////////////////////////////////////////// ////////////////////////////////////////////////////////////////////////////////

View File

@ -1,4 +1,5 @@
module.define("org/arangodb/simple-query", function(exports, module) { module.define("org/arangodb/simple-query", function(exports, module) {
/*jshint strict: false */
/*global require, exports */ /*global require, exports */
//////////////////////////////////////////////////////////////////////////////// ////////////////////////////////////////////////////////////////////////////////

View File

@ -1,5 +1,5 @@
module.define("org/arangodb/tutorial", function(exports, module) { module.define("org/arangodb/tutorial", function(exports, module) {
/*jslint indent: 2, nomen: true, maxlen: 120, sloppy: true, vars: true, white: true, plusplus: true */ /*jshint strict: false */
/*global require, exports */ /*global require, exports */
//////////////////////////////////////////////////////////////////////////////// ////////////////////////////////////////////////////////////////////////////////
@ -29,9 +29,6 @@ module.define("org/arangodb/tutorial", function(exports, module) {
/// @author Copyright 2012-2014, triAGENS GmbH, Cologne, Germany /// @author Copyright 2012-2014, triAGENS GmbH, Cologne, Germany
//////////////////////////////////////////////////////////////////////////////// ////////////////////////////////////////////////////////////////////////////////
var internal = require("internal");
var arangosh = require("org/arangodb/arangosh");
// ----------------------------------------------------------------------------- // -----------------------------------------------------------------------------
// --SECTION-- module "org/arangodb/tutorial" // --SECTION-- module "org/arangodb/tutorial"
// ----------------------------------------------------------------------------- // -----------------------------------------------------------------------------