Ecosyste.ms: Awesome

An open API service indexing awesome lists of open source software.

Awesome Lists | Featured Topics | Projects

https://github.com/php-cmsig/seal-read-write-adapter

The ReadWriteAdapter allows to use one adapter instance for reading and one for writing. Part of the https://github.com/php-cmsig/search project. READ-ONLY Repository
https://github.com/php-cmsig/seal-read-write-adapter

cmsig php seal-adapter seal-php-adapter

Last synced: about 1 month ago
JSON representation

The ReadWriteAdapter allows to use one adapter instance for reading and one for writing. Part of the https://github.com/php-cmsig/search project. READ-ONLY Repository

Awesome Lists containing this project

README

        


SEAL Logo with an abstract seal sitting on a telescope.

Logo created by Meine Wilma

SEAL
Read Write Adapter




The `ReadWriteAdapter` allows to use one adapter instance for reading
and one for writing. This is useful if you want to reindex something
without a downtime.

> **Note**:
> This is part of the `cmsig/search` project create issues in the [main repository](https://github.com/php-cmsig/search).

> **Note**:
> This project is heavily under development and any feedback is greatly appreciated.

## Installation

Use [composer](https://getcomposer.org/) for install the package:

```bash
composer require cmsig/seal cmsig/seal-read-write-adapter
```

## Usage

To use the adapter an instance of `ReadWriteAdapter` need to be created
which get a `$readAdapter` and `$writeAdapter` which are instances of the
`AdapterInterface`.

The following code shows how to create an Engine using this Adapter:

```php
**Note**
> Read a document and partial update it based on the read document should be avoided
> when using this adapter, as the read document could already be outdated. So always
> fully update the document and never do based on read documents.
> Have a look at the `MultiAdapter` to write into read and write adapter.

## Authors

- [Alexander Schranz](https://github.com/alexander-schranz/)
- [The Community Contributors](https://github.com/php-cmsig/search/graphs/contributors)