Deploying to gh-pages from @ GreptimeTeam/greptimedb@fdedbb8261 🚀

This commit is contained in:
github-merge-queue[bot]
2025-12-23 10:07:07 +00:00
commit bc02704e8b
20213 changed files with 2344105 additions and 0 deletions

1
common_sql/all.html Normal file

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

View 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>&nbsp;<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: &amp;<a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.str.html">str</a>,
data_type: &amp;ConcreteDataType,
) -&gt; <a class="type" href="../error/type.Result.html" title="type common_sql::error::Result">Result</a>&lt;<a class="enum" href="https://doc.rust-lang.org/nightly/core/option/enum.Option.html" title="enum core::option::Option">Option</a>&lt;Value&gt;&gt;</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 doesnt support auto casting.</p>
</div></details></section></div></main></body></html>

View File

@@ -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>&nbsp;<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: &amp;[<a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.u8.html">u8</a>],
column_name: &amp;<a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.str.html">str</a>,
data_type: &amp;ConcreteDataType,
) -&gt; <a class="type" href="../error/type.Result.html" title="type common_sql::error::Result">Result</a>&lt;<a class="enum" href="https://doc.rust-lang.org/nightly/core/option/enum.Option.html" title="enum core::option::Option">Option</a>&lt;ColumnDefaultConstraint&gt;&gt;</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>

View 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>&nbsp;<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: &amp;<a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.str.html">str</a>) -&gt; <a class="type" href="../error/type.Result.html" title="type common_sql::error::Result">Result</a>&lt;Value&gt;</code></pre></section></div></main></body></html>

View 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>&nbsp;<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&lt;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>&gt;(n: &amp;<a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.str.html">str</a>) -&gt; <a class="type" href="../error/type.Result.html" title="type common_sql::error::Result">Result</a>&lt;R&gt;<div class="where">where
&lt;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>&gt;::<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>

View 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>&nbsp;<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: &amp;<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: &amp;ConcreteDataType,
timezone: <a class="enum" href="https://doc.rust-lang.org/nightly/core/option/enum.Option.html" title="enum core::option::Option">Option</a>&lt;&amp;Timezone&gt;,
auto_string_to_numeric: <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.bool.html">bool</a>,
) -&gt; <a class="type" href="../error/type.Result.html" title="type common_sql::error::Result">Result</a>&lt;Value&gt;</code></pre></section></div></main></body></html>

View 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 datatypes 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>&nbsp;<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: &amp;ConcreteDataType,
n: &amp;<a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.str.html">str</a>,
) -&gt; <a class="type" href="../error/type.Result.html" title="type common_sql::error::Result">Result</a>&lt;Value&gt;</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 datatypes value</p>
</div></details></section></div></main></body></html>

View 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>&nbsp;<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: &amp;<a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.str.html">str</a>,
data_type: &amp;ConcreteDataType,
sql_val: &amp;<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>&lt;&amp;Timezone&gt;,
unary_op: <a class="enum" href="https://doc.rust-lang.org/nightly/core/option/enum.Option.html" title="enum core::option::Option">Option</a>&lt;<a class="enum" href="enum.UnaryOperator.html" title="enum common_sql::convert::UnaryOperator">UnaryOperator</a>&gt;,
auto_string_to_numeric: <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.bool.html">bool</a>,
) -&gt; <a class="type" href="../error/type.Result.html" title="type common_sql::error::Result">Result</a>&lt;Value&gt;</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>

View 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>&nbsp;<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&lt;V, E, F&gt;(v: <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.reference.html">&amp;mut V</a>, f: F) -&gt; <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>&lt;E&gt;<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>(&amp;mut <a class="enum" href="enum.Expr.html" title="enum common_sql::convert::Expr">Expr</a>) -&gt; <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>&lt;E&gt;,</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">&amp;</span>GenericDialect{}, sql).unwrap();
<span class="comment">// Remove all select limits in sub-queries
</span>visit_expressions_mut(<span class="kw-2">&amp;mut </span>statements, |expr| {
<span class="kw">if let </span>Expr::Subquery(q) = expr {
q.limit_clause = <span class="prelude-val">None</span>;
}
ControlFlow::&lt;()&gt;::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">&amp;</span>GenericDialect{}, sql).unwrap();
visit_expressions_mut(<span class="kw-2">&amp;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::&lt;()&gt;::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>

View 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>&nbsp;<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&lt;V, E, F&gt;(v: <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.reference.html">&amp;mut V</a>, f: F) -&gt; <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>&lt;E&gt;<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>(&amp;mut Statement) -&gt; <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>&lt;E&gt;,</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">&amp;</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">&amp;mut </span>statements, |stmt| {
<span class="kw">if let </span>Statement::Query(q) = stmt {
q.limit_clause = <span class="prelude-val">None</span>;
}
ControlFlow::&lt;()&gt;::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>

File diff suppressed because one or more lines are too long

View 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>

View 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>&nbsp;<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)), +) =&gt; { ... };
}</code></pre></section></div></main></body></html>

View 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"]};

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

