Home Reference Source Test

Function

Static Public Summary
public

App()

A container for all routes in the app (currently only one)

public

BinaryRelOp(props: *)

public
public
public

CurrentRelExpr(props: *)

public
public

EditorContainer(props: *)

public

Except()

public

GroupBy(props: *)

Group By relational algebra operator

public
public

GroupByWithAggregates(objectPattern: {"aggregateFunction": *})

public
public

GroupByWithHaving(objectPattern: {"aggregateFunction": *, "threshold": *})

public

Home(props: *)

Container for all components on the main page

public
public

Join(props: *)

public
public

MultiTable(props: *)

Displays more than one table with a dropdown to choose

public
public

OrderBy(props: *)

public
public

Projection(props: *)

Projection relational algebra operator

public

ReactGAProvider(objectPattern: {"children": *, "reactGA": *})

public

RelExpr(props: *)

A graphical representation of a relational algebra expression

public

RelExprTree(props: *)

A graphical representation of a relational algebra expression

public

RelOp(props: *)

Base for all relational algebra operators

public

Relation(props: *)

Simple component to display a relation name as part of an expression

public

Rename(props: *)

Rename relational algebra operator

public

Selection(props: *)

Selection relational algebra operator

public
public

SimpleJoin(objectPattern: {"joinType": *})

public

SimpleJoin(objectPattern: {"joinType": *})

public
public
public
public
public

SourceMultiTable(props: *)

public
public

Table(props: *)

A wrapper for {ReactTable} which sets some default options

public

Tutorial(props: *)

Container for all components of the tutorial

public

UnaryRelOp(props: *)

public

Union()

public
public

applyExpr(expr: *, sourceData: *): *

public

changeExpr(expr: *, element: *): *

public

Constructs a relational graph from the expr Nodes will have (tableName and selection criteria if any on that table) Edges are the join relations

public
public

enableOptimization(optimization: *): *

public

exprFromSql(sql: *, types: *): *

public

exprToString(expr: *, top: *): *

public

generateSuggestions(prefix: , context: , types: , needsTablePrefix: )

Generate autocomplete suggestions based on available tables and columns

public

getTableFromAttribute(attribute: , tables: )

public

joinOrderOptimization(graph: *, globalSelections: *): *

Performs join order optimization

public

parseForAutocomplete(text: , cursorPosition: )

Parse SQL text to detect table/column references being typed

public

reducer(state: *, action: )

public

reducer(state: *, action: )

public

resetAction(): ResetAction

public

Static Public

public App() source

A container for all routes in the app (currently only one)

Test:

public BinaryRelOp(props: *) source

import {BinaryRelOp} from 'relational-playground/src/RelOp.js'

Params:

NameTypeAttributeDescription
props *

public ComplexExpression() source

import {ComplexExpression} from 'relational-playground/src/RelExpr.stories.js'

public ComplexExpression() source

import {ComplexExpression} from 'relational-playground/src/RelExprTree.stories.js'

public CurrentRelExpr(props: *) source

import CurrentRelExpr from 'relational-playground/src/CurrentRelExpr.js'

Params:

NameTypeAttributeDescription
props *

Test:

public EditorContainer(props: *) source

import EditorContainer from 'relational-playground/src/EditorContainer.js'

Params:

NameTypeAttributeDescription
props *

public Except() source

import {Except} from 'relational-playground/src/RelOp.js'

Test:

public GroupByMultipleAggregates() source

import {GroupByMultipleAggregates} from 'relational-playground/src/RelExprTree.stories.js'

public GroupByWithAggregates(objectPattern: {"aggregateFunction": *}) source

import {GroupByWithAggregates} from 'relational-playground/src/RelExprTree.stories.js'

Params:

NameTypeAttributeDescription
objectPattern {"aggregateFunction": *}
  • default: {"aggregateFunction":null}

public GroupByWithComplexHaving() source

import {GroupByWithComplexHaving} from 'relational-playground/src/RelExprTree.stories.js'

public GroupByWithHaving(objectPattern: {"aggregateFunction": *, "threshold": *}) source

import {GroupByWithHaving} from 'relational-playground/src/RelExprTree.stories.js'

Params:

NameTypeAttributeDescription
objectPattern {"aggregateFunction": *, "threshold": *}
  • default: {"aggregateFunction":null,"threshold":null}

public Home(props: *) source

Container for all components on the main page

Params:

NameTypeAttributeDescription
props *

public Intersect() source

import {Intersect} from 'relational-playground/src/RelOp.js'

Test:

public Join(props: *) source

Params:

NameTypeAttributeDescription
props *

Test:

public JustARelation() source

public MultiTable(props: *) source

Displays more than one table with a dropdown to choose

Params:

NameTypeAttributeDescription
props *

public NestedOperations() source

import {NestedOperations} from 'relational-playground/src/UnaryRelOp.stories.js'

public OrderBy(props: *) source

import {OrderBy} from 'relational-playground/src/RelOp.js'

Params:

NameTypeAttributeDescription
props *

public Product() source

import {Product} from 'relational-playground/src/RelOp.js'

Test:

public Projection(props: *) source

import {Projection} from 'relational-playground/src/RelOp.js'

Projection relational algebra operator

Params:

NameTypeAttributeDescription
props *

Test:

public ReactGAProvider(objectPattern: {"children": *, "reactGA": *}) source

