Download the PHP package phel-lang/phel-sql without Composer

On this page you can find all versions of the php package phel-lang/phel-sql. 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 phel-sql

phel-sql

Data-driven SQL DSL for Phel Lang. Map in, [sql params] out. No database driver: the only job here is turning data into a parameterised query string.

Inspired by HoneySQL.

Install

Requires PHP 8.4+ and phel-lang/phel-lang 0.37+.

Use it

Pass the tuple to any PDO-like driver:

What it covers

Statement Clauses
SELECT with, with-recursive, select / select-distinct / select-distinct-on, from, joins (inner / left / right / full / cross / LATERAL), USING / ON, where, group-by, having, order-by (asc / desc / nulls-first / nulls-last), limit, offset, for (lock), returning
INSERT with, insert-into, columns, values (vector rows or map rows), on-conflict + do-nothing / do-update-set / on-conflict-where / do-update-where (Postgres), on-duplicate-key-update (MySQL), returning
UPDATE with, update, set, from, where, order-by, limit, returning
DELETE with, delete-from, where, order-by, limit, returning
Set ops union, union-all, intersect, except (top-level over a vector of queries)
VALUES top-level {:values [...]} as a standalone expression

WHERE operators: =, !=, <, >, <=, >=, like, not-like, ilike, not-ilike, and, or, not, in, not-in, between, not-between, is-null, is-not-null, exists, not-exists.

Tagged expression forms usable anywhere an identifier or operand is accepted:

Form Renders
[:raw "SQL"] raw fragment
[:fn name & args] name(args...)
[:cast expr type] CAST(expr AS TYPE)
[:case test then ... :else d] CASE WHEN ... THEN ... ELSE ... END
[:over expr spec] window function with :partition-by, :order-by, :frame
[:filter expr where] aggregate FILTER (WHERE ...)
[:lateral subquery] LATERAL (...)

Subqueries (maps) work anywhere an identifier or value is accepted. [:raw "SQL"] is the escape hatch for fragments the DSL does not yet cover.

Docs


All versions of phel-sql with dependencies

PHP Build Version
Package Version
Requires php Version >=8.4
phel-lang/phel-lang Version ^0.37
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 phel-lang/phel-sql contains the following files

Loading the files please wait ...