<?php
namespace Claromentis\Core\DAL;

$GLOBALS["__65da1b1ec2d6653e8a0ab7848e5" . "36215"] = (@$GLOBALS["__65da1b1ec2d6653e8a0ab7848e5362" . "15"] ?: array()) + array("_5846ddea7ff6d30bd0e7b4a81710" . "776e" => base64_decode("YXJyYXlf" . "c2hpZnQ="), "_5e30c4717ced3" . "6cff9e93e19a5c" . "576cc" => base64_decode("aXNfc3" . "RyaW5n"), "_ae76ef27ae5b48757" . "f71a202718b5e5e" => base64_decode("Y2FsbF91c2VyX" . "2Z1bmNfYXJyYX" . "k="), "_4278f6e1f1e27cc1e96763e4620" . "a4ff5" => base64_decode("Y21fZG" . "ll"), "_1138b6d1378872a9bc5c5818d5caf5b" . "7" => base64_decode("UXVlcnkgY29uc3RydWN0b3IgY2FsbGVk" . "IHdpdGggbm9uIHN0cmluZyBwYXJhbWV0" . "ZXI="), "_e21aea73c33e96ef626d3b3bf962359" . "3" => base64_decode("YXJyYXl" . "fcHVzaA" . "=="), "_4ae91226df21607" . "6d8b3b7bbb996cf7" . "3" => base64_decode("X1ByZXBhcm" . "U="));









class Query
{
    const EMPTY_QUERY = false;
    protected $query = '';
    
    
    
    
    
    
    protected $bind_keys_array = array();
    
    
    
    
    
    
    protected $bind_nums_array = array();
    
    
    
    
    
    
    protected $bind_summary = array();
    var $first, $count = -1, $flags = 0;
    var $join_conditions = array();
    
    
    
    
    
    
    
    
    
    public function __construct($_375b33ec4eb58c7d0a9e2fc367c30c68)
    {
        if ($_375b33ec4eb58c7d0a9e2fc367c30c68 === Query::EMPTY_QUERY) {
            return;
        }
        $_53b3c2191fef0545d371e36a8c709d44 = func_get_args();
        $GLOBALS["__65da1b1ec2d6" . "653e8a0ab7848e" . "536215"]["_ae76ef27ae5b48757f71a202718b5e" . "5e"](array($this, $GLOBALS["__65da1b1ec2d6653e8a0" . "ab7848e536215"]["_4ae91226df216076" . "d8b3b7bbb996cf73"]), $_53b3c2191fef0545d371e36a8c709d44);
    }
    public function _Prepare()
    {
        $_24b4c2afc713613f29f6b293d9bd9676 = func_get_args();
        $_e068dd4820128edb56e7da2adabb96d4 = $GLOBALS["__65da1b1ec2d6" . "653e8a0ab7848e" . "536215"]["_5846ddea7ff6d30bd0e7b4a8171077" . "6e"]($_24b4c2afc713613f29f6b293d9bd9676);
        if (!$GLOBALS["__65da1b1ec2d6653e8a0ab78" . "48e536215"]["_5e30c4717ced36cff9e93e1" . "9a5c576cc"]($_e068dd4820128edb56e7da2adabb96d4)) {
            $GLOBALS["__65da1b1ec2d6653e8a0a" . "b7848e536215"]["_4278f6e1f1e2" . "7cc1e96763e46" . "20a4ff5"]($GLOBALS["__65da1b1ec2d6653e8a0ab784" . "8e536215"]["_1138b6d13788" . "72a9bc5c5818d" . "5caf5b7"]);
        }
        $this->count = -1;
        $this->query = $_e068dd4820128edb56e7da2adabb96d4;
        $this->bind_nums_array = $_24b4c2afc713613f29f6b293d9bd9676;
        $this->flags = 0;
        $this->join_conditions = array();
    }
    public function _GetQuery()
    {
        return $this->query;
    }
    public function Bind($name, $value)
    {
        $this->bind_keys_array[$name] = $value;
    }
    public function BindPart(QueryPart $_d962cfd1735adb2dfba46f69c7f15cb8)
    {
        $this->bind_summary = $this->bind_summary + $_d962cfd1735adb2dfba46f69c7f15cb8->_GetBinds();
    }
    public function _GetBinds()
    {
        $this->bind_summary[$this->_GetUniq()] = array($this->bind_keys_array, $this->bind_nums_array);
        return $this->bind_summary;
    }
    protected function _GetUniq()
    {
        return 0;
    }
    
    
    public function setLimit($_f2b0589e330a88c87f5cc51408bda822, $_692408637c0ee5b3fa41190b465f74a4 = -1)
    {
        $this->first = $_692408637c0ee5b3fa41190b465f74a4 !== null ? (int) $_692408637c0ee5b3fa41190b465f74a4 : null;
        $this->count = $_f2b0589e330a88c87f5cc51408bda822 !== null ? (int) $_f2b0589e330a88c87f5cc51408bda822 : null;
    }
    public function addJoinCondition($_a9bc4b4976c1444c2094f007eda30414, $_6dbc66f3a27b4dcd4664355f89c67c77, $_a5a8b9d897aa719dd04368fc1d38aeda, $type = Db::JOIN_TYPE_LEFT_OUTER)
    {
        $GLOBALS["__65da1b1ec2d6653e8a0ab7848e" . "536215"]["_e21aea73c33" . "e96ef626d3b3" . "bf9623593"]($this->join_conditions, array($_a9bc4b4976c1444c2094f007eda30414, $_6dbc66f3a27b4dcd4664355f89c67c77, $_a5a8b9d897aa719dd04368fc1d38aeda, $type));
    }
}