Reference Source
public class | source

RecordProvider

Record provider base class.

Constructor Summary

Public Constructor
public

Create a record provider instance

Member Summary

Public Members
public

Record provider settings.

Method Summary

Public Methods
public

Build a query to fetch datas.

public abstract

Provide all datas records

public abstract

Find a record by its id.

public abstract

find_records_by_values(arg_values_map: object, arg_query: object | undefined): Promise

Find a record with a set of values.

Public Constructors

public constructor() source

Create a record provider instance

Public Members

public $settings: object source

Record provider settings.

Public Methods

public build_query(arg_query: object | undefined): Promise source

Build a query to fetch datas.

Params:

NameTypeAttributeDescription
arg_query object | undefined

optional query context

Return:

Promise

datas record promise

public abstract find_all_records(arg_query: object | undefined): Promise source

Provide all datas records

Params:

NameTypeAttributeDescription
arg_query object | undefined

optional query context

Return:

Promise

datas record promise

public abstract find_records_by_id(arg_id: string | number, arg_query: object | undefined): Promise source

Find a record by its id.

Params:

NameTypeAttributeDescription
arg_id string | number

record id

arg_query object | undefined

optional query context

Return:

Promise

promise of found record or null

public abstract find_records_by_values(arg_values_map: object, arg_query: object | undefined): Promise source

Find a record with a set of values.

Params:

NameTypeAttributeDescription
arg_values_map object

values map

arg_query object | undefined

optional query context

Return:

Promise

promise of found record or null