rbatis_codegen/codegen/syntax_tree_pysql/
bind_node.rs1use crate::codegen::syntax_tree_pysql::{DefaultName, Name, ToHtml};
2
3#[derive(Clone, Debug, Eq, PartialEq)]
14pub struct BindNode {
15 pub name: String,
16 pub value: String,
17}
18
19impl DefaultName for BindNode {
20 fn default_name() -> &'static str {
21 "let"
22 }
23}
24
25impl Name for BindNode {
26 fn name() -> &'static str {
27 "bind"
28 }
29}
30
31
32impl ToHtml for BindNode {
33 fn as_html(&self) -> String {
34 format!("<bind name=\"{}\" value=\"{}\"/>", self.name, self.value)
35 }
36}