Download the PHP package hershel-theodore-layton/sql-queryf without Composer

On this page you can find all versions of the php package hershel-theodore-layton/sql-queryf. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.

FAQ

After the download, you have to make one include require_once('vendor/autoload.php');. After that you have to import the classes with use statements.

Example:
If you use only one package a project is not needed. But if you use more then one package, without a project it is not possible to import the classes with use statements.

In general, it is recommended to use always a project to download your libraries. In an application normally there is more than one library needed.
Some PHP packages are not free to download and because of that hosted in private repositories. In this case some credentials are needed to access such packages. Please use the auth.json textarea to insert credentials, if a package is coming from a private repository. You can look here for more information.

  • Some hosting areas are not accessible by a terminal or SSH. Then it is not possible to use Composer.
  • To use Composer is sometimes complicated. Especially for beginners.
  • Composer needs much resources. Sometimes they are not available on a simple webspace.
  • If you are using private repositories you don't need to share your credentials. You can set up everything on our site and then you provide a simple download link to your team member.
  • Simplify your Composer build process. Use our own command line tool to download the vendor folder as binary. This makes your build process faster and you don't need to expose your credentials for private repositories.
Please rate this library. Is it a good library?

Informations about the package sql-queryf

SQL Queryf

Render queryf-style SQL queries to strings for logging and debugging.

SqlQueryf\ToString\engine() will render queries for logging and debugging purposes. For example, if you have a syntax error in the query you just ran, you might want to add the query to the exception message to aid the developer in fixing it.

Security Notice

SqlQueryf\ToString\engine() is meant for logging and debugging. Do NOT pass the returned query to a database. This is a bad idea, since SQL escaping has been mocked out with fake_mysql_escape_UNSAFE. Please for all that is good, don't!

Why don't I use HH\Lib\SQL\Query’s built-in methods?

If your application uses HH\Lib\SQL\Query, and want to use toString__FOR_DEBUGGING_ONLY for this purpose, you might tear down your entire hhvm instance with a segmentation fault. This method is broken and should not be used. The method toUnescapedString__FOR_DEBUGGING_ONLY__UNSAFE does work, but the result is very difficult to read. Strings with quotes or slashes break the SQL syntax and the renderer tries to save bytes by inserting as little whitespace as possible.

Migration

If you use HH\Lib\SQL\Query, create these functions in your namespace:

Replace usages of new SQL\Query() with queryf() and $db->queryAsync($q) with $db->queryAsync(query_to_native($q)). Then replace references to the SQL\Query type with the QueryType type. This will change nothing about your application.

You are now ready to make the switch to:

Use of the __FOR_DEBUGGING_ONLY methods will now be a type error. Replace them with a call to:

Congratulations on a successful migration.

Expanding the possibilities

Now that you own the HH\FormatString<T> type for your queries, you may want to add specifiers that are not part of the set provided by SQL\Query. You can create any engine() and transform from PackedQuery to SQL\Query.


All versions of sql-queryf with dependencies

PHP Build Version
Package Version
Requires hhvm Version >=4.153
hershel-theodore-layton/hhvm-four-shim Version <1
Composer command for our command line client (download client) This client runs in each environment. You don't need a specific PHP version etc. The first 20 API calls are free. Standard composer command

The package hershel-theodore-layton/sql-queryf contains the following files

Loading the files please wait ...