sqlglot expressions - JSON functions.
1"""sqlglot expressions - JSON functions.""" 2 3from __future__ import annotations 4 5from sqlglot.expressions.core import Expression, Func, AggFunc, Binary, Predicate 6 7 8class CheckJson(Expression, Func): 9 arg_types = {"this": True} 10 11 12class JSONArray(Expression, Func): 13 arg_types = { 14 "expressions": False, 15 "null_handling": False, 16 "return_type": False, 17 "strict": False, 18 } 19 is_var_len_args = True 20 21 22class JSONArrayAgg(Expression, AggFunc): 23 arg_types = { 24 "this": True, 25 "order": False, 26 "null_handling": False, 27 "return_type": False, 28 "strict": False, 29 } 30 31 32class JSONArrayAppend(Expression, Func): 33 arg_types = {"this": True, "expressions": True} 34 is_var_len_args = True 35 _sql_names = ["JSON_ARRAY_APPEND"] 36 37 38class JSONArrayContains(Expression, Binary, Predicate, Func): 39 arg_types = {"this": True, "expression": True, "json_type": False} 40 _sql_names = ["JSON_ARRAY_CONTAINS"] 41 42 43class JSONArrayInsert(Expression, Func): 44 arg_types = {"this": True, "expressions": True} 45 is_var_len_args = True 46 _sql_names = ["JSON_ARRAY_INSERT"] 47 48 49class JSONBContains(Expression, Binary, Predicate, Func): 50 _sql_names = ["JSONB_CONTAINS"] 51 52 53class JSONBContainsAllTopKeys(Expression, Binary, Predicate, Func): 54 pass 55 56 57class JSONBContainsTopKey(Expression, Binary, Predicate, Func): 58 pass 59 60 61class JSONBContainsAnyTopKeys(Expression, Binary, Predicate, Func): 62 pass 63 64 65class JSONBDeleteAtPath(Expression, Binary, Func): 66 pass 67 68 69class JSONBPathExists(Expression, Binary, Predicate, Func): 70 pass 71 72 73class JSONBExists(Expression, Func): 74 arg_types = {"this": True, "path": True} 75 _sql_names = ["JSONB_EXISTS"] 76 77 78class JSONBExtract(Expression, Binary, Func): 79 _sql_names = ["JSONB_EXTRACT"] 80 81 82class JSONBExtractScalar(Expression, Binary, Func): 83 arg_types = {"this": True, "expression": True, "json_type": False} 84 _sql_names = ["JSONB_EXTRACT_SCALAR"] 85 86 87class JSONBObjectAgg(Expression, AggFunc): 88 arg_types = {"this": True, "expression": True} 89 90 91class JSONBool(Expression, Func): 92 pass 93 94 95class JSONExists(Expression, Func): 96 arg_types = { 97 "this": True, 98 "path": True, 99 "passing": False, 100 "on_condition": False, 101 "from_dcolonqmark": False, 102 } 103 104 105class JSONExtract(Expression, Binary, Func): 106 arg_types = { 107 "this": True, 108 "expression": True, 109 "only_json_types": False, 110 "expressions": False, 111 "variant_extract": False, 112 "json_query": False, 113 "option": False, 114 "quote": False, 115 "on_condition": False, 116 "requires_json": False, 117 "emits": False, 118 } 119 _sql_names = ["JSON_EXTRACT"] 120 is_var_len_args = True 121 122 @property 123 def output_name(self) -> str: 124 return self.expression.output_name if not self.expressions else "" 125 126 127class JSONExtractArray(Expression, Func): 128 arg_types = {"this": True, "expression": False} 129 _sql_names = ["JSON_EXTRACT_ARRAY"] 130 131 132class JSONExtractScalar(Expression, Binary, Func): 133 arg_types = { 134 "this": True, 135 "expression": True, 136 "only_json_types": False, 137 "expressions": False, 138 "json_type": False, 139 "scalar_only": False, 140 "json_subtype": False, 141 } 142 _sql_names = ["JSON_EXTRACT_SCALAR"] 143 is_var_len_args = True 144 145 @property 146 def output_name(self) -> str: 147 return self.expression.output_name 148 149 150class JSONFormat(Expression, Func): 151 arg_types = {"this": False, "options": False, "is_json": False, "to_json": False} 152 _sql_names = ["JSON_FORMAT"] 153 154 155class JSONKeys(Expression, Func): 156 arg_types = {"this": True, "expression": False, "expressions": False} 157 is_var_len_args = True 158 _sql_names = ["JSON_KEYS"] 159 160 161class JSONKeysAtDepth(Expression, Func): 162 arg_types = {"this": True, "expression": False, "mode": False} 163 164 165class JSONObject(Expression, Func): 166 arg_types = { 167 "expressions": False, 168 "null_handling": False, 169 "unique_keys": False, 170 "return_type": False, 171 "encoding": False, 172 } 173 174 175class JSONObjectAgg(Expression, AggFunc): 176 arg_types = { 177 "expressions": False, 178 "null_handling": False, 179 "unique_keys": False, 180 "return_type": False, 181 "encoding": False, 182 } 183 184 185class JSONRemove(Expression, Func): 186 arg_types = {"this": True, "expressions": True} 187 is_var_len_args = True 188 _sql_names = ["JSON_REMOVE"] 189 190 191class JSONSet(Expression, Func): 192 arg_types = {"this": True, "expressions": True} 193 is_var_len_args = True 194 _sql_names = ["JSON_SET"] 195 196 197class JSONStripNulls(Expression, Func): 198 arg_types = { 199 "this": True, 200 "expression": False, 201 "include_arrays": False, 202 "remove_empty": False, 203 } 204 _sql_names = ["JSON_STRIP_NULLS"] 205 206 207class StripNullValue(Expression, Func): 208 pass 209 210 211class JSONTable(Expression, Func): 212 arg_types = { 213 "this": True, 214 "schema": True, 215 "path": False, 216 "error_handling": False, 217 "empty_handling": False, 218 } 219 220 221class JSONType(Expression, Func): 222 arg_types = {"this": True, "expression": False} 223 _sql_names = ["JSON_TYPE"] 224 225 226class ObjectId(Expression, Func): 227 arg_types = {"this": True, "expression": False} 228 229 230class ObjectInsert(Expression, Func): 231 arg_types = { 232 "this": True, 233 "key": True, 234 "value": True, 235 "update_flag": False, 236 } 237 238 239class OpenJSON(Expression, Func): 240 arg_types = {"this": True, "path": False, "expressions": False} 241 242 243class ParseJSON(Expression, Func): 244 # BigQuery, Snowflake have PARSE_JSON, Presto has JSON_PARSE 245 # Snowflake also has TRY_PARSE_JSON, which is represented using `safe` 246 _sql_names = ["PARSE_JSON", "JSON_PARSE"] 247 arg_types = {"this": True, "expression": False, "safe": False}
Inherited Members
- sqlglot.expressions.core.Expr
- Expr
- is_subquery
- is_cast
- is_data_type
- is_primitive
- dump
- load
- pipe
- apply
- sqlglot.expressions.core.Expression
- this
- expression
- expressions
- text
- is_string
- is_number
- to_py
- is_int
- is_star
- alias
- alias_column_names
- name
- alias_or_name
- output_name
- type
- is_type
- is_leaf
- meta
- meta_get
- copy
- add_comments
- pop_comments
- append
- set
- set_kwargs
- depth
- iter_expressions
- find
- find_all
- find_ancestor
- parent_select
- same_parent
- root
- walk
- dfs
- bfs
- unnest
- unalias
- unnest_operands
- flatten
- to_s
- sql
- transform
- replace
- pop
- assert_is
- error_messages
- and_
- or_
- not_
- update_positions
- as_
- isin
- between
- is_
- like
- ilike
- eq
- neq
- rlike
- div
- asc
- desc
- args
- parent
- arg_key
- index
- comments
13class JSONArray(Expression, Func): 14 arg_types = { 15 "expressions": False, 16 "null_handling": False, 17 "return_type": False, 18 "strict": False, 19 } 20 is_var_len_args = True
Inherited Members
- sqlglot.expressions.core.Expr
- Expr
- is_subquery
- is_cast
- is_data_type
- is_primitive
- dump
- load
- pipe
- apply
- sqlglot.expressions.core.Expression
- this
- expression
- expressions
- text
- is_string
- is_number
- to_py
- is_int
- is_star
- alias
- alias_column_names
- name
- alias_or_name
- output_name
- type
- is_type
- is_leaf
- meta
- meta_get
- copy
- add_comments
- pop_comments
- append
- set
- set_kwargs
- depth
- iter_expressions
- find
- find_all
- find_ancestor
- parent_select
- same_parent
- root
- walk
- dfs
- bfs
- unnest
- unalias
- unnest_operands
- flatten
- to_s
- sql
- transform
- replace
- pop
- assert_is
- error_messages
- and_
- or_
- not_
- update_positions
- as_
- isin
- between
- is_
- like
- ilike
- eq
- neq
- rlike
- div
- asc
- desc
- args
- parent
- arg_key
- index
- comments
23class JSONArrayAgg(Expression, AggFunc): 24 arg_types = { 25 "this": True, 26 "order": False, 27 "null_handling": False, 28 "return_type": False, 29 "strict": False, 30 }
arg_types =
{'this': True, 'order': False, 'null_handling': False, 'return_type': False, 'strict': False}
Inherited Members
- sqlglot.expressions.core.Expr
- Expr
- is_subquery
- is_cast
- is_data_type
- is_primitive
- dump
- load
- pipe
- apply
- sqlglot.expressions.core.Expression
- this
- expression
- expressions
- text
- is_string
- is_number
- to_py
- is_int
- is_star
- alias
- alias_column_names
- name
- alias_or_name
- output_name
- type
- is_type
- is_leaf
- meta
- meta_get
- copy
- add_comments
- pop_comments
- append
- set
- set_kwargs
- depth
- iter_expressions
- find
- find_all
- find_ancestor
- parent_select
- same_parent
- root
- walk
- dfs
- bfs
- unnest
- unalias
- unnest_operands
- flatten
- to_s
- sql
- transform
- replace
- pop
- assert_is
- error_messages
- and_
- or_
- not_
- update_positions
- as_
- isin
- between
- is_
- like
- ilike
- eq
- neq
- rlike
- div
- asc
- desc
- args
- parent
- arg_key
- index
- comments
33class JSONArrayAppend(Expression, Func): 34 arg_types = {"this": True, "expressions": True} 35 is_var_len_args = True 36 _sql_names = ["JSON_ARRAY_APPEND"]
Inherited Members
- sqlglot.expressions.core.Expr
- Expr
- is_subquery
- is_cast
- is_data_type
- is_primitive
- dump
- load
- pipe
- apply
- sqlglot.expressions.core.Expression
- this
- expression
- expressions
- text
- is_string
- is_number
- to_py
- is_int
- is_star
- alias
- alias_column_names
- name
- alias_or_name
- output_name
- type
- is_type
- is_leaf
- meta
- meta_get
- copy
- add_comments
- pop_comments
- append
- set
- set_kwargs
- depth
- iter_expressions
- find
- find_all
- find_ancestor
- parent_select
- same_parent
- root
- walk
- dfs
- bfs
- unnest
- unalias
- unnest_operands
- flatten
- to_s
- sql
- transform
- replace
- pop
- assert_is
- error_messages
- and_
- or_
- not_
- update_positions
- as_
- isin
- between
- is_
- like
- ilike
- eq
- neq
- rlike
- div
- asc
- desc
- args
- parent
- arg_key
- index
- comments
class
JSONArrayContains(sqlglot.expressions.core.Expression, sqlglot.expressions.core.Binary, sqlglot.expressions.core.Predicate, sqlglot.expressions.core.Func):
39class JSONArrayContains(Expression, Binary, Predicate, Func): 40 arg_types = {"this": True, "expression": True, "json_type": False} 41 _sql_names = ["JSON_ARRAY_CONTAINS"]
Inherited Members
- sqlglot.expressions.core.Expr
- Expr
- is_subquery
- is_cast
- is_data_type
- is_primitive
- dump
- load
- pipe
- apply
- sqlglot.expressions.core.Expression
- this
- expression
- expressions
- text
- is_string
- is_number
- to_py
- is_int
- is_star
- alias
- alias_column_names
- name
- alias_or_name
- output_name
- type
- is_type
- is_leaf
- meta
- meta_get
- copy
- add_comments
- pop_comments
- append
- set
- set_kwargs
- depth
- iter_expressions
- find
- find_all
- find_ancestor
- parent_select
- same_parent
- root
- walk
- dfs
- bfs
- unnest
- unalias
- unnest_operands
- flatten
- to_s
- sql
- transform
- replace
- pop
- assert_is
- error_messages
- and_
- or_
- not_
- update_positions
- as_
- isin
- between
- is_
- like
- ilike
- eq
- neq
- rlike
- div
- asc
- desc
- args
- parent
- arg_key
- index
- comments
44class JSONArrayInsert(Expression, Func): 45 arg_types = {"this": True, "expressions": True} 46 is_var_len_args = True 47 _sql_names = ["JSON_ARRAY_INSERT"]
Inherited Members
- sqlglot.expressions.core.Expr
- Expr
- is_subquery
- is_cast
- is_data_type
- is_primitive
- dump
- load
- pipe
- apply
- sqlglot.expressions.core.Expression
- this
- expression
- expressions
- text
- is_string
- is_number
- to_py
- is_int
- is_star
- alias
- alias_column_names
- name
- alias_or_name
- output_name
- type
- is_type
- is_leaf
- meta
- meta_get
- copy
- add_comments
- pop_comments
- append
- set
- set_kwargs
- depth
- iter_expressions
- find
- find_all
- find_ancestor
- parent_select
- same_parent
- root
- walk
- dfs
- bfs
- unnest
- unalias
- unnest_operands
- flatten
- to_s
- sql
- transform
- replace
- pop
- assert_is
- error_messages
- and_
- or_
- not_
- update_positions
- as_
- isin
- between
- is_
- like
- ilike
- eq
- neq
- rlike
- div
- asc
- desc
- args
- parent
- arg_key
- index
- comments
class
JSONBContains(sqlglot.expressions.core.Expression, sqlglot.expressions.core.Binary, sqlglot.expressions.core.Predicate, sqlglot.expressions.core.Func):
Inherited Members
- sqlglot.expressions.core.Expr
- Expr
- is_subquery
- is_cast
- is_data_type
- is_primitive
- dump
- load
- pipe
- apply
- sqlglot.expressions.core.Expression
- this
- expression
- expressions
- text
- is_string
- is_number
- to_py
- is_int
- is_star
- alias
- alias_column_names
- name
- alias_or_name
- output_name
- type
- is_type
- is_leaf
- meta
- meta_get
- copy
- add_comments
- pop_comments
- append
- set
- set_kwargs
- depth
- iter_expressions
- find
- find_all
- find_ancestor
- parent_select
- same_parent
- root
- walk
- dfs
- bfs
- unnest
- unalias
- unnest_operands
- flatten
- to_s
- sql
- transform
- replace
- pop
- assert_is
- error_messages
- and_
- or_
- not_
- update_positions
- as_
- isin
- between
- is_
- like
- ilike
- eq
- neq
- rlike
- div
- asc
- desc
- args
- parent
- arg_key
- index
- comments
class
JSONBContainsAllTopKeys(sqlglot.expressions.core.Expression, sqlglot.expressions.core.Binary, sqlglot.expressions.core.Predicate, sqlglot.expressions.core.Func):
Inherited Members
- sqlglot.expressions.core.Expr
- Expr
- is_subquery
- is_cast
- is_data_type
- is_primitive
- dump
- load
- pipe
- apply
- sqlglot.expressions.core.Expression
- this
- expression
- expressions
- text
- is_string
- is_number
- to_py
- is_int
- is_star
- alias
- alias_column_names
- name
- alias_or_name
- output_name
- type
- is_type
- is_leaf
- meta
- meta_get
- copy
- add_comments
- pop_comments
- append
- set
- set_kwargs
- depth
- iter_expressions
- find
- find_all
- find_ancestor
- parent_select
- same_parent
- root
- walk
- dfs
- bfs
- unnest
- unalias
- unnest_operands
- flatten
- to_s
- sql
- transform
- replace
- pop
- assert_is
- error_messages
- and_
- or_
- not_
- update_positions
- as_
- isin
- between
- is_
- like
- ilike
- eq
- neq
- rlike
- div
- asc
- desc
- args
- parent
- arg_key
- index
- comments
class
JSONBContainsTopKey(sqlglot.expressions.core.Expression, sqlglot.expressions.core.Binary, sqlglot.expressions.core.Predicate, sqlglot.expressions.core.Func):
Inherited Members
- sqlglot.expressions.core.Expr
- Expr
- is_subquery
- is_cast
- is_data_type
- is_primitive
- dump
- load
- pipe
- apply
- sqlglot.expressions.core.Expression
- this
- expression
- expressions
- text
- is_string
- is_number
- to_py
- is_int
- is_star
- alias
- alias_column_names
- name
- alias_or_name
- output_name
- type
- is_type
- is_leaf
- meta
- meta_get
- copy
- add_comments
- pop_comments
- append
- set
- set_kwargs
- depth
- iter_expressions
- find
- find_all
- find_ancestor
- parent_select
- same_parent
- root
- walk
- dfs
- bfs
- unnest
- unalias
- unnest_operands
- flatten
- to_s
- sql
- transform
- replace
- pop
- assert_is
- error_messages
- and_
- or_
- not_
- update_positions
- as_
- isin
- between
- is_
- like
- ilike
- eq
- neq
- rlike
- div
- asc
- desc
- args
- parent
- arg_key
- index
- comments
class
JSONBContainsAnyTopKeys(sqlglot.expressions.core.Expression, sqlglot.expressions.core.Binary, sqlglot.expressions.core.Predicate, sqlglot.expressions.core.Func):
Inherited Members
- sqlglot.expressions.core.Expr
- Expr
- is_subquery
- is_cast
- is_data_type
- is_primitive
- dump
- load
- pipe
- apply
- sqlglot.expressions.core.Expression
- this
- expression
- expressions
- text
- is_string
- is_number
- to_py
- is_int
- is_star
- alias
- alias_column_names
- name
- alias_or_name
- output_name
- type
- is_type
- is_leaf
- meta
- meta_get
- copy
- add_comments
- pop_comments
- append
- set
- set_kwargs
- depth
- iter_expressions
- find
- find_all
- find_ancestor
- parent_select
- same_parent
- root
- walk
- dfs
- bfs
- unnest
- unalias
- unnest_operands
- flatten
- to_s
- sql
- transform
- replace
- pop
- assert_is
- error_messages
- and_
- or_
- not_
- update_positions
- as_
- isin
- between
- is_
- like
- ilike
- eq
- neq
- rlike
- div
- asc
- desc
- args
- parent
- arg_key
- index
- comments
class
JSONBDeleteAtPath(sqlglot.expressions.core.Expression, sqlglot.expressions.core.Binary, sqlglot.expressions.core.Func):
Inherited Members
- sqlglot.expressions.core.Expr
- Expr
- is_subquery
- is_cast
- is_data_type
- is_primitive
- dump
- load
- pipe
- apply
- sqlglot.expressions.core.Expression
- this
- expression
- expressions
- text
- is_string
- is_number
- to_py
- is_int
- is_star
- alias
- alias_column_names
- name
- alias_or_name
- output_name
- type
- is_type
- is_leaf
- meta
- meta_get
- copy
- add_comments
- pop_comments
- append
- set
- set_kwargs
- depth
- iter_expressions
- find
- find_all
- find_ancestor
- parent_select
- same_parent
- root
- walk
- dfs
- bfs
- unnest
- unalias
- unnest_operands
- flatten
- to_s
- sql
- transform
- replace
- pop
- assert_is
- error_messages
- and_
- or_
- not_
- update_positions
- as_
- isin
- between
- is_
- like
- ilike
- eq
- neq
- rlike
- div
- asc
- desc
- args
- parent
- arg_key
- index
- comments
class
JSONBPathExists(sqlglot.expressions.core.Expression, sqlglot.expressions.core.Binary, sqlglot.expressions.core.Predicate, sqlglot.expressions.core.Func):
Inherited Members
- sqlglot.expressions.core.Expr
- Expr
- is_subquery
- is_cast
- is_data_type
- is_primitive
- dump
- load
- pipe
- apply
- sqlglot.expressions.core.Expression
- this
- expression
- expressions
- text
- is_string
- is_number
- to_py
- is_int
- is_star
- alias
- alias_column_names
- name
- alias_or_name
- output_name
- type
- is_type
- is_leaf
- meta
- meta_get
- copy
- add_comments
- pop_comments
- append
- set
- set_kwargs
- depth
- iter_expressions
- find
- find_all
- find_ancestor
- parent_select
- same_parent
- root
- walk
- dfs
- bfs
- unnest
- unalias
- unnest_operands
- flatten
- to_s
- sql
- transform
- replace
- pop
- assert_is
- error_messages
- and_
- or_
- not_
- update_positions
- as_
- isin
- between
- is_
- like
- ilike
- eq
- neq
- rlike
- div
- asc
- desc
- args
- parent
- arg_key
- index
- comments
74class JSONBExists(Expression, Func): 75 arg_types = {"this": True, "path": True} 76 _sql_names = ["JSONB_EXISTS"]
Inherited Members
- sqlglot.expressions.core.Expr
- Expr
- is_subquery
- is_cast
- is_data_type
- is_primitive
- dump
- load
- pipe
- apply
- sqlglot.expressions.core.Expression
- this
- expression
- expressions
- text
- is_string
- is_number
- to_py
- is_int
- is_star
- alias
- alias_column_names
- name
- alias_or_name
- output_name
- type
- is_type
- is_leaf
- meta
- meta_get
- copy
- add_comments
- pop_comments
- append
- set
- set_kwargs
- depth
- iter_expressions
- find
- find_all
- find_ancestor
- parent_select
- same_parent
- root
- walk
- dfs
- bfs
- unnest
- unalias
- unnest_operands
- flatten
- to_s
- sql
- transform
- replace
- pop
- assert_is
- error_messages
- and_
- or_
- not_
- update_positions
- as_
- isin
- between
- is_
- like
- ilike
- eq
- neq
- rlike
- div
- asc
- desc
- args
- parent
- arg_key
- index
- comments
class
JSONBExtract(sqlglot.expressions.core.Expression, sqlglot.expressions.core.Binary, sqlglot.expressions.core.Func):
Inherited Members
- sqlglot.expressions.core.Expr
- Expr
- is_subquery
- is_cast
- is_data_type
- is_primitive
- dump
- load
- pipe
- apply
- sqlglot.expressions.core.Expression
- this
- expression
- expressions
- text
- is_string
- is_number
- to_py
- is_int
- is_star
- alias
- alias_column_names
- name
- alias_or_name
- output_name
- type
- is_type
- is_leaf
- meta
- meta_get
- copy
- add_comments
- pop_comments
- append
- set
- set_kwargs
- depth
- iter_expressions
- find
- find_all
- find_ancestor
- parent_select
- same_parent
- root
- walk
- dfs
- bfs
- unnest
- unalias
- unnest_operands
- flatten
- to_s
- sql
- transform
- replace
- pop
- assert_is
- error_messages
- and_
- or_
- not_
- update_positions
- as_
- isin
- between
- is_
- like
- ilike
- eq
- neq
- rlike
- div
- asc
- desc
- args
- parent
- arg_key
- index
- comments
class
JSONBExtractScalar(sqlglot.expressions.core.Expression, sqlglot.expressions.core.Binary, sqlglot.expressions.core.Func):
83class JSONBExtractScalar(Expression, Binary, Func): 84 arg_types = {"this": True, "expression": True, "json_type": False} 85 _sql_names = ["JSONB_EXTRACT_SCALAR"]
Inherited Members
- sqlglot.expressions.core.Expr
- Expr
- is_subquery
- is_cast
- is_data_type
- is_primitive
- dump
- load
- pipe
- apply
- sqlglot.expressions.core.Expression
- this
- expression
- expressions
- text
- is_string
- is_number
- to_py
- is_int
- is_star
- alias
- alias_column_names
- name
- alias_or_name
- output_name
- type
- is_type
- is_leaf
- meta
- meta_get
- copy
- add_comments
- pop_comments
- append
- set
- set_kwargs
- depth
- iter_expressions
- find
- find_all
- find_ancestor
- parent_select
- same_parent
- root
- walk
- dfs
- bfs
- unnest
- unalias
- unnest_operands
- flatten
- to_s
- sql
- transform
- replace
- pop
- assert_is
- error_messages
- and_
- or_
- not_
- update_positions
- as_
- isin
- between
- is_
- like
- ilike
- eq
- neq
- rlike
- div
- asc
- desc
- args
- parent
- arg_key
- index
- comments
Inherited Members
- sqlglot.expressions.core.Expr
- Expr
- is_subquery
- is_cast
- is_data_type
- is_primitive
- dump
- load
- pipe
- apply
- sqlglot.expressions.core.Expression
- this
- expression
- expressions
- text
- is_string
- is_number
- to_py
- is_int
- is_star
- alias
- alias_column_names
- name
- alias_or_name
- output_name
- type
- is_type
- is_leaf
- meta
- meta_get
- copy
- add_comments
- pop_comments
- append
- set
- set_kwargs
- depth
- iter_expressions
- find
- find_all
- find_ancestor
- parent_select
- same_parent
- root
- walk
- dfs
- bfs
- unnest
- unalias
- unnest_operands
- flatten
- to_s
- sql
- transform
- replace
- pop
- assert_is
- error_messages
- and_
- or_
- not_
- update_positions
- as_
- isin
- between
- is_
- like
- ilike
- eq
- neq
- rlike
- div
- asc
- desc
- args
- parent
- arg_key
- index
- comments
Inherited Members
- sqlglot.expressions.core.Expr
- Expr
- arg_types
- is_subquery
- is_cast
- is_data_type
- is_primitive
- dump
- load
- pipe
- apply
- sqlglot.expressions.core.Expression
- this
- expression
- expressions
- text
- is_string
- is_number
- to_py
- is_int
- is_star
- alias
- alias_column_names
- name
- alias_or_name
- output_name
- type
- is_type
- is_leaf
- meta
- meta_get
- copy
- add_comments
- pop_comments
- append
- set
- set_kwargs
- depth
- iter_expressions
- find
- find_all
- find_ancestor
- parent_select
- same_parent
- root
- walk
- dfs
- bfs
- unnest
- unalias
- unnest_operands
- flatten
- to_s
- sql
- transform
- replace
- pop
- assert_is
- error_messages
- and_
- or_
- not_
- update_positions
- as_
- isin
- between
- is_
- like
- ilike
- eq
- neq
- rlike
- div
- asc
- desc
- args
- parent
- arg_key
- index
- comments
96class JSONExists(Expression, Func): 97 arg_types = { 98 "this": True, 99 "path": True, 100 "passing": False, 101 "on_condition": False, 102 "from_dcolonqmark": False, 103 }
arg_types =
{'this': True, 'path': True, 'passing': False, 'on_condition': False, 'from_dcolonqmark': False}
Inherited Members
- sqlglot.expressions.core.Expr
- Expr
- is_subquery
- is_cast
- is_data_type
- is_primitive
- dump
- load
- pipe
- apply
- sqlglot.expressions.core.Expression
- this
- expression
- expressions
- text
- is_string
- is_number
- to_py
- is_int
- is_star
- alias
- alias_column_names
- name
- alias_or_name
- output_name
- type
- is_type
- is_leaf
- meta
- meta_get
- copy
- add_comments
- pop_comments
- append
- set
- set_kwargs
- depth
- iter_expressions
- find
- find_all
- find_ancestor
- parent_select
- same_parent
- root
- walk
- dfs
- bfs
- unnest
- unalias
- unnest_operands
- flatten
- to_s
- sql
- transform
- replace
- pop
- assert_is
- error_messages
- and_
- or_
- not_
- update_positions
- as_
- isin
- between
- is_
- like
- ilike
- eq
- neq
- rlike
- div
- asc
- desc
- args
- parent
- arg_key
- index
- comments
class
JSONExtract(sqlglot.expressions.core.Expression, sqlglot.expressions.core.Binary, sqlglot.expressions.core.Func):
106class JSONExtract(Expression, Binary, Func): 107 arg_types = { 108 "this": True, 109 "expression": True, 110 "only_json_types": False, 111 "expressions": False, 112 "variant_extract": False, 113 "json_query": False, 114 "option": False, 115 "quote": False, 116 "on_condition": False, 117 "requires_json": False, 118 "emits": False, 119 } 120 _sql_names = ["JSON_EXTRACT"] 121 is_var_len_args = True 122 123 @property 124 def output_name(self) -> str: 125 return self.expression.output_name if not self.expressions else ""
arg_types =
{'this': True, 'expression': True, 'only_json_types': False, 'expressions': False, 'variant_extract': False, 'json_query': False, 'option': False, 'quote': False, 'on_condition': False, 'requires_json': False, 'emits': False}
output_name: str
123 @property 124 def output_name(self) -> str: 125 return self.expression.output_name if not self.expressions else ""
Name of the output column if this expression is a selection.
If the Expr has no output name, an empty string is returned.
Example:
>>> from sqlglot import parse_one >>> parse_one("SELECT a").expressions[0].output_name 'a' >>> parse_one("SELECT b AS c").expressions[0].output_name 'c' >>> parse_one("SELECT 1 + 2").expressions[0].output_name ''
Inherited Members
- sqlglot.expressions.core.Expr
- Expr
- is_subquery
- is_cast
- is_data_type
- is_primitive
- dump
- load
- pipe
- apply
- sqlglot.expressions.core.Expression
- this
- expression
- expressions
- text
- is_string
- is_number
- to_py
- is_int
- is_star
- alias
- alias_column_names
- name
- alias_or_name
- type
- is_type
- is_leaf
- meta
- meta_get
- copy
- add_comments
- pop_comments
- append
- set
- set_kwargs
- depth
- iter_expressions
- find
- find_all
- find_ancestor
- parent_select
- same_parent
- root
- walk
- dfs
- bfs
- unnest
- unalias
- unnest_operands
- flatten
- to_s
- sql
- transform
- replace
- pop
- assert_is
- error_messages
- and_
- or_
- not_
- update_positions
- as_
- isin
- between
- is_
- like
- ilike
- eq
- neq
- rlike
- div
- asc
- desc
- args
- parent
- arg_key
- index
- comments
128class JSONExtractArray(Expression, Func): 129 arg_types = {"this": True, "expression": False} 130 _sql_names = ["JSON_EXTRACT_ARRAY"]
Inherited Members
- sqlglot.expressions.core.Expr
- Expr
- is_subquery
- is_cast
- is_data_type
- is_primitive
- dump
- load
- pipe
- apply
- sqlglot.expressions.core.Expression
- this
- expression
- expressions
- text
- is_string
- is_number
- to_py
- is_int
- is_star
- alias
- alias_column_names
- name
- alias_or_name
- output_name
- type
- is_type
- is_leaf
- meta
- meta_get
- copy
- add_comments
- pop_comments
- append
- set
- set_kwargs
- depth
- iter_expressions
- find
- find_all
- find_ancestor
- parent_select
- same_parent
- root
- walk
- dfs
- bfs
- unnest
- unalias
- unnest_operands
- flatten
- to_s
- sql
- transform
- replace
- pop
- assert_is
- error_messages
- and_
- or_
- not_
- update_positions
- as_
- isin
- between
- is_
- like
- ilike
- eq
- neq
- rlike
- div
- asc
- desc
- args
- parent
- arg_key
- index
- comments
class
JSONExtractScalar(sqlglot.expressions.core.Expression, sqlglot.expressions.core.Binary, sqlglot.expressions.core.Func):
133class JSONExtractScalar(Expression, Binary, Func): 134 arg_types = { 135 "this": True, 136 "expression": True, 137 "only_json_types": False, 138 "expressions": False, 139 "json_type": False, 140 "scalar_only": False, 141 "json_subtype": False, 142 } 143 _sql_names = ["JSON_EXTRACT_SCALAR"] 144 is_var_len_args = True 145 146 @property 147 def output_name(self) -> str: 148 return self.expression.output_name
arg_types =
{'this': True, 'expression': True, 'only_json_types': False, 'expressions': False, 'json_type': False, 'scalar_only': False, 'json_subtype': False}
output_name: str
Name of the output column if this expression is a selection.
If the Expr has no output name, an empty string is returned.
Example:
>>> from sqlglot import parse_one >>> parse_one("SELECT a").expressions[0].output_name 'a' >>> parse_one("SELECT b AS c").expressions[0].output_name 'c' >>> parse_one("SELECT 1 + 2").expressions[0].output_name ''
Inherited Members
- sqlglot.expressions.core.Expr
- Expr
- is_subquery
- is_cast
- is_data_type
- is_primitive
- dump
- load
- pipe
- apply
- sqlglot.expressions.core.Expression
- this
- expression
- expressions
- text
- is_string
- is_number
- to_py
- is_int
- is_star
- alias
- alias_column_names
- name
- alias_or_name
- type
- is_type
- is_leaf
- meta
- meta_get
- copy
- add_comments
- pop_comments
- append
- set
- set_kwargs
- depth
- iter_expressions
- find
- find_all
- find_ancestor
- parent_select
- same_parent
- root
- walk
- dfs
- bfs
- unnest
- unalias
- unnest_operands
- flatten
- to_s
- sql
- transform
- replace
- pop
- assert_is
- error_messages
- and_
- or_
- not_
- update_positions
- as_
- isin
- between
- is_
- like
- ilike
- eq
- neq
- rlike
- div
- asc
- desc
- args
- parent
- arg_key
- index
- comments
151class JSONFormat(Expression, Func): 152 arg_types = {"this": False, "options": False, "is_json": False, "to_json": False} 153 _sql_names = ["JSON_FORMAT"]
Inherited Members
- sqlglot.expressions.core.Expr
- Expr
- is_subquery
- is_cast
- is_data_type
- is_primitive
- dump
- load
- pipe
- apply
- sqlglot.expressions.core.Expression
- this
- expression
- expressions
- text
- is_string
- is_number
- to_py
- is_int
- is_star
- alias
- alias_column_names
- name
- alias_or_name
- output_name
- type
- is_type
- is_leaf
- meta
- meta_get
- copy
- add_comments
- pop_comments
- append
- set
- set_kwargs
- depth
- iter_expressions
- find
- find_all
- find_ancestor
- parent_select
- same_parent
- root
- walk
- dfs
- bfs
- unnest
- unalias
- unnest_operands
- flatten
- to_s
- sql
- transform
- replace
- pop
- assert_is
- error_messages
- and_
- or_
- not_
- update_positions
- as_
- isin
- between
- is_
- like
- ilike
- eq
- neq
- rlike
- div
- asc
- desc
- args
- parent
- arg_key
- index
- comments
156class JSONKeys(Expression, Func): 157 arg_types = {"this": True, "expression": False, "expressions": False} 158 is_var_len_args = True 159 _sql_names = ["JSON_KEYS"]
Inherited Members
- sqlglot.expressions.core.Expr
- Expr
- is_subquery
- is_cast
- is_data_type
- is_primitive
- dump
- load
- pipe
- apply
- sqlglot.expressions.core.Expression
- this
- expression
- expressions
- text
- is_string
- is_number
- to_py
- is_int
- is_star
- alias
- alias_column_names
- name
- alias_or_name
- output_name
- type
- is_type
- is_leaf
- meta
- meta_get
- copy
- add_comments
- pop_comments
- append
- set
- set_kwargs
- depth
- iter_expressions
- find
- find_all
- find_ancestor
- parent_select
- same_parent
- root
- walk
- dfs
- bfs
- unnest
- unalias
- unnest_operands
- flatten
- to_s
- sql
- transform
- replace
- pop
- assert_is
- error_messages
- and_
- or_
- not_
- update_positions
- as_
- isin
- between
- is_
- like
- ilike
- eq
- neq
- rlike
- div
- asc
- desc
- args
- parent
- arg_key
- index
- comments
162class JSONKeysAtDepth(Expression, Func): 163 arg_types = {"this": True, "expression": False, "mode": False}
Inherited Members
- sqlglot.expressions.core.Expr
- Expr
- is_subquery
- is_cast
- is_data_type
- is_primitive
- dump
- load
- pipe
- apply
- sqlglot.expressions.core.Expression
- this
- expression
- expressions
- text
- is_string
- is_number
- to_py
- is_int
- is_star
- alias
- alias_column_names
- name
- alias_or_name
- output_name
- type
- is_type
- is_leaf
- meta
- meta_get
- copy
- add_comments
- pop_comments
- append
- set
- set_kwargs
- depth
- iter_expressions
- find
- find_all
- find_ancestor
- parent_select
- same_parent
- root
- walk
- dfs
- bfs
- unnest
- unalias
- unnest_operands
- flatten
- to_s
- sql
- transform
- replace
- pop
- assert_is
- error_messages
- and_
- or_
- not_
- update_positions
- as_
- isin
- between
- is_
- like
- ilike
- eq
- neq
- rlike
- div
- asc
- desc
- args
- parent
- arg_key
- index
- comments
166class JSONObject(Expression, Func): 167 arg_types = { 168 "expressions": False, 169 "null_handling": False, 170 "unique_keys": False, 171 "return_type": False, 172 "encoding": False, 173 }
arg_types =
{'expressions': False, 'null_handling': False, 'unique_keys': False, 'return_type': False, 'encoding': False}
Inherited Members
- sqlglot.expressions.core.Expr
- Expr
- is_subquery
- is_cast
- is_data_type
- is_primitive
- dump
- load
- pipe
- apply
- sqlglot.expressions.core.Expression
- this
- expression
- expressions
- text
- is_string
- is_number
- to_py
- is_int
- is_star
- alias
- alias_column_names
- name
- alias_or_name
- output_name
- type
- is_type
- is_leaf
- meta
- meta_get
- copy
- add_comments
- pop_comments
- append
- set
- set_kwargs
- depth
- iter_expressions
- find
- find_all
- find_ancestor
- parent_select
- same_parent
- root
- walk
- dfs
- bfs
- unnest
- unalias
- unnest_operands
- flatten
- to_s
- sql
- transform
- replace
- pop
- assert_is
- error_messages
- and_
- or_
- not_
- update_positions
- as_
- isin
- between
- is_
- like
- ilike
- eq
- neq
- rlike
- div
- asc
- desc
- args
- parent
- arg_key
- index
- comments
176class JSONObjectAgg(Expression, AggFunc): 177 arg_types = { 178 "expressions": False, 179 "null_handling": False, 180 "unique_keys": False, 181 "return_type": False, 182 "encoding": False, 183 }
arg_types =
{'expressions': False, 'null_handling': False, 'unique_keys': False, 'return_type': False, 'encoding': False}
Inherited Members
- sqlglot.expressions.core.Expr
- Expr
- is_subquery
- is_cast
- is_data_type
- is_primitive
- dump
- load
- pipe
- apply
- sqlglot.expressions.core.Expression
- this
- expression
- expressions
- text
- is_string
- is_number
- to_py
- is_int
- is_star
- alias
- alias_column_names
- name
- alias_or_name
- output_name
- type
- is_type
- is_leaf
- meta
- meta_get
- copy
- add_comments
- pop_comments
- append
- set
- set_kwargs
- depth
- iter_expressions
- find
- find_all
- find_ancestor
- parent_select
- same_parent
- root
- walk
- dfs
- bfs
- unnest
- unalias
- unnest_operands
- flatten
- to_s
- sql
- transform
- replace
- pop
- assert_is
- error_messages
- and_
- or_
- not_
- update_positions
- as_
- isin
- between
- is_
- like
- ilike
- eq
- neq
- rlike
- div
- asc
- desc
- args
- parent
- arg_key
- index
- comments
186class JSONRemove(Expression, Func): 187 arg_types = {"this": True, "expressions": True} 188 is_var_len_args = True 189 _sql_names = ["JSON_REMOVE"]
Inherited Members
- sqlglot.expressions.core.Expr
- Expr
- is_subquery
- is_cast
- is_data_type
- is_primitive
- dump
- load
- pipe
- apply
- sqlglot.expressions.core.Expression
- this
- expression
- expressions
- text
- is_string
- is_number
- to_py
- is_int
- is_star
- alias
- alias_column_names
- name
- alias_or_name
- output_name
- type
- is_type
- is_leaf
- meta
- meta_get
- copy
- add_comments
- pop_comments
- append
- set
- set_kwargs
- depth
- iter_expressions
- find
- find_all
- find_ancestor
- parent_select
- same_parent
- root
- walk
- dfs
- bfs
- unnest
- unalias
- unnest_operands
- flatten
- to_s
- sql
- transform
- replace
- pop
- assert_is
- error_messages
- and_
- or_
- not_
- update_positions
- as_
- isin
- between
- is_
- like
- ilike
- eq
- neq
- rlike
- div
- asc
- desc
- args
- parent
- arg_key
- index
- comments
192class JSONSet(Expression, Func): 193 arg_types = {"this": True, "expressions": True} 194 is_var_len_args = True 195 _sql_names = ["JSON_SET"]
Inherited Members
- sqlglot.expressions.core.Expr
- Expr
- is_subquery
- is_cast
- is_data_type
- is_primitive
- dump
- load
- pipe
- apply
- sqlglot.expressions.core.Expression
- this
- expression
- expressions
- text
- is_string
- is_number
- to_py
- is_int
- is_star
- alias
- alias_column_names
- name
- alias_or_name
- output_name
- type
- is_type
- is_leaf
- meta
- meta_get
- copy
- add_comments
- pop_comments
- append
- set
- set_kwargs
- depth
- iter_expressions
- find
- find_all
- find_ancestor
- parent_select
- same_parent
- root
- walk
- dfs
- bfs
- unnest
- unalias
- unnest_operands
- flatten
- to_s
- sql
- transform
- replace
- pop
- assert_is
- error_messages
- and_
- or_
- not_
- update_positions
- as_
- isin
- between
- is_
- like
- ilike
- eq
- neq
- rlike
- div
- asc
- desc
- args
- parent
- arg_key
- index
- comments
198class JSONStripNulls(Expression, Func): 199 arg_types = { 200 "this": True, 201 "expression": False, 202 "include_arrays": False, 203 "remove_empty": False, 204 } 205 _sql_names = ["JSON_STRIP_NULLS"]
Inherited Members
- sqlglot.expressions.core.Expr
- Expr
- is_subquery
- is_cast
- is_data_type
- is_primitive
- dump
- load
- pipe
- apply
- sqlglot.expressions.core.Expression
- this
- expression
- expressions
- text
- is_string
- is_number
- to_py
- is_int
- is_star
- alias
- alias_column_names
- name
- alias_or_name
- output_name
- type
- is_type
- is_leaf
- meta
- meta_get
- copy
- add_comments
- pop_comments
- append
- set
- set_kwargs
- depth
- iter_expressions
- find
- find_all
- find_ancestor
- parent_select
- same_parent
- root
- walk
- dfs
- bfs
- unnest
- unalias
- unnest_operands
- flatten
- to_s
- sql
- transform
- replace
- pop
- assert_is
- error_messages
- and_
- or_
- not_
- update_positions
- as_
- isin
- between
- is_
- like
- ilike
- eq
- neq
- rlike
- div
- asc
- desc
- args
- parent
- arg_key
- index
- comments
Inherited Members
- sqlglot.expressions.core.Expr
- Expr
- arg_types
- is_subquery
- is_cast
- is_data_type
- is_primitive
- dump
- load
- pipe
- apply
- sqlglot.expressions.core.Expression
- this
- expression
- expressions
- text
- is_string
- is_number
- to_py
- is_int
- is_star
- alias
- alias_column_names
- name
- alias_or_name
- output_name
- type
- is_type
- is_leaf
- meta
- meta_get
- copy
- add_comments
- pop_comments
- append
- set
- set_kwargs
- depth
- iter_expressions
- find
- find_all
- find_ancestor
- parent_select
- same_parent
- root
- walk
- dfs
- bfs
- unnest
- unalias
- unnest_operands
- flatten
- to_s
- sql
- transform
- replace
- pop
- assert_is
- error_messages
- and_
- or_
- not_
- update_positions
- as_
- isin
- between
- is_
- like
- ilike
- eq
- neq
- rlike
- div
- asc
- desc
- args
- parent
- arg_key
- index
- comments
212class JSONTable(Expression, Func): 213 arg_types = { 214 "this": True, 215 "schema": True, 216 "path": False, 217 "error_handling": False, 218 "empty_handling": False, 219 }
arg_types =
{'this': True, 'schema': True, 'path': False, 'error_handling': False, 'empty_handling': False}
Inherited Members
- sqlglot.expressions.core.Expr
- Expr
- is_subquery
- is_cast
- is_data_type
- is_primitive
- dump
- load
- pipe
- apply
- sqlglot.expressions.core.Expression
- this
- expression
- expressions
- text
- is_string
- is_number
- to_py
- is_int
- is_star
- alias
- alias_column_names
- name
- alias_or_name
- output_name
- type
- is_type
- is_leaf
- meta
- meta_get
- copy
- add_comments
- pop_comments
- append
- set
- set_kwargs
- depth
- iter_expressions
- find
- find_all
- find_ancestor
- parent_select
- same_parent
- root
- walk
- dfs
- bfs
- unnest
- unalias
- unnest_operands
- flatten
- to_s
- sql
- transform
- replace
- pop
- assert_is
- error_messages
- and_
- or_
- not_
- update_positions
- as_
- isin
- between
- is_
- like
- ilike
- eq
- neq
- rlike
- div
- asc
- desc
- args
- parent
- arg_key
- index
- comments
222class JSONType(Expression, Func): 223 arg_types = {"this": True, "expression": False} 224 _sql_names = ["JSON_TYPE"]
Inherited Members
- sqlglot.expressions.core.Expr
- Expr
- is_subquery
- is_cast
- is_data_type
- is_primitive
- dump
- load
- pipe
- apply
- sqlglot.expressions.core.Expression
- this
- expression
- expressions
- text
- is_string
- is_number
- to_py
- is_int
- is_star
- alias
- alias_column_names
- name
- alias_or_name
- output_name
- type
- is_type
- is_leaf
- meta
- meta_get
- copy
- add_comments
- pop_comments
- append
- set
- set_kwargs
- depth
- iter_expressions
- find
- find_all
- find_ancestor
- parent_select
- same_parent
- root
- walk
- dfs
- bfs
- unnest
- unalias
- unnest_operands
- flatten
- to_s
- sql
- transform
- replace
- pop
- assert_is
- error_messages
- and_
- or_
- not_
- update_positions
- as_
- isin
- between
- is_
- like
- ilike
- eq
- neq
- rlike
- div
- asc
- desc
- args
- parent
- arg_key
- index
- comments
Inherited Members
- sqlglot.expressions.core.Expr
- Expr
- is_subquery
- is_cast
- is_data_type
- is_primitive
- dump
- load
- pipe
- apply
- sqlglot.expressions.core.Expression
- this
- expression
- expressions
- text
- is_string
- is_number
- to_py
- is_int
- is_star
- alias
- alias_column_names
- name
- alias_or_name
- output_name
- type
- is_type
- is_leaf
- meta
- meta_get
- copy
- add_comments
- pop_comments
- append
- set
- set_kwargs
- depth
- iter_expressions
- find
- find_all
- find_ancestor
- parent_select
- same_parent
- root
- walk
- dfs
- bfs
- unnest
- unalias
- unnest_operands
- flatten
- to_s
- sql
- transform
- replace
- pop
- assert_is
- error_messages
- and_
- or_
- not_
- update_positions
- as_
- isin
- between
- is_
- like
- ilike
- eq
- neq
- rlike
- div
- asc
- desc
- args
- parent
- arg_key
- index
- comments
231class ObjectInsert(Expression, Func): 232 arg_types = { 233 "this": True, 234 "key": True, 235 "value": True, 236 "update_flag": False, 237 }
Inherited Members
- sqlglot.expressions.core.Expr
- Expr
- is_subquery
- is_cast
- is_data_type
- is_primitive
- dump
- load
- pipe
- apply
- sqlglot.expressions.core.Expression
- this
- expression
- expressions
- text
- is_string
- is_number
- to_py
- is_int
- is_star
- alias
- alias_column_names
- name
- alias_or_name
- output_name
- type
- is_type
- is_leaf
- meta
- meta_get
- copy
- add_comments
- pop_comments
- append
- set
- set_kwargs
- depth
- iter_expressions
- find
- find_all
- find_ancestor
- parent_select
- same_parent
- root
- walk
- dfs
- bfs
- unnest
- unalias
- unnest_operands
- flatten
- to_s
- sql
- transform
- replace
- pop
- assert_is
- error_messages
- and_
- or_
- not_
- update_positions
- as_
- isin
- between
- is_
- like
- ilike
- eq
- neq
- rlike
- div
- asc
- desc
- args
- parent
- arg_key
- index
- comments
240class OpenJSON(Expression, Func): 241 arg_types = {"this": True, "path": False, "expressions": False}
Inherited Members
- sqlglot.expressions.core.Expr
- Expr
- is_subquery
- is_cast
- is_data_type
- is_primitive
- dump
- load
- pipe
- apply
- sqlglot.expressions.core.Expression
- this
- expression
- expressions
- text
- is_string
- is_number
- to_py
- is_int
- is_star
- alias
- alias_column_names
- name
- alias_or_name
- output_name
- type
- is_type
- is_leaf
- meta
- meta_get
- copy
- add_comments
- pop_comments
- append
- set
- set_kwargs
- depth
- iter_expressions
- find
- find_all
- find_ancestor
- parent_select
- same_parent
- root
- walk
- dfs
- bfs
- unnest
- unalias
- unnest_operands
- flatten
- to_s
- sql
- transform
- replace
- pop
- assert_is
- error_messages
- and_
- or_
- not_
- update_positions
- as_
- isin
- between
- is_
- like
- ilike
- eq
- neq
- rlike
- div
- asc
- desc
- args
- parent
- arg_key
- index
- comments
244class ParseJSON(Expression, Func): 245 # BigQuery, Snowflake have PARSE_JSON, Presto has JSON_PARSE 246 # Snowflake also has TRY_PARSE_JSON, which is represented using `safe` 247 _sql_names = ["PARSE_JSON", "JSON_PARSE"] 248 arg_types = {"this": True, "expression": False, "safe": False}
Inherited Members
- sqlglot.expressions.core.Expr
- Expr
- is_subquery
- is_cast
- is_data_type
- is_primitive
- dump
- load
- pipe
- apply
- sqlglot.expressions.core.Expression
- this
- expression
- expressions
- text
- is_string
- is_number
- to_py
- is_int
- is_star
- alias
- alias_column_names
- name
- alias_or_name
- output_name
- type
- is_type
- is_leaf
- meta
- meta_get
- copy
- add_comments
- pop_comments
- append
- set
- set_kwargs
- depth
- iter_expressions
- find
- find_all
- find_ancestor
- parent_select
- same_parent
- root
- walk
- dfs
- bfs
- unnest
- unalias
- unnest_operands
- flatten
- to_s
- sql
- transform
- replace
- pop
- assert_is
- error_messages
- and_
- or_
- not_
- update_positions
- as_
- isin
- between
- is_
- like
- ilike
- eq
- neq
- rlike
- div
- asc
- desc
- args
- parent
- arg_key
- index
- comments