-
Notifications
You must be signed in to change notification settings - Fork 23
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
add connection files, compile a few fns in raw connection
- Loading branch information
Showing
22 changed files
with
3,765 additions
and
216 deletions.
There are no files selected for viewing
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
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
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
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
This file was deleted.
Oops, something went wrong.
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
11 changes: 11 additions & 0 deletions
11
diesel-wasm-sqlite/src/connection/diesel_manage_updated_at.sql
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,11 @@ | ||
CREATE TRIGGER __diesel_manage_updated_at_{table_name} | ||
AFTER UPDATE ON {table_name} | ||
FOR EACH ROW WHEN | ||
old.updated_at IS NULL AND | ||
new.updated_at IS NULL OR | ||
old.updated_at == new.updated_at | ||
BEGIN | ||
UPDATE {table_name} | ||
SET updated_at = CURRENT_TIMESTAMP | ||
WHERE ROWID = new.ROWID; | ||
END |
Oops, something went wrong.