当前位置:网站首页>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 .
边栏推荐
- GAN发明者Ian Goodfellow正式加入DeepMind,任Research Scientist
- Csma/cd carrier monitoring multipoint access / collision detection protocol
- [Reading stereo matching papers] [III] ints
- When FC connects to the database, do you have to use a custom domain name to access it outside?
- VSCode 配置使用 PyLint 语法检查器
- 一款你不容错过的Laravel后台管理扩展包 —— Voyager
- 通过 iValueConverter 给datagrid 的背景颜色 动态赋值
- NLLB-200:Meta开源新模型,可互译200种语言
- 請問,在使用flink sql sink數據到kafka的時候出現執行成功,但是kafka裏面沒有數
- Oracle Linux 9.0 正式发布
猜你喜欢
Data flow diagram, data dictionary
因员工将密码设为“123456”,AMD 被盗 450Gb 数据?
2022年13个UX/UI/UE最佳创意灵感网站
Data connection mode in low code platform (Part 2)
小程序目录结构
Reverse non return to zero code, Manchester code and differential Manchester code of common digital signal coding
Verilog implementation of a simple legv8 processor [4] [explanation of basic knowledge and module design of single cycle implementation]
一个程序员的水平能差到什么程度?尼玛,都是人才呀...
Selenium Library
Selenium库
随机推荐
Decrypt the three dimensional design of the game
WPF DataGrid realizes the UI interface to respond to a data change in a single line
IP address home location query
First choice for stock account opening, lowest Commission for stock trading account opening, is online account opening safe
leetcode:648. 单词替换【字典树板子 + 寻找若干前缀中的最短符合前缀】
最长上升子序列模型 AcWing 1014. 登山
Docker deploy Oracle
LeetCode每日一题(636. Exclusive Time of Functions)
CSMA/CD 载波监听多点接入/碰撞检测协议
课设之百万数据文档存取
Introduction to sakt method
数据流图,数据字典
EMQX 5.0 发布:单集群支持 1 亿 MQTT 连接的开源物联网消息服务器
小程序目录结构
The longest ascending subsequence model acwing 1014 Mountaineering
杭电oj2054 A == B ? ???
内部排序——插入排序
NLLB-200:Meta开源新模型,可互译200种语言
小米的芯片自研之路
Substance painter notes: settings for multi display and multi-resolution displays