-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
fix(events): Fix bug with logging property changes related to the Eve…
…ntRecord PK refactor re #104
- Loading branch information
Showing
7 changed files
with
82 additions
and
60 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
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,13 +1,31 @@ | ||
/* | ||
* Contains the `EventRecord` primary key system. | ||
* | ||
* Copyright (c) Joseph R Cowman | ||
* Licensed under MIT License (see https://github.com/regal/regal) | ||
*/ | ||
|
||
import { buildPKProvider } from "../../common"; | ||
import { EventRecord } from "../event-record"; | ||
|
||
/** The set of reserved `EventRecord` primary keys. */ | ||
export const EVENT_RESERVED_KEYS = { | ||
/** | ||
* The key for all changes made in the default, untracked `EventRecord`. | ||
* | ||
* **No reserved event keys should have a greater value than this!** | ||
*/ | ||
UNTRACKED: 100 | ||
}; | ||
|
||
/** | ||
* Reference this `PKProvider` for `EventRecord` PKs so we don't have | ||
* to do additional instantiations. | ||
*/ | ||
const INTERNAL_EVENT_PK_PROVIDER = buildPKProvider<EventRecord>( | ||
EVENT_RESERVED_KEYS | ||
); | ||
|
||
/** Shorthand for the `EVENT_RESERVED_KEYS.UNTRACKED` primary key. */ | ||
export const getUntrackedEventPK = () => | ||
INTERNAL_EVENT_PK_PROVIDER.reserved(EVENT_RESERVED_KEYS.UNTRACKED); |
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.