Home Reference Source Repository
import Table from 'wyst/es6/utils/Table.js'
public class | source

Table

Extends:

eventemitter2~EventEmitterExpressive → Table

Direct Subclass:

Discovery, Job, Registry

Some useful table extensions for Thinky

Static Member Summary

Static Public Members
public static get

table: Thinky:Table: *

returns a reference to the raw Table object

public static get

returns what the table name is, useful for raw r commands

Static Method Summary

Static Public Methods
public static

createModel(config: Array): *

creates a Thinky model

public static

drop(): *

drops this table on the database, primarily used to clean up after tests

public static

empty(): *

empties all rows from the table

public static

row(attrs: Object): *

creates a new row on this Table

Constructor Summary

Public Constructor
public

emits when the table is online, for any interested Listeners

Member Summary

Public Members
public

table: *

Inherited Summary

From class Expressive
public static

create(): *

creates a new inherited instance

public

debug: *

public

is(state: string): *

expressive emit

public

when(): *

expressive once

Static Public Members

public static get table: Thinky:Table: * source

returns a reference to the raw Table object

Return:

Thinky:Table

The table

public static get tableName: * source

returns what the table name is, useful for raw r commands

Static Public Methods

public static createModel(config: Array): * source

creates a Thinky model

Params:

NameTypeAttributeDescription
config Array

The accepts the same arguments as thinky.createModel

Return:

*

public static drop(): * source

drops this table on the database, primarily used to clean up after tests

Return:

*

public static empty(): * source

empties all rows from the table

Return:

*

public static row(attrs: Object): * source

creates a new row on this Table

Params:

NameTypeAttributeDescription
attrs Object

The attributes for the row

Return:

*

Public Constructors

public constructor source

emits when the table is online, for any interested Listeners

Override:

Expressive#constructor

Public Members

public table: * source