mirror of
https://github.com/GreptimeTeam/greptimedb.git
synced 2026-01-14 09:12:57 +00:00
Deploying to gh-pages from @ GreptimeTeam/greptimedb@2f4a15ec40 🚀
This commit is contained in:
426
common_sql/convert/enum.BinaryOperator.html
Normal file
426
common_sql/convert/enum.BinaryOperator.html
Normal file
File diff suppressed because one or more lines are too long
308
common_sql/convert/enum.ColumnOption.html
Normal file
308
common_sql/convert/enum.ColumnOption.html
Normal file
File diff suppressed because one or more lines are too long
485
common_sql/convert/enum.DataType.html
Normal file
485
common_sql/convert/enum.DataType.html
Normal file
File diff suppressed because one or more lines are too long
602
common_sql/convert/enum.Expr.html
Normal file
602
common_sql/convert/enum.Expr.html
Normal file
File diff suppressed because one or more lines are too long
243
common_sql/convert/enum.FunctionArg.html
Normal file
243
common_sql/convert/enum.FunctionArg.html
Normal file
File diff suppressed because one or more lines are too long
238
common_sql/convert/enum.FunctionArgExpr.html
Normal file
238
common_sql/convert/enum.FunctionArgExpr.html
Normal file
File diff suppressed because one or more lines are too long
240
common_sql/convert/enum.FunctionArguments.html
Normal file
240
common_sql/convert/enum.FunctionArguments.html
Normal file
File diff suppressed because one or more lines are too long
260
common_sql/convert/enum.SqlOption.html
Normal file
260
common_sql/convert/enum.SqlOption.html
Normal file
File diff suppressed because one or more lines are too long
284
common_sql/convert/enum.SqlValue.html
Normal file
284
common_sql/convert/enum.SqlValue.html
Normal file
File diff suppressed because one or more lines are too long
333
common_sql/convert/enum.TableConstraint.html
Normal file
333
common_sql/convert/enum.TableConstraint.html
Normal file
File diff suppressed because one or more lines are too long
239
common_sql/convert/enum.TimezoneInfo.html
Normal file
239
common_sql/convert/enum.TimezoneInfo.html
Normal file
File diff suppressed because one or more lines are too long
264
common_sql/convert/enum.UnaryOperator.html
Normal file
264
common_sql/convert/enum.UnaryOperator.html
Normal file
File diff suppressed because one or more lines are too long
7
common_sql/convert/fn.auto_cast_to_numeric.html
Normal file
7
common_sql/convert/fn.auto_cast_to_numeric.html
Normal file
@@ -0,0 +1,7 @@
|
||||
<!DOCTYPE html><html lang="en"><head><meta charset="utf-8"><meta name="viewport" content="width=device-width, initial-scale=1.0"><meta name="generator" content="rustdoc"><meta name="description" content="Casts string to value of specified numeric data type. If the string cannot be parsed, returns an error."><title>auto_cast_to_numeric in common_sql::convert - Rust</title><script>if(window.location.protocol!=="file:")document.head.insertAdjacentHTML("beforeend","SourceSerif4-Regular-6b053e98.ttf.woff2,FiraSans-Italic-81dc35de.woff2,FiraSans-Regular-0fe48ade.woff2,FiraSans-MediumItalic-ccf7e434.woff2,FiraSans-Medium-e1aa3f0a.woff2,SourceCodePro-Regular-8badfe75.ttf.woff2,SourceCodePro-Semibold-aa29a496.ttf.woff2".split(",").map(f=>`<link rel="preload" as="font" type="font/woff2"href="../../static.files/${f}">`).join(""))</script><link rel="stylesheet" href="../../static.files/normalize-9960930a.css"><link rel="stylesheet" href="../../static.files/rustdoc-e56847b5.css"><meta name="rustdoc-vars" data-root-path="../../" data-static-root-path="../../static.files/" data-current-crate="common_sql" data-themes="" data-resource-suffix="" data-rustdoc-version="1.92.0-nightly (fa3155a64 2025-09-30)" data-channel="nightly" data-search-js="search-e256b49e.js" data-stringdex-js="stringdex-828709d0.js" data-settings-js="settings-c38705f0.js" ><script src="../../static.files/storage-e2aeef58.js"></script><script defer src="sidebar-items.js"></script><script defer src="../../static.files/main-ce535bd0.js"></script><noscript><link rel="stylesheet" href="../../static.files/noscript-263c88ec.css"></noscript><link rel="alternate icon" type="image/png" href="../../static.files/favicon-32x32-eab170b8.png"><link rel="icon" type="image/svg+xml" href="../../static.files/favicon-044be391.svg"></head><body class="rustdoc fn"><!--[if lte IE 11]><div class="warning">This old browser is unsupported and will most likely display funky things.</div><![endif]--><rustdoc-topbar><h2><a href="#">auto_cast_to_numeric</a></h2></rustdoc-topbar><nav class="sidebar"><div class="sidebar-crate"><h2><a href="../../common_sql/index.html">common_<wbr>sql</a><span class="version">1.0.0-beta.3</span></h2></div><div class="sidebar-elems"><div id="rustdoc-modnav"><h2><a href="index.html">In common_<wbr>sql::<wbr>convert</a></h2></div></div></nav><div class="sidebar-resizer" title="Drag to resize sidebar"></div><main><div class="width-limiter"><section id="main-content" class="content"><div class="main-heading"><div class="rustdoc-breadcrumbs"><a href="../index.html">common_sql</a>::<wbr><a href="index.html">convert</a></div><h1>Function <span class="fn">auto_<wbr>cast_<wbr>to_<wbr>numeric</span> <button id="copy-path" title="Copy item path to clipboard">Copy item path</button></h1><rustdoc-toolbar></rustdoc-toolbar><span class="sub-heading"><a class="src" href="../../src/common_sql/convert.rs.html#338-368">Source</a> </span></div><pre class="rust item-decl"><code>pub(crate) fn auto_cast_to_numeric(
|
||||
s: &<a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.str.html">str</a>,
|
||||
data_type: &ConcreteDataType,
|
||||
) -> <a class="type" href="../error/type.Result.html" title="type common_sql::error::Result">Result</a><<a class="enum" href="https://doc.rust-lang.org/nightly/core/option/enum.Option.html" title="enum core::option::Option">Option</a><Value>></code></pre><details class="toggle top-doc" open><summary class="hideme"><span>Expand description</span></summary><div class="docblock"><p>Casts string to value of specified numeric data type.
|
||||
If the string cannot be parsed, returns an error.</p>
|
||||
<p>Returns None if the data type doesn’t support auto casting.</p>
|
||||
</div></details></section></div></main></body></html>
|
||||
@@ -0,0 +1,6 @@
|
||||
<!DOCTYPE html><html lang="en"><head><meta charset="utf-8"><meta name="viewport" content="width=device-width, initial-scale=1.0"><meta name="generator" content="rustdoc"><meta name="description" content="Deserialize default constraint from json bytes"><title>deserialize_default_constraint in common_sql::convert - Rust</title><script>if(window.location.protocol!=="file:")document.head.insertAdjacentHTML("beforeend","SourceSerif4-Regular-6b053e98.ttf.woff2,FiraSans-Italic-81dc35de.woff2,FiraSans-Regular-0fe48ade.woff2,FiraSans-MediumItalic-ccf7e434.woff2,FiraSans-Medium-e1aa3f0a.woff2,SourceCodePro-Regular-8badfe75.ttf.woff2,SourceCodePro-Semibold-aa29a496.ttf.woff2".split(",").map(f=>`<link rel="preload" as="font" type="font/woff2"href="../../static.files/${f}">`).join(""))</script><link rel="stylesheet" href="../../static.files/normalize-9960930a.css"><link rel="stylesheet" href="../../static.files/rustdoc-e56847b5.css"><meta name="rustdoc-vars" data-root-path="../../" data-static-root-path="../../static.files/" data-current-crate="common_sql" data-themes="" data-resource-suffix="" data-rustdoc-version="1.92.0-nightly (fa3155a64 2025-09-30)" data-channel="nightly" data-search-js="search-e256b49e.js" data-stringdex-js="stringdex-828709d0.js" data-settings-js="settings-c38705f0.js" ><script src="../../static.files/storage-e2aeef58.js"></script><script defer src="sidebar-items.js"></script><script defer src="../../static.files/main-ce535bd0.js"></script><noscript><link rel="stylesheet" href="../../static.files/noscript-263c88ec.css"></noscript><link rel="alternate icon" type="image/png" href="../../static.files/favicon-32x32-eab170b8.png"><link rel="icon" type="image/svg+xml" href="../../static.files/favicon-044be391.svg"></head><body class="rustdoc fn"><!--[if lte IE 11]><div class="warning">This old browser is unsupported and will most likely display funky things.</div><![endif]--><rustdoc-topbar><h2><a href="#">deserialize_default_constraint</a></h2></rustdoc-topbar><nav class="sidebar"><div class="sidebar-crate"><h2><a href="../../common_sql/index.html">common_<wbr>sql</a><span class="version">1.0.0-beta.3</span></h2></div><div class="sidebar-elems"><div id="rustdoc-modnav"><h2><a href="index.html">In common_<wbr>sql::<wbr>convert</a></h2></div></div></nav><div class="sidebar-resizer" title="Drag to resize sidebar"></div><main><div class="width-limiter"><section id="main-content" class="content"><div class="main-heading"><div class="rustdoc-breadcrumbs"><a href="../index.html">common_sql</a>::<wbr><a href="index.html">convert</a></div><h1>Function <span class="fn">deserialize_<wbr>default_<wbr>constraint</span> <button id="copy-path" title="Copy item path to clipboard">Copy item path</button></h1><rustdoc-toolbar></rustdoc-toolbar><span class="sub-heading"><a class="src" href="../../src/common_sql/convert.rs.html#391-409">Source</a> </span></div><pre class="rust item-decl"><code>pub fn deserialize_default_constraint(
|
||||
bytes: &[<a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.u8.html">u8</a>],
|
||||
column_name: &<a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.str.html">str</a>,
|
||||
data_type: &ConcreteDataType,
|
||||
) -> <a class="type" href="../error/type.Result.html" title="type common_sql::error::Result">Result</a><<a class="enum" href="https://doc.rust-lang.org/nightly/core/option/enum.Option.html" title="enum core::option::Option">Option</a><ColumnDefaultConstraint>></code></pre><details class="toggle top-doc" open><summary class="hideme"><span>Expand description</span></summary><div class="docblock"><p>Deserialize default constraint from json bytes</p>
|
||||
</div></details></section></div></main></body></html>
|
||||
1
common_sql/convert/fn.parse_hex_string.html
Normal file
1
common_sql/convert/fn.parse_hex_string.html
Normal file
@@ -0,0 +1 @@
|
||||
<!DOCTYPE html><html lang="en"><head><meta charset="utf-8"><meta name="viewport" content="width=device-width, initial-scale=1.0"><meta name="generator" content="rustdoc"><meta name="description" content="API documentation for the Rust `parse_hex_string` fn in crate `common_sql`."><title>parse_hex_string in common_sql::convert - Rust</title><script>if(window.location.protocol!=="file:")document.head.insertAdjacentHTML("beforeend","SourceSerif4-Regular-6b053e98.ttf.woff2,FiraSans-Italic-81dc35de.woff2,FiraSans-Regular-0fe48ade.woff2,FiraSans-MediumItalic-ccf7e434.woff2,FiraSans-Medium-e1aa3f0a.woff2,SourceCodePro-Regular-8badfe75.ttf.woff2,SourceCodePro-Semibold-aa29a496.ttf.woff2".split(",").map(f=>`<link rel="preload" as="font" type="font/woff2"href="../../static.files/${f}">`).join(""))</script><link rel="stylesheet" href="../../static.files/normalize-9960930a.css"><link rel="stylesheet" href="../../static.files/rustdoc-e56847b5.css"><meta name="rustdoc-vars" data-root-path="../../" data-static-root-path="../../static.files/" data-current-crate="common_sql" data-themes="" data-resource-suffix="" data-rustdoc-version="1.92.0-nightly (fa3155a64 2025-09-30)" data-channel="nightly" data-search-js="search-e256b49e.js" data-stringdex-js="stringdex-828709d0.js" data-settings-js="settings-c38705f0.js" ><script src="../../static.files/storage-e2aeef58.js"></script><script defer src="sidebar-items.js"></script><script defer src="../../static.files/main-ce535bd0.js"></script><noscript><link rel="stylesheet" href="../../static.files/noscript-263c88ec.css"></noscript><link rel="alternate icon" type="image/png" href="../../static.files/favicon-32x32-eab170b8.png"><link rel="icon" type="image/svg+xml" href="../../static.files/favicon-044be391.svg"></head><body class="rustdoc fn"><!--[if lte IE 11]><div class="warning">This old browser is unsupported and will most likely display funky things.</div><![endif]--><rustdoc-topbar><h2><a href="#">parse_hex_string</a></h2></rustdoc-topbar><nav class="sidebar"><div class="sidebar-crate"><h2><a href="../../common_sql/index.html">common_<wbr>sql</a><span class="version">1.0.0-beta.3</span></h2></div><div class="sidebar-elems"><div id="rustdoc-modnav"><h2><a href="index.html">In common_<wbr>sql::<wbr>convert</a></h2></div></div></nav><div class="sidebar-resizer" title="Drag to resize sidebar"></div><main><div class="width-limiter"><section id="main-content" class="content"><div class="main-heading"><div class="rustdoc-breadcrumbs"><a href="../index.html">common_sql</a>::<wbr><a href="index.html">convert</a></div><h1>Function <span class="fn">parse_<wbr>hex_<wbr>string</span> <button id="copy-path" title="Copy item path to clipboard">Copy item path</button></h1><rustdoc-toolbar></rustdoc-toolbar><span class="sub-heading"><a class="src" href="../../src/common_sql/convert.rs.html#370-388">Source</a> </span></div><pre class="rust item-decl"><code>pub(crate) fn parse_hex_string(s: &<a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.str.html">str</a>) -> <a class="type" href="../error/type.Result.html" title="type common_sql::error::Result">Result</a><Value></code></pre></section></div></main></body></html>
|
||||
2
common_sql/convert/fn.parse_sql_number.html
Normal file
2
common_sql/convert/fn.parse_sql_number.html
Normal file
@@ -0,0 +1,2 @@
|
||||
<!DOCTYPE html><html lang="en"><head><meta charset="utf-8"><meta name="viewport" content="width=device-width, initial-scale=1.0"><meta name="generator" content="rustdoc"><meta name="description" content="API documentation for the Rust `parse_sql_number` fn in crate `common_sql`."><title>parse_sql_number in common_sql::convert - Rust</title><script>if(window.location.protocol!=="file:")document.head.insertAdjacentHTML("beforeend","SourceSerif4-Regular-6b053e98.ttf.woff2,FiraSans-Italic-81dc35de.woff2,FiraSans-Regular-0fe48ade.woff2,FiraSans-MediumItalic-ccf7e434.woff2,FiraSans-Medium-e1aa3f0a.woff2,SourceCodePro-Regular-8badfe75.ttf.woff2,SourceCodePro-Semibold-aa29a496.ttf.woff2".split(",").map(f=>`<link rel="preload" as="font" type="font/woff2"href="../../static.files/${f}">`).join(""))</script><link rel="stylesheet" href="../../static.files/normalize-9960930a.css"><link rel="stylesheet" href="../../static.files/rustdoc-e56847b5.css"><meta name="rustdoc-vars" data-root-path="../../" data-static-root-path="../../static.files/" data-current-crate="common_sql" data-themes="" data-resource-suffix="" data-rustdoc-version="1.92.0-nightly (fa3155a64 2025-09-30)" data-channel="nightly" data-search-js="search-e256b49e.js" data-stringdex-js="stringdex-828709d0.js" data-settings-js="settings-c38705f0.js" ><script src="../../static.files/storage-e2aeef58.js"></script><script defer src="sidebar-items.js"></script><script defer src="../../static.files/main-ce535bd0.js"></script><noscript><link rel="stylesheet" href="../../static.files/noscript-263c88ec.css"></noscript><link rel="alternate icon" type="image/png" href="../../static.files/favicon-32x32-eab170b8.png"><link rel="icon" type="image/svg+xml" href="../../static.files/favicon-044be391.svg"></head><body class="rustdoc fn"><!--[if lte IE 11]><div class="warning">This old browser is unsupported and will most likely display funky things.</div><![endif]--><rustdoc-topbar><h2><a href="#">parse_sql_number</a></h2></rustdoc-topbar><nav class="sidebar"><div class="sidebar-crate"><h2><a href="../../common_sql/index.html">common_<wbr>sql</a><span class="version">1.0.0-beta.3</span></h2></div><div class="sidebar-elems"><div id="rustdoc-modnav"><h2><a href="index.html">In common_<wbr>sql::<wbr>convert</a></h2></div></div></nav><div class="sidebar-resizer" title="Drag to resize sidebar"></div><main><div class="width-limiter"><section id="main-content" class="content"><div class="main-heading"><div class="rustdoc-breadcrumbs"><a href="../index.html">common_sql</a>::<wbr><a href="index.html">convert</a></div><h1>Function <span class="fn">parse_<wbr>sql_<wbr>number</span> <button id="copy-path" title="Copy item path to clipboard">Copy item path</button></h1><rustdoc-toolbar></rustdoc-toolbar><span class="sub-heading"><a class="src" href="../../src/common_sql/convert.rs.html#38-49">Source</a> </span></div><pre class="rust item-decl"><code>fn parse_sql_number<R: <a class="trait" href="https://doc.rust-lang.org/nightly/core/str/traits/trait.FromStr.html" title="trait core::str::traits::FromStr">FromStr</a> + <a class="trait" href="https://doc.rust-lang.org/nightly/core/fmt/trait.Debug.html" title="trait core::fmt::Debug">Debug</a>>(n: &<a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.str.html">str</a>) -> <a class="type" href="../error/type.Result.html" title="type common_sql::error::Result">Result</a><R><div class="where">where
|
||||
<R as <a class="trait" href="https://doc.rust-lang.org/nightly/core/str/traits/trait.FromStr.html" title="trait core::str::traits::FromStr">FromStr</a>>::<a class="associatedtype" href="https://doc.rust-lang.org/nightly/core/str/traits/trait.FromStr.html#associatedtype.Err" title="type core::str::traits::FromStr::Err">Err</a>: <a class="trait" href="https://doc.rust-lang.org/nightly/core/fmt/trait.Debug.html" title="trait core::fmt::Debug">Debug</a>,</div></code></pre></section></div></main></body></html>
|
||||
7
common_sql/convert/fn.parse_string_to_value.html
Normal file
7
common_sql/convert/fn.parse_string_to_value.html
Normal file
@@ -0,0 +1,7 @@
|
||||
<!DOCTYPE html><html lang="en"><head><meta charset="utf-8"><meta name="viewport" content="width=device-width, initial-scale=1.0"><meta name="generator" content="rustdoc"><meta name="description" content="API documentation for the Rust `parse_string_to_value` fn in crate `common_sql`."><title>parse_string_to_value in common_sql::convert - Rust</title><script>if(window.location.protocol!=="file:")document.head.insertAdjacentHTML("beforeend","SourceSerif4-Regular-6b053e98.ttf.woff2,FiraSans-Italic-81dc35de.woff2,FiraSans-Regular-0fe48ade.woff2,FiraSans-MediumItalic-ccf7e434.woff2,FiraSans-Medium-e1aa3f0a.woff2,SourceCodePro-Regular-8badfe75.ttf.woff2,SourceCodePro-Semibold-aa29a496.ttf.woff2".split(",").map(f=>`<link rel="preload" as="font" type="font/woff2"href="../../static.files/${f}">`).join(""))</script><link rel="stylesheet" href="../../static.files/normalize-9960930a.css"><link rel="stylesheet" href="../../static.files/rustdoc-e56847b5.css"><meta name="rustdoc-vars" data-root-path="../../" data-static-root-path="../../static.files/" data-current-crate="common_sql" data-themes="" data-resource-suffix="" data-rustdoc-version="1.92.0-nightly (fa3155a64 2025-09-30)" data-channel="nightly" data-search-js="search-e256b49e.js" data-stringdex-js="stringdex-828709d0.js" data-settings-js="settings-c38705f0.js" ><script src="../../static.files/storage-e2aeef58.js"></script><script defer src="sidebar-items.js"></script><script defer src="../../static.files/main-ce535bd0.js"></script><noscript><link rel="stylesheet" href="../../static.files/noscript-263c88ec.css"></noscript><link rel="alternate icon" type="image/png" href="../../static.files/favicon-32x32-eab170b8.png"><link rel="icon" type="image/svg+xml" href="../../static.files/favicon-044be391.svg"></head><body class="rustdoc fn"><!--[if lte IE 11]><div class="warning">This old browser is unsupported and will most likely display funky things.</div><![endif]--><rustdoc-topbar><h2><a href="#">parse_string_to_value</a></h2></rustdoc-topbar><nav class="sidebar"><div class="sidebar-crate"><h2><a href="../../common_sql/index.html">common_<wbr>sql</a><span class="version">1.0.0-beta.3</span></h2></div><div class="sidebar-elems"><div id="rustdoc-modnav"><h2><a href="index.html">In common_<wbr>sql::<wbr>convert</a></h2></div></div></nav><div class="sidebar-resizer" title="Drag to resize sidebar"></div><main><div class="width-limiter"><section id="main-content" class="content"><div class="main-heading"><div class="rustdoc-breadcrumbs"><a href="../index.html">common_sql</a>::<wbr><a href="index.html">convert</a></div><h1>Function <span class="fn">parse_<wbr>string_<wbr>to_<wbr>value</span> <button id="copy-path" title="Copy item path to clipboard">Copy item path</button></h1><rustdoc-toolbar></rustdoc-toolbar><span class="sub-heading"><a class="src" href="../../src/common_sql/convert.rs.html#246-332">Source</a> </span></div><pre class="rust item-decl"><code>pub(crate) fn parse_string_to_value(
|
||||
column_name: &<a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.str.html">str</a>,
|
||||
s: <a class="struct" href="https://doc.rust-lang.org/nightly/alloc/string/struct.String.html" title="struct alloc::string::String">String</a>,
|
||||
data_type: &ConcreteDataType,
|
||||
timezone: <a class="enum" href="https://doc.rust-lang.org/nightly/core/option/enum.Option.html" title="enum core::option::Option">Option</a><&Timezone>,
|
||||
auto_string_to_numeric: <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.bool.html">bool</a>,
|
||||
) -> <a class="type" href="../error/type.Result.html" title="type common_sql::error::Result">Result</a><Value></code></pre></section></div></main></body></html>
|
||||
5
common_sql/convert/fn.sql_number_to_value.html
Normal file
5
common_sql/convert/fn.sql_number_to_value.html
Normal file
@@ -0,0 +1,5 @@
|
||||
<!DOCTYPE html><html lang="en"><head><meta charset="utf-8"><meta name="viewport" content="width=device-width, initial-scale=1.0"><meta name="generator" content="rustdoc"><meta name="description" content="Convert a sql value into datatype’s value"><title>sql_number_to_value in common_sql::convert - Rust</title><script>if(window.location.protocol!=="file:")document.head.insertAdjacentHTML("beforeend","SourceSerif4-Regular-6b053e98.ttf.woff2,FiraSans-Italic-81dc35de.woff2,FiraSans-Regular-0fe48ade.woff2,FiraSans-MediumItalic-ccf7e434.woff2,FiraSans-Medium-e1aa3f0a.woff2,SourceCodePro-Regular-8badfe75.ttf.woff2,SourceCodePro-Semibold-aa29a496.ttf.woff2".split(",").map(f=>`<link rel="preload" as="font" type="font/woff2"href="../../static.files/${f}">`).join(""))</script><link rel="stylesheet" href="../../static.files/normalize-9960930a.css"><link rel="stylesheet" href="../../static.files/rustdoc-e56847b5.css"><meta name="rustdoc-vars" data-root-path="../../" data-static-root-path="../../static.files/" data-current-crate="common_sql" data-themes="" data-resource-suffix="" data-rustdoc-version="1.92.0-nightly (fa3155a64 2025-09-30)" data-channel="nightly" data-search-js="search-e256b49e.js" data-stringdex-js="stringdex-828709d0.js" data-settings-js="settings-c38705f0.js" ><script src="../../static.files/storage-e2aeef58.js"></script><script defer src="sidebar-items.js"></script><script defer src="../../static.files/main-ce535bd0.js"></script><noscript><link rel="stylesheet" href="../../static.files/noscript-263c88ec.css"></noscript><link rel="alternate icon" type="image/png" href="../../static.files/favicon-32x32-eab170b8.png"><link rel="icon" type="image/svg+xml" href="../../static.files/favicon-044be391.svg"></head><body class="rustdoc fn"><!--[if lte IE 11]><div class="warning">This old browser is unsupported and will most likely display funky things.</div><![endif]--><rustdoc-topbar><h2><a href="#">sql_number_to_value</a></h2></rustdoc-topbar><nav class="sidebar"><div class="sidebar-crate"><h2><a href="../../common_sql/index.html">common_<wbr>sql</a><span class="version">1.0.0-beta.3</span></h2></div><div class="sidebar-elems"><div id="rustdoc-modnav"><h2><a href="index.html">In common_<wbr>sql::<wbr>convert</a></h2></div></div></nav><div class="sidebar-resizer" title="Drag to resize sidebar"></div><main><div class="width-limiter"><section id="main-content" class="content"><div class="main-heading"><div class="rustdoc-breadcrumbs"><a href="../index.html">common_sql</a>::<wbr><a href="index.html">convert</a></div><h1>Function <span class="fn">sql_<wbr>number_<wbr>to_<wbr>value</span> <button id="copy-path" title="Copy item path to clipboard">Copy item path</button></h1><rustdoc-toolbar></rustdoc-toolbar><span class="sub-heading"><a class="src" href="../../src/common_sql/convert.rs.html#105-121">Source</a> </span></div><pre class="rust item-decl"><code>pub(crate) fn sql_number_to_value(
|
||||
data_type: &ConcreteDataType,
|
||||
n: &<a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.str.html">str</a>,
|
||||
) -> <a class="type" href="../error/type.Result.html" title="type common_sql::error::Result">Result</a><Value></code></pre><details class="toggle top-doc" open><summary class="hideme"><span>Expand description</span></summary><div class="docblock"><p>Convert a sql value into datatype’s value</p>
|
||||
</div></details></section></div></main></body></html>
|
||||
11
common_sql/convert/fn.sql_value_to_value.html
Normal file
11
common_sql/convert/fn.sql_value_to_value.html
Normal file
@@ -0,0 +1,11 @@
|
||||
<!DOCTYPE html><html lang="en"><head><meta charset="utf-8"><meta name="viewport" content="width=device-width, initial-scale=1.0"><meta name="generator" content="rustdoc"><meta name="description" content="Converts SQL value to value according to the data type. If `auto_string_to_numeric` is true, tries to cast the string value to numeric values, and returns error if the cast fails."><title>sql_value_to_value in common_sql::convert - Rust</title><script>if(window.location.protocol!=="file:")document.head.insertAdjacentHTML("beforeend","SourceSerif4-Regular-6b053e98.ttf.woff2,FiraSans-Italic-81dc35de.woff2,FiraSans-Regular-0fe48ade.woff2,FiraSans-MediumItalic-ccf7e434.woff2,FiraSans-Medium-e1aa3f0a.woff2,SourceCodePro-Regular-8badfe75.ttf.woff2,SourceCodePro-Semibold-aa29a496.ttf.woff2".split(",").map(f=>`<link rel="preload" as="font" type="font/woff2"href="../../static.files/${f}">`).join(""))</script><link rel="stylesheet" href="../../static.files/normalize-9960930a.css"><link rel="stylesheet" href="../../static.files/rustdoc-e56847b5.css"><meta name="rustdoc-vars" data-root-path="../../" data-static-root-path="../../static.files/" data-current-crate="common_sql" data-themes="" data-resource-suffix="" data-rustdoc-version="1.92.0-nightly (fa3155a64 2025-09-30)" data-channel="nightly" data-search-js="search-e256b49e.js" data-stringdex-js="stringdex-828709d0.js" data-settings-js="settings-c38705f0.js" ><script src="../../static.files/storage-e2aeef58.js"></script><script defer src="sidebar-items.js"></script><script defer src="../../static.files/main-ce535bd0.js"></script><noscript><link rel="stylesheet" href="../../static.files/noscript-263c88ec.css"></noscript><link rel="alternate icon" type="image/png" href="../../static.files/favicon-32x32-eab170b8.png"><link rel="icon" type="image/svg+xml" href="../../static.files/favicon-044be391.svg"></head><body class="rustdoc fn"><!--[if lte IE 11]><div class="warning">This old browser is unsupported and will most likely display funky things.</div><![endif]--><rustdoc-topbar><h2><a href="#">sql_value_to_value</a></h2></rustdoc-topbar><nav class="sidebar"><div class="sidebar-crate"><h2><a href="../../common_sql/index.html">common_<wbr>sql</a><span class="version">1.0.0-beta.3</span></h2></div><div class="sidebar-elems"><div id="rustdoc-modnav"><h2><a href="index.html">In common_<wbr>sql::<wbr>convert</a></h2></div></div></nav><div class="sidebar-resizer" title="Drag to resize sidebar"></div><main><div class="width-limiter"><section id="main-content" class="content"><div class="main-heading"><div class="rustdoc-breadcrumbs"><a href="../index.html">common_sql</a>::<wbr><a href="index.html">convert</a></div><h1>Function <span class="fn">sql_<wbr>value_<wbr>to_<wbr>value</span> <button id="copy-path" title="Copy item path to clipboard">Copy item path</button></h1><rustdoc-toolbar></rustdoc-toolbar><span class="sub-heading"><a class="src" href="../../src/common_sql/convert.rs.html#126-244">Source</a> </span></div><pre class="rust item-decl"><code>pub fn sql_value_to_value(
|
||||
column_name: &<a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.str.html">str</a>,
|
||||
data_type: &ConcreteDataType,
|
||||
sql_val: &<a class="enum" href="enum.SqlValue.html" title="enum common_sql::convert::SqlValue">SqlValue</a>,
|
||||
timezone: <a class="enum" href="https://doc.rust-lang.org/nightly/core/option/enum.Option.html" title="enum core::option::Option">Option</a><&Timezone>,
|
||||
unary_op: <a class="enum" href="https://doc.rust-lang.org/nightly/core/option/enum.Option.html" title="enum core::option::Option">Option</a><<a class="enum" href="enum.UnaryOperator.html" title="enum common_sql::convert::UnaryOperator">UnaryOperator</a>>,
|
||||
auto_string_to_numeric: <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.bool.html">bool</a>,
|
||||
) -> <a class="type" href="../error/type.Result.html" title="type common_sql::error::Result">Result</a><Value></code></pre><details class="toggle top-doc" open><summary class="hideme"><span>Expand description</span></summary><div class="docblock"><p>Converts SQL value to value according to the data type.
|
||||
If <code>auto_string_to_numeric</code> is true, tries to cast the string value to numeric values,
|
||||
and returns error if the cast fails.</p>
|
||||
</div></details></section></div></main></body></html>
|
||||
47
common_sql/convert/fn.visit_expressions_mut.html
Normal file
47
common_sql/convert/fn.visit_expressions_mut.html
Normal file
@@ -0,0 +1,47 @@
|
||||
<!DOCTYPE html><html lang="en"><head><meta charset="utf-8"><meta name="viewport" content="width=device-width, initial-scale=1.0"><meta name="generator" content="rustdoc"><meta name="description" content="Invokes the provided closure iteratively with a mutable reference to all expressions present in `v`."><title>visit_expressions_mut in common_sql::convert - Rust</title><script>if(window.location.protocol!=="file:")document.head.insertAdjacentHTML("beforeend","SourceSerif4-Regular-6b053e98.ttf.woff2,FiraSans-Italic-81dc35de.woff2,FiraSans-Regular-0fe48ade.woff2,FiraSans-MediumItalic-ccf7e434.woff2,FiraSans-Medium-e1aa3f0a.woff2,SourceCodePro-Regular-8badfe75.ttf.woff2,SourceCodePro-Semibold-aa29a496.ttf.woff2".split(",").map(f=>`<link rel="preload" as="font" type="font/woff2"href="../../static.files/${f}">`).join(""))</script><link rel="stylesheet" href="../../static.files/normalize-9960930a.css"><link rel="stylesheet" href="../../static.files/rustdoc-e56847b5.css"><meta name="rustdoc-vars" data-root-path="../../" data-static-root-path="../../static.files/" data-current-crate="common_sql" data-themes="" data-resource-suffix="" data-rustdoc-version="1.92.0-nightly (fa3155a64 2025-09-30)" data-channel="nightly" data-search-js="search-e256b49e.js" data-stringdex-js="stringdex-828709d0.js" data-settings-js="settings-c38705f0.js" ><script src="../../static.files/storage-e2aeef58.js"></script><script defer src="sidebar-items.js"></script><script defer src="../../static.files/main-ce535bd0.js"></script><noscript><link rel="stylesheet" href="../../static.files/noscript-263c88ec.css"></noscript><link rel="alternate icon" type="image/png" href="../../static.files/favicon-32x32-eab170b8.png"><link rel="icon" type="image/svg+xml" href="../../static.files/favicon-044be391.svg"></head><body class="rustdoc fn"><!--[if lte IE 11]><div class="warning">This old browser is unsupported and will most likely display funky things.</div><![endif]--><rustdoc-topbar><h2><a href="#">visit_expressions_mut</a></h2></rustdoc-topbar><nav class="sidebar"><div class="sidebar-crate"><h2><a href="../../common_sql/index.html">common_<wbr>sql</a><span class="version">1.0.0-beta.3</span></h2></div><div class="sidebar-elems"><section id="rustdoc-toc"><h2 class="location"><a href="#">visit_<wbr>expressions_<wbr>mut</a></h2><h3><a href="#">Sections</a></h3><ul class="block top-toc"><li><a href="#example" title="Example">Example</a><ul><li><a href="#remove-all-select-limits-in-sub-queries" title="Remove all select limits in sub-queries">Remove all select limits in sub-queries</a></li><li><a href="#wrap-column-name-in-function-call" title="Wrap column name in function call">Wrap column name in function call</a></li></ul></li></ul></section><div id="rustdoc-modnav"><h2><a href="index.html">In common_<wbr>sql::<wbr>convert</a></h2></div></div></nav><div class="sidebar-resizer" title="Drag to resize sidebar"></div><main><div class="width-limiter"><section id="main-content" class="content"><div class="main-heading"><div class="rustdoc-breadcrumbs"><a href="../index.html">common_sql</a>::<wbr><a href="index.html">convert</a></div><h1>Function <span class="fn">visit_<wbr>expressions_<wbr>mut</span> <button id="copy-path" title="Copy item path to clipboard">Copy item path</button></h1><rustdoc-toolbar></rustdoc-toolbar><span class="sub-heading"></span></div><pre class="rust item-decl"><code>pub fn visit_expressions_mut<V, E, F>(v: <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.reference.html">&mut V</a>, f: F) -> <a class="enum" href="https://doc.rust-lang.org/nightly/core/ops/control_flow/enum.ControlFlow.html" title="enum core::ops::control_flow::ControlFlow">ControlFlow</a><E><div class="where">where
|
||||
V: <a class="trait" href="trait.VisitMut.html" title="trait common_sql::convert::VisitMut">VisitMut</a>,
|
||||
F: <a class="trait" href="https://doc.rust-lang.org/nightly/core/ops/function/trait.FnMut.html" title="trait core::ops::function::FnMut">FnMut</a>(&mut <a class="enum" href="enum.Expr.html" title="enum common_sql::convert::Expr">Expr</a>) -> <a class="enum" href="https://doc.rust-lang.org/nightly/core/ops/control_flow/enum.ControlFlow.html" title="enum core::ops::control_flow::ControlFlow">ControlFlow</a><E>,</div></code></pre><details class="toggle top-doc" open><summary class="hideme"><span>Expand description</span></summary><div class="docblock"><p>Invokes the provided closure iteratively with a mutable reference to all expressions
|
||||
present in <code>v</code>.</p>
|
||||
<p>This performs a depth-first search, so if the closure mutates the expression</p>
|
||||
<h2 id="example"><a class="doc-anchor" href="#example">§</a>Example</h2><h3 id="remove-all-select-limits-in-sub-queries"><a class="doc-anchor" href="#remove-all-select-limits-in-sub-queries">§</a>Remove all select limits in sub-queries</h3>
|
||||
<div class="example-wrap"><pre class="rust rust-example-rendered"><code><span class="kw">let </span>sql = <span class="string">"SELECT (SELECT y FROM z LIMIT 9) FROM t LIMIT 3"</span>;
|
||||
<span class="kw">let </span><span class="kw-2">mut </span>statements = Parser::parse_sql(<span class="kw-2">&</span>GenericDialect{}, sql).unwrap();
|
||||
|
||||
<span class="comment">// Remove all select limits in sub-queries
|
||||
</span>visit_expressions_mut(<span class="kw-2">&mut </span>statements, |expr| {
|
||||
<span class="kw">if let </span>Expr::Subquery(q) = expr {
|
||||
q.limit_clause = <span class="prelude-val">None</span>;
|
||||
}
|
||||
ControlFlow::<()>::Continue(())
|
||||
});
|
||||
|
||||
<span class="macro">assert_eq!</span>(statements[<span class="number">0</span>].to_string(), <span class="string">"SELECT (SELECT y FROM z) FROM t LIMIT 3"</span>);</code></pre></div><h3 id="wrap-column-name-in-function-call"><a class="doc-anchor" href="#wrap-column-name-in-function-call">§</a>Wrap column name in function call</h3>
|
||||
<p>This demonstrates how to effectively replace an expression with another more complicated one
|
||||
that references the original. This example avoids unnecessary allocations by using the
|
||||
<a href="https://doc.rust-lang.org/nightly/core/mem/index.html" title="mod core::mem"><code>std::mem</code></a> family of functions.</p>
|
||||
|
||||
<div class="example-wrap"><pre class="rust rust-example-rendered"><code><span class="kw">let </span>sql = <span class="string">"SELECT x, y FROM t"</span>;
|
||||
<span class="kw">let </span><span class="kw-2">mut </span>statements = Parser::parse_sql(<span class="kw-2">&</span>GenericDialect{}, sql).unwrap();
|
||||
|
||||
visit_expressions_mut(<span class="kw-2">&mut </span>statements, |expr| {
|
||||
<span class="kw">if </span><span class="macro">matches!</span>(expr, Expr::Identifier(col_name) <span class="kw">if </span>col_name.value == <span class="string">"x"</span>) {
|
||||
<span class="kw">let </span>old_expr = std::mem::replace(expr, Expr::value(Value::Null));
|
||||
<span class="kw-2">*</span>expr = Expr::Function(Function {
|
||||
name: ObjectName::from(<span class="macro">vec!</span>[Ident::new(<span class="string">"f"</span>)]),
|
||||
uses_odbc_syntax: <span class="bool-val">false</span>,
|
||||
args: FunctionArguments::List(FunctionArgumentList {
|
||||
duplicate_treatment: <span class="prelude-val">None</span>,
|
||||
args: <span class="macro">vec!</span>[FunctionArg::Unnamed(FunctionArgExpr::Expr(old_expr))],
|
||||
clauses: <span class="macro">vec!</span>[],
|
||||
}),
|
||||
null_treatment: <span class="prelude-val">None</span>,
|
||||
filter: <span class="prelude-val">None</span>,
|
||||
over: <span class="prelude-val">None</span>,
|
||||
parameters: FunctionArguments::None,
|
||||
within_group: <span class="macro">vec!</span>[],
|
||||
});
|
||||
}
|
||||
ControlFlow::<()>::Continue(())
|
||||
});
|
||||
|
||||
<span class="macro">assert_eq!</span>(statements[<span class="number">0</span>].to_string(), <span class="string">"SELECT f(x), y FROM t"</span>);</code></pre></div></div></details></section></div></main></body></html>
|
||||
17
common_sql/convert/fn.visit_statements_mut.html
Normal file
17
common_sql/convert/fn.visit_statements_mut.html
Normal file
@@ -0,0 +1,17 @@
|
||||
<!DOCTYPE html><html lang="en"><head><meta charset="utf-8"><meta name="viewport" content="width=device-width, initial-scale=1.0"><meta name="generator" content="rustdoc"><meta name="description" content="Invokes the provided closure on all statements (e.g. `SELECT`, `CREATE TABLE`, etc) present in `v`"><title>visit_statements_mut in common_sql::convert - Rust</title><script>if(window.location.protocol!=="file:")document.head.insertAdjacentHTML("beforeend","SourceSerif4-Regular-6b053e98.ttf.woff2,FiraSans-Italic-81dc35de.woff2,FiraSans-Regular-0fe48ade.woff2,FiraSans-MediumItalic-ccf7e434.woff2,FiraSans-Medium-e1aa3f0a.woff2,SourceCodePro-Regular-8badfe75.ttf.woff2,SourceCodePro-Semibold-aa29a496.ttf.woff2".split(",").map(f=>`<link rel="preload" as="font" type="font/woff2"href="../../static.files/${f}">`).join(""))</script><link rel="stylesheet" href="../../static.files/normalize-9960930a.css"><link rel="stylesheet" href="../../static.files/rustdoc-e56847b5.css"><meta name="rustdoc-vars" data-root-path="../../" data-static-root-path="../../static.files/" data-current-crate="common_sql" data-themes="" data-resource-suffix="" data-rustdoc-version="1.92.0-nightly (fa3155a64 2025-09-30)" data-channel="nightly" data-search-js="search-e256b49e.js" data-stringdex-js="stringdex-828709d0.js" data-settings-js="settings-c38705f0.js" ><script src="../../static.files/storage-e2aeef58.js"></script><script defer src="sidebar-items.js"></script><script defer src="../../static.files/main-ce535bd0.js"></script><noscript><link rel="stylesheet" href="../../static.files/noscript-263c88ec.css"></noscript><link rel="alternate icon" type="image/png" href="../../static.files/favicon-32x32-eab170b8.png"><link rel="icon" type="image/svg+xml" href="../../static.files/favicon-044be391.svg"></head><body class="rustdoc fn"><!--[if lte IE 11]><div class="warning">This old browser is unsupported and will most likely display funky things.</div><![endif]--><rustdoc-topbar><h2><a href="#">visit_statements_mut</a></h2></rustdoc-topbar><nav class="sidebar"><div class="sidebar-crate"><h2><a href="../../common_sql/index.html">common_<wbr>sql</a><span class="version">1.0.0-beta.3</span></h2></div><div class="sidebar-elems"><section id="rustdoc-toc"><h2 class="location"><a href="#">visit_<wbr>statements_<wbr>mut</a></h2><h3><a href="#">Sections</a></h3><ul class="block top-toc"><li><a href="#example" title="Example">Example</a></li></ul></section><div id="rustdoc-modnav"><h2><a href="index.html">In common_<wbr>sql::<wbr>convert</a></h2></div></div></nav><div class="sidebar-resizer" title="Drag to resize sidebar"></div><main><div class="width-limiter"><section id="main-content" class="content"><div class="main-heading"><div class="rustdoc-breadcrumbs"><a href="../index.html">common_sql</a>::<wbr><a href="index.html">convert</a></div><h1>Function <span class="fn">visit_<wbr>statements_<wbr>mut</span> <button id="copy-path" title="Copy item path to clipboard">Copy item path</button></h1><rustdoc-toolbar></rustdoc-toolbar><span class="sub-heading"></span></div><pre class="rust item-decl"><code>pub fn visit_statements_mut<V, E, F>(v: <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.reference.html">&mut V</a>, f: F) -> <a class="enum" href="https://doc.rust-lang.org/nightly/core/ops/control_flow/enum.ControlFlow.html" title="enum core::ops::control_flow::ControlFlow">ControlFlow</a><E><div class="where">where
|
||||
V: <a class="trait" href="trait.VisitMut.html" title="trait common_sql::convert::VisitMut">VisitMut</a>,
|
||||
F: <a class="trait" href="https://doc.rust-lang.org/nightly/core/ops/function/trait.FnMut.html" title="trait core::ops::function::FnMut">FnMut</a>(&mut Statement) -> <a class="enum" href="https://doc.rust-lang.org/nightly/core/ops/control_flow/enum.ControlFlow.html" title="enum core::ops::control_flow::ControlFlow">ControlFlow</a><E>,</div></code></pre><details class="toggle top-doc" open><summary class="hideme"><span>Expand description</span></summary><div class="docblock"><p>Invokes the provided closure on all statements (e.g. <code>SELECT</code>, <code>CREATE TABLE</code>, etc) present in <code>v</code></p>
|
||||
<h2 id="example"><a class="doc-anchor" href="#example">§</a>Example</h2>
|
||||
<div class="example-wrap"><pre class="rust rust-example-rendered"><code><span class="kw">let </span>sql = <span class="string">"SELECT x FROM foo LIMIT 9+$limit; SELECT * FROM t LIMIT f()"</span>;
|
||||
<span class="kw">let </span><span class="kw-2">mut </span>statements = Parser::parse_sql(<span class="kw-2">&</span>GenericDialect{}, sql).unwrap();
|
||||
|
||||
<span class="comment">// Remove all select limits in outer statements (not in sub-queries)
|
||||
</span>visit_statements_mut(<span class="kw-2">&mut </span>statements, |stmt| {
|
||||
<span class="kw">if let </span>Statement::Query(q) = stmt {
|
||||
q.limit_clause = <span class="prelude-val">None</span>;
|
||||
}
|
||||
ControlFlow::<()>::Continue(())
|
||||
});
|
||||
|
||||
<span class="macro">assert_eq!</span>(statements[<span class="number">0</span>].to_string(), <span class="string">"SELECT x FROM foo"</span>);
|
||||
<span class="macro">assert_eq!</span>(statements[<span class="number">1</span>].to_string(), <span class="string">"SELECT * FROM t"</span>);</code></pre></div></div></details></section></div></main></body></html>
|
||||
8
common_sql/convert/index.html
Normal file
8
common_sql/convert/index.html
Normal file
File diff suppressed because one or more lines are too long
11
common_sql/convert/macro.parse_number_to_value!.html
Normal file
11
common_sql/convert/macro.parse_number_to_value!.html
Normal file
@@ -0,0 +1,11 @@
|
||||
<!DOCTYPE html>
|
||||
<html lang="en">
|
||||
<head>
|
||||
<meta http-equiv="refresh" content="0;URL=macro.parse_number_to_value.html">
|
||||
<title>Redirection</title>
|
||||
</head>
|
||||
<body>
|
||||
<p>Redirecting to <a href="macro.parse_number_to_value.html">macro.parse_number_to_value.html</a>...</p>
|
||||
<script>location.replace("macro.parse_number_to_value.html" + location.search + location.hash);</script>
|
||||
</body>
|
||||
</html>
|
||||
3
common_sql/convert/macro.parse_number_to_value.html
Normal file
3
common_sql/convert/macro.parse_number_to_value.html
Normal file
@@ -0,0 +1,3 @@
|
||||
<!DOCTYPE html><html lang="en"><head><meta charset="utf-8"><meta name="viewport" content="width=device-width, initial-scale=1.0"><meta name="generator" content="rustdoc"><meta name="description" content="API documentation for the Rust `parse_number_to_value` macro in crate `common_sql`."><title>parse_number_to_value in common_sql::convert - Rust</title><script>if(window.location.protocol!=="file:")document.head.insertAdjacentHTML("beforeend","SourceSerif4-Regular-6b053e98.ttf.woff2,FiraSans-Italic-81dc35de.woff2,FiraSans-Regular-0fe48ade.woff2,FiraSans-MediumItalic-ccf7e434.woff2,FiraSans-Medium-e1aa3f0a.woff2,SourceCodePro-Regular-8badfe75.ttf.woff2,SourceCodePro-Semibold-aa29a496.ttf.woff2".split(",").map(f=>`<link rel="preload" as="font" type="font/woff2"href="../../static.files/${f}">`).join(""))</script><link rel="stylesheet" href="../../static.files/normalize-9960930a.css"><link rel="stylesheet" href="../../static.files/rustdoc-e56847b5.css"><meta name="rustdoc-vars" data-root-path="../../" data-static-root-path="../../static.files/" data-current-crate="common_sql" data-themes="" data-resource-suffix="" data-rustdoc-version="1.92.0-nightly (fa3155a64 2025-09-30)" data-channel="nightly" data-search-js="search-e256b49e.js" data-stringdex-js="stringdex-828709d0.js" data-settings-js="settings-c38705f0.js" ><script src="../../static.files/storage-e2aeef58.js"></script><script defer src="sidebar-items.js"></script><script defer src="../../static.files/main-ce535bd0.js"></script><noscript><link rel="stylesheet" href="../../static.files/noscript-263c88ec.css"></noscript><link rel="alternate icon" type="image/png" href="../../static.files/favicon-32x32-eab170b8.png"><link rel="icon" type="image/svg+xml" href="../../static.files/favicon-044be391.svg"></head><body class="rustdoc macro"><!--[if lte IE 11]><div class="warning">This old browser is unsupported and will most likely display funky things.</div><![endif]--><rustdoc-topbar><h2><a href="#">parse_number_to_value</a></h2></rustdoc-topbar><nav class="sidebar"><div class="sidebar-crate"><h2><a href="../../common_sql/index.html">common_<wbr>sql</a><span class="version">1.0.0-beta.3</span></h2></div><div class="sidebar-elems"><div id="rustdoc-modnav"><h2><a href="index.html">In common_<wbr>sql::<wbr>convert</a></h2></div></div></nav><div class="sidebar-resizer" title="Drag to resize sidebar"></div><main><div class="width-limiter"><section id="main-content" class="content"><div class="main-heading"><div class="rustdoc-breadcrumbs"><a href="../index.html">common_sql</a>::<wbr><a href="index.html">convert</a></div><h1>Macro <span class="macro">parse_<wbr>number_<wbr>to_<wbr>value</span> <button id="copy-path" title="Copy item path to clipboard">Copy item path</button></h1><rustdoc-toolbar></rustdoc-toolbar><span class="sub-heading"><a class="src" href="../../src/common_sql/convert.rs.html#51-102">Source</a> </span></div><pre class="rust item-decl"><code>macro_rules! parse_number_to_value {
|
||||
($data_type: expr, $n: ident, $(($Type: ident, $PrimitiveType: ident, $Target: ident)), +) => { ... };
|
||||
}</code></pre></section></div></main></body></html>
|
||||
1
common_sql/convert/sidebar-items.js
Normal file
1
common_sql/convert/sidebar-items.js
Normal file
@@ -0,0 +1 @@
|
||||
window.SIDEBAR_ITEMS = {"enum":["BinaryOperator","ColumnOption","DataType","Expr","FunctionArg","FunctionArgExpr","FunctionArguments","SqlOption","SqlValue","TableConstraint","TimezoneInfo","UnaryOperator"],"fn":["auto_cast_to_numeric","deserialize_default_constraint","parse_hex_string","parse_sql_number","parse_string_to_value","sql_number_to_value","sql_value_to_value","visit_expressions_mut","visit_statements_mut"],"macro":["parse_number_to_value"],"struct":["ColumnDef","ColumnOptionDef","Function","Ident","ObjectName"],"trait":["Visit","VisitMut","Visitor","VisitorMut"]};
|
||||
232
common_sql/convert/struct.ColumnDef.html
Normal file
232
common_sql/convert/struct.ColumnDef.html
Normal file
File diff suppressed because one or more lines are too long
244
common_sql/convert/struct.ColumnOptionDef.html
Normal file
244
common_sql/convert/struct.ColumnOptionDef.html
Normal file
File diff suppressed because one or more lines are too long
255
common_sql/convert/struct.Function.html
Normal file
255
common_sql/convert/struct.Function.html
Normal file
File diff suppressed because one or more lines are too long
242
common_sql/convert/struct.Ident.html
Normal file
242
common_sql/convert/struct.Ident.html
Normal file
File diff suppressed because one or more lines are too long
228
common_sql/convert/struct.ObjectName.html
Normal file
228
common_sql/convert/struct.ObjectName.html
Normal file
File diff suppressed because one or more lines are too long
38
common_sql/convert/trait.Visit.html
Normal file
38
common_sql/convert/trait.Visit.html
Normal file
File diff suppressed because one or more lines are too long
74
common_sql/convert/trait.VisitMut.html
Normal file
74
common_sql/convert/trait.VisitMut.html
Normal file
File diff suppressed because one or more lines are too long
119
common_sql/convert/trait.Visitor.html
Normal file
119
common_sql/convert/trait.Visitor.html
Normal file
@@ -0,0 +1,119 @@
|
||||
<!DOCTYPE html><html lang="en"><head><meta charset="utf-8"><meta name="viewport" content="width=device-width, initial-scale=1.0"><meta name="generator" content="rustdoc"><meta name="description" content="A visitor that can be used to walk an AST tree."><title>Visitor in common_sql::convert - Rust</title><script>if(window.location.protocol!=="file:")document.head.insertAdjacentHTML("beforeend","SourceSerif4-Regular-6b053e98.ttf.woff2,FiraSans-Italic-81dc35de.woff2,FiraSans-Regular-0fe48ade.woff2,FiraSans-MediumItalic-ccf7e434.woff2,FiraSans-Medium-e1aa3f0a.woff2,SourceCodePro-Regular-8badfe75.ttf.woff2,SourceCodePro-Semibold-aa29a496.ttf.woff2".split(",").map(f=>`<link rel="preload" as="font" type="font/woff2"href="../../static.files/${f}">`).join(""))</script><link rel="stylesheet" href="../../static.files/normalize-9960930a.css"><link rel="stylesheet" href="../../static.files/rustdoc-e56847b5.css"><meta name="rustdoc-vars" data-root-path="../../" data-static-root-path="../../static.files/" data-current-crate="common_sql" data-themes="" data-resource-suffix="" data-rustdoc-version="1.92.0-nightly (fa3155a64 2025-09-30)" data-channel="nightly" data-search-js="search-e256b49e.js" data-stringdex-js="stringdex-828709d0.js" data-settings-js="settings-c38705f0.js" ><script src="../../static.files/storage-e2aeef58.js"></script><script defer src="sidebar-items.js"></script><script defer src="../../static.files/main-ce535bd0.js"></script><noscript><link rel="stylesheet" href="../../static.files/noscript-263c88ec.css"></noscript><link rel="alternate icon" type="image/png" href="../../static.files/favicon-32x32-eab170b8.png"><link rel="icon" type="image/svg+xml" href="../../static.files/favicon-044be391.svg"></head><body class="rustdoc trait"><!--[if lte IE 11]><div class="warning">This old browser is unsupported and will most likely display funky things.</div><![endif]--><rustdoc-topbar><h2><a href="#">Visitor</a></h2></rustdoc-topbar><nav class="sidebar"><div class="sidebar-crate"><h2><a href="../../common_sql/index.html">common_<wbr>sql</a><span class="version">1.0.0-beta.3</span></h2></div><div class="sidebar-elems"><section id="rustdoc-toc"><h2 class="location"><a href="#">Visitor</a></h2><h3><a href="#">Sections</a></h3><ul class="block top-toc"><li><a href="#see-also" title="See also">See also</a></li><li><a href="#example" title="Example">Example</a></li></ul><h3><a href="#required-associated-types">Required Associated Types</a></h3><ul class="block"><li><a href="#associatedtype.Break" title="Break">Break</a></li></ul><h3><a href="#provided-methods">Provided Methods</a></h3><ul class="block"><li><a href="#method.post_visit_expr" title="post_visit_expr">post_visit_expr</a></li><li><a href="#method.post_visit_query" title="post_visit_query">post_visit_query</a></li><li><a href="#method.post_visit_relation" title="post_visit_relation">post_visit_relation</a></li><li><a href="#method.post_visit_statement" title="post_visit_statement">post_visit_statement</a></li><li><a href="#method.post_visit_table_factor" title="post_visit_table_factor">post_visit_table_factor</a></li><li><a href="#method.post_visit_value" title="post_visit_value">post_visit_value</a></li><li><a href="#method.pre_visit_expr" title="pre_visit_expr">pre_visit_expr</a></li><li><a href="#method.pre_visit_query" title="pre_visit_query">pre_visit_query</a></li><li><a href="#method.pre_visit_relation" title="pre_visit_relation">pre_visit_relation</a></li><li><a href="#method.pre_visit_statement" title="pre_visit_statement">pre_visit_statement</a></li><li><a href="#method.pre_visit_table_factor" title="pre_visit_table_factor">pre_visit_table_factor</a></li><li><a href="#method.pre_visit_value" title="pre_visit_value">pre_visit_value</a></li></ul><h3><a href="#implementors">Implementors</a></h3></section><div id="rustdoc-modnav"><h2><a href="index.html">In common_<wbr>sql::<wbr>convert</a></h2></div></div></nav><div class="sidebar-resizer" title="Drag to resize sidebar"></div><main><div class="width-limiter"><section id="main-content" class="content"><div class="main-heading"><div class="rustdoc-breadcrumbs"><a href="../index.html">common_sql</a>::<wbr><a href="index.html">convert</a></div><h1>Trait <span class="trait">Visitor</span> <button id="copy-path" title="Copy item path to clipboard">Copy item path</button></h1><rustdoc-toolbar></rustdoc-toolbar><span class="sub-heading"></span></div><pre class="rust item-decl"><code>pub trait Visitor {
|
||||
type <a href="#associatedtype.Break" class="associatedtype">Break</a>;
|
||||
|
||||
// Provided methods
|
||||
fn <a href="#method.pre_visit_query" class="fn">pre_visit_query</a>(&mut self, _query: &Query) -> <a class="enum" href="https://doc.rust-lang.org/nightly/core/ops/control_flow/enum.ControlFlow.html" title="enum core::ops::control_flow::ControlFlow">ControlFlow</a><Self::<a class="associatedtype" href="trait.Visitor.html#associatedtype.Break" title="type common_sql::convert::Visitor::Break">Break</a>> { ... }
|
||||
<span class="item-spacer"></span> fn <a href="#method.post_visit_query" class="fn">post_visit_query</a>(&mut self, _query: &Query) -> <a class="enum" href="https://doc.rust-lang.org/nightly/core/ops/control_flow/enum.ControlFlow.html" title="enum core::ops::control_flow::ControlFlow">ControlFlow</a><Self::<a class="associatedtype" href="trait.Visitor.html#associatedtype.Break" title="type common_sql::convert::Visitor::Break">Break</a>> { ... }
|
||||
<span class="item-spacer"></span> fn <a href="#method.pre_visit_relation" class="fn">pre_visit_relation</a>(
|
||||
&mut self,
|
||||
_relation: &<a class="struct" href="struct.ObjectName.html" title="struct common_sql::convert::ObjectName">ObjectName</a>,
|
||||
) -> <a class="enum" href="https://doc.rust-lang.org/nightly/core/ops/control_flow/enum.ControlFlow.html" title="enum core::ops::control_flow::ControlFlow">ControlFlow</a><Self::<a class="associatedtype" href="trait.Visitor.html#associatedtype.Break" title="type common_sql::convert::Visitor::Break">Break</a>> { ... }
|
||||
<span class="item-spacer"></span> fn <a href="#method.post_visit_relation" class="fn">post_visit_relation</a>(
|
||||
&mut self,
|
||||
_relation: &<a class="struct" href="struct.ObjectName.html" title="struct common_sql::convert::ObjectName">ObjectName</a>,
|
||||
) -> <a class="enum" href="https://doc.rust-lang.org/nightly/core/ops/control_flow/enum.ControlFlow.html" title="enum core::ops::control_flow::ControlFlow">ControlFlow</a><Self::<a class="associatedtype" href="trait.Visitor.html#associatedtype.Break" title="type common_sql::convert::Visitor::Break">Break</a>> { ... }
|
||||
<span class="item-spacer"></span> fn <a href="#method.pre_visit_table_factor" class="fn">pre_visit_table_factor</a>(
|
||||
&mut self,
|
||||
_table_factor: &TableFactor,
|
||||
) -> <a class="enum" href="https://doc.rust-lang.org/nightly/core/ops/control_flow/enum.ControlFlow.html" title="enum core::ops::control_flow::ControlFlow">ControlFlow</a><Self::<a class="associatedtype" href="trait.Visitor.html#associatedtype.Break" title="type common_sql::convert::Visitor::Break">Break</a>> { ... }
|
||||
<span class="item-spacer"></span> fn <a href="#method.post_visit_table_factor" class="fn">post_visit_table_factor</a>(
|
||||
&mut self,
|
||||
_table_factor: &TableFactor,
|
||||
) -> <a class="enum" href="https://doc.rust-lang.org/nightly/core/ops/control_flow/enum.ControlFlow.html" title="enum core::ops::control_flow::ControlFlow">ControlFlow</a><Self::<a class="associatedtype" href="trait.Visitor.html#associatedtype.Break" title="type common_sql::convert::Visitor::Break">Break</a>> { ... }
|
||||
<span class="item-spacer"></span> fn <a href="#method.pre_visit_expr" class="fn">pre_visit_expr</a>(&mut self, _expr: &<a class="enum" href="enum.Expr.html" title="enum common_sql::convert::Expr">Expr</a>) -> <a class="enum" href="https://doc.rust-lang.org/nightly/core/ops/control_flow/enum.ControlFlow.html" title="enum core::ops::control_flow::ControlFlow">ControlFlow</a><Self::<a class="associatedtype" href="trait.Visitor.html#associatedtype.Break" title="type common_sql::convert::Visitor::Break">Break</a>> { ... }
|
||||
<span class="item-spacer"></span> fn <a href="#method.post_visit_expr" class="fn">post_visit_expr</a>(&mut self, _expr: &<a class="enum" href="enum.Expr.html" title="enum common_sql::convert::Expr">Expr</a>) -> <a class="enum" href="https://doc.rust-lang.org/nightly/core/ops/control_flow/enum.ControlFlow.html" title="enum core::ops::control_flow::ControlFlow">ControlFlow</a><Self::<a class="associatedtype" href="trait.Visitor.html#associatedtype.Break" title="type common_sql::convert::Visitor::Break">Break</a>> { ... }
|
||||
<span class="item-spacer"></span> fn <a href="#method.pre_visit_statement" class="fn">pre_visit_statement</a>(
|
||||
&mut self,
|
||||
_statement: &Statement,
|
||||
) -> <a class="enum" href="https://doc.rust-lang.org/nightly/core/ops/control_flow/enum.ControlFlow.html" title="enum core::ops::control_flow::ControlFlow">ControlFlow</a><Self::<a class="associatedtype" href="trait.Visitor.html#associatedtype.Break" title="type common_sql::convert::Visitor::Break">Break</a>> { ... }
|
||||
<span class="item-spacer"></span> fn <a href="#method.post_visit_statement" class="fn">post_visit_statement</a>(
|
||||
&mut self,
|
||||
_statement: &Statement,
|
||||
) -> <a class="enum" href="https://doc.rust-lang.org/nightly/core/ops/control_flow/enum.ControlFlow.html" title="enum core::ops::control_flow::ControlFlow">ControlFlow</a><Self::<a class="associatedtype" href="trait.Visitor.html#associatedtype.Break" title="type common_sql::convert::Visitor::Break">Break</a>> { ... }
|
||||
<span class="item-spacer"></span> fn <a href="#method.pre_visit_value" class="fn">pre_visit_value</a>(&mut self, _value: &<a class="enum" href="enum.SqlValue.html" title="enum common_sql::convert::SqlValue">Value</a>) -> <a class="enum" href="https://doc.rust-lang.org/nightly/core/ops/control_flow/enum.ControlFlow.html" title="enum core::ops::control_flow::ControlFlow">ControlFlow</a><Self::<a class="associatedtype" href="trait.Visitor.html#associatedtype.Break" title="type common_sql::convert::Visitor::Break">Break</a>> { ... }
|
||||
<span class="item-spacer"></span> fn <a href="#method.post_visit_value" class="fn">post_visit_value</a>(&mut self, _value: &<a class="enum" href="enum.SqlValue.html" title="enum common_sql::convert::SqlValue">Value</a>) -> <a class="enum" href="https://doc.rust-lang.org/nightly/core/ops/control_flow/enum.ControlFlow.html" title="enum core::ops::control_flow::ControlFlow">ControlFlow</a><Self::<a class="associatedtype" href="trait.Visitor.html#associatedtype.Break" title="type common_sql::convert::Visitor::Break">Break</a>> { ... }
|
||||
}</code></pre><details class="toggle top-doc" open><summary class="hideme"><span>Expand description</span></summary><div class="docblock"><p>A visitor that can be used to walk an AST tree.</p>
|
||||
<p><code>pre_visit_</code> methods are invoked before visiting all children of the
|
||||
node and <code>post_visit_</code> methods are invoked after visiting all
|
||||
children of the node.</p>
|
||||
<h2 id="see-also"><a class="doc-anchor" href="#see-also">§</a>See also</h2>
|
||||
<p>These methods provide a more concise way of visiting nodes of a certain type:</p>
|
||||
<ul>
|
||||
<li>[visit_relations]</li>
|
||||
<li>[visit_expressions]</li>
|
||||
<li>[visit_statements]</li>
|
||||
</ul>
|
||||
<h2 id="example"><a class="doc-anchor" href="#example">§</a>Example</h2>
|
||||
<div class="example-wrap"><pre class="rust rust-example-rendered"><code><span class="comment">// A structure that records statements and relations
|
||||
</span><span class="attr">#[derive(Default)]
|
||||
</span><span class="kw">struct </span>V {
|
||||
visited: Vec<String>,
|
||||
}
|
||||
|
||||
<span class="comment">// Visit relations and exprs before children are visited (depth first walk)
|
||||
// Note you can also visit statements and visit exprs after children have been visited
|
||||
</span><span class="kw">impl </span>Visitor <span class="kw">for </span>V {
|
||||
<span class="kw">type </span>Break = ();
|
||||
|
||||
<span class="kw">fn </span>pre_visit_relation(<span class="kw-2">&mut </span><span class="self">self</span>, relation: <span class="kw-2">&</span>ObjectName) -> ControlFlow<<span class="self">Self</span>::Break> {
|
||||
<span class="self">self</span>.visited.push(<span class="macro">format!</span>(<span class="string">"PRE: RELATION: {}"</span>, relation));
|
||||
ControlFlow::Continue(())
|
||||
}
|
||||
|
||||
<span class="kw">fn </span>pre_visit_expr(<span class="kw-2">&mut </span><span class="self">self</span>, expr: <span class="kw-2">&</span>Expr) -> ControlFlow<<span class="self">Self</span>::Break> {
|
||||
<span class="self">self</span>.visited.push(<span class="macro">format!</span>(<span class="string">"PRE: EXPR: {}"</span>, expr));
|
||||
ControlFlow::Continue(())
|
||||
}
|
||||
}
|
||||
|
||||
<span class="kw">let </span>sql = <span class="string">"SELECT a FROM foo where x IN (SELECT y FROM bar)"</span>;
|
||||
<span class="kw">let </span>statements = Parser::parse_sql(<span class="kw-2">&</span>GenericDialect{}, sql)
|
||||
.unwrap();
|
||||
|
||||
<span class="comment">// Drive the visitor through the AST
|
||||
</span><span class="kw">let </span><span class="kw-2">mut </span>visitor = V::default();
|
||||
statements.visit(<span class="kw-2">&mut </span>visitor);
|
||||
|
||||
<span class="comment">// The visitor has visited statements and expressions in pre-traversal order
|
||||
</span><span class="kw">let </span>expected : Vec<<span class="kw">_</span>> = [
|
||||
<span class="string">"PRE: EXPR: a"</span>,
|
||||
<span class="string">"PRE: RELATION: foo"</span>,
|
||||
<span class="string">"PRE: EXPR: x IN (SELECT y FROM bar)"</span>,
|
||||
<span class="string">"PRE: EXPR: x"</span>,
|
||||
<span class="string">"PRE: EXPR: y"</span>,
|
||||
<span class="string">"PRE: RELATION: bar"</span>,
|
||||
]
|
||||
.into_iter().map(|s| s.to_string()).collect();
|
||||
|
||||
<span class="macro">assert_eq!</span>(visitor.visited, expected);</code></pre></div></div></details><h2 id="required-associated-types" class="section-header">Required Associated Types<a href="#required-associated-types" class="anchor">§</a></h2><div class="methods"><details class="toggle" open><summary><section id="associatedtype.Break" class="method"><h4 class="code-header">type <a href="#associatedtype.Break" class="associatedtype">Break</a></h4></section></summary><div class="docblock"><p>Type returned when the recursion returns early.</p>
|
||||
</div></details></div><h2 id="provided-methods" class="section-header">Provided Methods<a href="#provided-methods" class="anchor">§</a></h2><div class="methods"><details class="toggle method-toggle" open><summary><section id="method.pre_visit_query" class="method"><h4 class="code-header">fn <a href="#method.pre_visit_query" class="fn">pre_visit_query</a>(&mut self, _query: &Query) -> <a class="enum" href="https://doc.rust-lang.org/nightly/core/ops/control_flow/enum.ControlFlow.html" title="enum core::ops::control_flow::ControlFlow">ControlFlow</a><Self::<a class="associatedtype" href="trait.Visitor.html#associatedtype.Break" title="type common_sql::convert::Visitor::Break">Break</a>></h4></section></summary><div class="docblock"><p>Invoked for any queries that appear in the AST before visiting children</p>
|
||||
</div></details><details class="toggle method-toggle" open><summary><section id="method.post_visit_query" class="method"><h4 class="code-header">fn <a href="#method.post_visit_query" class="fn">post_visit_query</a>(&mut self, _query: &Query) -> <a class="enum" href="https://doc.rust-lang.org/nightly/core/ops/control_flow/enum.ControlFlow.html" title="enum core::ops::control_flow::ControlFlow">ControlFlow</a><Self::<a class="associatedtype" href="trait.Visitor.html#associatedtype.Break" title="type common_sql::convert::Visitor::Break">Break</a>></h4></section></summary><div class="docblock"><p>Invoked for any queries that appear in the AST after visiting children</p>
|
||||
</div></details><details class="toggle method-toggle" open><summary><section id="method.pre_visit_relation" class="method"><h4 class="code-header">fn <a href="#method.pre_visit_relation" class="fn">pre_visit_relation</a>(
|
||||
&mut self,
|
||||
_relation: &<a class="struct" href="struct.ObjectName.html" title="struct common_sql::convert::ObjectName">ObjectName</a>,
|
||||
) -> <a class="enum" href="https://doc.rust-lang.org/nightly/core/ops/control_flow/enum.ControlFlow.html" title="enum core::ops::control_flow::ControlFlow">ControlFlow</a><Self::<a class="associatedtype" href="trait.Visitor.html#associatedtype.Break" title="type common_sql::convert::Visitor::Break">Break</a>></h4></section></summary><div class="docblock"><p>Invoked for any relations (e.g. tables) that appear in the AST before visiting children</p>
|
||||
</div></details><details class="toggle method-toggle" open><summary><section id="method.post_visit_relation" class="method"><h4 class="code-header">fn <a href="#method.post_visit_relation" class="fn">post_visit_relation</a>(
|
||||
&mut self,
|
||||
_relation: &<a class="struct" href="struct.ObjectName.html" title="struct common_sql::convert::ObjectName">ObjectName</a>,
|
||||
) -> <a class="enum" href="https://doc.rust-lang.org/nightly/core/ops/control_flow/enum.ControlFlow.html" title="enum core::ops::control_flow::ControlFlow">ControlFlow</a><Self::<a class="associatedtype" href="trait.Visitor.html#associatedtype.Break" title="type common_sql::convert::Visitor::Break">Break</a>></h4></section></summary><div class="docblock"><p>Invoked for any relations (e.g. tables) that appear in the AST after visiting children</p>
|
||||
</div></details><details class="toggle method-toggle" open><summary><section id="method.pre_visit_table_factor" class="method"><h4 class="code-header">fn <a href="#method.pre_visit_table_factor" class="fn">pre_visit_table_factor</a>(
|
||||
&mut self,
|
||||
_table_factor: &TableFactor,
|
||||
) -> <a class="enum" href="https://doc.rust-lang.org/nightly/core/ops/control_flow/enum.ControlFlow.html" title="enum core::ops::control_flow::ControlFlow">ControlFlow</a><Self::<a class="associatedtype" href="trait.Visitor.html#associatedtype.Break" title="type common_sql::convert::Visitor::Break">Break</a>></h4></section></summary><div class="docblock"><p>Invoked for any table factors that appear in the AST before visiting children</p>
|
||||
</div></details><details class="toggle method-toggle" open><summary><section id="method.post_visit_table_factor" class="method"><h4 class="code-header">fn <a href="#method.post_visit_table_factor" class="fn">post_visit_table_factor</a>(
|
||||
&mut self,
|
||||
_table_factor: &TableFactor,
|
||||
) -> <a class="enum" href="https://doc.rust-lang.org/nightly/core/ops/control_flow/enum.ControlFlow.html" title="enum core::ops::control_flow::ControlFlow">ControlFlow</a><Self::<a class="associatedtype" href="trait.Visitor.html#associatedtype.Break" title="type common_sql::convert::Visitor::Break">Break</a>></h4></section></summary><div class="docblock"><p>Invoked for any table factors that appear in the AST after visiting children</p>
|
||||
</div></details><details class="toggle method-toggle" open><summary><section id="method.pre_visit_expr" class="method"><h4 class="code-header">fn <a href="#method.pre_visit_expr" class="fn">pre_visit_expr</a>(&mut self, _expr: &<a class="enum" href="enum.Expr.html" title="enum common_sql::convert::Expr">Expr</a>) -> <a class="enum" href="https://doc.rust-lang.org/nightly/core/ops/control_flow/enum.ControlFlow.html" title="enum core::ops::control_flow::ControlFlow">ControlFlow</a><Self::<a class="associatedtype" href="trait.Visitor.html#associatedtype.Break" title="type common_sql::convert::Visitor::Break">Break</a>></h4></section></summary><div class="docblock"><p>Invoked for any expressions that appear in the AST before visiting children</p>
|
||||
</div></details><details class="toggle method-toggle" open><summary><section id="method.post_visit_expr" class="method"><h4 class="code-header">fn <a href="#method.post_visit_expr" class="fn">post_visit_expr</a>(&mut self, _expr: &<a class="enum" href="enum.Expr.html" title="enum common_sql::convert::Expr">Expr</a>) -> <a class="enum" href="https://doc.rust-lang.org/nightly/core/ops/control_flow/enum.ControlFlow.html" title="enum core::ops::control_flow::ControlFlow">ControlFlow</a><Self::<a class="associatedtype" href="trait.Visitor.html#associatedtype.Break" title="type common_sql::convert::Visitor::Break">Break</a>></h4></section></summary><div class="docblock"><p>Invoked for any expressions that appear in the AST</p>
|
||||
</div></details><details class="toggle method-toggle" open><summary><section id="method.pre_visit_statement" class="method"><h4 class="code-header">fn <a href="#method.pre_visit_statement" class="fn">pre_visit_statement</a>(
|
||||
&mut self,
|
||||
_statement: &Statement,
|
||||
) -> <a class="enum" href="https://doc.rust-lang.org/nightly/core/ops/control_flow/enum.ControlFlow.html" title="enum core::ops::control_flow::ControlFlow">ControlFlow</a><Self::<a class="associatedtype" href="trait.Visitor.html#associatedtype.Break" title="type common_sql::convert::Visitor::Break">Break</a>></h4></section></summary><div class="docblock"><p>Invoked for any statements that appear in the AST before visiting children</p>
|
||||
</div></details><details class="toggle method-toggle" open><summary><section id="method.post_visit_statement" class="method"><h4 class="code-header">fn <a href="#method.post_visit_statement" class="fn">post_visit_statement</a>(
|
||||
&mut self,
|
||||
_statement: &Statement,
|
||||
) -> <a class="enum" href="https://doc.rust-lang.org/nightly/core/ops/control_flow/enum.ControlFlow.html" title="enum core::ops::control_flow::ControlFlow">ControlFlow</a><Self::<a class="associatedtype" href="trait.Visitor.html#associatedtype.Break" title="type common_sql::convert::Visitor::Break">Break</a>></h4></section></summary><div class="docblock"><p>Invoked for any statements that appear in the AST after visiting children</p>
|
||||
</div></details><details class="toggle method-toggle" open><summary><section id="method.pre_visit_value" class="method"><h4 class="code-header">fn <a href="#method.pre_visit_value" class="fn">pre_visit_value</a>(&mut self, _value: &<a class="enum" href="enum.SqlValue.html" title="enum common_sql::convert::SqlValue">Value</a>) -> <a class="enum" href="https://doc.rust-lang.org/nightly/core/ops/control_flow/enum.ControlFlow.html" title="enum core::ops::control_flow::ControlFlow">ControlFlow</a><Self::<a class="associatedtype" href="trait.Visitor.html#associatedtype.Break" title="type common_sql::convert::Visitor::Break">Break</a>></h4></section></summary><div class="docblock"><p>Invoked for any Value that appear in the AST before visiting children</p>
|
||||
</div></details><details class="toggle method-toggle" open><summary><section id="method.post_visit_value" class="method"><h4 class="code-header">fn <a href="#method.post_visit_value" class="fn">post_visit_value</a>(&mut self, _value: &<a class="enum" href="enum.SqlValue.html" title="enum common_sql::convert::SqlValue">Value</a>) -> <a class="enum" href="https://doc.rust-lang.org/nightly/core/ops/control_flow/enum.ControlFlow.html" title="enum core::ops::control_flow::ControlFlow">ControlFlow</a><Self::<a class="associatedtype" href="trait.Visitor.html#associatedtype.Break" title="type common_sql::convert::Visitor::Break">Break</a>></h4></section></summary><div class="docblock"><p>Invoked for any Value that appear in the AST after visiting children</p>
|
||||
</div></details></div><h2 id="implementors" class="section-header">Implementors<a href="#implementors" class="anchor">§</a></h2><div id="implementors-list"></div><script src="../../trait.impl/sqlparser/ast/visitor/trait.Visitor.js" async></script></section></div></main></body></html>
|
||||
112
common_sql/convert/trait.VisitorMut.html
Normal file
112
common_sql/convert/trait.VisitorMut.html
Normal file
@@ -0,0 +1,112 @@
|
||||
<!DOCTYPE html><html lang="en"><head><meta charset="utf-8"><meta name="viewport" content="width=device-width, initial-scale=1.0"><meta name="generator" content="rustdoc"><meta name="description" content="A visitor that can be used to mutate an AST tree."><title>VisitorMut in common_sql::convert - Rust</title><script>if(window.location.protocol!=="file:")document.head.insertAdjacentHTML("beforeend","SourceSerif4-Regular-6b053e98.ttf.woff2,FiraSans-Italic-81dc35de.woff2,FiraSans-Regular-0fe48ade.woff2,FiraSans-MediumItalic-ccf7e434.woff2,FiraSans-Medium-e1aa3f0a.woff2,SourceCodePro-Regular-8badfe75.ttf.woff2,SourceCodePro-Semibold-aa29a496.ttf.woff2".split(",").map(f=>`<link rel="preload" as="font" type="font/woff2"href="../../static.files/${f}">`).join(""))</script><link rel="stylesheet" href="../../static.files/normalize-9960930a.css"><link rel="stylesheet" href="../../static.files/rustdoc-e56847b5.css"><meta name="rustdoc-vars" data-root-path="../../" data-static-root-path="../../static.files/" data-current-crate="common_sql" data-themes="" data-resource-suffix="" data-rustdoc-version="1.92.0-nightly (fa3155a64 2025-09-30)" data-channel="nightly" data-search-js="search-e256b49e.js" data-stringdex-js="stringdex-828709d0.js" data-settings-js="settings-c38705f0.js" ><script src="../../static.files/storage-e2aeef58.js"></script><script defer src="sidebar-items.js"></script><script defer src="../../static.files/main-ce535bd0.js"></script><noscript><link rel="stylesheet" href="../../static.files/noscript-263c88ec.css"></noscript><link rel="alternate icon" type="image/png" href="../../static.files/favicon-32x32-eab170b8.png"><link rel="icon" type="image/svg+xml" href="../../static.files/favicon-044be391.svg"></head><body class="rustdoc trait"><!--[if lte IE 11]><div class="warning">This old browser is unsupported and will most likely display funky things.</div><![endif]--><rustdoc-topbar><h2><a href="#">VisitorMut</a></h2></rustdoc-topbar><nav class="sidebar"><div class="sidebar-crate"><h2><a href="../../common_sql/index.html">common_<wbr>sql</a><span class="version">1.0.0-beta.3</span></h2></div><div class="sidebar-elems"><section id="rustdoc-toc"><h2 class="location"><a href="#">Visitor<wbr>Mut</a></h2><h3><a href="#">Sections</a></h3><ul class="block top-toc"><li><a href="#see-also" title="See also">See also</a></li><li><a href="#example" title="Example">Example</a></li></ul><h3><a href="#required-associated-types">Required Associated Types</a></h3><ul class="block"><li><a href="#associatedtype.Break" title="Break">Break</a></li></ul><h3><a href="#provided-methods">Provided Methods</a></h3><ul class="block"><li><a href="#method.post_visit_expr" title="post_visit_expr">post_visit_expr</a></li><li><a href="#method.post_visit_query" title="post_visit_query">post_visit_query</a></li><li><a href="#method.post_visit_relation" title="post_visit_relation">post_visit_relation</a></li><li><a href="#method.post_visit_statement" title="post_visit_statement">post_visit_statement</a></li><li><a href="#method.post_visit_table_factor" title="post_visit_table_factor">post_visit_table_factor</a></li><li><a href="#method.post_visit_value" title="post_visit_value">post_visit_value</a></li><li><a href="#method.pre_visit_expr" title="pre_visit_expr">pre_visit_expr</a></li><li><a href="#method.pre_visit_query" title="pre_visit_query">pre_visit_query</a></li><li><a href="#method.pre_visit_relation" title="pre_visit_relation">pre_visit_relation</a></li><li><a href="#method.pre_visit_statement" title="pre_visit_statement">pre_visit_statement</a></li><li><a href="#method.pre_visit_table_factor" title="pre_visit_table_factor">pre_visit_table_factor</a></li><li><a href="#method.pre_visit_value" title="pre_visit_value">pre_visit_value</a></li></ul><h3><a href="#implementors">Implementors</a></h3></section><div id="rustdoc-modnav"><h2><a href="index.html">In common_<wbr>sql::<wbr>convert</a></h2></div></div></nav><div class="sidebar-resizer" title="Drag to resize sidebar"></div><main><div class="width-limiter"><section id="main-content" class="content"><div class="main-heading"><div class="rustdoc-breadcrumbs"><a href="../index.html">common_sql</a>::<wbr><a href="index.html">convert</a></div><h1>Trait <span class="trait">Visitor<wbr>Mut</span> <button id="copy-path" title="Copy item path to clipboard">Copy item path</button></h1><rustdoc-toolbar></rustdoc-toolbar><span class="sub-heading"></span></div><pre class="rust item-decl"><code>pub trait VisitorMut {
|
||||
type <a href="#associatedtype.Break" class="associatedtype">Break</a>;
|
||||
|
||||
// Provided methods
|
||||
fn <a href="#method.pre_visit_query" class="fn">pre_visit_query</a>(
|
||||
&mut self,
|
||||
_query: &mut Query,
|
||||
) -> <a class="enum" href="https://doc.rust-lang.org/nightly/core/ops/control_flow/enum.ControlFlow.html" title="enum core::ops::control_flow::ControlFlow">ControlFlow</a><Self::<a class="associatedtype" href="trait.VisitorMut.html#associatedtype.Break" title="type common_sql::convert::VisitorMut::Break">Break</a>> { ... }
|
||||
<span class="item-spacer"></span> fn <a href="#method.post_visit_query" class="fn">post_visit_query</a>(
|
||||
&mut self,
|
||||
_query: &mut Query,
|
||||
) -> <a class="enum" href="https://doc.rust-lang.org/nightly/core/ops/control_flow/enum.ControlFlow.html" title="enum core::ops::control_flow::ControlFlow">ControlFlow</a><Self::<a class="associatedtype" href="trait.VisitorMut.html#associatedtype.Break" title="type common_sql::convert::VisitorMut::Break">Break</a>> { ... }
|
||||
<span class="item-spacer"></span> fn <a href="#method.pre_visit_relation" class="fn">pre_visit_relation</a>(
|
||||
&mut self,
|
||||
_relation: &mut <a class="struct" href="struct.ObjectName.html" title="struct common_sql::convert::ObjectName">ObjectName</a>,
|
||||
) -> <a class="enum" href="https://doc.rust-lang.org/nightly/core/ops/control_flow/enum.ControlFlow.html" title="enum core::ops::control_flow::ControlFlow">ControlFlow</a><Self::<a class="associatedtype" href="trait.VisitorMut.html#associatedtype.Break" title="type common_sql::convert::VisitorMut::Break">Break</a>> { ... }
|
||||
<span class="item-spacer"></span> fn <a href="#method.post_visit_relation" class="fn">post_visit_relation</a>(
|
||||
&mut self,
|
||||
_relation: &mut <a class="struct" href="struct.ObjectName.html" title="struct common_sql::convert::ObjectName">ObjectName</a>,
|
||||
) -> <a class="enum" href="https://doc.rust-lang.org/nightly/core/ops/control_flow/enum.ControlFlow.html" title="enum core::ops::control_flow::ControlFlow">ControlFlow</a><Self::<a class="associatedtype" href="trait.VisitorMut.html#associatedtype.Break" title="type common_sql::convert::VisitorMut::Break">Break</a>> { ... }
|
||||
<span class="item-spacer"></span> fn <a href="#method.pre_visit_table_factor" class="fn">pre_visit_table_factor</a>(
|
||||
&mut self,
|
||||
_table_factor: &mut TableFactor,
|
||||
) -> <a class="enum" href="https://doc.rust-lang.org/nightly/core/ops/control_flow/enum.ControlFlow.html" title="enum core::ops::control_flow::ControlFlow">ControlFlow</a><Self::<a class="associatedtype" href="trait.VisitorMut.html#associatedtype.Break" title="type common_sql::convert::VisitorMut::Break">Break</a>> { ... }
|
||||
<span class="item-spacer"></span> fn <a href="#method.post_visit_table_factor" class="fn">post_visit_table_factor</a>(
|
||||
&mut self,
|
||||
_table_factor: &mut TableFactor,
|
||||
) -> <a class="enum" href="https://doc.rust-lang.org/nightly/core/ops/control_flow/enum.ControlFlow.html" title="enum core::ops::control_flow::ControlFlow">ControlFlow</a><Self::<a class="associatedtype" href="trait.VisitorMut.html#associatedtype.Break" title="type common_sql::convert::VisitorMut::Break">Break</a>> { ... }
|
||||
<span class="item-spacer"></span> fn <a href="#method.pre_visit_expr" class="fn">pre_visit_expr</a>(&mut self, _expr: &mut <a class="enum" href="enum.Expr.html" title="enum common_sql::convert::Expr">Expr</a>) -> <a class="enum" href="https://doc.rust-lang.org/nightly/core/ops/control_flow/enum.ControlFlow.html" title="enum core::ops::control_flow::ControlFlow">ControlFlow</a><Self::<a class="associatedtype" href="trait.VisitorMut.html#associatedtype.Break" title="type common_sql::convert::VisitorMut::Break">Break</a>> { ... }
|
||||
<span class="item-spacer"></span> fn <a href="#method.post_visit_expr" class="fn">post_visit_expr</a>(&mut self, _expr: &mut <a class="enum" href="enum.Expr.html" title="enum common_sql::convert::Expr">Expr</a>) -> <a class="enum" href="https://doc.rust-lang.org/nightly/core/ops/control_flow/enum.ControlFlow.html" title="enum core::ops::control_flow::ControlFlow">ControlFlow</a><Self::<a class="associatedtype" href="trait.VisitorMut.html#associatedtype.Break" title="type common_sql::convert::VisitorMut::Break">Break</a>> { ... }
|
||||
<span class="item-spacer"></span> fn <a href="#method.pre_visit_statement" class="fn">pre_visit_statement</a>(
|
||||
&mut self,
|
||||
_statement: &mut Statement,
|
||||
) -> <a class="enum" href="https://doc.rust-lang.org/nightly/core/ops/control_flow/enum.ControlFlow.html" title="enum core::ops::control_flow::ControlFlow">ControlFlow</a><Self::<a class="associatedtype" href="trait.VisitorMut.html#associatedtype.Break" title="type common_sql::convert::VisitorMut::Break">Break</a>> { ... }
|
||||
<span class="item-spacer"></span> fn <a href="#method.post_visit_statement" class="fn">post_visit_statement</a>(
|
||||
&mut self,
|
||||
_statement: &mut Statement,
|
||||
) -> <a class="enum" href="https://doc.rust-lang.org/nightly/core/ops/control_flow/enum.ControlFlow.html" title="enum core::ops::control_flow::ControlFlow">ControlFlow</a><Self::<a class="associatedtype" href="trait.VisitorMut.html#associatedtype.Break" title="type common_sql::convert::VisitorMut::Break">Break</a>> { ... }
|
||||
<span class="item-spacer"></span> fn <a href="#method.pre_visit_value" class="fn">pre_visit_value</a>(
|
||||
&mut self,
|
||||
_value: &mut <a class="enum" href="enum.SqlValue.html" title="enum common_sql::convert::SqlValue">Value</a>,
|
||||
) -> <a class="enum" href="https://doc.rust-lang.org/nightly/core/ops/control_flow/enum.ControlFlow.html" title="enum core::ops::control_flow::ControlFlow">ControlFlow</a><Self::<a class="associatedtype" href="trait.VisitorMut.html#associatedtype.Break" title="type common_sql::convert::VisitorMut::Break">Break</a>> { ... }
|
||||
<span class="item-spacer"></span> fn <a href="#method.post_visit_value" class="fn">post_visit_value</a>(
|
||||
&mut self,
|
||||
_value: &mut <a class="enum" href="enum.SqlValue.html" title="enum common_sql::convert::SqlValue">Value</a>,
|
||||
) -> <a class="enum" href="https://doc.rust-lang.org/nightly/core/ops/control_flow/enum.ControlFlow.html" title="enum core::ops::control_flow::ControlFlow">ControlFlow</a><Self::<a class="associatedtype" href="trait.VisitorMut.html#associatedtype.Break" title="type common_sql::convert::VisitorMut::Break">Break</a>> { ... }
|
||||
}</code></pre><details class="toggle top-doc" open><summary class="hideme"><span>Expand description</span></summary><div class="docblock"><p>A visitor that can be used to mutate an AST tree.</p>
|
||||
<p><code>pre_visit_</code> methods are invoked before visiting all children of the
|
||||
node and <code>post_visit_</code> methods are invoked after visiting all
|
||||
children of the node.</p>
|
||||
<h2 id="see-also"><a class="doc-anchor" href="#see-also">§</a>See also</h2>
|
||||
<p>These methods provide a more concise way of visiting nodes of a certain type:</p>
|
||||
<ul>
|
||||
<li>[visit_relations_mut]</li>
|
||||
<li><a href="fn.visit_expressions_mut.html" title="fn common_sql::convert::visit_expressions_mut">visit_expressions_mut</a></li>
|
||||
<li><a href="fn.visit_statements_mut.html" title="fn common_sql::convert::visit_statements_mut">visit_statements_mut</a></li>
|
||||
</ul>
|
||||
<h2 id="example"><a class="doc-anchor" href="#example">§</a>Example</h2>
|
||||
<div class="example-wrap"><pre class="rust rust-example-rendered"><code>
|
||||
<span class="comment">// A visitor that replaces "to_replace" with "replaced" in all expressions
|
||||
</span><span class="kw">struct </span>Replacer;
|
||||
|
||||
<span class="comment">// Visit each expression after its children have been visited
|
||||
</span><span class="kw">impl </span>VisitorMut <span class="kw">for </span>Replacer {
|
||||
<span class="kw">type </span>Break = ();
|
||||
|
||||
<span class="kw">fn </span>post_visit_expr(<span class="kw-2">&mut </span><span class="self">self</span>, expr: <span class="kw-2">&mut </span>Expr) -> ControlFlow<<span class="self">Self</span>::Break> {
|
||||
<span class="kw">if let </span>Expr::Identifier(Ident{ value, ..}) = expr {
|
||||
<span class="kw-2">*</span>value = value.replace(<span class="string">"to_replace"</span>, <span class="string">"replaced"</span>)
|
||||
}
|
||||
ControlFlow::Continue(())
|
||||
}
|
||||
}
|
||||
|
||||
<span class="kw">let </span>sql = <span class="string">"SELECT to_replace FROM foo where to_replace IN (SELECT to_replace FROM bar)"</span>;
|
||||
<span class="kw">let </span><span class="kw-2">mut </span>statements = Parser::parse_sql(<span class="kw-2">&</span>GenericDialect{}, sql).unwrap();
|
||||
|
||||
<span class="comment">// Drive the visitor through the AST
|
||||
</span>statements.visit(<span class="kw-2">&mut </span>Replacer);
|
||||
|
||||
<span class="macro">assert_eq!</span>(statements[<span class="number">0</span>].to_string(), <span class="string">"SELECT replaced FROM foo WHERE replaced IN (SELECT replaced FROM bar)"</span>);</code></pre></div></div></details><h2 id="required-associated-types" class="section-header">Required Associated Types<a href="#required-associated-types" class="anchor">§</a></h2><div class="methods"><details class="toggle" open><summary><section id="associatedtype.Break" class="method"><h4 class="code-header">type <a href="#associatedtype.Break" class="associatedtype">Break</a></h4></section></summary><div class="docblock"><p>Type returned when the recursion returns early.</p>
|
||||
</div></details></div><h2 id="provided-methods" class="section-header">Provided Methods<a href="#provided-methods" class="anchor">§</a></h2><div class="methods"><details class="toggle method-toggle" open><summary><section id="method.pre_visit_query" class="method"><h4 class="code-header">fn <a href="#method.pre_visit_query" class="fn">pre_visit_query</a>(&mut self, _query: &mut Query) -> <a class="enum" href="https://doc.rust-lang.org/nightly/core/ops/control_flow/enum.ControlFlow.html" title="enum core::ops::control_flow::ControlFlow">ControlFlow</a><Self::<a class="associatedtype" href="trait.VisitorMut.html#associatedtype.Break" title="type common_sql::convert::VisitorMut::Break">Break</a>></h4></section></summary><div class="docblock"><p>Invoked for any queries that appear in the AST before visiting children</p>
|
||||
</div></details><details class="toggle method-toggle" open><summary><section id="method.post_visit_query" class="method"><h4 class="code-header">fn <a href="#method.post_visit_query" class="fn">post_visit_query</a>(&mut self, _query: &mut Query) -> <a class="enum" href="https://doc.rust-lang.org/nightly/core/ops/control_flow/enum.ControlFlow.html" title="enum core::ops::control_flow::ControlFlow">ControlFlow</a><Self::<a class="associatedtype" href="trait.VisitorMut.html#associatedtype.Break" title="type common_sql::convert::VisitorMut::Break">Break</a>></h4></section></summary><div class="docblock"><p>Invoked for any queries that appear in the AST after visiting children</p>
|
||||
</div></details><details class="toggle method-toggle" open><summary><section id="method.pre_visit_relation" class="method"><h4 class="code-header">fn <a href="#method.pre_visit_relation" class="fn">pre_visit_relation</a>(
|
||||
&mut self,
|
||||
_relation: &mut <a class="struct" href="struct.ObjectName.html" title="struct common_sql::convert::ObjectName">ObjectName</a>,
|
||||
) -> <a class="enum" href="https://doc.rust-lang.org/nightly/core/ops/control_flow/enum.ControlFlow.html" title="enum core::ops::control_flow::ControlFlow">ControlFlow</a><Self::<a class="associatedtype" href="trait.VisitorMut.html#associatedtype.Break" title="type common_sql::convert::VisitorMut::Break">Break</a>></h4></section></summary><div class="docblock"><p>Invoked for any relations (e.g. tables) that appear in the AST before visiting children</p>
|
||||
</div></details><details class="toggle method-toggle" open><summary><section id="method.post_visit_relation" class="method"><h4 class="code-header">fn <a href="#method.post_visit_relation" class="fn">post_visit_relation</a>(
|
||||
&mut self,
|
||||
_relation: &mut <a class="struct" href="struct.ObjectName.html" title="struct common_sql::convert::ObjectName">ObjectName</a>,
|
||||
) -> <a class="enum" href="https://doc.rust-lang.org/nightly/core/ops/control_flow/enum.ControlFlow.html" title="enum core::ops::control_flow::ControlFlow">ControlFlow</a><Self::<a class="associatedtype" href="trait.VisitorMut.html#associatedtype.Break" title="type common_sql::convert::VisitorMut::Break">Break</a>></h4></section></summary><div class="docblock"><p>Invoked for any relations (e.g. tables) that appear in the AST after visiting children</p>
|
||||
</div></details><details class="toggle method-toggle" open><summary><section id="method.pre_visit_table_factor" class="method"><h4 class="code-header">fn <a href="#method.pre_visit_table_factor" class="fn">pre_visit_table_factor</a>(
|
||||
&mut self,
|
||||
_table_factor: &mut TableFactor,
|
||||
) -> <a class="enum" href="https://doc.rust-lang.org/nightly/core/ops/control_flow/enum.ControlFlow.html" title="enum core::ops::control_flow::ControlFlow">ControlFlow</a><Self::<a class="associatedtype" href="trait.VisitorMut.html#associatedtype.Break" title="type common_sql::convert::VisitorMut::Break">Break</a>></h4></section></summary><div class="docblock"><p>Invoked for any table factors that appear in the AST before visiting children</p>
|
||||
</div></details><details class="toggle method-toggle" open><summary><section id="method.post_visit_table_factor" class="method"><h4 class="code-header">fn <a href="#method.post_visit_table_factor" class="fn">post_visit_table_factor</a>(
|
||||
&mut self,
|
||||
_table_factor: &mut TableFactor,
|
||||
) -> <a class="enum" href="https://doc.rust-lang.org/nightly/core/ops/control_flow/enum.ControlFlow.html" title="enum core::ops::control_flow::ControlFlow">ControlFlow</a><Self::<a class="associatedtype" href="trait.VisitorMut.html#associatedtype.Break" title="type common_sql::convert::VisitorMut::Break">Break</a>></h4></section></summary><div class="docblock"><p>Invoked for any table factors that appear in the AST after visiting children</p>
|
||||
</div></details><details class="toggle method-toggle" open><summary><section id="method.pre_visit_expr" class="method"><h4 class="code-header">fn <a href="#method.pre_visit_expr" class="fn">pre_visit_expr</a>(&mut self, _expr: &mut <a class="enum" href="enum.Expr.html" title="enum common_sql::convert::Expr">Expr</a>) -> <a class="enum" href="https://doc.rust-lang.org/nightly/core/ops/control_flow/enum.ControlFlow.html" title="enum core::ops::control_flow::ControlFlow">ControlFlow</a><Self::<a class="associatedtype" href="trait.VisitorMut.html#associatedtype.Break" title="type common_sql::convert::VisitorMut::Break">Break</a>></h4></section></summary><div class="docblock"><p>Invoked for any expressions that appear in the AST before visiting children</p>
|
||||
</div></details><details class="toggle method-toggle" open><summary><section id="method.post_visit_expr" class="method"><h4 class="code-header">fn <a href="#method.post_visit_expr" class="fn">post_visit_expr</a>(&mut self, _expr: &mut <a class="enum" href="enum.Expr.html" title="enum common_sql::convert::Expr">Expr</a>) -> <a class="enum" href="https://doc.rust-lang.org/nightly/core/ops/control_flow/enum.ControlFlow.html" title="enum core::ops::control_flow::ControlFlow">ControlFlow</a><Self::<a class="associatedtype" href="trait.VisitorMut.html#associatedtype.Break" title="type common_sql::convert::VisitorMut::Break">Break</a>></h4></section></summary><div class="docblock"><p>Invoked for any expressions that appear in the AST</p>
|
||||
</div></details><details class="toggle method-toggle" open><summary><section id="method.pre_visit_statement" class="method"><h4 class="code-header">fn <a href="#method.pre_visit_statement" class="fn">pre_visit_statement</a>(
|
||||
&mut self,
|
||||
_statement: &mut Statement,
|
||||
) -> <a class="enum" href="https://doc.rust-lang.org/nightly/core/ops/control_flow/enum.ControlFlow.html" title="enum core::ops::control_flow::ControlFlow">ControlFlow</a><Self::<a class="associatedtype" href="trait.VisitorMut.html#associatedtype.Break" title="type common_sql::convert::VisitorMut::Break">Break</a>></h4></section></summary><div class="docblock"><p>Invoked for any statements that appear in the AST before visiting children</p>
|
||||
</div></details><details class="toggle method-toggle" open><summary><section id="method.post_visit_statement" class="method"><h4 class="code-header">fn <a href="#method.post_visit_statement" class="fn">post_visit_statement</a>(
|
||||
&mut self,
|
||||
_statement: &mut Statement,
|
||||
) -> <a class="enum" href="https://doc.rust-lang.org/nightly/core/ops/control_flow/enum.ControlFlow.html" title="enum core::ops::control_flow::ControlFlow">ControlFlow</a><Self::<a class="associatedtype" href="trait.VisitorMut.html#associatedtype.Break" title="type common_sql::convert::VisitorMut::Break">Break</a>></h4></section></summary><div class="docblock"><p>Invoked for any statements that appear in the AST after visiting children</p>
|
||||
</div></details><details class="toggle method-toggle" open><summary><section id="method.pre_visit_value" class="method"><h4 class="code-header">fn <a href="#method.pre_visit_value" class="fn">pre_visit_value</a>(&mut self, _value: &mut <a class="enum" href="enum.SqlValue.html" title="enum common_sql::convert::SqlValue">Value</a>) -> <a class="enum" href="https://doc.rust-lang.org/nightly/core/ops/control_flow/enum.ControlFlow.html" title="enum core::ops::control_flow::ControlFlow">ControlFlow</a><Self::<a class="associatedtype" href="trait.VisitorMut.html#associatedtype.Break" title="type common_sql::convert::VisitorMut::Break">Break</a>></h4></section></summary><div class="docblock"><p>Invoked for any value that appear in the AST before visiting children</p>
|
||||
</div></details><details class="toggle method-toggle" open><summary><section id="method.post_visit_value" class="method"><h4 class="code-header">fn <a href="#method.post_visit_value" class="fn">post_visit_value</a>(&mut self, _value: &mut <a class="enum" href="enum.SqlValue.html" title="enum common_sql::convert::SqlValue">Value</a>) -> <a class="enum" href="https://doc.rust-lang.org/nightly/core/ops/control_flow/enum.ControlFlow.html" title="enum core::ops::control_flow::ControlFlow">ControlFlow</a><Self::<a class="associatedtype" href="trait.VisitorMut.html#associatedtype.Break" title="type common_sql::convert::VisitorMut::Break">Break</a>></h4></section></summary><div class="docblock"><p>Invoked for any statements that appear in the AST after visiting children</p>
|
||||
</div></details></div><h2 id="implementors" class="section-header">Implementors<a href="#implementors" class="anchor">§</a></h2><div id="implementors-list"></div><script src="../../trait.impl/sqlparser/ast/visitor/trait.VisitorMut.js" async></script></section></div></main></body></html>
|
||||
Reference in New Issue
Block a user