@@ -3,7 +3,7 @@ use async_std::task;
3
3
use sqlx:: { pool:: PoolConnection , prelude:: PgQueryAs , Executor , PgConnection , PgPool } ;
4
4
use std:: time:: Duration ;
5
5
6
- /// sqlx sqlite session store for async-sessions
6
+ /// sqlx postgres session store for async-sessions
7
7
///
8
8
/// ```rust
9
9
/// use async_sqlx_session::PostgresSessionStore;
@@ -32,7 +32,7 @@ pub struct PostgresSessionStore {
32
32
33
33
impl PostgresSessionStore {
34
34
/// 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
36
36
/// store will be "async_sessions". To override this, chain this
37
37
/// with [`with_table_name`](crate::PostgresSessionStore::with_table_name).
38
38
///
@@ -53,14 +53,11 @@ impl PostgresSessionStore {
53
53
}
54
54
}
55
55
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
64
61
/// [`new_with_table_name`](crate::PostgresSessionStore::new_with_table_name)
65
62
///
66
63
/// ```rust
@@ -76,7 +73,7 @@ impl PostgresSessionStore {
76
73
Ok ( Self :: from_client ( pool) )
77
74
}
78
75
79
- /// constructs a new PostgresSessionStore from a sqlite: database url. the
76
+ /// constructs a new PostgresSessionStore from a postgres:// url. the
80
77
/// default table name for this session store will be
81
78
/// "async_sessions". To override this, either chain with
82
79
/// [`with_table_name`](crate::PostgresSessionStore::with_table_name) or
@@ -167,8 +164,6 @@ impl PostgresSessionStore {
167
164
Ok ( ( ) )
168
165
}
169
166
170
- // private utility function because sqlite does not support
171
- // parametrized table names
172
167
fn substitute_table_name ( & self , query : & str ) -> String {
173
168
query. replace ( "%%TABLE_NAME%%" , & self . table_name )
174
169
}
0 commit comments