Permalink
Browse files

skeleton for the driver

  • Loading branch information...
0 parents commit 46dd97c74bd86b024541411056d2ae7106010259 @dscape committed Jul 7, 2011
Showing with 70 additions and 0 deletions.
  1. 0 LICENSE
  2. 0 README.md
  3. +1 −0 index.js
  4. +56 −0 lib/nuvem/index.js
  5. +13 −0 package.json
No changes.
No changes.
@@ -0,0 +1 @@
+module.exports = require('./lib/nuvem/');
@@ -0,0 +1,56 @@
+/**
+ * Nuvem constructor
+ *
+ * @api public
+ */
+function Nuvem () {
+ this.options = {};
+ this.defaultConnection(); // default connection
+};
+
+/**
+ * Configures a Connection instance.
+ *
+ * Examples:
+ *
+ * db = nuvem.configureConnection('http://usr:pwd@host:port/db');
+ * // Will only change the setting you provide, rest remains the same
+ * // Check defaultConnection for the defaults
+ * db = nuvem.configureConnection({
+ * database: "Sample",
+ * username: "admin",
+ * password: "admin"
+ * });
+ *
+ * @param {JSON} Either the URL or a JSON object with params you want to alter
+ * @return {Connection} The altered Connection object
+ * @api public
+ */
+
+/**
+ * Set Nuvem options
+ *
+ * E.g.:
+ * nuvem.set('test', value) // sets the value of 'test'
+ *
+ * @param {String} key
+ * @param {String} value
+ * @api public
+ */
+Nuvem.prototype.set = function (key, value) {
+ this.options[key] = value;
+ return this;
+};
+
+/**
+ * Get Nuvem options
+ *
+ * E.g.:
+ * nuvem.get('test') // returns the value of 'test'
+ *
+ * @param {String} key
+ * @api public
+ */
+Nuvem.prototype.get = function (key) {
+ return this.options[key];
+};
@@ -0,0 +1,13 @@
+{
+ "name": "Nuvem",
+ "description": "MarkLogic Driver for Node.js",
+ "url" : "http://developer.marklogic.com",
+ "version": "0.0.1",
+ "author": "Nuno Job <nunojobpinto@gmail.com>",
+ "keywords": ["marklogic", "nuvem", "search", "data", "xml", "nosql"],
+ "dependencies": {},
+ "directories": { "lib": "./lib/nuvem" },
+ "scripts": { "test": "make test" },
+ "main": "./index.js",
+ "engines": { "node": ">= 0.4.8" }
+}

0 comments on commit 46dd97c

Please sign in to comment.