Skip to content

Bug fixes, additional methods, secure connections, `create` table and schema shortcuts.

Compare
Choose a tag to compare
@TheTechsTech TheTechsTech released this 13 Mar 03:29
· 374 commits to master since this release
  • additional create, drop, database schema maker helper methods.
    $database->create($table, ...$schema) where $schema is:
array( column, datatype, ...value/options arguments ) // calls create_schema() 
// datatype are global CONSTANTS and can be written out like:    VARCHAR, 32, notNULL, PRIMARY, AUTO, ....
// AUTO constant will replaced with the proper auto sequence for the SQL driver

Method shortcuts...

column( column, datatype, ...value/options arguments ) // returns string
primary( primary_key_label, ...primaryKeys) // returns string
foreign( foreign_key_label, ...foreignKeys) // returns string
unique( unique_key_label, ...uniqueKeys) // returns string
index(indexName, ...indexKeys)

See source comments/docblocks for more usage help.

For secure connections call securePDO('mysqli' or 'pgsql' or 'sqlserver', $key, $cert, $ca, $path);

  • Only mysqli has been tested. Needs to be called at least once just before for actual connection.

  • If no $key, $cert, $ca, $path is passed, an self signed certificate is created.

  • Feature requested, and bug fixes in reference to: #148, #149