(ctx context.Context, arg CreateSessionParams)
| 43 | } |
| 44 | |
| 45 | func (q *Queries) CreateSession(ctx context.Context, arg CreateSessionParams) (Session, error) { |
| 46 | row := q.db.QueryRowContext(ctx, createSession, |
| 47 | arg.UUID, |
| 48 | arg.Username, |
| 49 | arg.Email, |
| 50 | arg.Name, |
| 51 | arg.Provider, |
| 52 | arg.TotpPending, |
| 53 | arg.OAuthGroups, |
| 54 | arg.Expiry, |
| 55 | arg.CreatedAt, |
| 56 | arg.OAuthName, |
| 57 | arg.OAuthSub, |
| 58 | ) |
| 59 | var i Session |
| 60 | err := row.Scan( |
| 61 | &i.UUID, |
| 62 | &i.Username, |
| 63 | &i.Email, |
| 64 | &i.Name, |
| 65 | &i.Provider, |
| 66 | &i.TotpPending, |
| 67 | &i.OAuthGroups, |
| 68 | &i.Expiry, |
| 69 | &i.CreatedAt, |
| 70 | &i.OAuthName, |
| 71 | &i.OAuthSub, |
| 72 | ) |
| 73 | return i, err |
| 74 | } |
| 75 | |
| 76 | const deleteExpiredSessions = `-- name: DeleteExpiredSessions :exec |
| 77 | DELETE FROM "sessions" |
no test coverage detected