SQLAlchemy Repositories
fastauth.contrib.sqlalchemy.repositories.SQLAlchemyUserRepository
SQLAlchemyUserRepository(session)
Bases: AbstractUserRepository[UP, ID]
, Generic[UP, ID]
Source code in fastauth/contrib/sqlalchemy/repositories.py
17 18 |
|
user_model
instance-attribute
user_model
get_by_id
async
get_by_id(pk)
Source code in fastauth/contrib/sqlalchemy/repositories.py
20 21 |
|
get_by_email
async
get_by_email(email)
Source code in fastauth/contrib/sqlalchemy/repositories.py
23 24 25 |
|
get_by_username
async
get_by_username(username)
Source code in fastauth/contrib/sqlalchemy/repositories.py
27 28 29 30 31 |
|
get_by_fields
async
get_by_fields(username, fields)
Source code in fastauth/contrib/sqlalchemy/repositories.py
33 34 35 36 37 38 39 40 41 |
|
get_by_field
async
get_by_field(value, field)
Source code in fastauth/contrib/sqlalchemy/repositories.py
43 44 45 |
|
create
async
create(data)
Source code in fastauth/contrib/sqlalchemy/repositories.py
47 48 49 50 51 52 |
|
update
async
update(user, data)
Source code in fastauth/contrib/sqlalchemy/repositories.py
54 55 56 57 58 59 |
|
delete
async
delete(user)
Source code in fastauth/contrib/sqlalchemy/repositories.py
61 62 63 |
|
fastauth.contrib.sqlalchemy.repositories.SQLAlchemyRBACRepository
SQLAlchemyRBACRepository(session)
Bases: AbstractRolePermissionRepository[RP, PP]
, Generic[RP, PP]
Source code in fastauth/contrib/sqlalchemy/repositories.py
72 73 |
|
role_model
instance-attribute
role_model
permission_model
instance-attribute
permission_model
get_role
async
get_role(role_id)
Source code in fastauth/contrib/sqlalchemy/repositories.py
75 76 |
|
get_role_by_codename
async
get_role_by_codename(codename)
Source code in fastauth/contrib/sqlalchemy/repositories.py
78 79 80 81 82 |
|
create_role
async
create_role(data)
Source code in fastauth/contrib/sqlalchemy/repositories.py
84 85 86 87 88 89 |
|
update_role
async
update_role(role, data)
Source code in fastauth/contrib/sqlalchemy/repositories.py
91 92 93 94 95 96 |
|
delete_role
async
delete_role(role)
Source code in fastauth/contrib/sqlalchemy/repositories.py
98 99 100 |
|
list_roles
async
list_roles()
Source code in fastauth/contrib/sqlalchemy/repositories.py
102 103 104 |
|
get_permission
async
get_permission(permission_id)
Source code in fastauth/contrib/sqlalchemy/repositories.py
106 107 |
|
get_permission_by_codename
async
get_permission_by_codename(codename)
Source code in fastauth/contrib/sqlalchemy/repositories.py
109 110 111 112 113 114 115 |
|
create_permission
async
create_permission(data)
Source code in fastauth/contrib/sqlalchemy/repositories.py
117 118 119 120 121 122 |
|
update_permission
async
update_permission(permission, data)
Source code in fastauth/contrib/sqlalchemy/repositories.py
124 125 126 127 128 129 |
|
delete_permission
async
delete_permission(permission)
Source code in fastauth/contrib/sqlalchemy/repositories.py
131 132 133 |
|
list_permissions
async
list_permissions()
Source code in fastauth/contrib/sqlalchemy/repositories.py
135 136 137 |
|
fastauth.contrib.sqlalchemy.repositories.SQLAlchemyOAuthRepository
SQLAlchemyOAuthRepository(session)
Bases: AbstractOAuthRepository[UOAP, OAP]
, Generic[UOAP, OAP]
Source code in fastauth/contrib/sqlalchemy/repositories.py
144 145 |
|
user_model
instance-attribute
user_model
oauth_model
instance-attribute
oauth_model
get_user
async
get_user(oauth_name, account_id)
Source code in fastauth/contrib/sqlalchemy/repositories.py
147 148 149 150 151 152 153 154 155 |
|
add_oauth_account
async
add_oauth_account(user, data)
Source code in fastauth/contrib/sqlalchemy/repositories.py
157 158 159 160 161 162 163 164 |
|
update_oauth_account
async
update_oauth_account(user, oauth, data)
Source code in fastauth/contrib/sqlalchemy/repositories.py
166 167 168 169 170 171 172 173 174 |
|