Skip to content
Gabriel Mainginski edited this page Oct 18, 2016 · 1 revision

This page has to serve as a guide function for those who want to work in the project issue.

  • private $without_quotes Types that do not allow quotes in queries.

Functions

###compileForSelect(Builder $builder, $bindings) Catch the information provided by the Builder and assemble the binds again, as their types.

  • $arrTables Storing all tables used in select (from and joins).
  • $tables Storing all tables used in select (and all alias).
  • $types Get a query result from queryStringForSelect()'s query.
  • $tipos Takes the data generated by the previous var and "mix" with the $tables (includes alias!).
  • $new_format This is no longer being used here, sorry about that.
  • $wheres Storing the Builder's where.
  • $i Count only if found a bind (if you look the ifs, you will understand)
  • $new_binds The return of function, with all $bindings casting with our type.

###queryStringForSelect($tables) Pick up the $table fields and returns its types (such as integer, real).

  • $explicitDB If the database is explicitly in front of the table.

###compileBindings(Builder $builder, $bindings) Catch the information provided by the preg_match() (insert, update and delete) and assemble the binds again, as their types.

  • $matches All matches in preg_match() (tables and attributes).
  • $desQuery Get an associative array from $matches.
  • $arrQuery Get all attributes inner [] (tables is mixed with the fields, because you have something like [our_table].[our_field], it becomes useful in front).
  • $numTables Count the number of tables (i do not know why I wrote it. haha)

At this point, we separe fields (and fields with our types), and binding index (and with it, making $new_binds like compileForSelect()) per tables

  • $new_format Return of above.

###queryStringForCompileBindings($tables) Same as queryStringForSelect($tables).

###compileNewQuery($query, $bindings) Return a new compiled query such as Sybase works.

  • $partQuery Divide the query as the bindings.
  • $newQuery Return of function.

###compileOffset($offset, $query, $bindings = array(), $ Emulates the offset and pagination for Sybase ASE.

###queryStringForIdentity($from) Return the table's identity.

###queryStringForPrimaries($from) Return the tables' primary keys (don't works properly (issue #16)).

###select($query, $bindings = array(), $useReadPdo = true) Run all above.

Clone this wiki locally