当前位置:网站首页>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 .
边栏推荐
- Reverse non return to zero code, Manchester code and differential Manchester code of common digital signal coding
- 一个程序员的水平能差到什么程度?尼玛,都是人才呀...
- Source code analysis of ArrayList
- c#通过frame 和 page 切换页面
- LeetCode 648. Word replacement
- Excuse me, when using Flink SQL sink data to Kafka, the execution is successful, but there is no number in Kafka
- Equipment failure prediction machine failure early warning mechanical equipment vibration monitoring machine failure early warning CNC vibration wireless monitoring equipment abnormal early warning
- Internal sort - insert sort
- ndk初学习(一)
- 半小时『直播连麦搭建』动手实战,大学生技术岗位简历加分项get!
猜你喜欢
MRS离线数据分析:通过Flink作业处理OBS数据
LeetCode 648. 单词替换
MicTR01 Tester 振弦采集模块开发套件使用说明
LeetCode 648. Word replacement
KITTI数据集简介与使用
Assign a dynamic value to the background color of DataGrid through ivalueconverter
Mrs offline data analysis: process OBS data through Flink job
Internal sort - insert sort
2022PAGC 金帆奖 | 融云荣膺「年度杰出产品技术服务商」
Démontage de la fonction du système multi - Merchant Mall 01 - architecture du produit
随机推荐
用例图
docker部署oracle
GVIM [III] [u vimrc configuration]
交换机和路由器的异同
Hangdian oj2054 a = = B? ???
JS get the current time, month, day, year, and the uniapp location applet opens the map to select the location
[network security] SQL injection syntax summary
wpf dataGrid 实现单行某个数据变化 ui 界面随之响应
js 获取当前时间 年月日,uniapp定位 小程序打开地图选择地点
Substance Painter筆記:多顯示器且多分辨率顯示器時的設置
C # switch pages through frame and page
Million data document access of course design
潘多拉 IOT 开发板学习(HAL 库)—— 实验12 RTC实时时钟实验(学习笔记)
请问,PTS对数据库压测有好方案么?
2022PAGC 金帆奖 | 融云荣膺「年度杰出产品技术服务商」
ES日志报错赏析-maximum shards open
PAG体验:十分钟完成AE动效部署上线各平台!
全球首款 RISC-V 笔记本电脑开启预售,专为元宇宙而生!
Leetcode one question per day (636. exclusive time of functions)
【服务器数据恢复】某品牌StorageWorks服务器raid数据恢复案例