<commit_before>static string JS_client_client = 
  "////////////////////////////////////////////////////////////////////////////////\n"
  "/// @brief AvocadoShell client API\n"
  "///\n"
  "/// @file\n"
  "///\n"
  "/// DISCLAIMER\n"
  "///\n"
  "/// Copyright 2012 triagens GmbH, Cologne, Germany\n"
  "///\n"
  "/// Licensed under the Apache License, Version 2.0 (the \"License\");\n"
  "/// you may not use this file except in compliance with the License.\n"
  "/// You may obtain a copy of the License at\n"
  "///\n"
  "///     http://www.apache.org/licenses/LICENSE-2.0\n"
  "///\n"
  "/// Unless required by applicable law or agreed to in writing, software\n"
  "/// distributed under the License is distributed on an \"AS IS\" BASIS,\n"
  "/// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n"
  "/// See the License for the specific language governing permissions and\n"
  "/// limitations under the License.\n"
  "///\n"
  "/// Copyright holder is triAGENS GmbH, Cologne, Germany\n"
  "///\n"
  "/// @author <NAME>\n"
  "/// @author Copyright 2012, triAGENS GmbH, Cologne, Germany\n"
  "////////////////////////////////////////////////////////////////////////////////\n"
  "\n"
  "////////////////////////////////////////////////////////////////////////////////\n"
  "/// @addtogroup AvocadoShell\n"
  "/// @{\n"
  "////////////////////////////////////////////////////////////////////////////////\n"
  "\n"
  "// -----------------------------------------------------------------------------\n"
  "// --SECTION--                                                  global variables\n"
  "// -----------------------------------------------------------------------------\n"
  "\n"
  "////////////////////////////////////////////////////////////////////////////////\n"
  "/// @brief change internal.output to shell output\n"
  "////////////////////////////////////////////////////////////////////////////////\n"
  "\n"
  "ModuleCache[\"/internal\"].exports.output = TRI_SYS_OUTPUT;\n"
  "\n"
  "////////////////////////////////////////////////////////////////////////////////\n"
  "/// @brief default collection for saving queries\n"
  "////////////////////////////////////////////////////////////////////////////////\n"
  "\n"
  "var DEFAULT_QUERY_COLLECTION = \"query\";\n"
  "\n"
  "////////////////////////////////////////////////////////////////////////////////\n"
  "/// @brief help texts\n"
  "////////////////////////////////////////////////////////////////////////////////\n"
  "\n"
  "var HELP = \"\";\n"
  "var helpQueries = \"\";\n"
  "var helpAvocadoDatabase = \"\";\n"
  "var helpAvocadoCollection = \"\";\n"
  "var helpAvocadoQueryCursor = \"\";\n"
  "var helpAvocadoStoredStatement = \"\";\n"
  "var helpAvocadoStatement = \"\";\n"
  "var helpExtended = \"\";\n"
  "\n"
  "// -----------------------------------------------------------------------------\n"
  "// --SECTION--                                                  helper functions\n"
  "// -----------------------------------------------------------------------------\n"
  "\n"
  "////////////////////////////////////////////////////////////////////////////////\n"
  "/// @brief return a formatted type string for object\n"
  "/// \n"
  "/// if the object has an id, it will be included in the string\n"
  "////////////////////////////////////////////////////////////////////////////////\n"
  "\n"
  "function getIdString (object, typeName) {\n"
  "  var result = \"[object \" + typeName;\n"
  "  \n"
  "  if (object._id) {\n"
  "    result += \":\" + object._id;\n"
  "  }\n"
  "  else if (object.data && object.data._id) {\n"
  "    result += \":\" + object.data._id;\n"
  "  }\n"
  "  result += \"]\";\n"
  "\n"
  "  return result;\n"
  "}\n"
  "\n"
  "////////////////////////////////////////////////////////////////////////////////\n"
  "/// @brief turn off pretty printing\n"
  "////////////////////////////////////////////////////////////////////////////////\n"
  "\n"
  "function printPlain (data) {\n"
  "  var p = PRETTY_PRINT;\n"
  "  PRETTY_PRINT = false;\n"
  "  var c;\n"
  "  if (typeof(COLOR_OUTPUT) != undefined) {\n"
  "    c = COLOR_OUTPUT;\n"
  "    COLOR_OUTPUT = undefined;\n"
  "  }\n"
  "  \n"
  "  try {\n"
  "    print(data);\n"
  "    PRETTY_PRINT = p;\n"
  "    if (typeof(c) != undefined) {\n"
  "      COLOR_OUTPUT = c;\n"
  "    }   \n"
  "  }\n"
  "  catch (e) {\n"
  "    PRETTY_PRINT = p;\n"
  "    if (typeof(c) != undefined) {\n"
  "      COLOR_OUTPUT = c;\n"
  "    }   \n"
  "    throw e.message;    \n"
  "  }  \n"
  "}\n"
  "\n"
  "////////////////////////////////////////////////////////////////////////////////\n"
  "/// @brief handle error results\n"
  "/// \n"
  "/// return try if the result contains an error. in this case, the function will\n"
  "/// also print the error details\n"
  "////////////////////////////////////////////////////////////////////////////////\n"
  "\n"
  "function isErrorResult (requestResult) {\n"
  "  if (requestResult == undefined) {    \n"
  "    requestResult = {\n"
  "      \"error\" : true,\n"
  "      \"code\"  : 0,\n"
  "      \"errorNum\" : 0,\n"
  "      \"errorMessage\" : \"Unknown error. Request result is empty\"\n"
  "    }    \n"
  "  }\n"
  "  \n"
  "  if (requestResult[\"error\"] != undefined && requestResult[\"error\"]) {    \n"
  "    var code         = requestResult[\"code\"];\n"
  "    var errorNum     = requestResult[\"errorNum\"];\n"
  "    var errorMessage = requestResult[\"errorMessage\"];\n"
  "\n"
  "    if ( typeof(COLOR_BRIGHT) != \"undefined\" ) {\n"
  "      internal.output(COLOR_BRIGHT);\n"
  "      internal.output(\"Error: \");\n"
  "      internal.output(COLOR_OUTPUT_RESET);\n"
  "    }\n"
  "    else  {\n"
  "      internal.output(\"Error: \");      \n"
  "    }\n"
  "\n"
  "    internal.output(\"[\"); \n"
  "    internal.output(code); \n"
  "    internal.output(\":\"); \n"
  "    internal.output(errorNum); \n"
  "    internal.output(\"] \"); \n"
  "    print(errorMessage);\n"
  "    \n"
  "    return true;\n"
  "  }  \n"
  "  return false;\n"
  "}\n"
  "\n"
  "////////////////////////////////////////////////////////////////////////////////\n"
  "/// @brief stop pretty printing\n"
  "////////////////////////////////////////////////////////////////////////////////\n"
  "\n"
  "function stop_pretty_print () {\n"
  "  print(\"stop pretty printing\");\n"
  "  PRETTY_PRINT=false;\n"
  "  return undefined;\n"
  "}\n"
  "\n"
  "////////////////////////////////////////////////////////////////////////////////\n"
  "/// @brief start pretty printing\n"
  "////////////////////////////////////////////////////////////////////////////////\n"
  "\n"
  "function start_pretty_print () {\n"
  "  print(\"use pretty printing\");\n"
  "  PRETTY_PRINT=true;\n"
  "  return undefined;\n"
  "}\n"
  "\n"
  "////////////////////////////////////////////////////////////////////////////////\n"
  "/// @brief stop pretty printing\n"
  "////////////////////////////////////////////////////////////////////////////////\n"
  "\n"
  "function stop_color_print () {\n"
  "  print(\"stop color printing\");\n"
  "  COLOR_OUTPUT = undefined;\n"
  "  return undefined;\n"
  "}\n"
  "\n"
  "////////////////////////////////////////////////////////////////////////////////\n"
  "/// @brief start pretty printing with optional color\n"
  "////////////////////////////////////////////////////////////////////////////////\n"
  "\n"
  "function start_color_print (color) {\n"
  "  if (typeof(color) == \"string\") {\n"
  "    COLOR_OUTPUT = color;\n"
  "  }\n"
  "  else {\n"
  "    COLOR_OUTPUT = COLOR_BRIGHT;\n"
  "  }\n"
  "  print(\"start \" + COLOR_OUTPUT + \"color\" + COLOR_OUTPUT_RESET + \" printing\");\n"
  "  return undefined;\n"
  "}\n"
  "\n"
  "////////////////////////////////////////////////////////////////////////////////\n"
  "/// @brief create a formatted headline text \n"
  "////////////////////////////////////////////////////////////////////////////////\n"
  "\n"
  "function getHeadline (text) {\n"
  "  var x = parseInt(Math.abs(78 - text.length) / 2);\n"
  "  \n"
  "  var p = \"\";\n"
  "  for (var i = 0; i < x; ++i) {\n"
  "    p += \"-\";\n"
  "  }\n"
  "  \n"
  "  return \"\\n\" + p + \" \" + text + \" \" + p + \"\\n\";\n"
  "}\n"
  "\n"
  "////////////////////////////////////////////////////////////////////////////////\n"
  "/// @brief print the overall help\n"
  "////////////////////////////////////////////////////////////////////////////////\n"
  "\n"
  "function help () {\n"
  "  print(HELP);\n"
  "  print(helpQueries);\n"
  "  print(helpAvocadoDatabase);\n"
  "  print(helpAvocadoCollection);\n"
  "  print(helpAvocadoStatement);\n"
  "  print(helpAvocadoQueryCursor);\n"
  "  print(helpExtended);\n"
  "}\n"
  "\n"
  "// -----------------------------------------------------------------------------\n"
  "// --SECTION--                                                 Module \"internal\"\n"
  "// -----------------------------------------------------------------------------\n"
  "\n"
  "////////////////////////////////////////////////////////////////////////////////\n"
  "/// @addtogroup AvocadoShell\n"
  "/// @{\n"
  "////////////////////////////////////////////////////////////////////////////////\n"
  "\n"
  "////////////////////////////////////////////////////////////////////////////////\n"
  "/// @brief log function\n"
  "////////////////////////////////////////////////////////////////////////////////\n"
  "\n"
  "ModuleCache[\"/internal\"].exports.log = function(level, msg) {\n"
  "  internal.output(level, \": \", msg, \"\\n\");\n"
  "}\n"
  "\n"
  "////////////////////////////////////////////////////////////////////////////////\n"
  "/// @brief starts the pager\n"
  "////////////////////////////////////////////////////////////////////////////////\n"
  "\n"
  "ModuleCache[\"/internal\"].exports.start_pager = SYS_START_PAGER;\n"
  "\n"
  "////////////////////////////////////////////////////////////////////////////////\n"
  "/// @brief stops the pager\n"
  "////////////////////////////////////////////////////////////////////////////////\n"
  "\n"
  "ModuleCache[\"/internal\"].exports.stop_pager = SYS_STOP_PAGER;\n"
  "\n"
  "////////////////////////////////////////////////////////////////////////////////\n"
  "/// @}\n"
  "////////////////////////////////////////////////////////////////////////////////\n"
  "\n"
  "// -----------------------------------------------------------------------------\n"
  "// --SECTION--                                                 AvocadoCollection\n"
  "// -----------------------------------------------------------------------------\n"
  "\n"
  "////////////////////////////////////////////////////////////////////////////////\n"
  "/// @brief constructor\n"
  "////////////////////////////////////////////////////////////////////////////////\n"
  "\n"
  "function AvocadoCollection (database, data) {\n"
  "  this._database = database;\n"
  "\n"
  "  if (typeof data === \"string\") {\n"
  "    this.name = data;\n"
  "  }\n"
  "  else {\n"
  "    for (var i in data) {\n"
  "      this[i] = data[i];\n"
  "    }\n"
  "  }\n"
  "}\n"
  "\n"
  "////////////////////////////////////////////////////////////////////////////////\n"
  "/// @brief return all documents from the collection\n"
  "////////////////////////////////////////////////////////////////////////////////\n"
  "\n"
  "AvocadoCollection.prototype.all = function () {\n"
  "  var requestResult = this._database._connection.get(\"/_api/documents/\" + encodeURIComponent(this.name));\n"
  "    \n"
  "  if (isErrorResult(requestResult)) {\n"
  "    return undefined;\n"
  "  }\n"
  "\n"
  "  return requestResult[\"documents\"];    \n"
  "}\n"
  "\n"
  "////////////////////////////////////////////////////////////////////////////////\n"
  "/// @brief return a single document from the collection, identified by its id\n"
  "////////////////////////////////////////////////////////////////////////////////\n"
  "\n"
  "AvocadoCollection.prototype.document = function (id) {\n"
  "  var requestResult = this._database._connection.get(\"/_api/document/\" + encodeURIComponent(this.name) + \"/\" + encodeURIComponent(id));\n"
  "\n"
  "  if (isErrorResult(requestResult)) {\n"
  "    return undefined;\n"
  "  }\n"
  "\n"
  "  return requestResult[\"document\"];\n"
  "}\n"
  "\n"
  "////////////////////////////////////////////////////////////////////////////////\n"
  "/// @brief save a document in the collection, return its id\n"
  "////////////////////////////////////////////////////////////////////////////////\n"
  "\n"
  "AvocadoCollection.prototype.save = function (data) {    \n"
  "  var requestResult = this._database._connection.post(\"/_api/document/\" + encodeURIComponent(this.name), JSON.stringify(data));\n"
  "  \n"
  "  if (isErrorResult(requestResult)) {\n"
  "    return undefined;\n"
  "  }\n"
  "\n"
  "  return requestResult[\"_id\"];\n"
  "}\n"
  "\n"
  "////////////////////////////////////////////////////////////////////////////////\n"
  "/// @brief delete a document in the collection, identified by its id\n"
  "////////////////////////////////////////////////////////////////////////////////\n"
  "\n"
  "AvocadoCollection.prototype.delete = function (id) {    \n"
  "  var requestResult = this._database._connection.delete(\"/_api/document/\" + encodeURIComponent(this.name) + \"/\" + encodeURIComponent(id));\n"
  "\n"
  "  return !isErrorResult(requestResult);\n"
  "}\n"
  "\n"
  "////////////////////////////////////////////////////////////////////////////////\n"
  "/// @brief update a document in the collection, identified by its id\n"
  "////////////////////////////////////////////////////////////////////////////////\n"
  "\n"
  "AvocadoCollection.prototype.update = function (id, data) {    \n"
  "  var requestResult = this._database._connection.put(\"/_api/document/\" + encodeURIComponent(this.name) + \"/\" + encodeURIComponent(id), JSON.stringify(data));\n"
  "\n"
  "  return !isErrorResult(requestResult);\n"
  "}\n"
  "\n"
  "////////////////////////////////////////////////////////////////////////////////\n"
  "/// @brief print the help for AvocadoCollection\n"
  "////////////////////////////////////////////////////////////////////////////////\n"
  "\n"
  "AvocadoCollection.prototype._help = function () {  \n"
  "  print(helpAvocadoCollection);\n"
  "}\n"
  "\n"
  "////////////////////////////////////////////////////////////////////////////////\n"
  "/// @brief return a string representation of the collection\n"
  "////////////////////////////////////////////////////////////////////////////////\n"
  "\n"
  "AvocadoCollection.prototype.toString = function () {  \n"
  "  return getIdString(this, \"AvocadoCollection\");\n"
  "}\n"
  "\n"
  "// -----------------------------------------------------------------------------\n"
  "// --SECTION--                                                AvocadoQueryCursor\n"
  "// -----------------------------------------------------------------------------\n"
  "\n"
  "////////////////////////////////////////////////////////////////////////////////\n"
  "/// @brief constructor\n"
  "////////////////////////////////////////////////////////////////////////////////\n"
  "\n"
  "function AvocadoQueryCursor (database, data) {\n"
  "  this._database = database;\n"
  "  this.data = data;\n"
  "  this._hasNext = false;\n"
  "  this._hasMore = false;\n"
  "  this._pos = 0;\n"
  "  this._count = 0;\n"
  "  this._total = 0;\n"
  "  \n"
  "  if (data.result != undefined) {\n"
  "    this._count = data.result.length;\n"
  "    \n"
  "    if (this._pos < this._count) {\n"
  "      this._hasNext = true;\n"
  "    }\n"
  "    \n"
  "    if (data.hasMore != undefined && data.hasMore) {\n"
  "      this._hasMore = true;\n"
  "    }    \n"
  "  }\n"
  "}\n"
  "\n"
  "////////////////////////////////////////////////////////////////////////////////\n"
  "/// @brief return whether there are more results available in the cursor\n"
  "////////////////////////////////////////////////////////////////////////////////\n"
  "\n"
  "AvocadoQueryCursor.prototype.hasNext = function () {\n"
  "  return this._hasNext;\n"
  "}\n"
  "\n"
  "////////////////////////////////////////////////////////////////////////////////\n"
  "/// @brief return the next result document from the cursor\n"
  "///\n"
  "/// If no more results are available locally but more results are available on\n"
  "/// the server, this function will make a roundtrip to the server\n"
  "////////////////////////////////////////////////////////////////////////////////\n"
  "\n"
  "AvocadoQueryCursor.prototype.next = function () {\n"
  "  if (!this._hasNext) {\n"
  "    throw \"No more results\";\n"
  "  }\n"
  " \n"
  "  var result = this.data.result[this._pos];\n"
  "  this._pos++;\n"
  "    \n"
  "  if (this._pos == this._count) {\n"
  "    // reached last result\n"
  "    \n"
  "    this._hasNext = false;\n"
  "    this._pos = 0;\n"
  "    \n"
  "    if (this._hasMore && this.data._id) {\n"
  "      this._hasMore = false;\n"
  "      \n"
  "      // load more results      \n"
  "      var requestResult = this._database._connection.put(\"/_api/cursor/\"+ encodeURIComponent(this.data._id),  \"\");\n"
  "    \n"
  "      if (isErrorResult(requestResult)) {\n"
  "        return undefined;\n"
  "      }\n"
  "      \n"
  "      this.data = requestResult;\n"
  "      this._count = requestResult.result.length;\n"
  "    \n"
  "      if (this._pos < this._count) {\n"
  "        this._hasNext = true;\n"
  "      }\n"
  "    \n"
  "      if (requestResult.hasMore != undefined && requestResult.hasMore) {\n"
  "        this._hasMore = true;\n"
  "      }                \n"
  "    }    \n"
  "  }\n"
  "    \n"
  "  return result;\n"
  "}\n"
  "\n"
  "////////////////////////////////////////////////////////////////////////////////\n"
  "/// @brief return all remaining result documents from the cursor\n"
  "///\n"
  "/// If no more results are available locally but more results are available on\n"
  "/// the server, this function will make one or multiple roundtrips to the \n"
  "/// server. Calling this function will also fully exhaust the cursor.\n"
  "////////////////////////////////////////////////////////////////////////////////\n"
  "\n"
  "AvocadoQueryCursor.prototype.elements = function () {  \n"
  "  var result = [];\n"
  "  \n"
  "  while (this.hasNext()) { \n"
  "    result.push( this.next() ); \n"
  "  }\n"
  "  \n"
  "  return result;\n"
  "}\n"
  "\n"
  "////////////////////////////////////////////////////////////////////////////////\n"
  "/// @brief explicitly dispose the cursor\n"
  "///\n"
  "/// Calling this function will mark the cursor as deleted on the server. It will\n"
  "/// therefore make a roundtrip to the server. Using a cursor after it has been\n"
  "/// disposed is considered a user error\n"
  "////////////////////////////////////////////////////////////////////////////////\n"
  "\n"
  "AvocadoQueryCursor.prototype.dispose = function () {\n"
  "  if (!this.data._id) {\n"
  "    // client side only cursor\n"
  "    return;\n"
  "  }\n"
  "\n"
  "  var requestResult = this._database._connection.delete(\"/_api/cursor/\"+ encodeURIComponent(this.data._id), \"\");\n"
  "    \n"
  "  if (!isErrorResult(requestResult)) {\n"
  "    this.data._id = undefined;\n"
  "  }\n"
  "}\n"
  "\n"
  "////////////////////////////////////////////////////////////////////////////////\n"
  "/// @brief return the total number of documents in the cursor\n"
  "///\n"
  "/// The number will remain the same regardless how much result documents have\n"
  "/// already been fetched from the cursor.\n"
  "///\n"
  "/// This function will return the number only if the cursor was constructed \n"
  "/// with the \"doCount\" attribute. Otherwise it will return undefined.\n"
  "////////////////////////////////////////////////////////////////////////////////\n"
  "\n"
  "AvocadoQueryCursor.prototype.count = function () {\n"
  "  if (!this.data._id) {\n"
  "    throw \"cursor has been disposed\";\n"
  "  }\n"
  "\n"
  "  return this.data.count;\n"
  "}\n"
  "\n"
  "////////////////////////////////////////////////////////////////////////////////\n"
  "/// @brief print the help for the cursor\n"
  "////////////////////////////////////////////////////////////////////////////////\n"
  "\n"
  "AvocadoQueryCursor.prototype._help = function () {\n"
  "  print(helpAvocadoQueryCursor);\n"
  "}\n"
  "\n"
  "////////////////////////////////////////////////////////////////////////////////\n"
  "/// @brief return a string representation of the cursor\n"
  "////////////////////////////////////////////////////////////////////////////////\n"
  "\n"
  "AvocadoQueryCursor.prototype.toString = function () {  \n"
  "  return getIdString(this, \"AvocadoQueryCursor\");\n"
  "}\n"
  "\n"
  "// -----------------------------------------------------------------------------\n"
  "// --SECTION--                                                   AvocadoDatabase\n"
  "// -----------------------------------------------------------------------------\n"
  "\n"
  "////////////////////////////////////////////////////////////////////////////////\n"
  "/// @brief constructor\n"
  "////////////////////////////////////////////////////////////////////////////////\n"
  "\n"
  "function AvocadoDatabase (connection) {\n"
  "  this._connection = connection;\n"
  "}\n"
  "\n"
  "////////////////////////////////////////////////////////////////////////////////\n"
  "/// @brief return all collections from the database\n"
  "////////////////////////////////////////////////////////////////////////////////\n"
  "\n"
  "AvocadoDatabase.prototype._collections = function () {\n"
  "  var requestResult = this._connection.get(\"/_api/collections\");\n"
  "  \n"
  "  if (isErrorResult(requestResult)) {\n"
  "    return undefined;\n"
  "  }\n"
  "\n"
  "  if (requestResult[\"collections\"] != undefined) {\n"
  "    \n"
  "    // add all collentions to object\n"
  "    for (var i in requestResult[\"collections\"]) {\n"
  "      this[i] = new AvocadoCollection(this, requestResult[\"collections\"][i]);\n"
  "    }\n"
  "      \n"
  "    return requestResult[\"collections\"];\n"
  "  }\n"
  "  \n"
  "  return undefined;\n"
  "}\n"
  "\n"
  "////////////////////////////////////////////////////////////////////////////////\n"
  "/// @brief return a single collection, identified by its id\n"
  "////////////////////////////////////////////////////////////////////////////////\n"
  "\n"
  "AvocadoDatabase.prototype._collection = function (id) {\n"
  "  var requestResult = this._connection.get(\"/_api/collection/\" + encodeURIComponent(id));\n"
  "  \n"
  "  if (isErrorResult(requestResult)) {\n"
  "    return undefined;\n"
  "  }\n"
  "\n"
  "  if (requestResult[\"name\"] != undefined) {\n"
  "    \n"
  "    this[requestResult[\"name\"]] = new AvocadoCollection(this, requestResult);\n"
  "      \n"
  "    return requestResult;\n"
  "  }\n"
  "  \n"
  "  return undefined;\n"
  "}\n"
  "\n"
  "////////////////////////////////////////////////////////////////////////////////\n"
  "/// @brief print the help for AvocadoDatabase\n"
  "////////////////////////////////////////////////////////////////////////////////\n"
  "\n"
  "AvocadoDatabase.prototype._help = function () {  \n"
  "  print(helpAvocadoDatabase);\n"
  "}\n"
  "\n"
  "////////////////////////////////////////////////////////////////////////////////\n"
  "/// @brief return a string representation of the database object\n"<commit_msg>added create<commit_after>static string JS_client_client = 
  "////////////////////////////////////////////////////////////////////////////////\n"
  "/// @brief AvocadoShell client API\n"
  "///\n"
  "/// @file\n"
  "///\n"
  "/// DISCLAIMER\n"
  "///\n"
  "/// Copyright 2012 triagens GmbH, Cologne, Germany\n"
  "///\n"
  "/// Licensed under the Apache License, Version 2.0 (the \"License\");\n"
  "/// you may not use this file except in compliance with the License.\n"
  "/// You may obtain a copy of the License at\n"
  "///\n"
  "///     http://www.apache.org/licenses/LICENSE-2.0\n"
  "///\n"
  "/// Unless required by applicable law or agreed to in writing, software\n"
  "/// distributed under the License is distributed on an \"AS IS\" BASIS,\n"
  "/// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n"
  "/// See the License for the specific language governing permissions and\n"
  "/// limitations under the License.\n"
  "///\n"
  "/// Copyright holder is triAGENS GmbH, Cologne, Germany\n"
  "///\n"
  "/// @author <NAME>\n"
  "/// @author Copyright 2012, triAGENS GmbH, Cologne, Germany\n"
  "////////////////////////////////////////////////////////////////////////////////\n"
  "\n"
  "////////////////////////////////////////////////////////////////////////////////\n"
  "/// @addtogroup AvocadoShell\n"
  "/// @{\n"
  "////////////////////////////////////////////////////////////////////////////////\n"
  "\n"
  "// -----------------------------------------------------------------------------\n"
  "// --SECTION--                                                  global variables\n"
  "// -----------------------------------------------------------------------------\n"
  "\n"
  "////////////////////////////////////////////////////////////////////////////////\n"
  "/// @brief change internal.output to shell output\n"
  "////////////////////////////////////////////////////////////////////////////////\n"
  "\n"
  "ModuleCache[\"/internal\"].exports.output = TRI_SYS_OUTPUT;\n"
  "\n"
  "////////////////////////////////////////////////////////////////////////////////\n"
  "/// @brief default collection for saving queries\n"
  "////////////////////////////////////////////////////////////////////////////////\n"
  "\n"
  "var DEFAULT_QUERY_COLLECTION = \"query\";\n"
  "\n"
  "////////////////////////////////////////////////////////////////////////////////\n"
  "/// @brief help texts\n"
  "////////////////////////////////////////////////////////////////////////////////\n"
  "\n"
  "var HELP = \"\";\n"
  "var helpQueries = \"\";\n"
  "var helpAvocadoDatabase = \"\";\n"
  "var helpAvocadoCollection = \"\";\n"
  "var helpAvocadoQueryCursor = \"\";\n"
  "var helpAvocadoStoredStatement = \"\";\n"
  "var helpAvocadoStatement = \"\";\n"
  "var helpExtended = \"\";\n"
  "\n"
  "// -----------------------------------------------------------------------------\n"
  "// --SECTION--                                                  helper functions\n"
  "// -----------------------------------------------------------------------------\n"
  "\n"
  "////////////////////////////////////////////////////////////////////////////////\n"
  "/// @brief return a formatted type string for object\n"
  "/// \n"
  "/// if the object has an id, it will be included in the string\n"
  "////////////////////////////////////////////////////////////////////////////////\n"
  "\n"
  "function getIdString (object, typeName) {\n"
  "  var result = \"[object \" + typeName;\n"
  "  \n"
  "  if (object._id) {\n"
  "    result += \":\" + object._id;\n"
  "  }\n"
  "  else if (object.data && object.data._id) {\n"
  "    result += \":\" + object.data._id;\n"
  "  }\n"
  "  result += \"]\";\n"
  "\n"
  "  return result;\n"
  "}\n"
  "\n"
  "////////////////////////////////////////////////////////////////////////////////\n"
  "/// @brief turn off pretty printing\n"
  "////////////////////////////////////////////////////////////////////////////////\n"
  "\n"
  "function printPlain (data) {\n"
  "  var p = PRETTY_PRINT;\n"
  "  PRETTY_PRINT = false;\n"
  "  var c;\n"
  "  if (typeof(COLOR_OUTPUT) != undefined) {\n"
  "    c = COLOR_OUTPUT;\n"
  "    COLOR_OUTPUT = undefined;\n"
  "  }\n"
  "  \n"
  "  try {\n"
  "    print(data);\n"
  "    PRETTY_PRINT = p;\n"
  "    if (typeof(c) != undefined) {\n"
  "      COLOR_OUTPUT = c;\n"
  "    }   \n"
  "  }\n"
  "  catch (e) {\n"
  "    PRETTY_PRINT = p;\n"
  "    if (typeof(c) != undefined) {\n"
  "      COLOR_OUTPUT = c;\n"
  "    }   \n"
  "    throw e.message;    \n"
  "  }  \n"
  "}\n"
  "\n"
  "////////////////////////////////////////////////////////////////////////////////\n"
  "/// @brief handle error results\n"
  "/// \n"
  "/// return try if the result contains an error. in this case, the function will\n"
  "/// also print the error details\n"
  "////////////////////////////////////////////////////////////////////////////////\n"
  "\n"
  "function isErrorResult (requestResult) {\n"
  "  if (requestResult == undefined) {    \n"
  "    requestResult = {\n"
  "      \"error\" : true,\n"
  "      \"code\"  : 0,\n"
  "      \"errorNum\" : 0,\n"
  "      \"errorMessage\" : \"Unknown error. Request result is empty\"\n"
  "    }    \n"
  "  }\n"
  "  \n"
  "  if (requestResult[\"error\"] != undefined && requestResult[\"error\"]) {    \n"
  "    var code         = requestResult[\"code\"];\n"
  "    var errorNum     = requestResult[\"errorNum\"];\n"
  "    var errorMessage = requestResult[\"errorMessage\"];\n"
  "\n"
  "    if ( typeof(COLOR_BRIGHT) != \"undefined\" ) {\n"
  "      internal.output(COLOR_BRIGHT);\n"
  "      internal.output(\"Error: \");\n"
  "      internal.output(COLOR_OUTPUT_RESET);\n"
  "    }\n"
  "    else  {\n"
  "      internal.output(\"Error: \");      \n"
  "    }\n"
  "\n"
  "    internal.output(\"[\"); \n"
  "    internal.output(code); \n"
  "    internal.output(\":\"); \n"
  "    internal.output(errorNum); \n"
  "    internal.output(\"] \"); \n"
  "    print(errorMessage);\n"
  "    \n"
  "    return true;\n"
  "  }  \n"
  "  return false;\n"
  "}\n"
  "\n"
  "////////////////////////////////////////////////////////////////////////////////\n"
  "/// @brief stop pretty printing\n"
  "////////////////////////////////////////////////////////////////////////////////\n"
  "\n"
  "function stop_pretty_print () {\n"
  "  print(\"stop pretty printing\");\n"
  "  PRETTY_PRINT=false;\n"
  "  return undefined;\n"
  "}\n"
  "\n"
  "////////////////////////////////////////////////////////////////////////////////\n"
  "/// @brief start pretty printing\n"
  "////////////////////////////////////////////////////////////////////////////////\n"
  "\n"
  "function start_pretty_print () {\n"
  "  print(\"use pretty printing\");\n"
  "  PRETTY_PRINT=true;\n"
  "  return undefined;\n"
  "}\n"
  "\n"
  "////////////////////////////////////////////////////////////////////////////////\n"
  "/// @brief stop pretty printing\n"
  "////////////////////////////////////////////////////////////////////////////////\n"
  "\n"
  "function stop_color_print () {\n"
  "  print(\"stop color printing\");\n"
  "  COLOR_OUTPUT = undefined;\n"
  "  return undefined;\n"
  "}\n"
  "\n"
  "////////////////////////////////////////////////////////////////////////////////\n"
  "/// @brief start pretty printing with optional color\n"
  "////////////////////////////////////////////////////////////////////////////////\n"
  "\n"
  "function start_color_print (color) {\n"
  "  if (typeof(color) == \"string\") {\n"
  "    COLOR_OUTPUT = color;\n"
  "  }\n"
  "  else {\n"
  "    COLOR_OUTPUT = COLOR_BRIGHT;\n"
  "  }\n"
  "  print(\"start \" + COLOR_OUTPUT + \"color\" + COLOR_OUTPUT_RESET + \" printing\");\n"
  "  return undefined;\n"
  "}\n"
  "\n"
  "////////////////////////////////////////////////////////////////////////////////\n"
  "/// @brief create a formatted headline text \n"
  "////////////////////////////////////////////////////////////////////////////////\n"
  "\n"
  "function getHeadline (text) {\n"
  "  var x = parseInt(Math.abs(78 - text.length) / 2);\n"
  "  \n"
  "  var p = \"\";\n"
  "  for (var i = 0; i < x; ++i) {\n"
  "    p += \"-\";\n"
  "  }\n"
  "  \n"
  "  return \"\\n\" + p + \" \" + text + \" \" + p + \"\\n\";\n"
  "}\n"
  "\n"
  "////////////////////////////////////////////////////////////////////////////////\n"
  "/// @brief print the overall help\n"
  "////////////////////////////////////////////////////////////////////////////////\n"
  "\n"
  "function help () {\n"
  "  print(HELP);\n"
  "  print(helpQueries);\n"
  "  print(helpAvocadoDatabase);\n"
  "  print(helpAvocadoCollection);\n"
  "  print(helpAvocadoStatement);\n"
  "  print(helpAvocadoQueryCursor);\n"
  "  print(helpExtended);\n"
  "}\n"
  "\n"
  "// -----------------------------------------------------------------------------\n"
  "// --SECTION--                                                 Module \"internal\"\n"
  "// -----------------------------------------------------------------------------\n"
  "\n"
  "////////////////////////////////////////////////////////////////////////////////\n"
  "/// @addtogroup AvocadoShell\n"
  "/// @{\n"
  "////////////////////////////////////////////////////////////////////////////////\n"
  "\n"
  "////////////////////////////////////////////////////////////////////////////////\n"
  "/// @brief log function\n"
  "////////////////////////////////////////////////////////////////////////////////\n"
  "\n"
  "ModuleCache[\"/internal\"].exports.log = function(level, msg) {\n"
  "  internal.output(level, \": \", msg, \"\\n\");\n"
  "}\n"
  "\n"
  "////////////////////////////////////////////////////////////////////////////////\n"
  "/// @brief starts the pager\n"
  "////////////////////////////////////////////////////////////////////////////////\n"
  "\n"
  "ModuleCache[\"/internal\"].exports.start_pager = SYS_START_PAGER;\n"
  "\n"
  "////////////////////////////////////////////////////////////////////////////////\n"
  "/// @brief stops the pager\n"
  "////////////////////////////////////////////////////////////////////////////////\n"
  "\n"
  "ModuleCache[\"/internal\"].exports.stop_pager = SYS_STOP_PAGER;\n"
  "\n"
  "////////////////////////////////////////////////////////////////////////////////\n"
  "/// @}\n"
  "////////////////////////////////////////////////////////////////////////////////\n"
  "\n"
  "// -----------------------------------------------------------------------------\n"
  "// --SECTION--                                                 AvocadoCollection\n"
  "// -----------------------------------------------------------------------------\n"
  "\n"
  "////////////////////////////////////////////////////////////////////////////////\n"
  "/// @brief constructor\n"
  "////////////////////////////////////////////////////////////////////////////////\n"
  "\n"
  "function AvocadoCollection (database, data) {\n"
  "  this._database = database;\n"
  "\n"
  "  if (typeof data === \"string\") {\n"
  "    this.name = data;\n"
  "  }\n"
  "  else {\n"
  "    for (var i in data) {\n"
  "      this[i] = data[i];\n"
  "    }\n"
  "  }\n"
  "}\n"
  "\n"
  "////////////////////////////////////////////////////////////////////////////////\n"
  "/// @brief return all documents from the collection\n"
  "////////////////////////////////////////////////////////////////////////////////\n"
  "\n"
  "AvocadoCollection.prototype.all = function () {\n"
  "  var requestResult = this._database._connection.get(\"/_api/documents/\" + encodeURIComponent(this.name));\n"
  "    \n"
  "  if (isErrorResult(requestResult)) {\n"
  "    return undefined;\n"
  "  }\n"
  "\n"
  "  return requestResult[\"documents\"];    \n"
  "}\n"
  "\n"
  "////////////////////////////////////////////////////////////////////////////////\n"
  "/// @brief return a single document from the collection, identified by its id\n"
  "////////////////////////////////////////////////////////////////////////////////\n"
  "\n"
  "AvocadoCollection.prototype.document = function (id) {\n"
  "  var requestResult = this._database._connection.get(\"/_api/document/\" + encodeURIComponent(this.name) + \"/\" + encodeURIComponent(id));\n"
  "\n"
  "  if (isErrorResult(requestResult)) {\n"
  "    return undefined;\n"
  "  }\n"
  "\n"
  "  return requestResult[\"document\"];\n"
  "}\n"
  "\n"
  "////////////////////////////////////////////////////////////////////////////////\n"
  "/// @brief save a document in the collection, return its id\n"
  "////////////////////////////////////////////////////////////////////////////////\n"
  "\n"
  "AvocadoCollection.prototype.save = function (data) {    \n"
  "  var requestResult = this._database._connection.post(\"/_api/document/\" + encodeURIComponent(this.name), JSON.stringify(data));\n"
  "  \n"
  "  if (isErrorResult(requestResult)) {\n"
  "    return undefined;\n"
  "  }\n"
  "\n"
  "  return requestResult[\"_id\"];\n"
  "}\n"
  "\n"
  "////////////////////////////////////////////////////////////////////////////////\n"
  "/// @brief delete a document in the collection, identified by its id\n"
  "////////////////////////////////////////////////////////////////////////////////\n"
  "\n"
  "AvocadoCollection.prototype.delete = function (id) {    \n"
  "  var requestResult = this._database._connection.delete(\"/_api/document/\" + encodeURIComponent(this.name) + \"/\" + encodeURIComponent(id));\n"
  "\n"
  "  return !isErrorResult(requestResult);\n"
  "}\n"
  "\n"
  "////////////////////////////////////////////////////////////////////////////////\n"
  "/// @brief update a document in the collection, identified by its id\n"
  "////////////////////////////////////////////////////////////////////////////////\n"
  "\n"
  "AvocadoCollection.prototype.update = function (id, data) {    \n"
  "  var requestResult = this._database._connection.put(\"/_api/document/\" + encodeURIComponent(this.name) + \"/\" + encodeURIComponent(id), JSON.stringify(data));\n"
  "\n"
  "  return !isErrorResult(requestResult);\n"
  "}\n"
  "\n"
  "////////////////////////////////////////////////////////////////////////////////\n"
  "/// @brief print the help for AvocadoCollection\n"
  "////////////////////////////////////////////////////////////////////////////////\n"
  "\n"
  "AvocadoCollection.prototype._help = function () {  \n"
  "  print(helpAvocadoCollection);\n"
  "}\n"
  "\n"
  "////////////////////////////////////////////////////////////////////////////////\n"
  "/// @brief return a string representation of the collection\n"
  "////////////////////////////////////////////////////////////////////////////////\n"
  "\n"
  "AvocadoCollection.prototype.toString = function () {  \n"
  "  return getIdString(this, \"AvocadoCollection\");\n"
  "}\n"
  "\n"
  "// -----------------------------------------------------------------------------\n"
  "// --SECTION--                                                AvocadoQueryCursor\n"
  "// -----------------------------------------------------------------------------\n"
  "\n"
  "////////////////////////////////////////////////////////////////////////////////\n"
  "/// @brief constructor\n"
  "////////////////////////////////////////////////////////////////////////////////\n"
  "\n"
  "function AvocadoQueryCursor (database, data) {\n"
  "  this._database = database;\n"
  "  this.data = data;\n"
  "  this._hasNext = false;\n"
  "  this._hasMore = false;\n"
  "  this._pos = 0;\n"
  "  this._count = 0;\n"
  "  this._total = 0;\n"
  "  \n"
  "  if (data.result != undefined) {\n"
  "    this._count = data.result.length;\n"
  "    \n"
  "    if (this._pos < this._count) {\n"
  "      this._hasNext = true;\n"
  "    }\n"
  "    \n"
  "    if (data.hasMore != undefined && data.hasMore) {\n"
  "      this._hasMore = true;\n"
  "    }    \n"
  "  }\n"
  "}\n"
  "\n"
  "////////////////////////////////////////////////////////////////////////////////\n"
  "/// @brief return whether there are more results available in the cursor\n"
  "////////////////////////////////////////////////////////////////////////////////\n"
  "\n"
  "AvocadoQueryCursor.prototype.hasNext = function () {\n"
  "  return this._hasNext;\n"
  "}\n"
  "\n"
  "////////////////////////////////////////////////////////////////////////////////\n"
  "/// @brief return the next result document from the cursor\n"
  "///\n"
  "/// If no more results are available locally but more results are available on\n"
  "/// the server, this function will make a roundtrip to the server\n"
  "////////////////////////////////////////////////////////////////////////////////\n"
  "\n"
  "AvocadoQueryCursor.prototype.next = function () {\n"
  "  if (!this._hasNext) {\n"
  "    throw \"No more results\";\n"
  "  }\n"
  " \n"
  "  var result = this.data.result[this._pos];\n"
  "  this._pos++;\n"
  "    \n"
  "  if (this._pos == this._count) {\n"
  "    // reached last result\n"
  "    \n"
  "    this._hasNext = false;\n"
  "    this._pos = 0;\n"
  "    \n"
  "    if (this._hasMore && this.data._id) {\n"
  "      this._hasMore = false;\n"
  "      \n"
  "      // load more results      \n"
  "      var requestResult = this._database._connection.put(\"/_api/cursor/\"+ encodeURIComponent(this.data._id),  \"\");\n"
  "    \n"
  "      if (isErrorResult(requestResult)) {\n"
  "        return undefined;\n"
  "      }\n"
  "      \n"
  "      this.data = requestResult;\n"
  "      this._count = requestResult.result.length;\n"
  "    \n"
  "      if (this._pos < this._count) {\n"
  "        this._hasNext = true;\n"
  "      }\n"
  "    \n"
  "      if (requestResult.hasMore != undefined && requestResult.hasMore) {\n"
  "        this._hasMore = true;\n"
  "      }                \n"
  "    }    \n"
  "  }\n"
  "    \n"
  "  return result;\n"
  "}\n"
  "\n"
  "////////////////////////////////////////////////////////////////////////////////\n"
  "/// @brief return all remaining result documents from the cursor\n"
  "///\n"
  "/// If no more results are available locally but more results are available on\n"
  "/// the server, this function will make one or multiple roundtrips to the \n"
  "/// server. Calling this function will also fully exhaust the cursor.\n"
  "////////////////////////////////////////////////////////////////////////////////\n"
  "\n"
  "AvocadoQueryCursor.prototype.elements = function () {  \n"
  "  var result = [];\n"
  "  \n"
  "  while (this.hasNext()) { \n"
  "    result.push( this.next() ); \n"
  "  }\n"
  "  \n"
  "  return result;\n"
  "}\n"
  "\n"
  "////////////////////////////////////////////////////////////////////////////////\n"
  "/// @brief explicitly dispose the cursor\n"
  "///\n"
  "/// Calling this function will mark the cursor as deleted on the server. It will\n"
  "/// therefore make a roundtrip to the server. Using a cursor after it has been\n"
  "/// disposed is considered a user error\n"
  "////////////////////////////////////////////////////////////////////////////////\n"
  "\n"
  "AvocadoQueryCursor.prototype.dispose = function () {\n"
  "  if (!this.data._id) {\n"
  "    // client side only cursor\n"
  "    return;\n"
  "  }\n"
  "\n"
  "  var requestResult = this._database._connection.delete(\"/_api/cursor/\"+ encodeURIComponent(this.data._id), \"\");\n"
  "    \n"
  "  if (!isErrorResult(requestResult)) {\n"
  "    this.data._id = undefined;\n"
  "  }\n"
  "}\n"
  "\n"
  "////////////////////////////////////////////////////////////////////////////////\n"
  "/// @brief return the total number of documents in the cursor\n"
  "///\n"
  "/// The number will remain the same regardless how much result documents have\n"
  "/// already been fetched from the cursor.\n"
  "///\n"
  "/// This function will return the number only if the cursor was constructed \n"
  "/// with the \"doCount\" attribute. Otherwise it will return undefined.\n"
  "////////////////////////////////////////////////////////////////////////////////\n"
  "\n"
  "AvocadoQueryCursor.prototype.count = function () {\n"
  "  if (!this.data._id) {\n"
  "    throw \"cursor has been disposed\";\n"
  "  }\n"
  "\n"
  "  return this.data.count;\n"
  "}\n"
  "\n"
  "////////////////////////////////////////////////////////////////////////////////\n"
  "/// @brief print the help for the cursor\n"
  "////////////////////////////////////////////////////////////////////////////////\n"
  "\n"
  "AvocadoQueryCursor.prototype._help = function () {\n"
  "  print(helpAvocadoQueryCursor);\n"
  "}\n"
  "\n"
  "////////////////////////////////////////////////////////////////////////////////\n"
  "/// @brief return a string representation of the cursor\n"
  "////////////////////////////////////////////////////////////////////////////////\n"
  "\n"
  "AvocadoQueryCursor.prototype.toString = function () {  \n"
  "  return getIdString(this, \"AvocadoQueryCursor\");\n"
  "}\n"
  "\n"
  "// -----------------------------------------------------------------------------\n"
  "// --SECTION--                                                   AvocadoDatabase\n"
  "// -----------------------------------------------------------------------------\n"
  "\n"
  "////////////////////////////////////////////////////////////////////////////////\n"
  "/// @brief constructor\n"
  "////////////////////////////////////////////////////////////////////////////////\n"
  "\n"
  "function AvocadoDatabase (connection) {\n"
  "  this._connection = connection;\n"
  "}\n"
  "\n"
  "////////////////////////////////////////////////////////////////////////////////\n"
  "/// @brief return all collections from the database\n"
  "////////////////////////////////////////////////////////////////////////////////\n"
  "\n"
  "AvocadoDatabase.prototype._collections = function () {\n"
  "  var requestResult = this._connection.get(\"/_api/collections\");\n"
  "  \n"
  "  if (isErrorResult(requestResult)) {\n"
  "    return undefined;\n"
  "  }\n"
  "\n"
  "  if (requestResult[\"collections\"] != undefined) {\n"
  "    \n"
  "    // add all collentions to object\n"
  "    for (var i in requestResult[\"collections\"]) {\n"
  "      this[i] = new AvocadoCollection(this, requestResult[\"collections\"][i]);\n"
  "    }\n"
  "      \n"
  "    return requestResult[\"collections\"];\n"
  "  }\n"
  "  \n"
  "  return undefined;\n"
  "}\n"
  "\n"
  "////////////////////////////////////////////////////////////////////////////////\n"
  "/// @brief return a single collection, identified by its id\n"
  "////////////////////////////////////////////////////////////////////////////////\n"
  "\n"
  "AvocadoDatabase.prototype._collection = function (id) {\n"
  "  var requestResult = this._connection.get(\"/_api/collection/\" + encodeURIComponent(id));\n"
  "  \n"
  "  if (isErrorResult(requestResult)) {\n"
  "    return undefined;\n"
  "  }\n"
  "\n"
  "  if (requestResult[\"name\"] != undefined) {\n"
  "    \n"
  "    this[requestResult[\"name\"]] = new AvocadoCollection(this, requestResult);\n"
  "      \n"
  "    return requestResult;\n"
  "  }\n"
  "  \n"
  "  return undefined;\n"
  "}\n"
  "\n"
  "////////////////////////////////////////////////////////////////////////////////\n"
  "/// @brief return a single collection, identified by its id\n"
  "////////////////////////////////////////////////////////////////////////////////\n"
  "\n"
  "AvocadoDatabase.prototype._create = function (name) {\n"
  "  var body = {\n"
  "    \"name\" : name\n"
  "  };\n"
  "\n"
  "  var str = this._connection.post(\"/_api/database/collection\", JSON.stringify(body));\n"
  "\n"
  "  print(str);\n"
  "  \n"
  "  var requestResult = undefined;\n"
  "\n"
  "  if (str != undefined) {\n"
  "    requestResult = JSON.parse(str);\n"
  "  }\n"
  "  \n"
  "  if (isErrorResult(requestResult)) {\n"
  "    return undefined;\n"
  "  }\n"
  "\n"
  "  return requestResult;\n"
  "}\n"
  "\n"
  "////////////////////////////////////////////////////////////////////////////////\n"
  "/// @brief print the help for AvocadoDatabase\n"
  "////////////////////////////////////////////////////////////////////////////////\n"
  "\n"
  "AvocadoDatabase.prototype._help = function () {  \n"
  "  print(helpAvocadoDatabase);\n"
  "}\n"
  "\n"
  "////////////////////////////////////////////////////////////////////////////////\n"
  "/// @brief return a string representation of the database object\n"
{'fraction_non_alphanumeric': 0.4548774126238915, 'fraction_numerical': 0.0009181011997913406, 'mean_word_length': 0.879524687242637, 'pattern_counts': {'":': 8, '<': 11, '<?xml version=': 0, '>': 5, 'https://': 0, 'lorem ipsum': 0, 'www.': 2, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 24, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '3179528', 'n_tokens_mistral': 13342, 'n_tokens_neox': 13139, 'n_words': 2917}