summaryrefslogtreecommitdiff
path: root/README.markdown
diff options
context:
space:
mode:
authorJamie Matthews <[email protected]>2010-03-04 00:59:06 +0000
committerJamie Matthews <[email protected]>2010-03-04 00:59:06 +0000
commitde828e61366bb2b0ee0b9ffde20cfa486aa1745b (patch)
treef20579acb0f39605434a1cc6efd0278142960f96 /README.markdown
parent66542f6ac94feaca5c8f780fd74f549788c9ec5f (diff)
Reordered README slightly to clarify
Diffstat (limited to 'README.markdown')
-rw-r--r--README.markdown4
1 files changed, 3 insertions, 1 deletions
diff --git a/README.markdown b/README.markdown
index 6d18b07..eb46608 100644
--- a/README.markdown
+++ b/README.markdown
@@ -53,10 +53,12 @@ Then, pass a *Data Source Name* connection string to the `configure` method of t
Idiorm provides a [*fluent interface*](http://en.wikipedia.org/wiki/Fluent_interface) to enable simple queries to be built without writing a single character of SQL. If you've used [jQuery](http://jquery.com) at all, you'll be familiar with the concept of a fluent interface. It just means that you can *chain* method calls together, one after another. This can make your code more readable, as the method calls strung together in order can start to look a bit like a sentence.
-All Idiorm queries start with a call to the `for_table` static method on the ORM class. This tells the ORM which table to use when making the query. Method calls which add filters and constraints to your query are then strung together. Finally, the chain is finished by calling either `find_one()` or `find_many()`, which executes the query and returns the result.
+All Idiorm queries start with a call to the `for_table` static method on the ORM class. This tells the ORM which table to use when making the query.
*Note that this method **does not** escape its query parameter and so the table name should **not** be passed directly from user input.*
+Method calls which add filters and constraints to your query are then strung together. Finally, the chain is finished by calling either `find_one()` or `find_many()`, which executes the query and returns the result.
+
Let's start with a simple example. Say we have a table called `person` which contains the columns `id` (the primary key of the record - Idiorm assumes the primary key column is called `id` but this is configurable, see below), `name`, `age` and `gender`.
#### Single records ####