vesparny / cimongo-codeigniter-mongodb-library Goto Github PK
View Code? Open in Web Editor NEWDEPRECATED
DEPRECATED
Hello,
The decrement function says inc, shouldn´t it be dec?
Like this:
public function dec($fields = array(), $value = 0){
$this->_update_init('$dec');
if (is_string($fields)){
$this->updates['$dec'][$fields] = $value;
}elseif (is_array($fields)){
foreach ($fields as $field => $value){
$this->updates['$dec'][$field] = $value;
}
}
return $this;
}
Hello!
I tried to use the limit functionality but it makes no difference. All records are returned anyway.
I tried both:
$result = $this->cimongo->limit(1)->get('users');
and this:
$result = $this->cimongo->get('users')->limit(1);
and this:
$result = $this->cimongo->limit('1')->get('users');
Hello,
It seems that the set operator is not working.
I tried this:
$this -> cimongo -> where ($query) -> set ('tags_suggested', $all_tags) -> update ('files');
And I got this error:
Update of data into MongoDB failed: Invalid modifier specified: $set
When getting a result set that is larger than the PHP limit, the result_object method tries to build the array of the entire result set, causing it to error out. I need to iterate over the results and deal with each bit of data individually instead of a complete array, but can't due to the fact that the cursor is protected.
Additionally, the idea that you iterate over the cursor to build an array, so that I can then iterate over the array seems a bit like you're doubling the run time.
Hello,
I am having problems with queries locking up. Is there a way to set a timeout that kills these queries after a certain time?
Thanks!
Hello!
I cannot find a way of using offset. Does the library support it?
Hello!
How is update_batch used?
I need to take an array of IDs and update those documents status to sending.
Is this possible?
I got an error when i used where not in function:
A PHP Error was encountered
Severity: Warning
Message: Illegal string offset '$nin'
Filename: cimongo/Cimongo.php
Line Number: 177
Solution: i changed the line no 177
$this->wheres[$field]['$nin'] = $in;
to
$this->wheres[$field] = array('$nin'=>$in);
Then the issue has been re-solved.
i am posting this because i want know it is right or not ?
Hello,
I added the ability to make a where_in_all work with mongoregex. The problem is that it only works on my offline server, not on my production server. Do you see any problems with the code? Do you know why it wont work online?
public function where_in_all_like($field = "", $in = array()){
$thearray = array ();
foreach ($in as $value) {
array_push ($thearray, new MongoRegex('/'.$value.'/i'));
}
$this->_where_init($field);
$this->wheres[$field]['$all'] = $thearray;
return ($this);
}
Hello,
I try to run a map/reduce command but it keeps timing out.
I get this error:
"MongoDB command failed to execute: cursor timed out (timeout: 30000, time left: 0:0, status: 0)"
I tried to add this code into the constructor of the mongo_cursor.php but it still keeps timing out.
$cursor->timeout(30000000000);
Do you know why?
Hello,
I am just wondering how I can delete more than one matching document in the same query?
This is my current query and it only deletes the first one.
$where = array ('owner.user_id' => new MongoId ($args['user_id']));
$this -> cimongo -> where ($where) -> delete ('accounts');
Hello,
Your library looks very promising and contain more functionalities than for example Alex Bilbies library.
I am having one small problem with it right now. When running the below query I only get the cursor object.
How can I get my fetched documents?
$result = $this->cimongo->get('users');
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.