Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

Already on GitHub? Sign in to your account

Query Builder documentation needs return information #2512

Doggie52 opened this Issue Jul 3, 2013 · 6 comments


None yet
5 participants

Doggie52 commented Jul 3, 2013

The documentation for the Query Builder needs information on what the various functions return in different scenarios (success/failure).

@Doggie52 Doggie52 closed this Jul 3, 2013

@Doggie52 Doggie52 reopened this Jul 3, 2013

Doggie52 commented Jul 3, 2013

Unsure if there are other parts of the database documentation that need this information too, but there most likely are.

Doggie52 commented Jul 4, 2013

Yes, the documentation I referred to was in fact the one in this repo and not the 2.1.3 one. I'll take a look and see what I can do.

I've asked around briefly on IRC and nobody seems quite sure about the precise return values. I can simulate a successful database write and var_dump() it but I'm not quite sure how to simulate an unsuccessful one. I'll take a look at the source code directly and see what secrets it reveals.


cryode commented Jul 4, 2013

Anything you need to know about return values is in the source code.


GDmac commented Mar 17, 2014

Most query 'building' methods return $this (the query builder object) to be able to chain those methods. Generally, when the query has been 'build', then the query is excecuted with one of the query excecuting methods e.g. insert(), update(),replace(), delete(), etc. Most return a result object, but indeed can return a boolean or query-string as well, which should be better documented.

$query = $this->db
   ->select('fieldname') // returns $this
   ->from('tablename') // same
   ->limit(5) // also returns $this
   ->get(); // returns result set

jim-parry commented Nov 12, 2014

I will go through the database docs ... there could be room for improvement!

ps Not sure whether to consider documentation changes a bug or a feature, hence the waffling on the labels :-/


narfbg commented Nov 12, 2014

It's neither.

@jim-parry jim-parry closed this in 42a7df6 Nov 25, 2014

@narfbg narfbg added a commit that referenced this issue Nov 25, 2014

@narfbg narfbg Merge pull request #3373 from jim-parry/userguide/querybuilder
User Guide update - Query Builder (fixes #2512)

@narfbg narfbg reopened this Nov 25, 2014

@jim-parry jim-parry self-assigned this Nov 30, 2014

@ghost ghost pushed a commit to goreilly/CodeIgniter that referenced this issue Dec 3, 2014

@jim-parry @goreilly jim-parry + goreilly User Guide update - Query Builder (fixes #2512)
1) Changed the grouping for better readability, in the query builder writeup
2) Added return value descriptors for all methods
3) Added default setting to query builder configuration writeup.

The TOC sidebar is much better than before, though still a bit messy. This will need fixing with the sphinx theme update, being done separately.

Signed-off-by:James L Parry <jim_parry@bcit.ca>

@narfbg narfbg closed this in 4fce5c4 Dec 11, 2014

@ghost ghost pushed a commit to goreilly/CodeIgniter that referenced this issue Jan 3, 2015

@narfbg @goreilly narfbg + goreilly [ci skip] Update Query Builder docs
Close #2512
Related: #3396
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment