phatduckk/Duckk_CouchDB
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Folders and files
Name | Name | Last commit message | Last commit date | |
---|---|---|---|---|
Repository files navigation
CouchDB Library coming soon... SETUP: * install CouchDB & start it ;-) * make sure you have the Duckk_SimpleHTTP/ folder from Duckk_SimpleHttp in your include_path * download that from http://github.com/phatduckk/Duckk_SimpleHTTP/tree/master * download this package and make sure you have the Duckk_CouchDB/ folder from Duckk_CouchDB in your include_path * download this from http://github.com/phatduckk/Duckk_CouchDB/tree/master You include_path will look something like PEAR/ YourIncPath/ Duckk_CouchDB/ Duckk_SimpleHTTP/ echo get_include_path(); // someStuff:Duckk_CouchDB:Duckk_SimpleHTTP:YourIncPath:PEAR ---------------------------- EXAMPLE ------------------------------ $couchdb = new Duckk_CouchDB(); $randomDBName = 'testing' . md5(microtime(true)); print_r($couchdb->getDatabases()); // shows array of db names var_dump($couchdb->createDatabase($randomDBName)); // should return TRUE assuming $randomDBName doesnt exist try { $couchdb->createDatabase($randomDBName); } catch (Exception $e) { print_r($e); // should print the exception cuz we already created $randomDBName } var_dump($couchdb->deleteDatabase($randomDBName)); // should return TRUE cuz it successfully deleted $randomDBName try { $couchdb->deleteDatabase($randomDBName); } catch (Exception $e) { print_r($e); // should print the exception cuz $randomDBName no longer exists }
About
A PHP CouchDB Library
Resources
Stars
Watchers
Forks
Releases
No releases published
Packages 0
No packages published