Home Reference Source Repository
import PostgresqlFacade from 'schema-mapper-driver-postgresql'
public class | source

PostgresqlFacade

You can directly use instance of this class. postgresqlFacade

PostgresqlFacade

Constructor Summary

Public Constructor
public

constructor(config: Object)

Create a new PostgresqlFacade instance

Member Summary

Public Members
public

adapter: *

public

dropper: *

public
public
public
public

syncer: *

Method Summary

Public Methods
public

delItem(itemId: String, schema: Schema, metadata: Metadata): Promise

Remove an item.

public

drop(projectId: String, projectVersion: Number): Promise

Drop postgresql database.

public

migrate(projectId: String, oldProject: Project, project: Project, changes: Array): Promise

Create a new postgresql database and it's tables.

public

putItem(item: Item, schema: Schema, metadata: Metadata): Promise

Insert / update item.

Public Constructors

public constructor(config: Object) source

Create a new PostgresqlFacade instance

Params:

NameTypeAttributeDescription
config Object

Public Members

public adapter: * source

public dropper: * source

public migrator: * source

public repository: * source

public serializer: * source

public syncer: * source

Public Methods

public delItem(itemId: String, schema: Schema, metadata: Metadata): Promise source

Remove an item.

Params:

NameTypeAttributeDescription
itemId String

The id of the item

schema Schema

The schema for the name and primary properties.

metadata Metadata

An object with a projectName and projectVersion property.

Return:

Promise

public drop(projectId: String, projectVersion: Number): Promise source

Drop postgresql database.

Params:

NameTypeAttributeDescription
projectId String
projectVersion Number

Return:

Promise

public migrate(projectId: String, oldProject: Project, project: Project, changes: Array): Promise source

Create a new postgresql database and it's tables.

Params:

NameTypeAttributeDescription
projectId String
oldProject Project
project Project
changes Array

Return:

Promise

public putItem(item: Item, schema: Schema, metadata: Metadata): Promise source

Insert / update item.

Params:

NameTypeAttributeDescription
item Item

The item to store

schema Schema

The schema for the name and primary properties.

metadata Metadata

An object with a projectName and projectVersion property.

Return:

Promise