Page Contents

Home > @loopback/sequelize > SequelizeDataSource

SequelizeDataSource class

Sequelize DataSource Class

Signature:

export declare class SequelizeDataSource implements LifeCycleObserver 

Implements: LifeCycleObserver

Constructors

Constructor Modifiers Description

(constructor)(config)

Constructs a new instance of the SequelizeDataSource class

Properties

Property Modifiers Type Description

config

SequelizeDataSourceConfig

name

string

parseJsonColumns

readonly

boolean

Gets the flag indicating whether to parse JSON columns. If the parseJsonColumns property is set in the configuration, its value will be returned. Otherwise, it returns true if the dialect is MySQL, false otherwise.

sequelize

Sequelize

sequelizeConfig

SequelizeOptions

settings

{}

Methods

Method Modifiers Description

automigrate()

autoupdate()

beginTransaction(options)

Begin a new transaction.

execute(command, parameters, options)

Execute a SQL command.

**WARNING:** In general, it is always better to perform database actions through repository methods. Directly executing SQL may lead to unexpected results, corrupted data, security vulnerabilities and other issues.

getPoolOptions()

init()

start(_injectedArgs)

stop()