Comments (19)
I still have not used it with CakePHP 2.4, but I do not know what could have happened to not work.
from couchdb-datasource.
I think you need some schema.
Try something like....
class [YourModel] extends AppModel {
public $schema = array(
'id' => array(
'type' => 'string',
'null' => true,
'key' => 'primary',
'length' => 32
),
'rev' => array(
'type' => 'string',
'null' => true,
'key' => 'primary',
'length' => 34
)
)
}
Tell me what happened.
Thank you.
from couchdb-datasource.
Same result. I don't really imagine, how to debug it...
from couchdb-datasource.
It would be great if someone implements CouchDB output for debug > 1. :)
from couchdb-datasource.
Well, debug is 2 in CakePHP. And it's no use to turn debug on in CouchDB as it do not recive any requests =))
from couchdb-datasource.
well, I traced model.php
The problem in $schema, so that is correct:
public $schema = array(
'id' => array(
'type' => 'string',
'null' => true,
'key' => 'primary',
'length' => 32
),
'rev' => array(
'type' => 'string',
'null' => true,
'key' => 'primary',
'length' => 34
),
'title' => array(
'type' => 'string',
'null' => true,
'length' => 512
)
);
from couchdb-datasource.
Great!
I improved this https://github.com/maurymmarques/couchdb-datasource#creating-a-model
As I said, it would be interesting if someone implement CouchDB output to debug > 1, so it would be possible read all GETs, POSTs, PUTs and DELETEs made from application to CouchDB.
Thanks
from couchdb-datasource.
I do not really understatnd, what do you want exactly. But I can make a server for you in my cloud so you could test what ever you want for this plugin.
from couchdb-datasource.
I mean that when you change the debug to 2 you are able to read the log command sent to MySQL, but there is not a list of log commands sent to CouchDB, that needs to be implemented in the datasource. Do you understand?
from couchdb-datasource.
Well, but it is possible to see all commands in CouchDB log, something like this:
- - 'GET' /_all_dbs 200
[Thu, 10 Oct 2013 16:42:29 GMT] [info] [<0.25457.3>] 192.168.2.1 - - 'GET' /spoilers/fa6c2f5c56ed090b50ab5eed0c0033c3 200
[Thu, 10 Oct 2013 16:42:29 GMT] [info] [<0.25458.3>] 192.168.2.1 - - 'GET' /spoilers/fa6c2f5c56ed090b50ab5eed0c0033c3 200
[Thu, 10 Oct 2013 16:42:29 GMT] [info] [<0.25459.3>] 192.168.2.1 - - 'GET' /spoilers/fa6c2f5c56ed090b50ab5eed0c0033c3 200
[Thu, 10 Oct 2013 16:42:29 GMT] [info] [<0.25460.3>] 192.168.2.1 - - 'DELETE' /spoilers/fa6c2f5c56ed090b50ab5eed0c0033c3/?rev=16-8dbc6e0be36ab5356e4bd932882b1f2e 200
[Thu, 10 Oct 2013 16:42:29 GMT] [info] [<0.25461.3>] 192.168.2.1 - - 'GET' /_all_dbs 200
[Thu, 10 Oct 2013 16:42:29 GMT] [info] [<0.25462.3>] 192.168.2.1 - - 'GET' /spoilers/_all_docs?include_docs=true&limit=20 200
[Thu, 10 Oct 2013 16:42:29 GMT] [info] [<0.25463.3>] 192.168.2.1 - - 'GET' /spoilers/_all_docs?include_docs=true 200
[Thu, 10 Oct 2013 18:21:23 GMT] [info] [<0.25464.3>] 192.168.2.1 - - 'GET' /_log 401
from couchdb-datasource.
Yes, that is possible, but if there are other processes or other tools running along with the application, it will be difficult to identify what really CakePHP is sending to CouchDB.
from couchdb-datasource.
I think it's interesting and not too hard to develop, I'm just too busy, but if someone could help me I would be developing and supporting that.
from couchdb-datasource.
Well, I can modify this plugin to use CakeLog http://book.cakephp.org/2.0/en/core-libraries/logging.html#CakeLog
If I do understand write, it is possible to write to a separate log.
from couchdb-datasource.
I mean that the log is only displayed to the user, but it should not be persisted.
from couchdb-datasource.
I mean something like this https://github.com/cakephp/cakephp/blob/master/lib/Cake/Model/Datasource/DboSource.php#L422
from couchdb-datasource.
Ah! =)))) Now I understand =)) Ok, I'll try to do that.
from couchdb-datasource.
Those 3 paramters
$this->took = round((microtime(true) - $t) * 1000, 0);
$this->numRows = $this->affected = $this->lastAffected();
$this->logQuery($sql, $params);
But except $numRows that I think it does not make sense to CouchDB.
from couchdb-datasource.
OK! I'll check this out in a week, when I will make code for CouchDB in my present project.
from couchdb-datasource.
👍 =)
from couchdb-datasource.
Related Issues (4)
- isConnected method HOT 1
- agregar function getLog HOT 4
- Get Specific Revision of a Document HOT 4
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from couchdb-datasource.