JSPM

  • Created
  • Published
  • Downloads 6
  • Score
    100M100P100Q78794F
  • License MIT

An adapter the resolve-query uses to store the read model state in MySQL

Package Exports

  • resolve-readmodel-mysql

This package does not declare an exports field, so the exports above have been automatically detected and optimized by JSPM instead. If any package subpath is missing, it is recommended to post an issue to the original package (resolve-readmodel-mysql) to support the "exports" field. If that is not possible, create a JSPM override to customize the exports field for this package.

Readme

resolve-readmodel-mysql

npm version

A Read Model Adapter for MySQL 5.7+ and compatible (like AWS Aurora) databases. The adapter provides a query API for projection and resolvers. This API is similar to the other reSolve adapters API, which means you can change a Read Model Adapter in the configuration file without changing the code.

Available Parameters

Adapter interface is provided by resolve-readmodel-base package.

Usage

import createAdapter from 'resolve-readmodel-mysql'

const adapter = createAdapter({
  ...connectionSettings
})

Notes:

  • Index fields can store only numbers with BIGINT type or strings in utf8mb4 encoding with the utf8mb4_unicode_ci collation (details).
  • Other fields are stored in a json column as longblob (details)
  • The maximum packet size is limited. You can configure it in MySQL server options
  • Double-check the encoding of connection names, requests, and responses: the encoding-related bugs are hard to catch.

Analytics