This repository has been archived by the owner on Oct 9, 2023. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 20
Introduce Values to support expressions #226
Merged
flyingsilverfin
merged 17 commits into
typedb:master
from
flyingsilverfin:introduce-values
May 26, 2023
Merged
Introduce Values to support expressions #226
flyingsilverfin
merged 17 commits into
typedb:master
from
flyingsilverfin:introduce-values
May 26, 2023
Conversation
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
PR Review ChecklistDo not edit the content of this comment. The PR reviewer should simply update this comment by ticking each review item below, as they get completed. Trivial Change
Code
Architecture
|
alexjpwalker
approved these changes
May 25, 2023
Sign up for free
to subscribe to this conversation on GitHub.
Already have an account?
Sign in.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
What is the goal of this PR?
Introduce the 'Value' type, which is returned as the result of an expression's computation. This change follows from typedb/typeql#260, which outlines the capabilities of the new expression syntax.
Values (representing any of Long, Double, Boolean, String, or DateTime) are returned as part of
ConceptMap
answers and are subtypes ofConcept
for the time being. Their main API is made of the.getValue()
method and.getValueType()
method, along with all the standard safe downcasting methods to convert aConcept
into aValue
, usingConcept.isValue()
andConcept.asValue()
.We also move the import location of
ValueType
from being nested inAttributeType
toConcept
.What are the changes implemented in this PR?
Value
concept and the requiredValueImpl
that implements itValueType
to no longer live withinAttributeType
- now it exists inConcept.ValueType
ExpressionTest
behaviour scenarios, which we also add to CI