Download the PHP package shiwolang/db without Composer

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

RapidDB 轻量级数据库操作组件

使用方式

通过composer安装

初始化连接

暂仅支持mysql和sqlite

单个连接情景
多个连接情景
PDO设置初始化 单个连接情景
PDO设置初始化 多个连接情景

获取数据库连接


单个连接情景
多个连接情景

添加数据(单表)


删除数据(单表)


修改数据(单表)


查询数据


请注意在使用limit的时候的数值务必为整数int型!!

设置获取模式

设置为数组的获取方式(默认方式)
设置为类的实例集合的获取方式
将每行的列作为参数传递给指定的函数,并返回调用函数后的结果的获取方式
按相关的结果集中获取下一行

数组获取方式

类的实例获取方式

JSON格式数据

数组获取方式的json

类的实例集合获取方式的json

!!请注意!!
DB::json(&$fetchResult = null, $className = null, $args = []) 第一个形参为返回的结果集,并不是绑定的类名!!

!!注!!json数据获取中当获取方式为对象集合的方式时,支持数据自动格式化,可以使用@json注解来注解类中的一个公共方法,对应的json键名为这个方法的首字符小写的[去掉get字符后(如果含有)]方法名称; 同样可以实现ObjectContainerInterface和\JsonSerializable 接口并使用Statement::setJsonObjectContainerClassName($jsonObjectContainerClassName)进行对象集合容器的自定义设置

事务的支持


此功能依赖数据事务功能

事务使用声明方式
事务使用声明方式支持无限级嵌套
事务使用回调函数方式,支持无限级嵌套

执行记录查询


获取所有执行记录
单条未执行的sql

附录

Content类
数据库创建语句

All versions of db with dependencies

PHP Build Version
Package Version
Requires php Version >=5.5.0
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 shiwolang/db contains the following files

Loading the files please wait ....