当前位置:网站首页>Attribute keywords serveronly, sqlcolumnnumber, sqlcomputecode, sqlcomputed
Attribute keywords serveronly, sqlcolumnnumber, sqlcomputecode, sqlcomputed
2022-07-07 14:30:00 【User 7741497】
The first 109 Chapter Attribute keyword - ServerOnly
Specify whether to project this attribute to Java
The client .
usage
To specify whether the attribute is projected to Java
client , Please use the following syntax :
Property name As classname [ ServerOnly = n ];
among n
Is one of the following :
0
Indicates that this attribute is projected .1
Indicates that the attribute is not projected .
Detailed explanation
This keyword specifies whether the attribute is projected to Java
client .
Default
If you omit this keyword , Attributes will be projected .
The first 110 Chapter Attribute keyword - SqlColumnNumber
Specify SQL Column number . Only for persistent classes .
usage
To specify attributes SQL Column number , Please use the following syntax :
Property name As classname [ SqlColumnNumber = 4 ];
among n It's a positive integer. .
Detailed explanation
This keyword allows you to explicitly set the SQL
Column number . This is provided to support traditional applications .
Default
The default value is an empty string .
The first 111 Chapter Attribute keyword - SqlComputeCode
Specify the code that sets the value of this property .
usage
To specify how the attribute is calculated , Please use the following syntax :
Property name As classname [ SqlComputeCode = { Set {FieldName} = Expression }, SqlComputed ];
FieldName
— Of the attribute being defined SQL Field name .Expression
— Object specifies the script expression of the attribute value .
Detailed explanation
If this keyword is specified ( If SqlComputed
It's true ), Then this attribute is a calculation attribute .
For the value of this keyword , Please specify according to the following rules ( In braces ) A line of object script code for setting attribute values :
- To reference this property , Please use
{*}
perhaps , If you do not specify SqlFieldName
keyword , Please use {propertyname}
, among propertyname
Is the property name . If you specify SqlFieldName
keyword , Please use {sqlfieldnamevalue}
, among sqlfieldnamevalue
Is the value of the keyword .
Please note that ,SqlFieldName
Available for all object classes , Although it is only useful for persistent classes .
- Again , To reference another attribute , If you do not specify
SqlFieldName
keyword , Please use{propertyname}
, amongpropertyname
Is the property name . If you specifySqlFieldName
keyword , Please use{sqlfieldnamevalue}
, amongsqlfieldnamevalue
Is the value of the keyword . - if necessary , Code can contain multiple
Set
command . Spaces are allowed before and after the equal sign , Although each is completeSet
Statements must appear on one line . - Code can reference class methods through the usual full syntax 、 Routine or subroutine . Again , It can be used ObjectScript Functions and operators .
- Code can contain embedded SQL.
- The code can include the following pseudo field reference variables , These variables are converted to specific values when the class is compiled :
{%%CLASSNAME}
and{%%CLASSNAMEQ}
All converted to projection SQL The name of the class defined by the table .{%%CLASSNAME}
Returns an unquoted string ,{%%CLASSNAMEQ}
Returns a quoted string .{%%TABLENAME}
Convert to the fully qualified name of the table , Returns... As a quoted string .{%%ID}
Convert toRowID
name . Don't knowRowID
When the name of the field , This reference is very useful .
- Code cannot use the syntax of the form
..propertyname
or..methodname()
for example :
Property TestProp As %String [ SqlComputeCode = {set {*} = {OtherField}}, SqlComputed ];
Another example :
Property FullName As %String [ SqlComputeCode = {set {*}={FirstName}_" "_{LastName}}, SqlComputed ];
The code uses Do Command invoked .
Important note :
- If you intend to index this field , Please use deterministic code , Not uncertain code . IRIS Cannot maintain an index on the results of uncertain code , Because it is impossible to reliably delete obsolete index key values .( When passing the same parameters , The deterministic code returns the same value every time . for example , return
h` It is modified outside the function control .)
SqlComputeCode
Any user variables used in should be new before use . This prevents any conflicts with variables with the same name elsewhere in the relevant code .
Default
The default value is an empty string .
The first 112 Chapter Attribute keyword - SqlComputed
Specify whether this is a calculated property .
usage
To specify the calculation of this property , Please use the following syntax :
Property name As classname [ SqlComputeCode = sqlcomputecode, SqlComputed ];
among sqlcomputecode
stay SqlComputeCode
Description in .
otherwise , Omit this keyword or put the word Not Put in front of the keyword .
Detailed explanation
If this keyword is true ( And the attribute also specifies SqlComputeCode
), Then this attribute is a calculation attribute .
If an attribute has SqlComputed
The value of the keyword , IRIS This value will be used to calculate the attribute . say concretely , from SqlComputeCode
A new class method is generated <property>Compute
. From the properties of <property>Get
Method calls this method . If the attribute also specifies SqlComputeOnChange
keyword , Then call... At the specified time <property>Compute
Method .
This function is available in <property>Get
and <property>Set
Method implementation . If you rewrite any of these methods , Then attribute calculation does not work , Unless the rewritten method implementation has provisions for triggering calculation .
边栏推荐
- docker部署oracle
- Hangdian oj2054 a = = B? ???
- LeetCode每日一题(636. Exclusive Time of Functions)
- EfficientNet模型的完整细节
- wpf dataGrid 实现单行某个数据变化 ui 界面随之响应
- Million data document access of course design
- UML 顺序图(时序图)
- NDK beginner's study (1)
- The longest ascending subsequence model acwing 1014 Mountaineering
- Nllb-200: meta open source new model, which can translate 200 languages
猜你喜欢
最长上升子序列模型 AcWing 1012. 友好城市
The longest ascending subsequence model acwing 1014 Mountaineering
Parsing of XML files
Démontage de la fonction du système multi - Merchant Mall 01 - architecture du produit
Cvpr2022 | backdoor attack based on frequency injection in medical image analysis
Docker deploy Oracle
libSGM的horizontal_path_aggregation程序解读
AWS学习笔记(三)
最长上升子序列模型 AcWing 1014. 登山
Beginner JSP
随机推荐
Substance Painter筆記:多顯示器且多分辨率顯示器時的設置
請問,在使用flink sql sink數據到kafka的時候出現執行成功,但是kafka裏面沒有數
Environment configuration
c#利用 TCP 协议建立连接
一个简单LEGv8处理器的Verilog实现【四】【单周期实现基础知识及模块设计讲解】
Horizontal of libsgm_ path_ Interpretation of aggregation program
EfficientNet模型的完整细节
Docker deploy Oracle
UML state diagram
Equipment failure prediction machine failure early warning mechanical equipment vibration monitoring machine failure early warning CNC vibration wireless monitoring equipment abnormal early warning
Oracle Linux 9.0 正式发布
[AI practice] Application xgboost Xgbregressor builds air quality prediction model (II)
oracle 非自动提交解决
IP address home location query
数据湖(九):Iceberg特点详述和数据类型
[Reading stereo matching papers] [III] ints
半小时『直播连麦搭建』动手实战,大学生技术岗位简历加分项get!
全球首款 RISC-V 笔记本电脑开启预售,专为元宇宙而生!
Navigation — 这么好用的导航框架你确定不来看看?
云上“视界” 创新无限 | 2022阿里云直播峰会正式上线