Skip to content

Commit 531b987

Browse files
author
Artyom Abakumov
committed
Add more description for constant and deterministic methods
1 parent 65ed53f commit 531b987

1 file changed

Lines changed: 4 additions & 0 deletions

File tree

src/dsql/Nodes.h

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -690,6 +690,9 @@ class ExprNode : public DmlNode
690690
}
691691

692692
// Check if expression returns deterministic result
693+
// Determinate whether the node is volatile (or not) in the current execution context.
694+
// A DBKEY is deterministic (it cannot change for an already fetched row)
695+
// but it's not constant (and thus cannot be used as an initializer expression).
693696
virtual bool deterministic(thread_db* tdbb) const;
694697

695698
// Check if expression could return NULL or expression can turn NULL into a true/false.
@@ -702,6 +705,7 @@ class ExprNode : public DmlNode
702705
virtual bool unmappable(const MapNode* mapNode, StreamType shellStream) const;
703706

704707
// Check if expression returns constant result
708+
// The result true means the value does not change after recompilation
705709
virtual bool constant() const
706710
{
707711
return false;

0 commit comments

Comments
 (0)