Skip to content
New issue

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

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Query Builder documentation needs return information #2512

Closed
Doggie52 opened this issue Jul 3, 2013 · 6 comments
Closed

Query Builder documentation needs return information #2512

Doggie52 opened this issue Jul 3, 2013 · 6 comments
Assignees

Comments

@Doggie52
Copy link

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 as completed Jul 3, 2013
@Doggie52 Doggie52 reopened this Jul 3, 2013
@Doggie52
Copy link
Author

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
Copy link
Author

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.

@AkenRoberts
Copy link
Contributor

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

@GDmac
Copy link
Contributor

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
Copy link
Contributor

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
Copy link
Contributor

narfbg commented Nov 12, 2014

It's neither.

narfbg added a commit that referenced this issue Nov 25, 2014
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 pushed a commit to goreilly/CodeIgniter that referenced this issue Dec 3, 2014
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 as completed in 4fce5c4 Dec 11, 2014
ghost pushed a commit to goreilly/CodeIgniter that referenced this issue Jan 3, 2015
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

5 participants