Skip to content

Commit 29f8f06

Browse files
committed
update docs
1 parent 3f29157 commit 29f8f06

File tree

1 file changed

+8
-13
lines changed

1 file changed

+8
-13
lines changed

src/pg.rs

Lines changed: 8 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@ use async_std::task;
33
use sqlx::{pool::PoolConnection, prelude::PgQueryAs, Executor, PgConnection, PgPool};
44
use std::time::Duration;
55

6-
/// sqlx sqlite session store for async-sessions
6+
/// sqlx postgres session store for async-sessions
77
///
88
/// ```rust
99
/// use async_sqlx_session::PostgresSessionStore;
@@ -32,7 +32,7 @@ pub struct PostgresSessionStore {
3232

3333
impl PostgresSessionStore {
3434
/// constructs a new PostgresSessionStore from an existing
35-
/// sqlx::PostgresPool. the default table name for this session
35+
/// sqlx::PgPool. the default table name for this session
3636
/// store will be "async_sessions". To override this, chain this
3737
/// with [`with_table_name`](crate::PostgresSessionStore::with_table_name).
3838
///
@@ -53,14 +53,11 @@ impl PostgresSessionStore {
5353
}
5454
}
5555

56-
/// Constructs a new PostgresSessionStore from a sqlite: database url. note
57-
/// that this documentation uses the special `:memory:` sqlite
58-
/// database for convenient testing, but a real application would
59-
/// use a path like `sqlite:///path/to/database.db`. The default
60-
/// table name for this session store will be "async_sessions". To
61-
/// override this, either chain with
62-
/// [`with_table_name`](crate::PostgresSessionStore::with_table_name) or
63-
/// use
56+
/// Constructs a new PostgresSessionStore from a postgres://
57+
/// database url. The default table name for this session store
58+
/// will be "async_sessions". To override this, either chain with
59+
/// [`with_table_name`](crate::PostgresSessionStore::with_table_name)
60+
/// or use
6461
/// [`new_with_table_name`](crate::PostgresSessionStore::new_with_table_name)
6562
///
6663
/// ```rust
@@ -76,7 +73,7 @@ impl PostgresSessionStore {
7673
Ok(Self::from_client(pool))
7774
}
7875

79-
/// constructs a new PostgresSessionStore from a sqlite: database url. the
76+
/// constructs a new PostgresSessionStore from a postgres:// url. the
8077
/// default table name for this session store will be
8178
/// "async_sessions". To override this, either chain with
8279
/// [`with_table_name`](crate::PostgresSessionStore::with_table_name) or
@@ -167,8 +164,6 @@ impl PostgresSessionStore {
167164
Ok(())
168165
}
169166

170-
// private utility function because sqlite does not support
171-
// parametrized table names
172167
fn substitute_table_name(&self, query: &str) -> String {
173168
query.replace("%%TABLE_NAME%%", &self.table_name)
174169
}

0 commit comments

Comments
 (0)