Code Monkey home page Code Monkey logo

cimongo-codeigniter-mongodb-library's People

Contributors

juanitomint avatar lukexue avatar pkandathil avatar vesparny avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

cimongo-codeigniter-mongodb-library's Issues

Decrement not working?

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;
}

Limit does not work

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');

Set operator not working?

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

result set greater than PHP memory limit

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.

Timout

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!

Offset is missing

Hello!

I cannot find a way of using offset. Does the library support it?

Using update_batch?

Hello!

How is update_batch used?
I need to take an array of IDs and update those documents status to sending.
Is this possible?

where_not_in issue

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 ?

Where in all with like functionality

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);
}

Map/reduce keeps timing out

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?

Delete multiple documents in the same query

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');

Displaying documents and not cursor object

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');

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo 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.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.