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 |
Product() |
|
| 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 |
SqlEditorWithContext(props: ) |
|
| 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 |
WithData() |
|
| public |
applyExpr(expr: *, sourceData: *): * |
|
| public |
changeExpr(expr: *, element: *): * |
|
| public |
constructRelationalGraph(expr: *) 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 |
disableOptimization(): * |
|
| 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
import App from 'relational-playground/src/App.js'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:
| Name | Type | Attribute | Description |
| 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:
| Name | Type | Attribute | Description |
| props | * |
public DataContainer() source
import DataContainer from 'relational-playground/src/DataContainer.js'public EditorContainer(props: *) source
import EditorContainer from 'relational-playground/src/EditorContainer.js'Params:
| Name | Type | Attribute | Description |
| props | * |
public GroupBy(props: *) source
import {GroupBy} from 'relational-playground/src/RelOp.js'Group By relational algebra operator
Params:
| Name | Type | Attribute | Description |
| props | * |
Test:
- renders GROUP BY with aggregate only (no grouping columns)
- renders GROUP BY with grouping columns and aggregate
- renders GROUP BY with selected columns and aggregates
- renders GROUP BY with multiple grouping columns
- renders GROUP BY with multiple aggregates
- renders GROUP BY with mixed select columns and aggregates
- handles qualified column names
- renders correctly without selectColumns prop
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:
| Name | Type | Attribute | Description |
| objectPattern | {"aggregateFunction": *} |
|
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:
| Name | Type | Attribute | Description |
| objectPattern | {"aggregateFunction": *, "threshold": *} |
|
public Home(props: *) source
import Home from 'relational-playground/src/Home.js'Container for all components on the main page
Params:
| Name | Type | Attribute | Description |
| props | * |
public Join(props: *) source
import {Join} from 'relational-playground/src/RelOp.js'Params:
| Name | Type | Attribute | Description |
| props | * |
public JustARelation() source
import {JustARelation} from 'relational-playground/src/RelExprTree.stories.js'public MultiTable(props: *) source
import MultiTable from 'relational-playground/src/MultiTable.js'Displays more than one table with a dropdown to choose
Params:
| Name | Type | Attribute | Description |
| 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:
| Name | Type | Attribute | Description |
| props | * |
public Projection(props: *) source
import {Projection} from 'relational-playground/src/RelOp.js'Projection relational algebra operator
Params:
| Name | Type | Attribute | Description |
| props | * |
Test:
public ReactGAProvider(objectPattern: {"children": *, "reactGA": *}) source
import {ReactGAProvider} from 'relational-playground/src/contexts/ReactGAContext.js'Params:
| Name | Type | Attribute | Description |
| objectPattern | {"children": *, "reactGA": *} |
|
public RelExpr(props: *) source
import RelExpr from 'relational-playground/src/RelExpr.js'A graphical representation of a relational algebra expression
Params:
| Name | Type | Attribute | Description |
| props | * |
public RelExprTree(props: *) source
import RelExprTree from 'relational-playground/src/RelExprTree.js'A graphical representation of a relational algebra expression
Params:
| Name | Type | Attribute | Description |
| props | * |
public RelOp(props: *) source
import RelOp from 'relational-playground/src/RelOp.js'Base for all relational algebra operators
Params:
| Name | Type | Attribute | Description |
| props | * |
public Relation(props: *) source
import Relation from 'relational-playground/src/Relation.js'Simple component to display a relation name as part of an expression
Params:
| Name | Type | Attribute | Description |
| props | * |
Test:
public Rename(props: *) source
import {Rename} from 'relational-playground/src/RelOp.js'Rename relational algebra operator
Params:
| Name | Type | Attribute | Description |
| props | * |
public Selection(props: *) source
import {Selection} from 'relational-playground/src/RelOp.js'Selection relational algebra operator
Params:
| Name | Type | Attribute | Description |
| props | * |
public SeveralSources() source
import {SeveralSources} from 'relational-playground/src/MultiTable.stories.js'public SimpleJoin(objectPattern: {"joinType": *}) source
import {SimpleJoin} from 'relational-playground/src/BinaryRelOp.stories.js'Params:
| Name | Type | Attribute | Description |
| objectPattern | {"joinType": *} |
|
public SimpleJoin(objectPattern: {"joinType": *}) source
import {SimpleJoin} from 'relational-playground/src/RelExprTree.stories.js'Params:
| Name | Type | Attribute | Description |
| objectPattern | {"joinType": *} |
|
public SimpleProduct() source
import {SimpleProduct} from 'relational-playground/src/BinaryRelOp.stories.js'public SimpleProjection() source
import {SimpleProjection} from 'relational-playground/src/UnaryRelOp.stories.js'public SimpleRename() source
import {SimpleRename} from 'relational-playground/src/UnaryRelOp.stories.js'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:
| Name | Type | Attribute | Description |
| props | * |
public SqlEditorWithContext(props: ) source
import SqlEditorWithContext from 'relational-playground/src/SqlEditor.js'Params:
| Name | Type | Attribute | Description |
| props |
public Table(props: *) source
import Table from 'relational-playground/src/Table.js'A wrapper for {ReactTable} which sets some default options
Params:
| Name | Type | Attribute | Description |
| props | * |
public Tutorial(props: *) source
import Tutorial from 'relational-playground/src/Tutorial.js'Container for all components of the tutorial
Params:
| Name | Type | Attribute | Description |
| props | * |
public UnaryRelOp(props: *) source
import {UnaryRelOp} from 'relational-playground/src/RelOp.js'Params:
| Name | Type | Attribute | Description |
| props | * |
public applyExpr(expr: *, sourceData: *): * source
import {applyExpr} from 'relational-playground/src/modules/data.js'Params:
| Name | Type | Attribute | Description |
| expr | * | a relational algebra expression to evaluate |
|
| sourceData | * | source data from relations |
Return:
| * | result of evaluating the expression |
public changeExpr(expr: *, element: *): * source
import {changeExpr} from 'relational-playground/src/modules/data.js'Params:
| Name | Type | Attribute | Description |
| 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:
| Name | Type | Attribute | Description |
| expr | * |
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:
| Name | Type | Attribute | Description |
| optimization | * | a string denoting the type of optimization performed |
Return:
| * | a new ENABLE_OPTIMIZATION action |
public exprFromSql(sql: *, types: *): * source
import {exprFromSql} from 'relational-playground/src/modules/relexp.js'Params:
| Name | Type | Attribute | Description |
| 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:
| Name | Type | Attribute | Description |
| 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:
| Name | Type | Attribute | Description |
| prefix | |||
| context | |||
| types | |||
| needsTablePrefix |
public getTableFromAttribute(attribute: , tables: ) source
import {getTableFromAttribute} from 'relational-playground/src/modules/constructRelationalGraph.js'Params:
| Name | Type | Attribute | Description |
| attribute | |||
| tables |
public joinOrderOptimization(graph: *, globalSelections: *): * source
import {joinOrderOptimization} from 'relational-playground/src/modules/joinOrderOptimization.js'Performs join order optimization
Params:
| Name | Type | Attribute | Description |
| 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:
| Name | Type | Attribute | Description |
| text | |||
| cursorPosition |
public reducer(state: *, action: ) source
import reducer from 'relational-playground/src/modules/data.js'Params:
| Name | Type | Attribute | Description |
| state | * |
|
|
| action |
public reducer(state: *, action: ) source
import reducer from 'relational-playground/src/modules/relexp.js'Params:
| Name | Type | Attribute | Description |
| state | * |
|
|
| action |
public resetAction(): ResetAction source
import {resetAction} from 'relational-playground/src/modules/data.js'Return:
| ResetAction |
public useReactGA() source
import {useReactGA} from 'relational-playground/src/contexts/ReactGAContext.js'
