@since 0.2

@param Statement|StatementGuid|string $statement Statement object or GUID
@param EditInfo|null $editInfo

@return bool
@throws UnexpectedValueException
545715
public function remove( $statement, EditInfo $editInfo = null ) {
		if( is_string( $statement ) ) {
			$guid = $statement;
		} else if ( $statement instanceof StatementGuid ) {
			$guid = $statement->getSerialization();
		} else if ( $statement instanceof Statement ) {
			$guid = $statement->getGuid();
		} else {
			throw new UnexpectedValueException( 'Could not get statement guid from $statement' );
		}
		if( !is_string( $guid ) ) {
			throw new UnexpectedValueException( 'Unexpected statement guid got from $statement' );
		}

		$params = array(
			'claim' => $guid,
		);

		$this->api->postRequest( 'wbremoveclaims', $params, $editInfo );
		return true;
	}
403758
public function fetchColumn(string $statement, array $bindings = [], int $columnNum = 0)
    {
        $sth = $this->execute($statement, $bindings);
        $result = $sth->fetchColumn($columnNum);

        $this->freeResource($sth);

        return $result;
    }
715666
private static function getPositionalPlaceholderPositions(string $statement) : array
    {
        return self::collectPlaceholders(
            $statement,
            '?',
            self::POSITIONAL_TOKEN,
            static function (string $_, int $placeholderPosition, int $fragmentPosition, array &$carry) : void {
                $carry[] = $placeholderPosition + $fragmentPosition;
            }
        );
    }
300634
public function prepare($statement, $driverOpts = null) {
		if ($driverOpts === null) {
			$driverOpts = [];
		}

		try {
			$stmt = $this->pdo->prepare($statement, $driverOpts);
			return new PreparedStatement($stmt, $this->pdo, $this->exceptionAdapter);
		} catch (PDOException $e) {
			throw $this->exceptionAdapter->adapt($e, $statement);
		}
	}
1263986
public function prepare($statement, $driver_options = [])
    {
        try {
            $this->_last_statement = $statement;

            return parent::prepare($statement, $driver_options);
        } catch (\PDOException $e) {
            throw new Exception($e->getMessage(), 500, Exception::DBSTATEMENT);
        }
    }
734477
public function exec(string $statement) : bool
    {
        try {
            return ($this->getConnection()->exec($statement) !== false);
        } catch (\PDOException $e) {
            throw new ParserRuntimeException('Statement could not be executed.', 0, $e);
        }
    }
1361925
public function bindValues($statement, $bindings)
    {
        foreach ($bindings as $key => $value) {
            $statement->bindParam($key, $bindings[$key]);
        }
    }
997424
public function getSingleResult($statement, $params = array())
    {
        $result = $this->getResults($statement, $params);

        if (!sizeof($result)) {
            return null;
        }

        return $result[0];
    }
1193100
public function execute( $statement ) {

		$result = $this->wpdb->query( $statement );
		if ( FALSE === $result ) {
			throw new WpDbExecuteException( $this->wpdb->last_error );
		}

		return (int) $result;
	}
383832
public StatementInfo prepareStatementInfo() throws SQLException {
		List<ArgumentHolder> argList = new ArrayList<ArgumentHolder>();
		String statement = buildStatementString(argList);
		return new StatementInfo(statement, argList);
	}
684469
public function set( $reference, $target, EditInfo $editInfo = null ) {
		if( $reference instanceof Reference ) {
			$reference = $reference->getHash();
		}
		if( !is_string( $reference ) ) {
			throw new UnexpectedValueException( 'Could not get reference hash from $reference' );
		}

		if( is_string( $target ) ) {
			$guid = $target;
		} else if ( $target instanceof StatementGuid ) {
			$guid = $target->getSerialization();
		} else if ( $target instanceof Statement ) {
			$guid = $target->getGuid();
		} else {
			throw new UnexpectedValueException( 'Could not get statement guid from $target' );
		}
		if( !is_string( $guid ) ) {
			throw new UnexpectedValueException( 'Unexpected statement guid got from $target' );
		}

		$params = array(
			'statement' => $guid,
			'references' => $reference,
		);

		$this->api->postRequest( 'wbremovereferences', $params, $editInfo );
		return true;
	}
