Zoo Standard Setup Tools

Here is the API reference of the “standard ZooDb setup” related functions and classes. Please refer to Setting up a “Standard” ZooDb for a little guide on using them to create your zoo.

import { makeStandardZooDb } from '@phfaist/zoodb/stdzoodb';
import {
    makeStandardYamlDbDataLoader
} from '@phfaist/zoodb/std/stdyamldbdataloader';

import { use_relations_populator } from '@phfaist/zoodb/use_relations_populator';
import {
    use_flm_environment, default_target_href_resolver,
} from '@phfaist/zoodb/use_flm_environment';
import { use_flm_processor } from '@phfaist/zoodb/use_flm_processor';
import {
    use_gitlastmodified_processor
} from '@phfaist/zoodb/use_gitlastmodified_processor';
import {
    use_searchable_text_processor
} from '@phfaist/zoodb/use_searchable_text_processor';
makeStandardZooDb(config)

Create a ZooDb() instance (or a custom subclass instance) using standard settings with higher-level options.

To create an instance of a custom ZooDb subclass, set the config value config.ZooDbClass to the subclass of ZooDb you want to use (see An example).

TODO: Document the higher-level options !!

Feature helpers

use_relations_populator()

Set up the StandardZooDb to set up a RelationsPopulator() database processor.

use_flm_environment(_this)

Set up the StandardZooDb to set up a ZooFLMEnvironment() with some standard features and settings.

Document options……………………….

default_target_href_resolver(ref_instance, render_context)

Doc……..

use_flm_processor(_this)

Doc…………….

Lots of options to document!…….

use_gitlastmodified_processor(_this)

Set up the StandardZooDb to include a GetGitLastModifiedDbProcessor() database processor.

use_searchable_text_processor(_this)

Set up the StandardZooDb to include a SearchableTextProcessor() database processor.

A FLMSearchableDocTextValuesAssembler() is created to assemble the text documents to for searching. A SearchableTextFieldset() is created with standard settings.

The searchable_text_options.object_types config option is inspected; set this to an array of object type names that we’d like to be able to search for.

Data loader

This function will create a data loader class (YamlDbDataLoader()) that you can then use in a :ZooDbDataLoaderHandler class, which will take care of loading (and if requested, reloading) the data into the main zoo instance.

makeStandardYamlDbDataLoader(zoodb, config)

Create a YamlDbDataLoader() instance using some standard settings with higher-level options, based on some settings that have been set in a standard ZooDb instance.

The zoodb argument should be a ZooDb() instance (or subclass instance) that was created with makeStandardZooDb().

TODO: Document the higher-level options !! (Check our example for now)