View 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>&nbsp;<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>(&amp;mut self, _query: &amp;Query) -&gt; <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>&lt;Self::<a class="associatedtype" href="trait.Visitor.html#associatedtype.Break" title="type common_sql::convert::Visitor::Break">Break</a>&gt; { ... }
<span class="item-spacer"></span> fn <a href="#method.post_visit_query" class="fn">post_visit_query</a>(&amp;mut self, _query: &amp;Query) -&gt; <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>&lt;Self::<a class="associatedtype" href="trait.Visitor.html#associatedtype.Break" title="type common_sql::convert::Visitor::Break">Break</a>&gt; { ... }
<span class="item-spacer"></span> fn <a href="#method.pre_visit_relation" class="fn">pre_visit_relation</a>(
&amp;mut self,
_relation: &amp;<a class="struct" href="struct.ObjectName.html" title="struct common_sql::convert::ObjectName">ObjectName</a>,
) -&gt; <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>&lt;Self::<a class="associatedtype" href="trait.Visitor.html#associatedtype.Break" title="type common_sql::convert::Visitor::Break">Break</a>&gt; { ... }
<span class="item-spacer"></span> fn <a href="#method.post_visit_relation" class="fn">post_visit_relation</a>(
&amp;mut self,
_relation: &amp;<a class="struct" href="struct.ObjectName.html" title="struct common_sql::convert::ObjectName">ObjectName</a>,
) -&gt; <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>&lt;Self::<a class="associatedtype" href="trait.Visitor.html#associatedtype.Break" title="type common_sql::convert::Visitor::Break">Break</a>&gt; { ... }
<span class="item-spacer"></span> fn <a href="#method.pre_visit_table_factor" class="fn">pre_visit_table_factor</a>(
&amp;mut self,
_table_factor: &amp;TableFactor,
) -&gt; <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>&lt;Self::<a class="associatedtype" href="trait.Visitor.html#associatedtype.Break" title="type common_sql::convert::Visitor::Break">Break</a>&gt; { ... }
<span class="item-spacer"></span> fn <a href="#method.post_visit_table_factor" class="fn">post_visit_table_factor</a>(
&amp;mut self,
_table_factor: &amp;TableFactor,
) -&gt; <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>&lt;Self::<a class="associatedtype" href="trait.Visitor.html#associatedtype.Break" title="type common_sql::convert::Visitor::Break">Break</a>&gt; { ... }
<span class="item-spacer"></span> fn <a href="#method.pre_visit_expr" class="fn">pre_visit_expr</a>(&amp;mut self, _expr: &amp;<a class="enum" href="enum.Expr.html" title="enum common_sql::convert::Expr">Expr</a>) -&gt; <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>&lt;Self::<a class="associatedtype" href="trait.Visitor.html#associatedtype.Break" title="type common_sql::convert::Visitor::Break">Break</a>&gt; { ... }
<span class="item-spacer"></span> fn <a href="#method.post_visit_expr" class="fn">post_visit_expr</a>(&amp;mut self, _expr: &amp;<a class="enum" href="enum.Expr.html" title="enum common_sql::convert::Expr">Expr</a>) -&gt; <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>&lt;Self::<a class="associatedtype" href="trait.Visitor.html#associatedtype.Break" title="type common_sql::convert::Visitor::Break">Break</a>&gt; { ... }
<span class="item-spacer"></span> fn <a href="#method.pre_visit_statement" class="fn">pre_visit_statement</a>(
&amp;mut self,
_statement: &amp;Statement,
) -&gt; <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>&lt;Self::<a class="associatedtype" href="trait.Visitor.html#associatedtype.Break" title="type common_sql::convert::Visitor::Break">Break</a>&gt; { ... }
<span class="item-spacer"></span> fn <a href="#method.post_visit_statement" class="fn">post_visit_statement</a>(
&amp;mut self,
_statement: &amp;Statement,
) -&gt; <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>&lt;Self::<a class="associatedtype" href="trait.Visitor.html#associatedtype.Break" title="type common_sql::convert::Visitor::Break">Break</a>&gt; { ... }
<span class="item-spacer"></span> fn <a href="#method.pre_visit_value" class="fn">pre_visit_value</a>(&amp;mut self, _value: &amp;<a class="enum" href="enum.SqlValue.html" title="enum common_sql::convert::SqlValue">Value</a>) -&gt; <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>&lt;Self::<a class="associatedtype" href="trait.Visitor.html#associatedtype.Break" title="type common_sql::convert::Visitor::Break">Break</a>&gt; { ... }
<span class="item-spacer"></span> fn <a href="#method.post_visit_value" class="fn">post_visit_value</a>(&amp;mut self, _value: &amp;<a class="enum" href="enum.SqlValue.html" title="enum common_sql::convert::SqlValue">Value</a>) -&gt; <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>&lt;Self::<a class="associatedtype" href="trait.Visitor.html#associatedtype.Break" title="type common_sql::convert::Visitor::Break">Break</a>&gt; { ... }
}</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&lt;String&gt;,
}
<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">&amp;mut </span><span class="self">self</span>, relation: <span class="kw-2">&amp;</span>ObjectName) -&gt; ControlFlow&lt;<span class="self">Self</span>::Break&gt; {
<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">&amp;mut </span><span class="self">self</span>, expr: <span class="kw-2">&amp;</span>Expr) -&gt; ControlFlow&lt;<span class="self">Self</span>::Break&gt; {
<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">&amp;</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">&amp;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&lt;<span class="kw">_</span>&gt; = [
<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>(&amp;mut self, _query: &amp;Query) -&gt; <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>&lt;Self::<a class="associatedtype" href="trait.Visitor.html#associatedtype.Break" title="type common_sql::convert::Visitor::Break">Break</a>&gt;</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>(&amp;mut self, _query: &amp;Query) -&gt; <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>&lt;Self::<a class="associatedtype" href="trait.Visitor.html#associatedtype.Break" title="type common_sql::convert::Visitor::Break">Break</a>&gt;</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>(
&amp;mut self,
_relation: &amp;<a class="struct" href="struct.ObjectName.html" title="struct common_sql::convert::ObjectName">ObjectName</a>,
) -&gt; <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>&lt;Self::<a class="associatedtype" href="trait.Visitor.html#associatedtype.Break" title="type common_sql::convert::Visitor::Break">Break</a>&gt;</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>(
&amp;mut self,
_relation: &amp;<a class="struct" href="struct.ObjectName.html" title="struct common_sql::convert::ObjectName">ObjectName</a>,
) -&gt; <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>&lt;Self::<a class="associatedtype" href="trait.Visitor.html#associatedtype.Break" title="type common_sql::convert::Visitor::Break">Break</a>&gt;</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>(
&amp;mut self,
_table_factor: &amp;TableFactor,
) -&gt; <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>&lt;Self::<a class="associatedtype" href="trait.Visitor.html#associatedtype.Break" title="type common_sql::convert::Visitor::Break">Break</a>&gt;</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>(
&amp;mut self,
_table_factor: &amp;TableFactor,
) -&gt; <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>&lt;Self::<a class="associatedtype" href="trait.Visitor.html#associatedtype.Break" title="type common_sql::convert::Visitor::Break">Break</a>&gt;</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>(&amp;mut self, _expr: &amp;<a class="enum" href="enum.Expr.html" title="enum common_sql::convert::Expr">Expr</a>) -&gt; <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>&lt;Self::<a class="associatedtype" href="trait.Visitor.html#associatedtype.Break" title="type common_sql::convert::Visitor::Break">Break</a>&gt;</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>(&amp;mut self, _expr: &amp;<a class="enum" href="enum.Expr.html" title="enum common_sql::convert::Expr">Expr</a>) -&gt; <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>&lt;Self::<a class="associatedtype" href="trait.Visitor.html#associatedtype.Break" title="type common_sql::convert::Visitor::Break">Break</a>&gt;</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>(
&amp;mut self,
_statement: &amp;Statement,
) -&gt; <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>&lt;Self::<a class="associatedtype" href="trait.Visitor.html#associatedtype.Break" title="type common_sql::convert::Visitor::Break">Break</a>&gt;</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>(
&amp;mut self,
_statement: &amp;Statement,
) -&gt; <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>&lt;Self::<a class="associatedtype" href="trait.Visitor.html#associatedtype.Break" title="type common_sql::convert::Visitor::Break">Break</a>&gt;</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>(&amp;mut self, _value: &amp;<a class="enum" href="enum.SqlValue.html" title="enum common_sql::convert::SqlValue">Value</a>) -&gt; <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>&lt;Self::<a class="associatedtype" href="trait.Visitor.html#associatedtype.Break" title="type common_sql::convert::Visitor::Break">Break</a>&gt;</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>(&amp;mut self, _value: &amp;<a class="enum" href="enum.SqlValue.html" title="enum common_sql::convert::SqlValue">Value</a>) -&gt; <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>&lt;Self::<a class="associatedtype" href="trait.Visitor.html#associatedtype.Break" title="type common_sql::convert::Visitor::Break">Break</a>&gt;</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>

View 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>&nbsp;<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>(
&amp;mut self,
_query: &amp;mut Query,
) -&gt; <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>&lt;Self::<a class="associatedtype" href="trait.VisitorMut.html#associatedtype.Break" title="type common_sql::convert::VisitorMut::Break">Break</a>&gt; { ... }
<span class="item-spacer"></span> fn <a href="#method.post_visit_query" class="fn">post_visit_query</a>(
&amp;mut self,
_query: &amp;mut Query,
) -&gt; <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>&lt;Self::<a class="associatedtype" href="trait.VisitorMut.html#associatedtype.Break" title="type common_sql::convert::VisitorMut::Break">Break</a>&gt; { ... }
<span class="item-spacer"></span> fn <a href="#method.pre_visit_relation" class="fn">pre_visit_relation</a>(
&amp;mut self,
_relation: &amp;mut <a class="struct" href="struct.ObjectName.html" title="struct common_sql::convert::ObjectName">ObjectName</a>,
) -&gt; <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>&lt;Self::<a class="associatedtype" href="trait.VisitorMut.html#associatedtype.Break" title="type common_sql::convert::VisitorMut::Break">Break</a>&gt; { ... }
<span class="item-spacer"></span> fn <a href="#method.post_visit_relation" class="fn">post_visit_relation</a>(
&amp;mut self,
_relation: &amp;mut <a class="struct" href="struct.ObjectName.html" title="struct common_sql::convert::ObjectName">ObjectName</a>,
) -&gt; <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>&lt;Self::<a class="associatedtype" href="trait.VisitorMut.html#associatedtype.Break" title="type common_sql::convert::VisitorMut::Break">Break</a>&gt; { ... }
<span class="item-spacer"></span> fn <a href="#method.pre_visit_table_factor" class="fn">pre_visit_table_factor</a>(
&amp;mut self,
_table_factor: &amp;mut TableFactor,
) -&gt; <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>&lt;Self::<a class="associatedtype" href="trait.VisitorMut.html#associatedtype.Break" title="type common_sql::convert::VisitorMut::Break">Break</a>&gt; { ... }
<span class="item-spacer"></span> fn <a href="#method.post_visit_table_factor" class="fn">post_visit_table_factor</a>(
&amp;mut self,
_table_factor: &amp;mut TableFactor,
) -&gt; <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>&lt;Self::<a class="associatedtype" href="trait.VisitorMut.html#associatedtype.Break" title="type common_sql::convert::VisitorMut::Break">Break</a>&gt; { ... }
<span class="item-spacer"></span> fn <a href="#method.pre_visit_expr" class="fn">pre_visit_expr</a>(&amp;mut self, _expr: &amp;mut <a class="enum" href="enum.Expr.html" title="enum common_sql::convert::Expr">Expr</a>) -&gt; <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>&lt;Self::<a class="associatedtype" href="trait.VisitorMut.html#associatedtype.Break" title="type common_sql::convert::VisitorMut::Break">Break</a>&gt; { ... }
<span class="item-spacer"></span> fn <a href="#method.post_visit_expr" class="fn">post_visit_expr</a>(&amp;mut self, _expr: &amp;mut <a class="enum" href="enum.Expr.html" title="enum common_sql::convert::Expr">Expr</a>) -&gt; <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>&lt;Self::<a class="associatedtype" href="trait.VisitorMut.html#associatedtype.Break" title="type common_sql::convert::VisitorMut::Break">Break</a>&gt; { ... }
<span class="item-spacer"></span> fn <a href="#method.pre_visit_statement" class="fn">pre_visit_statement</a>(
&amp;mut self,
_statement: &amp;mut Statement,
) -&gt; <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>&lt;Self::<a class="associatedtype" href="trait.VisitorMut.html#associatedtype.Break" title="type common_sql::convert::VisitorMut::Break">Break</a>&gt; { ... }
<span class="item-spacer"></span> fn <a href="#method.post_visit_statement" class="fn">post_visit_statement</a>(
&amp;mut self,
_statement: &amp;mut Statement,
) -&gt; <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>&lt;Self::<a class="associatedtype" href="trait.VisitorMut.html#associatedtype.Break" title="type common_sql::convert::VisitorMut::Break">Break</a>&gt; { ... }
<span class="item-spacer"></span> fn <a href="#method.pre_visit_value" class="fn">pre_visit_value</a>(
&amp;mut self,
_value: &amp;mut <a class="enum" href="enum.SqlValue.html" title="enum common_sql::convert::SqlValue">Value</a>,
) -&gt; <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>&lt;Self::<a class="associatedtype" href="trait.VisitorMut.html#associatedtype.Break" title="type common_sql::convert::VisitorMut::Break">Break</a>&gt; { ... }
<span class="item-spacer"></span> fn <a href="#method.post_visit_value" class="fn">post_visit_value</a>(
&amp;mut self,
_value: &amp;mut <a class="enum" href="enum.SqlValue.html" title="enum common_sql::convert::SqlValue">Value</a>,
) -&gt; <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>&lt;Self::<a class="associatedtype" href="trait.VisitorMut.html#associatedtype.Break" title="type common_sql::convert::VisitorMut::Break">Break</a>&gt; { ... }
}</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">&amp;mut </span><span class="self">self</span>, expr: <span class="kw-2">&amp;mut </span>Expr) -&gt; ControlFlow&lt;<span class="self">Self</span>::Break&gt; {
<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">&amp;</span>GenericDialect{}, sql).unwrap();
<span class="comment">// Drive the visitor through the AST
</span>statements.visit(<span class="kw-2">&amp;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>(&amp;mut self, _query: &amp;mut Query) -&gt; <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>&lt;Self::<a class="associatedtype" href="trait.VisitorMut.html#associatedtype.Break" title="type common_sql::convert::VisitorMut::Break">Break</a>&gt;</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>(&amp;mut self, _query: &amp;mut Query) -&gt; <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>&lt;Self::<a class="associatedtype" href="trait.VisitorMut.html#associatedtype.Break" title="type common_sql::convert::VisitorMut::Break">Break</a>&gt;</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>(
&amp;mut self,
_relation: &amp;mut <a class="struct" href="struct.ObjectName.html" title="struct common_sql::convert::ObjectName">ObjectName</a>,
) -&gt; <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>&lt;Self::<a class="associatedtype" href="trait.VisitorMut.html#associatedtype.Break" title="type common_sql::convert::VisitorMut::Break">Break</a>&gt;</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>(
&amp;mut self,
_relation: &amp;mut <a class="struct" href="struct.ObjectName.html" title="struct common_sql::convert::ObjectName">ObjectName</a>,
) -&gt; <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>&lt;Self::<a class="associatedtype" href="trait.VisitorMut.html#associatedtype.Break" title="type common_sql::convert::VisitorMut::Break">Break</a>&gt;</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>(
&amp;mut self,
_table_factor: &amp;mut TableFactor,
) -&gt; <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>&lt;Self::<a class="associatedtype" href="trait.VisitorMut.html#associatedtype.Break" title="type common_sql::convert::VisitorMut::Break">Break</a>&gt;</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>(
&amp;mut self,
_table_factor: &amp;mut TableFactor,
) -&gt; <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>&lt;Self::<a class="associatedtype" href="trait.VisitorMut.html#associatedtype.Break" title="type common_sql::convert::VisitorMut::Break">Break</a>&gt;</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>(&amp;mut self, _expr: &amp;mut <a class="enum" href="enum.Expr.html" title="enum common_sql::convert::Expr">Expr</a>) -&gt; <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>&lt;Self::<a class="associatedtype" href="trait.VisitorMut.html#associatedtype.Break" title="type common_sql::convert::VisitorMut::Break">Break</a>&gt;</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>(&amp;mut self, _expr: &amp;mut <a class="enum" href="enum.Expr.html" title="enum common_sql::convert::Expr">Expr</a>) -&gt; <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>&lt;Self::<a class="associatedtype" href="trait.VisitorMut.html#associatedtype.Break" title="type common_sql::convert::VisitorMut::Break">Break</a>&gt;</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>(
&amp;mut self,
_statement: &amp;mut Statement,
) -&gt; <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>&lt;Self::<a class="associatedtype" href="trait.VisitorMut.html#associatedtype.Break" title="type common_sql::convert::VisitorMut::Break">Break</a>&gt;</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>(
&amp;mut self,
_statement: &amp;mut Statement,
) -&gt; <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>&lt;Self::<a class="associatedtype" href="trait.VisitorMut.html#associatedtype.Break" title="type common_sql::convert::VisitorMut::Break">Break</a>&gt;</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>(&amp;mut self, _value: &amp;mut <a class="enum" href="enum.SqlValue.html" title="enum common_sql::convert::SqlValue">Value</a>) -&gt; <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>&lt;Self::<a class="associatedtype" href="trait.VisitorMut.html#associatedtype.Break" title="type common_sql::convert::VisitorMut::Break">Break</a>&gt;</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>(&amp;mut self, _value: &amp;mut <a class="enum" href="enum.SqlValue.html" title="enum common_sql::convert::SqlValue">Value</a>) -&gt; <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>&lt;Self::<a class="associatedtype" href="trait.VisitorMut.html#associatedtype.Break" title="type common_sql::convert::VisitorMut::Break">Break</a>&gt;</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>

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

View File

@@ -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="API documentation for the Rust `parse_column_default_constraint` fn in crate `common_sql`."><title>parse_column_default_constraint in common_sql::default_constraint - 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_column_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>default_<wbr>constraint</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">default_constraint</a></div><h1>Function <span class="fn">parse_<wbr>column_<wbr>default_<wbr>constraint</span>&nbsp;<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/default_constraint.rs.html#31-119">Source</a> </span></div><pre class="rust item-decl"><code>pub fn parse_column_default_constraint(
column_name: &amp;<a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.str.html">str</a>,
data_type: &amp;ConcreteDataType,
opts: &amp;[<a class="struct" href="../convert/struct.ColumnOptionDef.html" title="struct common_sql::convert::ColumnOptionDef">ColumnOptionDef</a>],
timezone: <a class="enum" href="https://doc.rust-lang.org/nightly/core/option/enum.Option.html" title="enum core::option::Option">Option</a>&lt;&amp;Timezone&gt;,
) -&gt; <a class="type" href="../error/type.Result.html" title="type common_sql::error::Result">Result</a>&lt;<a class="enum" href="https://doc.rust-lang.org/nightly/core/option/enum.Option.html" title="enum core::option::Option">Option</a>&lt;ColumnDefaultConstraint&gt;&gt;</code></pre></section></div></main></body></html>

View 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::default_constraint - 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>default_<wbr>constraint</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">default_constraint</a></div><h1>Function <span class="fn">visit_<wbr>expressions_<wbr>mut</span>&nbsp;<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&lt;V, E, F&gt;(v: <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.reference.html">&amp;mut V</a>, f: F) -&gt; <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>&lt;E&gt;<div class="where">where
V: <a class="trait" href="../convert/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>(&amp;mut <a class="enum" href="../convert/enum.Expr.html" title="enum common_sql::convert::Expr">Expr</a>) -&gt; <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>&lt;E&gt;,</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">&amp;</span>GenericDialect{}, sql).unwrap();
<span class="comment">// Remove all select limits in sub-queries
</span>visit_expressions_mut(<span class="kw-2">&amp;mut </span>statements, |expr| {
<span class="kw">if let </span>Expr::Subquery(q) = expr {
q.limit_clause = <span class="prelude-val">None</span>;
}
ControlFlow::&lt;()&gt;::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">&amp;</span>GenericDialect{}, sql).unwrap();
visit_expressions_mut(<span class="kw-2">&amp;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::&lt;()&gt;::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>

View 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::default_constraint - 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>default_<wbr>constraint</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">default_constraint</a></div><h1>Function <span class="fn">visit_<wbr>statements_<wbr>mut</span>&nbsp;<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&lt;V, E, F&gt;(v: <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.reference.html">&amp;mut V</a>, f: F) -&gt; <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>&lt;E&gt;<div class="where">where
V: <a class="trait" href="../convert/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>(&amp;mut Statement) -&gt; <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>&lt;E&gt;,</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">&amp;</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">&amp;mut </span>statements, |stmt| {
<span class="kw">if let </span>Statement::Query(q) = stmt {
q.limit_clause = <span class="prelude-val">None</span>;
}
ControlFlow::&lt;()&gt;::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>

File diff suppressed because one or more lines are too long

View File

@@ -0,0 +1 @@
window.SIDEBAR_ITEMS = {"enum":["BinaryOperator","ColumnOption","DataType","Expr","FunctionArg","FunctionArgExpr","FunctionArguments","SqlOption","SqlValue","TableConstraint","TimezoneInfo","UnaryOperator"],"fn":["parse_column_default_constraint","visit_expressions_mut","visit_statements_mut"],"struct":["ColumnDef","ColumnOptionDef","Function","Ident","ObjectName"],"trait":["Visit","VisitMut","Visitor","VisitorMut"]};

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

View 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::default_constraint - 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>default_<wbr>constraint</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">default_constraint</a></div><h1>Trait <span class="trait">Visitor</span>&nbsp;<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>(&amp;mut self, _query: &amp;Query) -&gt; <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>&lt;Self::<a class="associatedtype" href="../convert/trait.Visitor.html#associatedtype.Break" title="type common_sql::convert::Visitor::Break">Break</a>&gt; { ... }
<span class="item-spacer"></span> fn <a href="#method.post_visit_query" class="fn">post_visit_query</a>(&amp;mut self, _query: &amp;Query) -&gt; <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>&lt;Self::<a class="associatedtype" href="../convert/trait.Visitor.html#associatedtype.Break" title="type common_sql::convert::Visitor::Break">Break</a>&gt; { ... }
<span class="item-spacer"></span> fn <a href="#method.pre_visit_relation" class="fn">pre_visit_relation</a>(
&amp;mut self,
_relation: &amp;<a class="struct" href="../convert/struct.ObjectName.html" title="struct common_sql::convert::ObjectName">ObjectName</a>,
) -&gt; <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>&lt;Self::<a class="associatedtype" href="../convert/trait.Visitor.html#associatedtype.Break" title="type common_sql::convert::Visitor::Break">Break</a>&gt; { ... }
<span class="item-spacer"></span> fn <a href="#method.post_visit_relation" class="fn">post_visit_relation</a>(
&amp;mut self,
_relation: &amp;<a class="struct" href="../convert/struct.ObjectName.html" title="struct common_sql::convert::ObjectName">ObjectName</a>,
) -&gt; <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>&lt;Self::<a class="associatedtype" href="../convert/trait.Visitor.html#associatedtype.Break" title="type common_sql::convert::Visitor::Break">Break</a>&gt; { ... }
<span class="item-spacer"></span> fn <a href="#method.pre_visit_table_factor" class="fn">pre_visit_table_factor</a>(
&amp;mut self,
_table_factor: &amp;TableFactor,
) -&gt; <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>&lt;Self::<a class="associatedtype" href="../convert/trait.Visitor.html#associatedtype.Break" title="type common_sql::convert::Visitor::Break">Break</a>&gt; { ... }
<span class="item-spacer"></span> fn <a href="#method.post_visit_table_factor" class="fn">post_visit_table_factor</a>(
&amp;mut self,
_table_factor: &amp;TableFactor,
) -&gt; <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>&lt;Self::<a class="associatedtype" href="../convert/trait.Visitor.html#associatedtype.Break" title="type common_sql::convert::Visitor::Break">Break</a>&gt; { ... }
<span class="item-spacer"></span> fn <a href="#method.pre_visit_expr" class="fn">pre_visit_expr</a>(&amp;mut self, _expr: &amp;<a class="enum" href="../convert/enum.Expr.html" title="enum common_sql::convert::Expr">Expr</a>) -&gt; <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>&lt;Self::<a class="associatedtype" href="../convert/trait.Visitor.html#associatedtype.Break" title="type common_sql::convert::Visitor::Break">Break</a>&gt; { ... }
<span class="item-spacer"></span> fn <a href="#method.post_visit_expr" class="fn">post_visit_expr</a>(&amp;mut self, _expr: &amp;<a class="enum" href="../convert/enum.Expr.html" title="enum common_sql::convert::Expr">Expr</a>) -&gt; <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>&lt;Self::<a class="associatedtype" href="../convert/trait.Visitor.html#associatedtype.Break" title="type common_sql::convert::Visitor::Break">Break</a>&gt; { ... }
<span class="item-spacer"></span> fn <a href="#method.pre_visit_statement" class="fn">pre_visit_statement</a>(
&amp;mut self,
_statement: &amp;Statement,
) -&gt; <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>&lt;Self::<a class="associatedtype" href="../convert/trait.Visitor.html#associatedtype.Break" title="type common_sql::convert::Visitor::Break">Break</a>&gt; { ... }
<span class="item-spacer"></span> fn <a href="#method.post_visit_statement" class="fn">post_visit_statement</a>(
&amp;mut self,
_statement: &amp;Statement,
) -&gt; <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>&lt;Self::<a class="associatedtype" href="../convert/trait.Visitor.html#associatedtype.Break" title="type common_sql::convert::Visitor::Break">Break</a>&gt; { ... }
<span class="item-spacer"></span> fn <a href="#method.pre_visit_value" class="fn">pre_visit_value</a>(&amp;mut self, _value: &amp;<a class="enum" href="../convert/enum.SqlValue.html" title="enum common_sql::convert::SqlValue">Value</a>) -&gt; <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>&lt;Self::<a class="associatedtype" href="../convert/trait.Visitor.html#associatedtype.Break" title="type common_sql::convert::Visitor::Break">Break</a>&gt; { ... }
<span class="item-spacer"></span> fn <a href="#method.post_visit_value" class="fn">post_visit_value</a>(&amp;mut self, _value: &amp;<a class="enum" href="../convert/enum.SqlValue.html" title="enum common_sql::convert::SqlValue">Value</a>) -&gt; <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>&lt;Self::<a class="associatedtype" href="../convert/trait.Visitor.html#associatedtype.Break" title="type common_sql::convert::Visitor::Break">Break</a>&gt; { ... }
}</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&lt;String&gt;,
}
<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">&amp;mut </span><span class="self">self</span>, relation: <span class="kw-2">&amp;</span>ObjectName) -&gt; ControlFlow&lt;<span class="self">Self</span>::Break&gt; {
<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">&amp;mut </span><span class="self">self</span>, expr: <span class="kw-2">&amp;</span>Expr) -&gt; ControlFlow&lt;<span class="self">Self</span>::Break&gt; {
<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">&amp;</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">&amp;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&lt;<span class="kw">_</span>&gt; = [
<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>(&amp;mut self, _query: &amp;Query) -&gt; <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>&lt;Self::<a class="associatedtype" href="../convert/trait.Visitor.html#associatedtype.Break" title="type common_sql::convert::Visitor::Break">Break</a>&gt;</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>(&amp;mut self, _query: &amp;Query) -&gt; <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>&lt;Self::<a class="associatedtype" href="../convert/trait.Visitor.html#associatedtype.Break" title="type common_sql::convert::Visitor::Break">Break</a>&gt;</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>(
&amp;mut self,
_relation: &amp;<a class="struct" href="../convert/struct.ObjectName.html" title="struct common_sql::convert::ObjectName">ObjectName</a>,
) -&gt; <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>&lt;Self::<a class="associatedtype" href="../convert/trait.Visitor.html#associatedtype.Break" title="type common_sql::convert::Visitor::Break">Break</a>&gt;</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>(
&amp;mut self,
_relation: &amp;<a class="struct" href="../convert/struct.ObjectName.html" title="struct common_sql::convert::ObjectName">ObjectName</a>,
) -&gt; <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>&lt;Self::<a class="associatedtype" href="../convert/trait.Visitor.html#associatedtype.Break" title="type common_sql::convert::Visitor::Break">Break</a>&gt;</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>(
&amp;mut self,
_table_factor: &amp;TableFactor,
) -&gt; <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>&lt;Self::<a class="associatedtype" href="../convert/trait.Visitor.html#associatedtype.Break" title="type common_sql::convert::Visitor::Break">Break</a>&gt;</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>(
&amp;mut self,
_table_factor: &amp;TableFactor,
) -&gt; <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>&lt;Self::<a class="associatedtype" href="../convert/trait.Visitor.html#associatedtype.Break" title="type common_sql::convert::Visitor::Break">Break</a>&gt;</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>(&amp;mut self, _expr: &amp;<a class="enum" href="../convert/enum.Expr.html" title="enum common_sql::convert::Expr">Expr</a>) -&gt; <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>&lt;Self::<a class="associatedtype" href="../convert/trait.Visitor.html#associatedtype.Break" title="type common_sql::convert::Visitor::Break">Break</a>&gt;</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>(&amp;mut self, _expr: &amp;<a class="enum" href="../convert/enum.Expr.html" title="enum common_sql::convert::Expr">Expr</a>) -&gt; <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>&lt;Self::<a class="associatedtype" href="../convert/trait.Visitor.html#associatedtype.Break" title="type common_sql::convert::Visitor::Break">Break</a>&gt;</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>(
&amp;mut self,
_statement: &amp;Statement,
) -&gt; <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>&lt;Self::<a class="associatedtype" href="../convert/trait.Visitor.html#associatedtype.Break" title="type common_sql::convert::Visitor::Break">Break</a>&gt;</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>(
&amp;mut self,
_statement: &amp;Statement,
) -&gt; <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>&lt;Self::<a class="associatedtype" href="../convert/trait.Visitor.html#associatedtype.Break" title="type common_sql::convert::Visitor::Break">Break</a>&gt;</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>(&amp;mut self, _value: &amp;<a class="enum" href="../convert/enum.SqlValue.html" title="enum common_sql::convert::SqlValue">Value</a>) -&gt; <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>&lt;Self::<a class="associatedtype" href="../convert/trait.Visitor.html#associatedtype.Break" title="type common_sql::convert::Visitor::Break">Break</a>&gt;</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>(&amp;mut self, _value: &amp;<a class="enum" href="../convert/enum.SqlValue.html" title="enum common_sql::convert::SqlValue">Value</a>) -&gt; <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>&lt;Self::<a class="associatedtype" href="../convert/trait.Visitor.html#associatedtype.Break" title="type common_sql::convert::Visitor::Break">Break</a>&gt;</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>

View 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::default_constraint - 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>default_<wbr>constraint</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">default_constraint</a></div><h1>Trait <span class="trait">Visitor<wbr>Mut</span>&nbsp;<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>(
&amp;mut self,
_query: &amp;mut Query,
) -&gt; <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>&lt;Self::<a class="associatedtype" href="../convert/trait.VisitorMut.html#associatedtype.Break" title="type common_sql::convert::VisitorMut::Break">Break</a>&gt; { ... }
<span class="item-spacer"></span> fn <a href="#method.post_visit_query" class="fn">post_visit_query</a>(
&amp;mut self,
_query: &amp;mut Query,
) -&gt; <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>&lt;Self::<a class="associatedtype" href="../convert/trait.VisitorMut.html#associatedtype.Break" title="type common_sql::convert::VisitorMut::Break">Break</a>&gt; { ... }
<span class="item-spacer"></span> fn <a href="#method.pre_visit_relation" class="fn">pre_visit_relation</a>(
&amp;mut self,
_relation: &amp;mut <a class="struct" href="../convert/struct.ObjectName.html" title="struct common_sql::convert::ObjectName">ObjectName</a>,
) -&gt; <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>&lt;Self::<a class="associatedtype" href="../convert/trait.VisitorMut.html#associatedtype.Break" title="type common_sql::convert::VisitorMut::Break">Break</a>&gt; { ... }
<span class="item-spacer"></span> fn <a href="#method.post_visit_relation" class="fn">post_visit_relation</a>(
&amp;mut self,
_relation: &amp;mut <a class="struct" href="../convert/struct.ObjectName.html" title="struct common_sql::convert::ObjectName">ObjectName</a>,
) -&gt; <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>&lt;Self::<a class="associatedtype" href="../convert/trait.VisitorMut.html#associatedtype.Break" title="type common_sql::convert::VisitorMut::Break">Break</a>&gt; { ... }
<span class="item-spacer"></span> fn <a href="#method.pre_visit_table_factor" class="fn">pre_visit_table_factor</a>(
&amp;mut self,
_table_factor: &amp;mut TableFactor,
) -&gt; <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>&lt;Self::<a class="associatedtype" href="../convert/trait.VisitorMut.html#associatedtype.Break" title="type common_sql::convert::VisitorMut::Break">Break</a>&gt; { ... }
<span class="item-spacer"></span> fn <a href="#method.post_visit_table_factor" class="fn">post_visit_table_factor</a>(
&amp;mut self,
_table_factor: &amp;mut TableFactor,
) -&gt; <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>&lt;Self::<a class="associatedtype" href="../convert/trait.VisitorMut.html#associatedtype.Break" title="type common_sql::convert::VisitorMut::Break">Break</a>&gt; { ... }
<span class="item-spacer"></span> fn <a href="#method.pre_visit_expr" class="fn">pre_visit_expr</a>(&amp;mut self, _expr: &amp;mut <a class="enum" href="../convert/enum.Expr.html" title="enum common_sql::convert::Expr">Expr</a>) -&gt; <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>&lt;Self::<a class="associatedtype" href="../convert/trait.VisitorMut.html#associatedtype.Break" title="type common_sql::convert::VisitorMut::Break">Break</a>&gt; { ... }
<span class="item-spacer"></span> fn <a href="#method.post_visit_expr" class="fn">post_visit_expr</a>(&amp;mut self, _expr: &amp;mut <a class="enum" href="../convert/enum.Expr.html" title="enum common_sql::convert::Expr">Expr</a>) -&gt; <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>&lt;Self::<a class="associatedtype" href="../convert/trait.VisitorMut.html#associatedtype.Break" title="type common_sql::convert::VisitorMut::Break">Break</a>&gt; { ... }
<span class="item-spacer"></span> fn <a href="#method.pre_visit_statement" class="fn">pre_visit_statement</a>(
&amp;mut self,
_statement: &amp;mut Statement,
) -&gt; <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>&lt;Self::<a class="associatedtype" href="../convert/trait.VisitorMut.html#associatedtype.Break" title="type common_sql::convert::VisitorMut::Break">Break</a>&gt; { ... }
<span class="item-spacer"></span> fn <a href="#method.post_visit_statement" class="fn">post_visit_statement</a>(
&amp;mut self,
_statement: &amp;mut Statement,
) -&gt; <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>&lt;Self::<a class="associatedtype" href="../convert/trait.VisitorMut.html#associatedtype.Break" title="type common_sql::convert::VisitorMut::Break">Break</a>&gt; { ... }
<span class="item-spacer"></span> fn <a href="#method.pre_visit_value" class="fn">pre_visit_value</a>(
&amp;mut self,
_value: &amp;mut <a class="enum" href="../convert/enum.SqlValue.html" title="enum common_sql::convert::SqlValue">Value</a>,
) -&gt; <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>&lt;Self::<a class="associatedtype" href="../convert/trait.VisitorMut.html#associatedtype.Break" title="type common_sql::convert::VisitorMut::Break">Break</a>&gt; { ... }
<span class="item-spacer"></span> fn <a href="#method.post_visit_value" class="fn">post_visit_value</a>(
&amp;mut self,
_value: &amp;mut <a class="enum" href="../convert/enum.SqlValue.html" title="enum common_sql::convert::SqlValue">Value</a>,
) -&gt; <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>&lt;Self::<a class="associatedtype" href="../convert/trait.VisitorMut.html#associatedtype.Break" title="type common_sql::convert::VisitorMut::Break">Break</a>&gt; { ... }
}</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="../convert/fn.visit_expressions_mut.html" title="fn common_sql::convert::visit_expressions_mut">visit_expressions_mut</a></li>
<li><a href="../convert/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">&amp;mut </span><span class="self">self</span>, expr: <span class="kw-2">&amp;mut </span>Expr) -&gt; ControlFlow&lt;<span class="self">Self</span>::Break&gt; {
<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">&amp;</span>GenericDialect{}, sql).unwrap();
<span class="comment">// Drive the visitor through the AST
</span>statements.visit(<span class="kw-2">&amp;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>(&amp;mut self, _query: &amp;mut Query) -&gt; <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>&lt;Self::<a class="associatedtype" href="../convert/trait.VisitorMut.html#associatedtype.Break" title="type common_sql::convert::VisitorMut::Break">Break</a>&gt;</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>(&amp;mut self, _query: &amp;mut Query) -&gt; <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>&lt;Self::<a class="associatedtype" href="../convert/trait.VisitorMut.html#associatedtype.Break" title="type common_sql::convert::VisitorMut::Break">Break</a>&gt;</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>(
&amp;mut self,
_relation: &amp;mut <a class="struct" href="../convert/struct.ObjectName.html" title="struct common_sql::convert::ObjectName">ObjectName</a>,
) -&gt; <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>&lt;Self::<a class="associatedtype" href="../convert/trait.VisitorMut.html#associatedtype.Break" title="type common_sql::convert::VisitorMut::Break">Break</a>&gt;</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>(
&amp;mut self,
_relation: &amp;mut <a class="struct" href="../convert/struct.ObjectName.html" title="struct common_sql::convert::ObjectName">ObjectName</a>,
) -&gt; <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>&lt;Self::<a class="associatedtype" href="../convert/trait.VisitorMut.html#associatedtype.Break" title="type common_sql::convert::VisitorMut::Break">Break</a>&gt;</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>(
&amp;mut self,
_table_factor: &amp;mut TableFactor,
) -&gt; <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>&lt;Self::<a class="associatedtype" href="../convert/trait.VisitorMut.html#associatedtype.Break" title="type common_sql::convert::VisitorMut::Break">Break</a>&gt;</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>(
&amp;mut self,
_table_factor: &amp;mut TableFactor,
) -&gt; <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>&lt;Self::<a class="associatedtype" href="../convert/trait.VisitorMut.html#associatedtype.Break" title="type common_sql::convert::VisitorMut::Break">Break</a>&gt;</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>(&amp;mut self, _expr: &amp;mut <a class="enum" href="../convert/enum.Expr.html" title="enum common_sql::convert::Expr">Expr</a>) -&gt; <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>&lt;Self::<a class="associatedtype" href="../convert/trait.VisitorMut.html#associatedtype.Break" title="type common_sql::convert::VisitorMut::Break">Break</a>&gt;</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>(&amp;mut self, _expr: &amp;mut <a class="enum" href="../convert/enum.Expr.html" title="enum common_sql::convert::Expr">Expr</a>) -&gt; <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>&lt;Self::<a class="associatedtype" href="../convert/trait.VisitorMut.html#associatedtype.Break" title="type common_sql::convert::VisitorMut::Break">Break</a>&gt;</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>(
&amp;mut self,
_statement: &amp;mut Statement,
) -&gt; <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>&lt;Self::<a class="associatedtype" href="../convert/trait.VisitorMut.html#associatedtype.Break" title="type common_sql::convert::VisitorMut::Break">Break</a>&gt;</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>(
&amp;mut self,
_statement: &amp;mut Statement,
) -&gt; <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>&lt;Self::<a class="associatedtype" href="../convert/trait.VisitorMut.html#associatedtype.Break" title="type common_sql::convert::VisitorMut::Break">Break</a>&gt;</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>(&amp;mut self, _value: &amp;mut <a class="enum" href="../convert/enum.SqlValue.html" title="enum common_sql::convert::SqlValue">Value</a>) -&gt; <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>&lt;Self::<a class="associatedtype" href="../convert/trait.VisitorMut.html#associatedtype.Break" title="type common_sql::convert::VisitorMut::Break">Break</a>&gt;</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>(&amp;mut self, _value: &amp;mut <a class="enum" href="../convert/enum.SqlValue.html" title="enum common_sql::convert::SqlValue">Value</a>) -&gt; <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>&lt;Self::<a class="associatedtype" href="../convert/trait.VisitorMut.html#associatedtype.Break" title="type common_sql::convert::VisitorMut::Break">Break</a>&gt;</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>

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

View File

@@ -0,0 +1 @@
window.SIDEBAR_ITEMS = {"enum":["Error","Expr","SqlValue"],"struct":["ColumnTypeMismatchSnafu","ConvertSqlValueSnafu","ConvertStrSnafu","DatatypeSnafu","DeserializeSnafu","InvalidCastSnafu","InvalidSqlValueSnafu","InvalidUnaryOpSnafu","ParseSqlValueSnafu","TimestampOverflowSnafu","UnsupportedDefaultValueSnafu","UnsupportedUnaryOpSnafu"],"type":["Result"]};

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

View File

@@ -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="API documentation for the Rust `Result` type in crate `common_sql`."><title>Result in common_sql::error - 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 type"><!--[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="#">Result</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="#">Result</a></h2><h3><a href="#aliased-type">Aliased Type</a></h3><h3><a href="#variants">Variants</a></h3><ul class="block variant"><li><a href="#variant.Err" title="Err">Err</a></li><li><a href="#variant.Ok" title="Ok">Ok</a></li></ul></section><div id="rustdoc-modnav"><h2><a href="index.html">In common_<wbr>sql::<wbr>error</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">error</a></div><h1>Type Alias <span class="type">Result</span>&nbsp;<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/error.rs.html#27">Source</a> </span></div><pre class="rust item-decl"><code>pub type Result&lt;T&gt; = <a class="enum" href="https://doc.rust-lang.org/nightly/core/result/enum.Result.html" title="enum core::result::Result">Result</a>&lt;T, <a class="enum" href="enum.Error.html" title="enum common_sql::error::Error">Error</a>&gt;;</code></pre><h2 id="aliased-type" class="section-header">Aliased Type<a href="#aliased-type" class="anchor">§</a></h2><pre class="rust item-decl"><code>pub enum Result&lt;T&gt; {
Ok(T),
Err(<a class="enum" href="enum.Error.html" title="enum common_sql::error::Error">Error</a>),
}</code></pre><h2 id="variants" class="variants section-header">Variants<a href="#variants" class="anchor">§</a></h2><div class="variants"><section id="variant.Ok" class="variant"><a href="#variant.Ok" class="anchor">§</a><span class="since rightside" title="Stable since Rust version 1.0.0">1.0.0</span><h3 class="code-header">Ok(T)</h3></section><div class="docblock"><p>Contains the success value</p>
</div><section id="variant.Err" class="variant"><a href="#variant.Err" class="anchor">§</a><span class="since rightside" title="Stable since Rust version 1.0.0">1.0.0</span><h3 class="code-header">Err(<a class="enum" href="enum.Error.html" title="enum common_sql::error::Error">Error</a>)</h3></section><div class="docblock"><p>Contains the error value</p>
</div></div><script src="../../type.impl/core/result/enum.Result.js" data-self-path="common_sql::error::Result" async></script></section></div></main></body></html>

1
common_sql/index.html Normal file
View 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 `common_sql` crate."><title>common_sql - 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="../crates.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 mod crate"><!--[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="#">Crate common_sql</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"><ul class="block"><li><a id="all-types" href="all.html">All Items</a></li></ul><section id="rustdoc-toc"><h3><a href="#modules">Crate Items</a></h3><ul class="block"><li><a href="#modules" title="Modules">Modules</a></li></ul></section><div id="rustdoc-modnav"></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"><h1>Crate <span>common_<wbr>sql</span>&nbsp;<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/lib.rs.html#15-19">Source</a> </span></div><h2 id="modules" class="section-header">Modules<a href="#modules" class="anchor">§</a></h2><dl class="item-table"><dt><a class="mod" href="convert/index.html" title="mod common_sql::convert">convert</a></dt><dt><a class="mod" href="default_constraint/index.html" title="mod common_sql::default_constraint">default_<wbr>constraint</a></dt><dt><a class="mod" href="error/index.html" title="mod common_sql::error">error</a></dt></dl></section></div></main></body></html>

View File

@@ -0,0 +1 @@
window.SIDEBAR_ITEMS = {"mod":["convert","default_constraint","error"]};