Skip to content

Commit 658d039

Browse files
committed
fix(code): change "type ConnectionType" to be public
which was broken for "once-connection-type" re cc0ecf2
1 parent 7047c81 commit 658d039

File tree

29 files changed

+29
-29
lines changed

29 files changed

+29
-29
lines changed

src/code.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -590,7 +590,7 @@ pub fn generate_common_structs(table_options: &TableOptions<'_>) -> String {
590590
/// Generate connection-type type
591591
pub fn generate_connection_type(config: &GenerationConfig) -> String {
592592
format!(
593-
"type ConnectionType = {connection_type};",
593+
"pub type ConnectionType = {connection_type};",
594594
connection_type = config.connection_type,
595595
)
596596
}

test/autogenerated_all/models/todos/generated.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ use diesel::*;
44
use crate::schema::*;
55
use diesel::QueryResult;
66

7-
type ConnectionType = diesel::r2d2::PooledConnection<diesel::r2d2::ConnectionManager<diesel::PgConnection>>;
7+
pub type ConnectionType = diesel::r2d2::PooledConnection<diesel::r2d2::ConnectionManager<diesel::PgConnection>>;
88

99
/// Struct representing a row in table `todos`
1010
#[derive(Debug, Clone, serde::Serialize, serde::Deserialize, Queryable, Selectable)]

test/autogenerated_attributes/models/todos/generated.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ use diesel::*;
44
use crate::schema::*;
55
use diesel::QueryResult;
66

7-
type ConnectionType = diesel::r2d2::PooledConnection<diesel::r2d2::ConnectionManager<diesel::PgConnection>>;
7+
pub type ConnectionType = diesel::r2d2::PooledConnection<diesel::r2d2::ConnectionManager<diesel::PgConnection>>;
88

99
/// Struct representing a row in table `todos`
1010
#[derive(Debug, Clone, serde::Serialize, serde::Deserialize, Queryable, Selectable)]

test/autogenerated_primary_keys/models/todos/generated.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ use diesel::*;
44
use crate::schema::*;
55
use diesel::QueryResult;
66

7-
type ConnectionType = diesel::r2d2::PooledConnection<diesel::r2d2::ConnectionManager<diesel::PgConnection>>;
7+
pub type ConnectionType = diesel::r2d2::PooledConnection<diesel::r2d2::ConnectionManager<diesel::PgConnection>>;
88

99
/// Struct representing a row in table `todos`
1010
#[derive(Debug, Clone, serde::Serialize, serde::Deserialize, Queryable, Selectable)]

test/cleanup_generated_content/models/todos/generated.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ use diesel::*;
44
use crate::schema::*;
55
use diesel::QueryResult;
66

7-
type ConnectionType = diesel::r2d2::PooledConnection<diesel::r2d2::ConnectionManager<diesel::PgConnection>>;
7+
pub type ConnectionType = diesel::r2d2::PooledConnection<diesel::r2d2::ConnectionManager<diesel::PgConnection>>;
88

99
/// Struct representing a row in table `todos`
1010
#[derive(Debug, Clone, serde::Serialize, serde::Deserialize, Queryable, Selectable)]

test/create_update_str_cow/models/todos/generated.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ use diesel::*;
44
use crate::schema::*;
55
use diesel::QueryResult;
66

7-
type ConnectionType = diesel::r2d2::PooledConnection<diesel::r2d2::ConnectionManager<diesel::PgConnection>>;
7+
pub type ConnectionType = diesel::r2d2::PooledConnection<diesel::r2d2::ConnectionManager<diesel::PgConnection>>;
88

99
/// Struct representing a row in table `todos`
1010
#[derive(Debug, Clone, serde::Serialize, serde::Deserialize, Queryable, Selectable)]

test/create_update_str_str/models/todos/generated.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ use diesel::*;
44
use crate::schema::*;
55
use diesel::QueryResult;
66

7-
type ConnectionType = diesel::r2d2::PooledConnection<diesel::r2d2::ConnectionManager<diesel::PgConnection>>;
7+
pub type ConnectionType = diesel::r2d2::PooledConnection<diesel::r2d2::ConnectionManager<diesel::PgConnection>>;
88

99
/// Struct representing a row in table `todos`
1010
#[derive(Debug, Clone, serde::Serialize, serde::Deserialize, Queryable, Selectable)]

test/custom_model_and_schema_path/models/tableA/generated.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ use diesel::*;
44
use crate::data::schema::*;
55
use diesel::QueryResult;
66

7-
type ConnectionType = diesel::r2d2::PooledConnection<diesel::r2d2::ConnectionManager<diesel::PgConnection>>;
7+
pub type ConnectionType = diesel::r2d2::PooledConnection<diesel::r2d2::ConnectionManager<diesel::PgConnection>>;
88

99
/// Struct representing a row in table `tableA`
1010
#[derive(Debug, Clone, serde::Serialize, serde::Deserialize, Queryable, Selectable)]

test/custom_model_and_schema_path/models/tableB/generated.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@ use crate::data::models::table_a::TableA;
55
use crate::data::schema::*;
66
use diesel::QueryResult;
77

8-
type ConnectionType = diesel::r2d2::PooledConnection<diesel::r2d2::ConnectionManager<diesel::PgConnection>>;
8+
pub type ConnectionType = diesel::r2d2::PooledConnection<diesel::r2d2::ConnectionManager<diesel::PgConnection>>;
99

1010
/// Struct representing a row in table `tableB`
1111
#[derive(Debug, Clone, serde::Serialize, serde::Deserialize, Queryable, Selectable, Associations, Identifiable)]

test/custom_model_path/models/tableA/generated.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ use diesel::*;
44
use crate::schema::*;
55
use diesel::QueryResult;
66

7-
type ConnectionType = diesel::r2d2::PooledConnection<diesel::r2d2::ConnectionManager<diesel::PgConnection>>;
7+
pub type ConnectionType = diesel::r2d2::PooledConnection<diesel::r2d2::ConnectionManager<diesel::PgConnection>>;
88

99
/// Struct representing a row in table `tableA`
1010
#[derive(Debug, Clone, serde::Serialize, serde::Deserialize, Queryable, Selectable)]

0 commit comments

Comments
 (0)