-
Notifications
You must be signed in to change notification settings - Fork 485
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat: Add core-data event related db methods for postgres (#4855)
* feat: Add core-data event related db methods for postgres Relates to #4847. Add core-data event related db methods for postgres db client. Signed-off-by: Lindsey Cheng <[email protected]> * fix: Define json query string as query argument Define json query string as query argument instead of in sql statement. Signed-off-by: Lindsey Cheng <[email protected]> * fix: Update core-data event table design Update event design based on the event struct fields to have multi columns. Signed-off-by: Lindsey Cheng <[email protected]> --------- Signed-off-by: Lindsey Cheng <[email protected]>
- Loading branch information
1 parent
5b52836
commit 4ff1172
Showing
11 changed files
with
447 additions
and
20 deletions.
There are no files selected for viewing
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,7 @@ | ||
-- | ||
-- Copyright (C) 2024 IOTech Ltd | ||
-- | ||
-- SPDX-License-Identifier: Apache-2.0 | ||
|
||
-- schema for core-data related tables | ||
CREATE SCHEMA IF NOT EXISTS core_data; |
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,14 @@ | ||
-- | ||
-- Copyright (C) 2024 IOTech Ltd | ||
-- | ||
-- SPDX-License-Identifier: Apache-2.0 | ||
|
||
-- core_data.event is used to store the event information | ||
CREATE TABLE IF NOT EXISTS core_data.event ( | ||
id UUID PRIMARY KEY, | ||
devicename TEXT, | ||
profilename TEXT, | ||
sourcename TEXT, | ||
origin BIGINT, | ||
tags JSONB | ||
); |
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 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
Oops, something went wrong.