aboutsummaryrefslogtreecommitdiff
path: root/engine/lib/query.php
diff options
context:
space:
mode:
authoricewing <icewing@36083f99-b078-4883-b0ff-0f9b5a30f544>2008-06-04 10:27:47 +0000
committericewing <icewing@36083f99-b078-4883-b0ff-0f9b5a30f544>2008-06-04 10:27:47 +0000
commit45419606077dca7a5ce99d11f04bc1803d147ae7 (patch)
treed5660c2e0af2488587f79cb11a35e3e75040a306 /engine/lib/query.php
parentcf6d4c680bcd81319282c87fd8561461884d4691 (diff)
downloadelgg-45419606077dca7a5ce99d11f04bc1803d147ae7.tar.gz
elgg-45419606077dca7a5ce99d11f04bc1803d147ae7.tar.bz2
Marcus Povey <marcus@dushka.co.uk>
* More documentation added git-svn-id: https://code.elgg.org/elgg/trunk@786 36083f99-b078-4883-b0ff-0f9b5a30f544
Diffstat (limited to 'engine/lib/query.php')
-rw-r--r--engine/lib/query.php50
1 files changed, 50 insertions, 0 deletions
diff --git a/engine/lib/query.php b/engine/lib/query.php
index 8b6df5c8b..6606a7cc8 100644
--- a/engine/lib/query.php
+++ b/engine/lib/query.php
@@ -481,28 +481,78 @@
$this->setQueryType(new SelectQueryTypeQueryComponent());
}
+ /**
+ * Add limits and offsets to the query.
+ *
+ * @param LimitOffsetQueryComponent $component The limit and offset.
+ */
public function setLimitAndOffset(LimitOffsetQueryComponent $component) { $this->limit_and_offset = $component; }
+ /**
+ * Reset and set the field to the select statement.
+ *
+ * @param SelectFieldQueryComponent $component Table and field component.
+ */
public function setSelectField(SelectFieldQueryComponent $component)
{
$this->fields = array();
return $this->addSelectField($component);
}
+ /**
+ * Add a select field.
+ *
+ * @param SelectFieldQueryComponent $component Add a component.
+ */
public function addSelectField(SelectFieldQueryComponent $component) { $this->fields[] = $component; }
+ /**
+ * Add a join to the component.
+ *
+ * @param JoinQueryComponent $component The join.
+ */
public function addJoin(JoinQueryComponent $component) { $this->joins[] = $component; }
+ /**
+ * Set a field value in an update or insert statement.
+ *
+ * @param SetQueryComponent $component Fields to set.
+ */
public function addSet(SetQueryComponent $component) { $this->sets[] = $component; }
+ /**
+ * Set the query type, i.e. "select", "update", "insert" & "delete".
+ *
+ * @param QueryTypeQueryComponent $component The query type.
+ */
public function setQueryType(QueryTypeQueryComponent $component) { $this->query_type = $component; }
+ /**
+ * Attach an order component.
+ *
+ * @param OrderQueryComponent $component The order component.
+ */
public function setOrder(OrderQueryComponent $component) { $this->order = $component; }
+ /**
+ * Add a table to the query.
+ *
+ * @param TableQueryComponent $component Table to add.
+ */
public function addTable(TableQueryComponent $component) { $this->tables[] = $component; }
+ /**
+ * Add a where clause to the query.
+ *
+ * @param WhereQueryComponent $component The where component
+ */
public function addWhere(WhereQueryComponent $component) { $this->where[] = $component; }
+ /**
+ * Set access control.
+ *
+ * @param AccessControlQueryComponent $component Access control.
+ */
public function setAccessControl(AccessControlQueryComponent $component) { $this->access_control = $component; }
public function __toString()