Download the PHP package amkt922/ssql without Composer

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

SSql

Build Status

The SSql is a simple database access library.
It has two main features:

The second is inspired by the dbflute outside sql.
dbflute
About OutsideSql

SSqlはシンプルなデータベースアクセスライブラリです。 主に2つの機能があります。

2つ目の機能はdbfluteの外出しSQLに感銘を受けて作りました。
dbflute
dbfluteの外出しSQL

Motive

In the actual project, sometimes we need to access databases with more complex sqls than functions a ORM library has.
When executing them with a ORM, sources are going to be more complicated generally.
I need to embed them in the sources, and I don't know whether they are corrent grammertically.
The dbflute has solved such matters with a function that is called outside sql, however the dbflute is implemented in Java.
I have wanted to such a library in PHP, and then implemented a library that has outside sql feature.

動機

実際の業務では、ORMが持っている機能以上のDBへのアクセス処理を実装する必要が時々あります。
ORMの機能でそのようなSQLを発行する場合、大抵は実際にWebアプリケーションで確認するまで文法的に正しいかはわかりません。
dbfluteはそのような問題を外出しSQLで解決しています。ただdbfluteはJavaで実装されており、PHPでそのようなライブラリが欲しかったため、PHPで外出しSQLを実装したライブラリです。

What is the outside sql?

The outside sql is a function that execute a sql that is written in sql file.
You write a sql with comment that is called a parameter comment.

外出しSQLって?

外出しSQLとはテキストファイルに記載されたSQLを実行する機能です。
パラメータコメントと呼ばれるコメントとともにSQLを記載します。

What is the Parameter comment?

Its example is below.
/*IF */, /*BEGIN*/ and so on are parameter comments.

パラメータコメントって?

機能はdbfluteを模倣しているので、dbfluteの外付けSQLのページでご確認ください。
About OutsideSql

Differences from dbflute as of now.

現時点でのdbfluteとの相違点

How to install the SSql.

just import SSql.php

SSqlのインストール方法

SSql.phpを読み込むだけです。

Requirements, 環境

Limitation, 制限

Supports Sqlite, Mysql and Postgresql, other databases are not support as of now.

MysqlとSqlite, Postgresqlのみサポートしています。他のデータベースは現時点ではサポートしていません。

Usage

Note: These example are parts of SSql features.
There are many another functions in the SSql, please check test code.
Of course I will set up documents in the future.

Setup

First of all, set up $config like this,

Simple Query

When you want to execute a simple sql, you can use SQueryManager(Simple Query).
* When you don't need to execute complex sql.

  1. connect with the config and get a SSql object
  2. let it know you use SQueryManager with createSQry method
  3. build a sql with some methods, they're Doctrine like
  4. execute it, and get a Result

Update, Delete, Insert operations are almost same as above.

They build sqls like below.

Simple Sql

When you want to execute a complicate sql, you can use SSqlManager(Simple Sql).

  1. create sql files wherever you want. it's path should be set in $config['sqlDir'].
  2. connect with the config and get SSql object(same as Simple Query)
  3. execute selectList with sqlfile name(without extension) and parameters for sqlfile

SSql builts a sql below and execute.
The written parameters in the selectUser.sql, 2 of id and 10 of status, are trimmed. This advantage of sql file with parameter comment is that you can build and test sql in Database tool(e.g MySqlWorkbench), and then controll parameters in you application with parameter.

If you don't pass id, AND is removed automatically.

If parameter, paging is false, ELSE line is valid and ORDER is removed.

Others

The SSql has beginTransaction, commit, rollback methods itself.


All versions of ssql with dependencies

PHP Build Version
Package Version
No informations.
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 amkt922/ssql contains the following files

Loading the files please wait ...