pub(crate) fn build_insert_sqls(&mut self) {
        for index in 0..self.fixture_files.len() {
            let file = &self.fixture_files[index].content;
            let mut buf_reader = BufReader::new(file);
            let mut content = String::new();
            buf_reader.read_to_string(&mut content).unwrap();
            let records = YamlLoader::load_from_str(content.as_str()).unwrap();

            if let Yaml::Array(records) = &records[0] {
                for record in records {
                    let (sql, values) = self.build_insert_sql(&self.fixture_files[index], record);
                    self.fixture_files[index].insert_sqls.push(InsertSql {
                        sql,
                        params: values,
                    });
                }
            };
        }
    }
/// Build SQL queries from fixture files.
Build SQL queries from fixture files.
Build SQL queries from fixture files .
pub(crate) fn build_insert_sqls(&mut self) {
        for index in 0..self.fixture_files.len() {
            let file = &self.fixture_files[index].content;
            let mut buf_reader = BufReader::new(file);
            let mut content = String::new();
            buf_reader.read_to_string(&mut content).unwrap();
            let records = YamlLoader::load_from_str(content.as_str()).unwrap();
            if let Yaml::Array(records) = &records[0] {
                for record in records {
                    let (sql, values) = self.build_insert_sql(&self.fixture_files[index], record);
                    self.fixture_files[index].insert_sqls.push(InsertSql {
                        sql,
                        params: values,
                    });
                }
            };
        }
    }
pub ( crate ) fn build_insert_sqls ( & mut self ) { for index in 0 .. self . fixture_files . len ( ) { let file = & self . fixture_files [ index ] . content ; let mut buf_reader = BufReader :: new ( file ) ; let mut content = String :: new ( ) ; buf_reader . read_to_string ( & mut content ) . unwrap ( ) ; let records = YamlLoader :: load_from_str ( content . as_str ( ) ) . unwrap ( ) ; if let Yaml :: Array ( records ) = & records [ 0 ] { for record in records { let ( sql , values ) = self . build_insert_sql ( & self . fixture_files [ index ] , record ) ; self . fixture_files [ index ] . insert_sqls . push ( InsertSql { sql , params : values , } ) ; } } ; } }
Build SQL queries from fixture files.
Build SQL queries from fixture files .
&mut self
&mut self