<commit_before><commit_msg>new readme<commit_after>CouchDB DataSource for CakePHP
==============================

This plugin aims at cakephp-developers who wish to easily embed CouchDB into their cakephp projects.
Since it's not yet fully done, feel free to contribute or comment. Basic CakePhp model functions that make developing with cake so comfortable will be implemented in this datasource.

Getting started
---------------

pull the plugin into your app/Plugin folder


Have a db-config somewhat like this:

    class DATABASE_CONFIG {
      .
      .
      .
      public $couchdb = array(
        'host'      => 'localhost', // optional
        'port'      => 5984,        // optional
        'login'     => 'root',
        'password'  => '<PASSWORD>',
        'models'    => 'type',      // (optional)
        'database'  => 'cake',      // can be overridden in Model->database
      );
    }


$couchdb['models'] hereby refers to the document field, that most nosql-developers use to distinguish between models.
check out http://guide.couchdb.org/draft/validation.html#type on this matter


Load Plugin at the end of bootstrap like this

    CakePlugin::load('CouchDB');


in your application you can then create models like this:

    <?php
      App::uses('CouchDBAppModel', 'CouchDB.Model');
      class User extends CouchDBAppModel {
        .
        .
        .
      }
    ?>
{'fraction_non_alphanumeric': 0.1212338593974175, 'fraction_numerical': 0.0028694404591104736, 'mean_word_length': 2.5050251256281406, 'pattern_counts': {'":': 0, '<': 5, '<?xml version=': 0, '>': 12, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '6825542', 'n_tokens_mistral': 394, 'n_tokens_neox': 372, 'n_words': 137}