Skip to content

Commit 81cebbf

Browse files
committed
Merge branch 'main' into json_table_advanced_column_types
2 parents 9b984d8 + 239eea9 commit 81cebbf

File tree

1 file changed

+14
-0
lines changed

1 file changed

+14
-0
lines changed

src/ast/query.rs

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2276,6 +2276,12 @@ impl fmt::Display for ForJson {
22762276
}
22772277

22782278
/// A single column definition in MySQL's `JSON_TABLE` table valued function.
2279+
///
2280+
/// See
2281+
/// - [MySQL's JSON_TABLE documentation](https://dev.mysql.com/doc/refman/8.0/en/json-table-functions.html#function_json-table)
2282+
/// - [Oracle's JSON_TABLE documentation](https://docs.oracle.com/en/database/oracle/oracle-database/21/sqlrf/JSON_TABLE.html)
2283+
/// - [MariaDB's JSON_TABLE documentation](https://mariadb.com/kb/en/json_table/)
2284+
///
22792285
/// ```sql
22802286
/// SELECT *
22812287
/// FROM JSON_TABLE(
@@ -2293,8 +2299,11 @@ impl fmt::Display for ForJson {
22932299
#[cfg_attr(feature = "visitor", derive(Visit, VisitMut))]
22942300
#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
22952301
pub enum JsonTableColumn {
2302+
/// A named column with a JSON path
22962303
Named(JsonTableNamedColumn),
2304+
/// The FOR ORDINALITY column, which is a special column that returns the index of the current row in a JSON array.
22972305
ForOrdinality(Ident),
2306+
/// A set of nested columns, which extracts data from a nested JSON array.
22982307
Nested(JsonTableNestedColumn),
22992308
}
23002309

@@ -2313,6 +2322,8 @@ impl fmt::Display for JsonTableColumn {
23132322
}
23142323

23152324
/// A nested column in a JSON_TABLE column list
2325+
///
2326+
/// See <https://mariadb.com/kb/en/json_table/#nested-paths>
23162327
#[derive(Debug, Clone, PartialEq, PartialOrd, Eq, Ord, Hash)]
23172328
#[cfg_attr(feature = "visitor", derive(Visit, VisitMut))]
23182329
#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
@@ -2333,6 +2344,9 @@ impl fmt::Display for JsonTableNestedColumn {
23332344
}
23342345

23352346
/// A single column definition in MySQL's `JSON_TABLE` table valued function.
2347+
///
2348+
/// See <https://mariadb.com/kb/en/json_table/#path-columns>
2349+
///
23362350
/// ```sql
23372351
/// value VARCHAR(20) PATH '$'
23382352
/// ```

0 commit comments

Comments
 (0)