pub fn new(database: Option<&str>, schema: Option<&str>, table: &str) -> Self {
        let estimated_joined_len =
            database.map_or(0, |s| s.len() + 1) + schema.map_or(0, |s| s.len() + 1) + table.len();

        let mut qualified_name = String::with_capacity(estimated_joined_len);
        let mut unique_name = String::with_capacity(estimated_joined_len);
        if let Some(db) = database {
            qualified_name.push_str(db);
            qualified_name.push('.');
            unescape_into(&mut unique_name, db, true);
            unique_name.push('.');
        }
        if let Some(schema) = schema {
            qualified_name.push_str(schema);
            qualified_name.push('.');
            unescape_into(&mut unique_name, schema, true);
            unique_name.push('.');
        }
        let table_name_index = qualified_name.len();
        let unique_table_name_index = unique_name.len();
        qualified_name.push_str(table);
        unescape_into(&mut unique_name, table, true);

        Self {
            table_name_index,
            unique_table_name_index,
            qualified_name,
            unique_name,
        }
    }
/// Creates a new qualified name from its components.
Creates a new qualified name from its components.
Creates a new qualified name from its components .
pub fn new(database: Option<&str>, schema: Option<&str>, table: &str) -> Self {
        let estimated_joined_len =
            database.map_or(0, |s| s.len() + 1) + schema.map_or(0, |s| s.len() + 1) + table.len();
        let mut qualified_name = String::with_capacity(estimated_joined_len);
        let mut unique_name = String::with_capacity(estimated_joined_len);
        if let Some(db) = database {
            qualified_name.push_str(db);
            qualified_name.push('.');
            unescape_into(&mut unique_name, db, true);
            unique_name.push('.');
        }
        if let Some(schema) = schema {
            qualified_name.push_str(schema);
            qualified_name.push('.');
            unescape_into(&mut unique_name, schema, true);
            unique_name.push('.');
        }
        let table_name_index = qualified_name.len();
        let unique_table_name_index = unique_name.len();
        qualified_name.push_str(table);
        unescape_into(&mut unique_name, table, true);
        Self {
            table_name_index,
            unique_table_name_index,
            qualified_name,
            unique_name,
        }
    }
pub fn new ( database : Option < & str > , schema : Option < & str > , table : & str ) -> Self { let estimated_joined_len = database . map_or ( 0 , | s | s . len ( ) + 1 ) + schema . map_or ( 0 , | s | s . len ( ) + 1 ) + table . len ( ) ; let mut qualified_name = String :: with_capacity ( estimated_joined_len ) ; let mut unique_name = String :: with_capacity ( estimated_joined_len ) ; if let Some ( db ) = database { qualified_name . push_str ( db ) ; qualified_name . push ( '.' ) ; unescape_into ( & mut unique_name , db , true ) ; unique_name . push ( '.' ) ; } if let Some ( schema ) = schema { qualified_name . push_str ( schema ) ; qualified_name . push ( '.' ) ; unescape_into ( & mut unique_name , schema , true ) ; unique_name . push ( '.' ) ; } let table_name_index = qualified_name . len ( ) ; let unique_table_name_index = unique_name . len ( ) ; qualified_name . push_str ( table ) ; unescape_into ( & mut unique_name , table , true ) ; Self { table_name_index , unique_table_name_index , qualified_name , unique_name , } }
Creates a new qualified name from its components.
Creates a new qualified name from its components .
database
Option<&str>
schema
Option<&str>
table
&str
database
Option<&str>
schema
Option<&str>
table
&str