Page Contents

Home > @loopback/repository-tests > CrudFeatures

CrudFeatures interface

List of flags describing behavior specific to different connectors and repository implementations. These flags are used by the test suite to tweak assertions and skip tests for scenarios not supported by some implementations.

Signature:

export interface CrudFeatures 

Properties

Property Modifiers Type Description

emptyValue

undefined | null

The value used by the database to store properties set to undefined. Typically, SQL databases store both undefined and null as null.

Default: undefined

freeFormProperties

boolean

Does the database (or the connector) require a fixed schema, or can it support additional (free-form) properties? SQL databases typically don’t support free-form properties.

Default: true

hasRevisionToken

boolean

Does the connector have the revision token for replacement operations? (Cloudant)

Default: false

idType

‘string’ | ‘number’

What type is used for auto-generated primary keys? - SQL databases typically use auto-incremented numbers, - NoSQL databases tend to use GUID/UUID strings.

Default: 'string'.

supportsInclusionResolvers

boolean

Does the repository provide inclusionResolvers object where resolvers can be registered?

Default: true

supportsTransactions

boolean

Does the connector support using transactions for performing CRUD operations atomically and being able to commit or rollback the changes? SQL databases usually support transactions

Default: false