Params:

NameTypeAttributeDescription
objectPattern {"children": *, "reactGA": *}
  • default: {"children":null,"reactGA":null}

public RelExprTree(props: *) source

A graphical representation of a relational algebra expression

Params:

NameTypeAttributeDescription
props *

Test:

public RelOp(props: *) source

Base for all relational algebra operators

Params:

NameTypeAttributeDescription
props *

public Relation(props: *) source

Simple component to display a relation name as part of an expression

Params:

NameTypeAttributeDescription
props *

Test:

public Rename(props: *) source

import {Rename} from 'relational-playground/src/RelOp.js'

Rename relational algebra operator

Params:

NameTypeAttributeDescription
props *

Test:

public Selection(props: *) source

import {Selection} from 'relational-playground/src/RelOp.js'

Selection relational algebra operator

Params:

NameTypeAttributeDescription
props *

Test:

public SeveralSources() source

public SimpleJoin(objectPattern: {"joinType": *}) source

Params:

NameTypeAttributeDescription
objectPattern {"joinType": *}
  • default: {"joinType":null}

public SimpleJoin(objectPattern: {"joinType": *}) source

Params:

NameTypeAttributeDescription
objectPattern {"joinType": *}
  • default: {"joinType":null}

public SimpleProduct() source

public SimpleProjection() source

import {SimpleProjection} from 'relational-playground/src/UnaryRelOp.stories.js'

public SimpleRename() source

public SimpleSelection() source

import {SimpleSelection} from 'relational-playground/src/UnaryRelOp.stories.js'

public SourceMultiTable(props: *) source

import SourceMultiTable from 'relational-playground/src/SourceMultiTable.js'

Params:

NameTypeAttributeDescription
props *

public SqlEditorWithContext(props: ) source

import SqlEditorWithContext from 'relational-playground/src/SqlEditor.js'

Params:

NameTypeAttributeDescription
props

public Table(props: *) source

A wrapper for {ReactTable} which sets some default options

Params:

NameTypeAttributeDescription
props *

Test:

public Tutorial(props: *) source

Container for all components of the tutorial

Params:

NameTypeAttributeDescription
props *

Test:

public UnaryRelOp(props: *) source

import {UnaryRelOp} from 'relational-playground/src/RelOp.js'

Params:

NameTypeAttributeDescription
props *

public Union() source

Test:

public WithData() source

public applyExpr(expr: *, sourceData: *): * source

Params:

NameTypeAttributeDescription
expr *

a relational algebra expression to evaluate

sourceData *

source data from relations

Return:

*

result of evaluating the expression

public changeExpr(expr: *, element: *): * source

Params:

NameTypeAttributeDescription
expr *

a relational algebra expression object

element *

Return:

*

a new CHANGE_EXPR action

public constructRelationalGraph(expr: *) source

import {constructRelationalGraph} from 'relational-playground/src/modules/constructRelationalGraph.js'

Constructs a relational graph from the expr Nodes will have (tableName and selection criteria if any on that table) Edges are the join relations

Params:

NameTypeAttributeDescription
expr *

Test:

public disableOptimization(): * source

import {disableOptimization} from 'relational-playground/src/modules/relexp.js'

Return:

*

a new DISABLE_OPTIMIZATION action

public enableOptimization(optimization: *): * source

import {enableOptimization} from 'relational-playground/src/modules/relexp.js'

Params:

NameTypeAttributeDescription
optimization *

a string denoting the type of optimization performed

Return:

*

a new ENABLE_OPTIMIZATION action

public exprFromSql(sql: *, types: *): * source

Params:

NameTypeAttributeDescription
sql *

a parsed SQL query

types *

an object mapping table names to lists of columns

Return:

*

a new EXPR_FROM_SQL action

public exprToString(expr: *, top: *): * source

import {exprToString} from 'relational-playground/src/util.js'

Params:

NameTypeAttributeDescription
expr *

an object representing an expression

top *

whether this is a top-level expression - to avoid unneccessary ()

Return:

*

a string representing a query condition

public generateSuggestions(prefix: , context: , types: , needsTablePrefix: ) source

import {generateSuggestions} from 'relational-playground/src/SqlAutocomplete.js'

Generate autocomplete suggestions based on available tables and columns

Params:

NameTypeAttributeDescription
prefix
context
types
needsTablePrefix

public getTableFromAttribute(attribute: , tables: ) source

Params:

NameTypeAttributeDescription
attribute
tables

public joinOrderOptimization(graph: *, globalSelections: *): * source

Performs join order optimization

Params:

NameTypeAttributeDescription
graph *

the relational graph

globalSelections *

the global selections

Return:

*

the relational expression

public parseForAutocomplete(text: , cursorPosition: ) source

import {parseForAutocomplete} from 'relational-playground/src/SqlAutocomplete.js'

Parse SQL text to detect table/column references being typed

Params:

NameTypeAttributeDescription
text
cursorPosition

public reducer(state: *, action: ) source

Params:

NameTypeAttributeDescription
state *
  • optional
  • default: initialState
action

public reducer(state: *, action: ) source

Params:

NameTypeAttributeDescription
state *
  • optional
  • default: initialState
action

public resetAction(): ResetAction source

import {resetAction} from 'relational-playground/src/modules/data.js'

Return:

ResetAction

public useReactGA() source