<% /* * Copyright: * (C) 2006 by Derrell Lipman * All rights reserved * * License: * LGPL 2.1: http://creativecommons.org/licenses/LGPL/2.1/ */ /* * JSON-RPC mappings to the ldb ejs functions */ /* We'll be saving resources in the session */ jsonrpc_include("resources.esp"); /** * Connect to a database * * @param params[0] * Database name * * @param params[1..n] * Option (e.g. "modules:modlist") * * @param error * An object of class JsonRpcError. * * @return * Success: The resource id to be used for future access to the database * Failure: -1 * * @note * Credentials or session_info may be set up first. */ function _connect(params, error) { if (params.length < 1) { error.setError(JsonRpcError_ParameterMismatch, "usage: [