Commit 1a445a10 authored by Marco Mariani's avatar Marco Mariani

minor fixes

parent ce7d0972
jIO Complex Queries jIO Complex Queries
=================== ===================
...@@ -7,7 +8,7 @@ What are Complex Queries? ...@@ -7,7 +8,7 @@ What are Complex Queries?
In jIO, a complex query can ask a storage server to select, filter, sort, or In jIO, a complex query can ask a storage server to select, filter, sort, or
limit a document list before sending it back. If the server is not able to do limit a document list before sending it back. If the server is not able to do
so, the complex query tool can do the filtering by itself on the client. Only the so, the complex query tool can do the filtering by itself on the client. Only the
``allDocs()`` method can use complex queries. ``.allDocs()`` method can use complex queries.
A query can either be a string (using a specific language useful for writing A query can either be a string (using a specific language useful for writing
queries), or it can be a tree of objects (useful to browse queries). To handle queries), or it can be a tree of objects (useful to browse queries). To handle
...@@ -33,7 +34,7 @@ to run the query on the index before querying documents itself. ...@@ -33,7 +34,7 @@ to run the query on the index before querying documents itself.
How to use Complex Queries with jIO? How to use Complex Queries with jIO?
------------------------------------ ------------------------------------
Complex queries can be triggered by including the option named **query** in the ``allDocs()`` method call. Complex queries can be triggered by including the option named **query** in the ``.allDocs()`` method call.
Example: Example:
......
...@@ -45,15 +45,23 @@ Getting started ...@@ -45,15 +45,23 @@ Getting started
You can use both handlers and available storages to build a storage You can use both handlers and available storages to build a storage
tree across which all documents will be maintained and managed by jIO. tree across which all documents will be maintained and managed by jIO.
See :ref:`List of Available Storages <list-of-available-storages>`.
.. code-block:: javascript .. code-block:: javascript
// create your jio instance // create your jio instance
var my_jio = jIO.createJIO(storage_description); var my_jio = jIO.createJIO(storage_description);
You have to provide a ``storage_description`` object, providing location
and credentials.
Its format depends on the type of storage,
see :ref:`List of Available Storages <list-of-available-storages>`.
#. The jIO API provides ten main methods to manage documents across the storage(s) specified in your jIO storage tree. #. The jIO API provides ten main methods to manage documents across the storage(s) specified in your jIO storage tree.
For details on the ``document`` and ``attachment`` objects, see :ref:`What is a document? <what-is-a-document>`
======================= ====================================================== ======================= ======================================================
Method Example Method Example
======================= ====================================================== ======================= ======================================================
......
.. jIO documentation master file, created by
sphinx-quickstart on Fri Nov 15 11:55:08 2013.
You can adapt this file completely to your liking, but it should at least
contain the root `toctree` directive.
Welcome to jIO Welcome to jIO
============== ==============
......
...@@ -12,6 +12,9 @@ CouchDB provides a RESTful HTTP/JSON API accessible by many programming ...@@ -12,6 +12,9 @@ CouchDB provides a RESTful HTTP/JSON API accessible by many programming
libraries and tools (like `curl <http://curl.haxx.se/>`_ or `Pouchdb <http://pouchdb.com/>`_) libraries and tools (like `curl <http://curl.haxx.se/>`_ or `Pouchdb <http://pouchdb.com/>`_)
and has its own conflict management system. and has its own conflict management system.
.. _what-is-a-document:
What is a document? What is a document?
------------------- -------------------
...@@ -63,7 +66,7 @@ see how method calls should be made with either of these storages. ...@@ -63,7 +66,7 @@ see how method calls should be made with either of these storages.
.. code-block:: javascript .. code-block:: javascript
// Create a new jIO instance // Create a new jIO instance
var jio_instance = jIO.createJIO(storage tree description); var jio_instance = jIO.createJIO(storage_description);
// create and store new document // create and store new document
jio_instance.post({title: 'some title'}). jio_instance.post({title: 'some title'}).
...@@ -256,8 +259,8 @@ In case of error, the ``errorCallback`` first parameter will look like: ...@@ -256,8 +259,8 @@ In case of error, the ``errorCallback`` first parameter will look like:
How to store a video on localStorage How to store binary data
------------------------------------ ------------------------
The following example creates a new jIO in localStorage and then posts a document with two attachments. The following example creates a new jIO in localStorage and then posts a document with two attachments.
......
...@@ -11,7 +11,7 @@ The word "metadata" means "data about data". Metadata articulates a context for ...@@ -11,7 +11,7 @@ The word "metadata" means "data about data". Metadata articulates a context for
objects of interest -- "resources" such as MP3 files, library books, or objects of interest -- "resources" such as MP3 files, library books, or
satellite images -- in the form of "resource descriptions". As a tradition, satellite images -- in the form of "resource descriptions". As a tradition,
resource description dates back to the earliest archives and library catalogs. resource description dates back to the earliest archives and library catalogs.
During the Web revolution of the mid-1990s, `Dublic Core <http://dublincore.org/metadata-basics/>`_ During the Web revolution of the mid-1990s, `Dublin Core <http://dublincore.org/metadata-basics/>`_
has emerged as one of the prominent metadata standards. has emerged as one of the prominent metadata standards.
Why use metadata? Why use metadata?
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment