-
Notifications
You must be signed in to change notification settings - Fork 3
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
6 changed files
with
36 additions
and
11 deletions.
There are no files selected for viewing
2 changes: 1 addition & 1 deletion
2
modules/persistence/src/commonMain/sqldelight/com/sphereon/oid/fed/persistence/models/4.sqm
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
2 changes: 1 addition & 1 deletion
2
modules/persistence/src/commonMain/sqldelight/com/sphereon/oid/fed/persistence/models/5.sqm
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
10 changes: 10 additions & 0 deletions
10
modules/persistence/src/commonMain/sqldelight/com/sphereon/oid/fed/persistence/models/6.sqm
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,10 @@ | ||
CREATE TABLE authority_hint ( | ||
id SERIAL PRIMARY KEY, | ||
account_id INT NOT NULL, | ||
identifier TEXT NOT NULL, | ||
created_at TIMESTAMP DEFAULT CURRENT_TIMESTAMP, | ||
deleted_at TIMESTAMP, | ||
CONSTRAINT FK_ParentAuthorityHint FOREIGN KEY (account_id) REFERENCES account (id) | ||
); | ||
|
||
CREATE INDEX authority_hint_account_id_index ON subordinate (account_id); |
15 changes: 15 additions & 0 deletions
15
...stence/src/commonMain/sqldelight/com/sphereon/oid/fed/persistence/models/AuthorityHint.sq
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,15 @@ | ||
|
||
create: | ||
INSERT INTO authority_hint ( | ||
account_id, | ||
identifier | ||
) VALUES ( ?, ?) RETURNING *; | ||
|
||
delete: | ||
UPDATE authority_hint SET deleted_at = CURRENT_TIMESTAMP WHERE id = ? AND deleted_at IS NULL RETURNING *; | ||
|
||
findByAccountId: | ||
SELECT * FROM authority_hint WHERE account_id = ? AND deleted_at IS NULL; | ||
|
||
findById: | ||
SELECT * FROM authority_hint WHERE id = ? AND deleted_at IS NULL; |
10 changes: 5 additions & 5 deletions
10
...monMain/sqldelight/com/sphereon/oid/fed/persistence/models/EntityConfigurationMetadata.sq
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,18 +1,18 @@ | ||
create: | ||
INSERT INTO entityConfigurationMetadata ( | ||
INSERT INTO entity_configuration_metadata ( | ||
account_id, | ||
key, | ||
value | ||
) VALUES (?, ?, ?) RETURNING *; | ||
|
||
delete: | ||
UPDATE entityConfigurationMetadata SET deleted_at = CURRENT_TIMESTAMP WHERE id = ? AND deleted_at IS NULL RETURNING *; | ||
UPDATE entity_configuration_metadata SET deleted_at = CURRENT_TIMESTAMP WHERE id = ? AND deleted_at IS NULL RETURNING *; | ||
|
||
findByAccountId: | ||
SELECT * FROM entityConfigurationMetadata WHERE account_id = ? AND deleted_at IS NULL; | ||
SELECT * FROM entity_configuration_metadata WHERE account_id = ? AND deleted_at IS NULL; | ||
|
||
findByAccountIdAndKey: | ||
SELECT * FROM entityConfigurationMetadata WHERE account_id = ? AND key = ? AND deleted_at IS NULL; | ||
SELECT * FROM entity_configuration_metadata WHERE account_id = ? AND key = ? AND deleted_at IS NULL; | ||
|
||
findById: | ||
SELECT * FROM entityConfigurationMetadata WHERE id = ? AND deleted_at IS NULL; | ||
SELECT * FROM entity_configuration_metadata WHERE id = ? AND deleted_at IS NULL; |
8 changes: 4 additions & 4 deletions
8
...onMain/sqldelight/com/sphereon/oid/fed/persistence/models/EntityConfigurationStatement.sq
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,15 +1,15 @@ | ||
findByAccountId: | ||
SELECT * FROM entityConfigurationStatement WHERE account_id = ?; | ||
SELECT * FROM entity_configuration_statement WHERE account_id = ?; | ||
|
||
findById: | ||
SELECT * FROM entityConfigurationStatement WHERE id = ?; | ||
SELECT * FROM entity_configuration_statement WHERE id = ?; | ||
|
||
create: | ||
INSERT INTO entityConfigurationStatement ( | ||
INSERT INTO entity_configuration_statement ( | ||
account_id, | ||
statement, | ||
expires_at | ||
) VALUES (?, ?, ?) RETURNING *; | ||
|
||
findLatestByAccountId: | ||
SELECT * FROM entityConfigurationStatement WHERE account_id = ? ORDER BY id DESC LIMIT 1; | ||
SELECT * FROM entity_configuration_statement WHERE account_id = ? ORDER BY id DESC LIMIT 1; |