App Database
14 nodes
On this page 14
Default File Name
FunctionThe local database file when nothing names one.
DefaultFileName() -> Text
string DefaultFileName()
Returns
| result | Text |
- Ships with
- Divooka ExploreDivooka Compute
- Graph kinds
- Flows Function Events Routine Constructs StateMachineState
- Declared by
- App Database
- Package
- Web Applications
Path Variable
FunctionThe variable naming the local database file.
PathVariable() -> Text
string PathVariable()
Returns
| result | Text |
- Ships with
- Divooka ExploreDivooka Compute
- Graph kinds
- Flows Function Events Routine Constructs StateMachineState
- Declared by
- App Database
- Package
- Web Applications
Url Variable
FunctionThe variable naming the platform database's address.
UrlVariable() -> Text
string UrlVariable()
Returns
| result | Text |
- Ships with
- Divooka ExploreDivooka Compute
- Graph kinds
- Flows Function Events Routine Constructs StateMachineState
- Declared by
- App Database
- Package
- Web Applications
Batch
FunctionRuns several statements as one: either all of them take effect, or - when any is refused - none does.
Batch(statements: Database Statement Array) -> Database Result Array
DatabaseResult[] Batch(DatabaseStatement[] statements)
Parameters
| name | type | default | description |
|---|---|---|---|
| statements | Database Statement Array | — |
Returns
| Results | Database Result Array |
- Ships with
- Divooka ExploreDivooka Compute
- Graph kinds
- Flows Function Events Routine Constructs StateMachineState
- Declared by
- App Database
- Package
- Web Applications
Describe
FunctionWhere this app's database is, in words.
Describe() -> Text
string Describe()
Returns
| result | Text |
- Ships with
- Divooka ExploreDivooka Compute
- Graph kinds
- Flows Function Events Routine Constructs StateMachineState
- Declared by
- App Database
- Package
- Web Applications
Execute
FunctionRuns a statement that changes something - CREATE, INSERT, UPDATE, DELETE - and says how many rows it changed.
Execute(SQL: Text, parameters: Any Array) -> Large Integer
long Execute(string sql, object[] parameters)
Parameters
| name | type | default | description |
|---|---|---|---|
| SQL | Text | — | The statement, with ? where each value goes. |
| parameters | Any Array | — | The values for the placeholders, in order. |
Returns
| Rows Affected | Large Integer |
- Ships with
- Divooka ExploreDivooka Compute
- Graph kinds
- Flows Function Events Routine Constructs StateMachineState
- Declared by
- App Database
- Package
- Web Applications
Execute Named
FunctionRuns a statement that changes something, with its values named as AppDatabase.QueryNamed names them, and says how many rows it changed.
ExecuteNamed -> Large Integer
SQL: Text
values: Dictionary of Text to Textlong ExecuteNamed(string sql, Dictionary<string, string> values)
Parameters
| name | type | default | description |
|---|---|---|---|
| SQL | Text | — | |
| values | Dictionary of Text to Text | — |
Returns
| Rows Affected | Large Integer |
- Ships with
- Divooka ExploreDivooka Compute
- Graph kinds
- Flows Function Events Routine Constructs StateMachineState
- Declared by
- App Database
- Package
- Web Applications
Insert
FunctionRuns a statement that inserts one row and gives back the new row's id.
Insert(SQL: Text, parameters: Any Array) -> Large Integer
long Insert(string sql, object[] parameters)
Parameters
| name | type | default | description |
|---|---|---|---|
| SQL | Text | — | |
| parameters | Any Array | — |
Returns
| Row Id | Large Integer |
- Ships with
- Divooka ExploreDivooka Compute
- Graph kinds
- Flows Function Events Routine Constructs StateMachineState
- Declared by
- App Database
- Package
- Web Applications
Insert Named
FunctionRuns a statement that inserts one row, with its values named as AppDatabase.QueryNamed names them, and gives back the new row's id.
InsertNamed -> Large Integer
SQL: Text
values: Dictionary of Text to Textlong InsertNamed(string sql, Dictionary<string, string> values)
Parameters
| name | type | default | description |
|---|---|---|---|
| SQL | Text | — | |
| values | Dictionary of Text to Text | — |
Returns
| Row Id | Large Integer |
- Ships with
- Divooka ExploreDivooka Compute
- Graph kinds
- Flows Function Events Routine Constructs StateMachineState
- Declared by
- App Database
- Package
- Web Applications
Query
FunctionRuns a statement that reads - a SELECT - and gives back its rows.
Query(SQL: Text, parameters: Any Array) -> Database Result
DatabaseResult Query(string sql, object[] parameters)
Parameters
| name | type | default | description |
|---|---|---|---|
| SQL | Text | — | The statement, with ? where each value goes. |
| parameters | Any Array | — | The values for the placeholders, in order. |
Returns
| Result | Database Result |
- Ships with
- Divooka ExploreDivooka Compute
- Graph kinds
- Flows Function Events Routine Constructs StateMachineState
- Declared by
- App Database
- Package
- Web Applications
Query Named
FunctionRuns a statement that reads, with its values named: :name in the SQL takes the value of name in Values - a web request's parameters, as an endpoint's handler receives them.
QueryNamed -> Database Result
SQL: Text
values: Dictionary of Text to TextDatabaseResult QueryNamed(
string sql,
Dictionary<string, string> values)Parameters
| name | type | default | description |
|---|---|---|---|
| SQL | Text | — | The statement, with :name (or @name, $name) where each value goes. |
| values | Dictionary of Text to Text | — | The values by name. |
Returns
| Result | Database Result |
- Ships with
- Divooka ExploreDivooka Compute
- Graph kinds
- Flows Function Events Routine Constructs StateMachineState
- Declared by
- App Database
- Package
- Web Applications
Statement
FunctionA statement for AppDatabase.Batch.
Statement -> Database Statement
SQL: Text
parameters: Any ArrayDatabaseStatement Statement(string sql, object[] parameters)
Parameters
| name | type | default | description |
|---|---|---|---|
| SQL | Text | — | |
| parameters | Any Array | — |
Returns
| Statement | Database Statement |
- Ships with
- Divooka ExploreDivooka Compute
- Graph kinds
- Flows Function Events Routine Constructs StateMachineState
- Declared by
- App Database
- Package
- Web Applications
Use
FunctionUses Provider from now on, closing the one in use. For a host that decides where the database is itself, and for tests.
Use(provider: I App Database Provider)
void Use(IAppDatabaseProvider provider)
Parameters
| name | type | default | description |
|---|---|---|---|
| provider | I App Database Provider | — |
- Ships with
- Divooka ExploreDivooka Compute
- Graph kinds
- Flows Function Events Routine Constructs StateMachineState
- Declared by
- App Database
- Package
- Web Applications
With Value
FunctionThe values with one more - or one replaced - for a named statement: a request's parameters plus what the handler worked out, a password's hash or a time, without changing the request's own.
WithValue -> Dictionary of Text to Text
values: Dictionary of Text to Text
name: Text
value: TextDictionary<string, string> WithValue(
Dictionary<string, string> values,
string name,
string value)Parameters
| name | type | default | description |
|---|---|---|---|
| values | Dictionary of Text to Text | — | The values so far - a handler's Parameters. |
| name | Text | — | The name the statement uses for it, without the colon. |
| value | Text | — | Its value. |
Returns
| Values | Dictionary of Text to Text |
Remarks
A handler is a Function graph, which cannot add to a dictionary in place; this answers a new one, so a value the handler computed reaches :name as the request's fields do, rather than being spliced into the SQL text.
- Ships with
- Divooka ExploreDivooka Compute
- Graph kinds
- Flows Function Events Routine Constructs StateMachineState
- Declared by
- App Database
- Package
- Web Applications