866045
public function executeStatement($statement, array $options = [])
    {
        if (!empty($options)) {
            return $this->session->execute($statement, $options);
        } else {
            return $this->session->execute($statement);
        }
    }
116175
public function prepare($statement)
    {
	
        $returnValue = null;
        $this->preparedExec = false;
        $returnValue = $this->getStatement($statement);

		
        return $returnValue;
    }
1351567
private Object exec(StatementContext statement) {
    if (statement == null)
      return null;
    return statement.accept(visitor);
  }
385751
private function isNamedParameterable($statement)
    {
        return ! preg_match('/^alter+ +table/', strtolower(trim($statement)))
        and ! preg_match('/^create+ +table/', strtolower(trim($statement)));
    }
642047
public static function Execute($statement, $parameters = array(), $return=false)
	{
		$db = self::connect();
		$rowsAffected = 0;
		$lastID = 0;
		
		try
		{
			$query = $db->prepare($statement);
			
			foreach($parameters as $key => $parameter)
			{
				if(!isset($parameter["type"]))
					$parameter["type"] = PDO::PARAM_STR;
				
				$query->bindParam($key,$parameter["value"],$parameter["type"]);
			}
			
			$db->beginTransaction();
			$query->execute();
			$rowsAffected += $query->rowCount();
			$lastID = $db->lastInsertId();
			$db->commit();
		}
		catch (PDOException $e)
		{
			$db->rollBack();
			$exception = "Sorry, there was a problem with query execution. ({$e->getMessage()})";
		}

		if($exception) throw new \Exception($exception);
		
		$returnObject = (object) array(
			DatabaseReturn::RowsAffected => $rowsAffected,
			DatabaseReturn::LastInsertID => $lastID
		);
		
		if($return) return $returnObject;
		else return $rowsAffected;
	}
1204151
public function postSelect(StatementInterface $statement, ResultInterface $result, ResultSetInterface $resultSet)
    {
        if ($this->getDmsColumns())
            // We have used the query with presented Predefined DMS Columns
            // Nothing to do
            return;

        $storedValues = $this->getStoredValues();
        $pkColumn     = $storedValues['pk'];

        $totalResultSet = array();
        foreach($resultSet as $rc)
        {
            if (!$rc instanceof iDataSetConveyor)
                throw new \Exception(sprintf(
                    'ResultSet must instance of iDataSetConveyor to DmsFeature interact to. "%s" given.'
                    , get_class($rc)
                ));

            $rc = $rc->toArray();

            $pk = $rc[$pkColumn]; // get pk column value
            foreach ($rc as $c => $v) {
                // iterate trough result containing duplicated rows because of join over dms values
                if ($c == 'dms__content' || $c == 'dms__field')
                    // dms virtual columns avoided and set as field->content
                    continue;

                if ($c == $pkColumn
                    && (!in_array($pkColumn, $storedValues['columns'])
                        && !in_array('*', $storedValues['columns'])
                    )
                )
                    continue;


                $totalResultSet[$pk][$c] = $v;
            }

            if (isset($rc['dms__content']) && isset($rc['dms__field'])) {
                if (in_array($rc['dms__field'], $storedValues['columns'])
                    || in_array('*', $storedValues['columns'])
                )
                {
                    $column = $rc['dms__field'];
                    $value  = $rc['dms__content'];
                    $totalResultSet[$pk][$column] = $value;
                }

                unset($rc['dms__field']);
                unset($rc['dms__content']);
            }
        }

        $resultSet->initialize($totalResultSet);
    }