Session
Class: Session
Section titled “Class: Session”Contains methods that are published globally, so can be invoked anywhere in the /definitions
folder of a sqlanvil project.
Hierarchy
Section titled “Hierarchy”- Session
Properties
Section titled “Properties”Methods
Section titled “Methods”Properties
Section titled “Properties”projectConfig
Section titled “projectConfig”• projectConfig: ProjectConfig
Stores the sqlanvil project configuration of the current sqlanvil project. Can be accessed via
the sqlanvil global variable.
Example:
sqlanvil.projectConfig.vars.myVariableName === "myVariableValue"Methods
Section titled “Methods”assert
Section titled “assert”▸ assert(name: string, queryOrConfig?: AContextable‹string› | AssertionConfig): Assertion
Adds a sqlanvil assertion the compiled graph.
Available only in the /definitions directory.
see assertion for examples on how to use.
Parameters:
| Name | Type |
|---|---|
name | string |
queryOrConfig? | AContextable‹string› | AssertionConfig |
Returns: Assertion
declare
Section titled “declare”▸ declare(config: DeclarationConfig | any): Declaration
Declares the dataset as a sqlanvil data source.
Available only in the /definitions directory.
see Declaration for examples on how to use.
Parameters:
| Name | Type |
|---|---|
config | DeclarationConfig | any |
Returns: Declaration
notebook
Section titled “notebook”▸ notebook(config: NotebookConfig): Notebook
Creates a Notebook action.
Available only in the /definitions directory.
see Notebook for examples on how to use.
Parameters:
| Name | Type |
|---|---|
config | NotebookConfig |
Returns: Notebook
operate
Section titled “operate”▸ operate(name: string, queryOrConfig?: Contextable‹IActionContext, string | string[]› | OperationConfig): Operation
Defines a SQL operation.
Available only in the /definitions directory.
see operation for examples on how to use.
Parameters:
| Name | Type |
|---|---|
name | string |
queryOrConfig? | Contextable‹IActionContext, string | string[]› | OperationConfig |
Returns: Operation
publish
Section titled “publish”▸ publish(name: string, queryOrConfig?: Contextable‹ITableContext, string› | TableConfig | ViewConfig | IncrementalTableConfig | ILegacyTableConfig | any): Table | IncrementalTable | View
Creates a table, view, or incremental table.
Available only in the /definitions directory.
see Operation for examples on how to make tables.
see View for examples on how to make views.
see IncrementalTable for examples on how to make incremental tables.
Parameters:
| Name | Type |
|---|---|
name | string |
queryOrConfig? | Contextable‹ITableContext, string› | TableConfig | ViewConfig | IncrementalTableConfig | ILegacyTableConfig | any |
Returns: Table | IncrementalTable | View
▸ test(name: string): Test
Creates a Test action.
Available only in the /definitions directory.
see Test for examples on how to use.
Parameters:
| Name | Type |
|---|---|
name | string |
Returns: Test