Download the PHP package mr-jiawen/php-database-repository without Composer

On this page you can find all versions of the php package mr-jiawen/php-database-repository. 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 php-database-repository

php-database-repository 组件

database repository 简介

它主要是帮助我们快速的生成数据仓库。在平时开发时候,不需花大量的精力去关心数据结构,把主要精力放在业务处理就好。

目前本组件正在开发之中,现在为v1.0 版本,主要完成的功能为代码构建基本功能。接下来,准备为整个数据仓库添加缓存,来健全数据库仓库的基本建设。

当然,此组件也可以为其添加热插件,来增添其功能,目前v1.0 添加热插件有:

使用手册:

第一步, 完成基本配置:

  1. 配置服务提供者:

  2. 配置artisan命令行:

  3. 执行命令,生成配置config\database_repository.php文件

第二步, 完成配置文件的配置:(完成此部分的配置)

其中需要注意的是:

  1. database_repository(最外一层):表示为整个database repository的基本配置信息;而与此层同级的配置信息,为缓存的全局配置信息(预留)。

  2. database_repository\database_name(第二层): 它对应的是整个数据仓库的基础原子模块。换一句话说,一个database_name 对应一个数据表(必须与数据库的表名称对应)。

  3. database_name\repository_type(第三层): 表示每个基础原子模块的类型,一共有三种类型

    • 独立的数据仓库independent(数据模型原始表): 此原子模块会独立的建立一个数据仓库,也就是会在对应的store中构建代码

    • 同级依赖数据仓库equality_dependent(数据模型一对一关系): 此原子模块不会建立独立厂库,它需要被某一个独立数据厂库给依赖,否则无法给这个原子模块新建一个model和把其数据结构融入到对应的独立模块中。
    • 子级依赖数据仓库child_dependent(数据模型一对一): 此原子模块和equality_dependent类似,我们常常遇到一种情况就是,某原始数据信息表,会根据不同的数据类型具备不同的数据结构,但是他们又同属同一个模块,没有必要拆分为多个模块进行分别开发,则可以在底层进行数据结构整理。(其特性和equality_dependent一样);
    • 补充:
  4. database_name\equality_dependent(第三层): 设置他所依赖的同级原子模块。

    • 如果此原子模块是一个独立模块,则必须配置此项,如果没有同级依赖原子模型模块,则为其留空数组;
    • 如果此原子模块不是一个独立模块,则必须删除此项配置;
  5. database_name\child_dependent(第三层): 设置他所依赖的子级原子模块。

    • 如果此原子模块是一个独立模块,则必须配置此项,如果没有同级依赖原子模型模块,则为其留空数组;
    • 如果此原子模块不是一个独立模块,则必须删除此项配置;
  6. database_name\string_key(第三层): 设置其此原子模块的唯一索引。

    • 必须是与对应的表字段对应。
    • 可以是单个字段形成的单一唯一索引;
    • 可以是多个字段形成个复合索引(多个字段给数组);
  7. database_name\list_key(第三层): 设置其此原子模块的普通索引。

    • database_name\string_key
  8. database_name\list_page_key(第三层): 设置其此原子模块的列表分页索引。
    • database_name\string_key

常见的使用

  1. 对列表进行排序,则我们可以对某个方法进行重写,如下所示:

  2. 遍历整个数据厂库,则可以进行引进 Src\RepositoryLibrary\AllOrAllPageStoreTrait;

后面将持续更新,尽情期待!!!


All versions of php-database-repository with dependencies

PHP Build Version
Package Version
Requires mr-jiawen/php-library Version ^1.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 mr-jiawen/php-database-repository contains the following files

Loading the files please wait ....