Download the PHP package friendsofhyperf/fast-paginate without Composer

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

Fast Paginate for Hyperf

Fork from https://github.com/hammerstonedev/fast-paginate

About

This is a fast limit/offset pagination macro for Hyperf. It can be used in place of the standard paginate methods.

This package uses a SQL method similar to a "deferred join" to achieve this speedup. A deferred join is a technique that defers access to requested columns until after the offset and limit have been applied.

In our case we don't actually do a join, but rather a where in with a subquery. Using this technique we create a subquery that can be optimized with specific indexes for maximum speed and then use those results to fetch the full rows.

The SQL looks something like this:

You might get an error trying to run the query above! Something like This version of MySQL doesn't yet support 'LIMIT & IN/ALL/ANY/SOME subquery. In this package, we run them as two separate queries to get around that!

The benefits can vary based on your dataset, but this method allows the database to examine as little data as possible to satisfy the user's intent.

It's unlikely that this method will ever perform worse than traditional offset / limit, although it is possible, so be sure to test on your data!

If you want to read 3,000 words on the theory of this package, you can head over to aaronfrancis.com/2022/efficient-pagination-using-deferred-joins.

Installation

This package supports Hyperf 3.0+.

To install, require the package via composer:

There is nothing further you need to do. The service provider will be loaded automatically by Hyperf.

Usage

Anywhere you would use Model::query()->paginate(), you can use Model::query()->fastPaginate()! That's it! The method signature is the same.

Relationships are supported as well:

A Favor

If this helps you, please start me with before and after times! I'd love to know :D

Some community results so far:

Contact

License

MIT


All versions of fast-paginate with dependencies

PHP Build Version
Package Version
Requires friendsofhyperf/helpers Version ~3.1.0
hyperf/database Version ~3.1.0
hyperf/event Version ~3.1.0
hyperf/paginator Version ~3.1.0
hyperf/tappable Version ~3.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 friendsofhyperf/fast-paginate contains the following files

Loading the files please wait ....