<commit_before># dataloader-sequelize

Batching, caching and simplification of Sequelize with facebook/dataloader

[![Build Status](https://circleci.com/gh/mickhansen/dataloader-sequelize.svg)](https://circleci.com/gh/mickhansen/dataloader-sequelize)
[![Coverage](https://codecov.io/gh/mickhansen/dataloader-sequelize/branch/master/graph/badge.svg)](https://codecov.io/gh/mickhansen/dataloader-sequelize)

# How it works

dataloader-sequelize is designed to provide per-request catching/batching for sequelize lookups, most likely in a graphql environment

# API

## `createContext(sequelize, object options)`
* Should be called after all models and associations are defined
* `sequelize` a sequelize instance
* `options.max=500` the maximum number of simultaneous dataloaders to store in memory. The loaders are stored in an LRU cache
<commit_msg>Typo: "catching" --> "caching" (#85)<commit_after># dataloader-sequelize

Batching, caching and simplification of Sequelize with facebook/dataloader

[![Build Status](https://circleci.com/gh/mickhansen/dataloader-sequelize.svg)](https://circleci.com/gh/mickhansen/dataloader-sequelize)
[![Coverage](https://codecov.io/gh/mickhansen/dataloader-sequelize/branch/master/graph/badge.svg)](https://codecov.io/gh/mickhansen/dataloader-sequelize)

# How it works

dataloader-sequelize is designed to provide per-request caching/batching for sequelize lookups, most likely in a graphql environment

# API

## `createContext(sequelize, object options)`
* Should be called after all models and associations are defined
* `sequelize` a sequelize instance
* `options.max=500` the maximum number of simultaneous dataloaders to store in memory. The loaders are stored in an LRU cache

{'fraction_non_alphanumeric': 0.10651920838183934, 'fraction_numerical': 0.004656577415599534, 'mean_word_length': 5.848605577689243, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 4, 'https://': 8, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '5762987', 'n_tokens_mistral': 590, 'n_tokens_neox': 555, 'n_words': 141}