소스 검색

Merge pull request #7838 from JamesDeFabia/14247FoldNofold

HPCC-14247 Document FOLD / NOFOLD options for SERVICE

Reviewed By: Richard Chapman <rchapman@hpccsystems.com>
Richard Chapman 9 년 전
부모
커밋
c596f48af3
1개의 변경된 파일31개의 추가작업 그리고 3개의 파일을 삭제
  1. 31 3
      docs/ECLLanguageReference/ECLR_mods/ExtrSvcs-ExternalServicesImpl.xml

+ 31 - 3
docs/ECLLanguageReference/ECLR_mods/ExtrSvcs-ExternalServicesImpl.xml

@@ -128,7 +128,9 @@
             </row>
 
             <row>
-              <entry><emphasis>INCLUDE</emphasis></entry>
+              <entry><emphasis>INCLUDE<indexterm>
+                  <primary>INCLUDE</primary>
+                </indexterm></emphasis></entry>
 
               <entry>Indicates the function prototype is in the specified
               include file, so the generated CPP must #include that file. If
@@ -144,7 +146,9 @@
             </row>
 
             <row>
-              <entry><emphasis>PURE</emphasis></entry>
+              <entry><emphasis>PURE<indexterm>
+                  <primary>PURE</primary>
+                </indexterm></emphasis></entry>
 
               <entry>Indicates the function returns the same result every time
               you call it with the same parameters and has no side effects.
@@ -153,7 +157,9 @@
             </row>
 
             <row>
-              <entry><emphasis>ONCE</emphasis></entry>
+              <entry><emphasis>ONCE<indexterm>
+                  <primary>ONCE</primary>
+                </indexterm></emphasis></entry>
 
               <entry>Indicates the function has no side effects and is
               evaluated at query execution time, even if the parameters are
@@ -162,6 +168,28 @@
             </row>
 
             <row>
+              <entry><emphasis>FOLD<indexterm>
+                  <primary>FOLD</primary>
+                </indexterm></emphasis></entry>
+
+              <entry>Specifies that the function is evaluated at compile time
+              if all parameters are constants. Specifying FOLD to the SERVICE
+              applys it to all function definitions in the service - in such
+              cases NOFOLD may be useful to override this default for
+              individual functions that are not suitable for constant
+              folding.</entry>
+            </row>
+
+            <row>
+              <entry><emphasis>NOFOLD<indexterm>
+                  <primary>NOFOLD</primary>
+                </indexterm></emphasis></entry>
+
+              <entry>Specifies that the service is not suitable for constant
+              folding.</entry>
+            </row>
+
+            <row>
               <entry><emphasis>ACTION</emphasis></entry>
 
               <entry>Indicates the function has side effects and requires the