rename function to more clear name and adding associated test as todo
This commit is contained in:
parent
433054dd7e
commit
84564a9199
|
|
@ -43,7 +43,7 @@ fn generate_select_query<T: more_fields::FieldsAsMap>(
|
|||
|
||||
/// Generate create table_name with fields as columns
|
||||
/// This function expects a hash map containing (column name, sqlite type)
|
||||
pub fn generate_database_query(table_name: &str, fields: HashMap<String, String>) -> String {
|
||||
pub fn generate_create_table_query(table_name: &str, fields: HashMap<String, String>) -> String {
|
||||
format!(
|
||||
"CREATE TABLE IF NOT EXISTS {} ({}, PRIMARY KEY('id' AUTOINCREMENT));",
|
||||
table_name,
|
||||
|
|
@ -123,4 +123,10 @@ mod test {
|
|||
]
|
||||
)
|
||||
}
|
||||
|
||||
#[ignore = "todo"]
|
||||
#[test]
|
||||
fn test_generate_create_table_query() {
|
||||
todo!()
|
||||
}
|
||||
}
|
||||
|
|
|
|||
Loading…
Reference in New Issue