应用数据库
14 个节点
本页内容 14
默认文件名
函数The local database file when nothing names one.
默认文件名() -> 文本
string DefaultFileName()
返回
| 结果 | 文本 |
- 所属发行版
- 元编程(教育版)元编程(专业版)
- 可用的图种类
- 数据流 函数 事件 例程 蓝图 状态机状态
- 声明于
- 应用数据库
- 所属包
- 网络应用
路径变量
函数The variable naming the local database file.
路径变量() -> 文本
string PathVariable()
返回
| 结果 | 文本 |
- 所属发行版
- 元编程(教育版)元编程(专业版)
- 可用的图种类
- 数据流 函数 事件 例程 蓝图 状态机状态
- 声明于
- 应用数据库
- 所属包
- 网络应用
网址变量
函数The variable naming the platform database's address.
网址变量() -> 文本
string UrlVariable()
返回
| 结果 | 文本 |
- 所属发行版
- 元编程(教育版)元编程(专业版)
- 可用的图种类
- 数据流 函数 事件 例程 蓝图 状态机状态
- 声明于
- 应用数据库
- 所属包
- 网络应用
批量执行
函数Runs several statements as one: either all of them take effect, or - when any is refused - none does.
批量执行(语句: Database Statement 数组) -> Database Result 数组
DatabaseResult[] Batch(DatabaseStatement[] statements)
参数
| 名称 | 类型 | 默认值 | 说明 |
|---|---|---|---|
| 语句 | Database Statement 数组 | — |
返回
| 结果 | Database Result 数组 |
- 所属发行版
- 元编程(教育版)元编程(专业版)
- 可用的图种类
- 数据流 函数 事件 例程 蓝图 状态机状态
- 声明于
- 应用数据库
- 所属包
- 网络应用
描述
函数Where this app's database is, in words.
描述() -> 文本
string Describe()
返回
| 结果 | 文本 |
- 所属发行版
- 元编程(教育版)元编程(专业版)
- 可用的图种类
- 数据流 函数 事件 例程 蓝图 状态机状态
- 声明于
- 应用数据库
- 所属包
- 网络应用
执行
函数Runs a statement that changes something - CREATE, INSERT, UPDATE, DELETE - and says how many rows it changed.
执行(SQL: 文本, 参数: 任意数组) -> 大整数
long Execute(string sql, object[] parameters)
参数
| 名称 | 类型 | 默认值 | 说明 |
|---|---|---|---|
| SQL | 文本 | — | The statement, with ? where each value goes. |
| 参数 | 任意数组 | — | The values for the placeholders, in order. |
返回
| 受影响行数 | 大整数 |
- 所属发行版
- 元编程(教育版)元编程(专业版)
- 可用的图种类
- 数据流 函数 事件 例程 蓝图 状态机状态
- 声明于
- 应用数据库
- 所属包
- 网络应用
按名称参数执行
函数Runs a statement that changes something, with its values named as AppDatabase.QueryNamed names them, and says how many rows it changed.
按名称参数执行(SQL: 文本, 值: 文本到文本的字典) -> 大整数
long ExecuteNamed(string sql, Dictionary<string, string> values)
参数
| 名称 | 类型 | 默认值 | 说明 |
|---|---|---|---|
| SQL | 文本 | — | |
| 值 | 文本到文本的字典 | — |
返回
| 受影响行数 | 大整数 |
- 所属发行版
- 元编程(教育版)元编程(专业版)
- 可用的图种类
- 数据流 函数 事件 例程 蓝图 状态机状态
- 声明于
- 应用数据库
- 所属包
- 网络应用
插入
函数Runs a statement that inserts one row and gives back the new row's id.
插入(SQL: 文本, 参数: 任意数组) -> 大整数
long Insert(string sql, object[] parameters)
参数
| 名称 | 类型 | 默认值 | 说明 |
|---|---|---|---|
| SQL | 文本 | — | |
| 参数 | 任意数组 | — |
返回
| 行 ID | 大整数 |
- 所属发行版
- 元编程(教育版)元编程(专业版)
- 可用的图种类
- 数据流 函数 事件 例程 蓝图 状态机状态
- 声明于
- 应用数据库
- 所属包
- 网络应用
按名称参数插入
函数Runs a statement that inserts one row, with its values named as AppDatabase.QueryNamed names them, and gives back the new row's id.
按名称参数插入(SQL: 文本, 值: 文本到文本的字典) -> 大整数
long InsertNamed(string sql, Dictionary<string, string> values)
参数
| 名称 | 类型 | 默认值 | 说明 |
|---|---|---|---|
| SQL | 文本 | — | |
| 值 | 文本到文本的字典 | — |
返回
| 行 ID | 大整数 |
- 所属发行版
- 元编程(教育版)元编程(专业版)
- 可用的图种类
- 数据流 函数 事件 例程 蓝图 状态机状态
- 声明于
- 应用数据库
- 所属包
- 网络应用
查询
函数Runs a statement that reads - a SELECT - and gives back its rows.
查询(SQL: 文本, 参数: 任意数组) -> Database Result
DatabaseResult Query(string sql, object[] parameters)
参数
| 名称 | 类型 | 默认值 | 说明 |
|---|---|---|---|
| SQL | 文本 | — | The statement, with ? where each value goes. |
| 参数 | 任意数组 | — | The values for the placeholders, in order. |
返回
| 结果 | Database Result |
- 所属发行版
- 元编程(教育版)元编程(专业版)
- 可用的图种类
- 数据流 函数 事件 例程 蓝图 状态机状态
- 声明于
- 应用数据库
- 所属包
- 网络应用
按名称参数查询
函数Runs 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.
按名称参数查询 -> Database Result
SQL: 文本
值: 文本到文本的字典DatabaseResult QueryNamed(
string sql,
Dictionary<string, string> values)参数
| 名称 | 类型 | 默认值 | 说明 |
|---|---|---|---|
| SQL | 文本 | — | The statement, with :name (or @name, $name) where each value goes. |
| 值 | 文本到文本的字典 | — | The values by name. |
返回
| 结果 | Database Result |
- 所属发行版
- 元编程(教育版)元编程(专业版)
- 可用的图种类
- 数据流 函数 事件 例程 蓝图 状态机状态
- 声明于
- 应用数据库
- 所属包
- 网络应用
语句
函数A statement for AppDatabase.Batch.
语句(SQL: 文本, 参数: 任意数组) -> Database Statement
DatabaseStatement Statement(string sql, object[] parameters)
参数
| 名称 | 类型 | 默认值 | 说明 |
|---|---|---|---|
| SQL | 文本 | — | |
| 参数 | 任意数组 | — |
返回
| 语句 | Database Statement |
- 所属发行版
- 元编程(教育版)元编程(专业版)
- 可用的图种类
- 数据流 函数 事件 例程 蓝图 状态机状态
- 声明于
- 应用数据库
- 所属包
- 网络应用
使用数据库
函数Uses Provider from now on, closing the one in use. For a host that decides where the database is itself, and for tests.
使用数据库(提供者: I App Database Provider)
void Use(IAppDatabaseProvider provider)
参数
| 名称 | 类型 | 默认值 | 说明 |
|---|---|---|---|
| 提供者 | I App Database Provider | — |
- 所属发行版
- 元编程(教育版)元编程(专业版)
- 可用的图种类
- 数据流 函数 事件 例程 蓝图 状态机状态
- 声明于
- 应用数据库
- 所属包
- 网络应用
设置值
函数The 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.
设置值 -> 文本到文本的字典
值: 文本到文本的字典
名称: 文本
值: 文本Dictionary<string, string> WithValue(
Dictionary<string, string> values,
string name,
string value)参数
| 名称 | 类型 | 默认值 | 说明 |
|---|---|---|---|
| 值 | 文本到文本的字典 | — | The values so far - a handler's Parameters. |
| 名称 | 文本 | — | The name the statement uses for it, without the colon. |
| 值 | 文本 | — | Its value. |
返回
| 值 | 文本到文本的字典 |
备注
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.
- 所属发行版
- 元编程(教育版)元编程(专业版)
- 可用的图种类
- 数据流 函数 事件 例程 蓝图 状态机状态
- 声明于
- 应用数据库
- 所属包
- 网络应用