akissa / php-couchdb Goto Github PK
View Code? Open in Web Editor NEWPHP extension for CouchDB
Home Page: http://www.topdog.za.net/php_couchdb_extension
License: Other
PHP extension for CouchDB
Home Page: http://www.topdog.za.net/php_couchdb_extension
License: Other
__construct() is inexplicably declared Final.
Good day!
Can you add support for query method for raw request? For example,
$query = '/test_db/design/test/_info';
$method = 'POST'; // by default GET
$conn->query($query, $method);
Thank you!
Can you add support for arguments in .getView() method? For example, this syntax will be very useful for developers.
$args = array(
'startkey' => $startKey,
'endkey' => $endKey,
'limit' => $limit,
);
$response = $client->getView('foo', 'map', $args);
http://wiki.apache.org/couchdb/HTTP_view_API?highlight=((Introduction_to_CouchDB_views))#Querying_Options
I guess that no need to validate arguments, just build argument string as is.
Thank you!
/arch/dist/php-couchdb/couchdb.c:35:23: error: curl/curl.h: No such file or directory
/arch/dist/php-couchdb/couchdb.c:343: error: expected '=', ',', ';', 'asm' or 'attribute' before 'couchdb_make_request'
/arch/dist/php-couchdb/couchdb.c: In function 'couchdb_prepare_request':
/arch/dist/php-couchdb/couchdb.c:507: warning: implicit declaration of function 'couchdb_make_request'
/arch/dist/php-couchdb/couchdb.c: In function 'zim_CouchdbClient_storeDoc':
/arch/dist/php-couchdb/couchdb.c:1138: warning: dereferencing type-punned pointer will break strict-aliasing rules
/arch/dist/php-couchdb/couchdb.c:1143: warning: dereferencing type-punned pointer will break strict-aliasing rules
/arch/dist/php-couchdb/couchdb.c:1161: warning: dereferencing type-punned pointer will break strict-aliasing rules
/arch/dist/php-couchdb/couchdb.c: In function 'zm_startup_couchdb':
/arch/dist/php-couchdb/couchdb.c:2423: warning: implicit declaration of function 'curl_global_init'
/arch/dist/php-couchdb/couchdb.c:2423: error: 'CURL_GLOBAL_DEFAULT' undeclared (first use in this function)
/arch/dist/php-couchdb/couchdb.c:2423: error: (Each undeclared identifier is reported only once
/arch/dist/php-couchdb/couchdb.c:2423: error: for each function it appears in.)
/arch/dist/php-couchdb/couchdb.c:2423: error: 'CURLE_OK' undeclared (first use in this function)
/arch/dist/php-couchdb/couchdb.c: In function 'zm_shutdown_couchdb':
/arch/dist/php-couchdb/couchdb.c:2449: warning: implicit declaration of function 'curl_global_cleanup'
*** Error code 1
Would love to see a utility method for handling upsert pattern and automated conflict resolution.
Feature should allow for 'partial update' of document. I know it's not part of the Couch API, but I think it's something that everyone finds to be an irritation and handling in the library would make life easier.
Upsert outline:
if duplicate key on insert, pull existing document with conflicting key, merge new document into existing document replacing existing values, save merged document and return with new _rev.
Auto conflict resolution:
if when saving, newer version exists (conflict), pull newer version of document, merge data from request into new document, save merged document and return new _rev
Partial update description:
given existing document in couchdb
{
"_id": "doc1",
"_rev": "AAA",
"type": "mytype",
"value": "ZZZ"
}
now we have the _id of that doc from a result set from a view, and just want to append a new property/attribute to the doc without having to jump through exception handling hoops in client code every time,
$update_doc = array("_id"=>"doc1","mynewfield"=>"mynewvalue");
$res = $conn->upsertDoc($update_doc);
we end up with
$res == array("ok"=>1, "id" => "doc1", "rev"=>"BBB");
and in couchdb:
{
"_id": "doc1",
"_rev": "BBB",
"type": "mytype",
"value": "ZZZ",
"mynewfield": "mynewvalue"
}
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.