Skip to content

Commit 0008e4d

Browse files
committed
feat(code): change table functions "insert_into" to also use "diesel::" prefix (like other functions)
1 parent 8c00d73 commit 0008e4d

File tree

32 files changed

+33
-33
lines changed

32 files changed

+33
-33
lines changed

src/code.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -485,7 +485,7 @@ fn build_table_fns(
485485
pub{async_keyword} fn create(db: &mut ConnectionType, item: &{create_struct_identifier}) -> QueryResult<Self> {{
486486
use {schema_path}{table_name}::dsl::*;
487487
488-
insert_into({table_name}).values(item).get_result::<Self>(db){await_keyword}
488+
diesel::insert_into({table_name}).values(item).get_result::<Self>(db){await_keyword}
489489
}}
490490
"##
491491
));
@@ -496,7 +496,7 @@ fn build_table_fns(
496496
pub{async_keyword} fn create(db: &mut ConnectionType) -> QueryResult<Self> {{
497497
use {schema_path}{table_name}::dsl::*;
498498
499-
insert_into({table_name}).default_values().get_result::<Self>(db){await_keyword}
499+
diesel::insert_into({table_name}).default_values().get_result::<Self>(db){await_keyword}
500500
}}
501501
"##
502502
));

test/autogenerated_all/models/todos/generated.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -44,7 +44,7 @@ impl Todos {
4444
pub fn create(db: &mut ConnectionType) -> QueryResult<Self> {
4545
use crate::schema::todos::dsl::*;
4646

47-
insert_into(todos).default_values().get_result::<Self>(db)
47+
diesel::insert_into(todos).default_values().get_result::<Self>(db)
4848
}
4949

5050
/// Get a row from `todos`, identified by the primary key

test/autogenerated_attributes/models/todos/generated.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -52,7 +52,7 @@ impl Todos {
5252
pub fn create(db: &mut ConnectionType, item: &CreateTodos) -> QueryResult<Self> {
5353
use crate::schema::todos::dsl::*;
5454

55-
insert_into(todos).values(item).get_result::<Self>(db)
55+
diesel::insert_into(todos).values(item).get_result::<Self>(db)
5656
}
5757

5858
/// Get a row from `todos`, identified by the primary key

test/autogenerated_primary_keys/models/todos/generated.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -52,7 +52,7 @@ impl Todos {
5252
pub fn create(db: &mut ConnectionType, item: &CreateTodos) -> QueryResult<Self> {
5353
use crate::schema::todos::dsl::*;
5454

55-
insert_into(todos).values(item).get_result::<Self>(db)
55+
diesel::insert_into(todos).values(item).get_result::<Self>(db)
5656
}
5757

5858
/// Get a row from `todos`, identified by the primary key

test/cleanup_generated_content/models/todos/generated.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -68,7 +68,7 @@ impl Todos {
6868
pub fn create(db: &mut ConnectionType, item: &CreateTodos) -> QueryResult<Self> {
6969
use crate::schema::todos::dsl::*;
7070

71-
insert_into(todos).values(item).get_result::<Self>(db)
71+
diesel::insert_into(todos).values(item).get_result::<Self>(db)
7272
}
7373

7474
/// Get a row from `todos`, identified by the primary key

test/create_update_bytes_cow/models/todos/generated.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -54,7 +54,7 @@ impl Todos {
5454
pub fn create(db: &mut ConnectionType, item: &CreateTodos) -> QueryResult<Self> {
5555
use crate::schema::todos::dsl::*;
5656

57-
insert_into(todos).values(item).get_result::<Self>(db)
57+
diesel::insert_into(todos).values(item).get_result::<Self>(db)
5858
}
5959

6060
/// Get a row from `todos`, identified by the primary key

test/create_update_bytes_slice/models/todos/generated.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -54,7 +54,7 @@ impl Todos {
5454
pub fn create(db: &mut ConnectionType, item: &CreateTodos) -> QueryResult<Self> {
5555
use crate::schema::todos::dsl::*;
5656

57-
insert_into(todos).values(item).get_result::<Self>(db)
57+
diesel::insert_into(todos).values(item).get_result::<Self>(db)
5858
}
5959

6060
/// Get a row from `todos`, identified by the primary key

test/create_update_str_cow/models/todos/generated.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -66,7 +66,7 @@ impl Todos {
6666
pub fn create(db: &mut ConnectionType, item: &CreateTodos) -> QueryResult<Self> {
6767
use crate::schema::todos::dsl::*;
6868

69-
insert_into(todos).values(item).get_result::<Self>(db)
69+
diesel::insert_into(todos).values(item).get_result::<Self>(db)
7070
}
7171

7272
/// Get a row from `todos`, identified by the primary key

test/create_update_str_str/models/todos/generated.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -66,7 +66,7 @@ impl Todos {
6666
pub fn create(db: &mut ConnectionType, item: &CreateTodos) -> QueryResult<Self> {
6767
use crate::schema::todos::dsl::*;
6868

69-
insert_into(todos).values(item).get_result::<Self>(db)
69+
diesel::insert_into(todos).values(item).get_result::<Self>(db)
7070
}
7171

7272
/// Get a row from `todos`, identified by the primary key

test/custom_model_and_schema_path/models/table_a/generated.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -42,7 +42,7 @@ impl TableA {
4242
pub fn create(db: &mut ConnectionType, item: &CreateTableA) -> QueryResult<Self> {
4343
use crate::data::schema::tableA::dsl::*;
4444

45-
insert_into(tableA).values(item).get_result::<Self>(db)
45+
diesel::insert_into(tableA).values(item).get_result::<Self>(db)
4646
}
4747

4848
/// Get a row from `tableA`, identified by the primary key

0 commit comments

Comments
 (0)