当前位置:网站首页>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 .
边栏推荐
- Analysis of arouter
- 2022pagc Golden Sail award | rongyun won the "outstanding product technology service provider of the year"
- MicTR01 Tester 振弦采集模块开发套件使用说明
- Notes de l'imprimante substance: paramètres pour les affichages Multi - écrans et multi - Résolutions
- 最长上升子序列模型 AcWing 1012. 友好城市
- Equipment failure prediction machine failure early warning mechanical equipment vibration monitoring machine failure early warning CNC vibration wireless monitoring equipment abnormal early warning
- Excuse me, why is it that there are no consumption messages in redis and they are all piled up in redis? Cerely is used.
- JS get the current time, month, day, year, and the uniapp location applet opens the map to select the location
- 2022PAGC 金帆奖 | 融云荣膺「年度杰出产品技术服务商」
- Beginner JSP
猜你喜欢
数据湖(九):Iceberg特点详述和数据类型
Codes de non - retour à zéro inversés, codes Manchester et codes Manchester différentiels couramment utilisés pour le codage des signaux numériques
STM32CubeMX,68套组件,遵循10条开源协议
UML 顺序图(时序图)
【历史上的今天】7 月 7 日:C# 发布;Chrome OS 问世;《仙剑奇侠传》发行
UML 状态图
UML sequence diagram (sequence diagram)
【立体匹配论文阅读】【三】INTS
低代码平台中的数据连接方式(下)
Selenium Library
随机推荐
EfficientNet模型的完整细节
Excusez - moi, l'exécution a été réussie lors de l'utilisation des données de puits SQL Flink à Kafka, mais il n'y a pas de nombre dans Kafka
一个程序员的水平能差到什么程度?尼玛,都是人才呀...
Substance painter notes: settings for multi display and multi-resolution displays
VSCode 配置使用 PyLint 语法检查器
华为云数据库DDS产品深度赋能
低代码平台中的数据连接方式(下)
MicTR01 Tester 振弦采集模块开发套件使用说明
【立体匹配论文阅读】【三】INTS
Reading and understanding of eventbus source code
MLGO:Google AI发布工业级编译器优化机器学习框架
Demis Hassabis谈AlphaFold未来目标
一文读懂数仓中的pg_stat
2022pagc Golden Sail award | rongyun won the "outstanding product technology service provider of the year"
Introduction to sakt method
Analysis of arouter
Hands on Teaching: XML modeling
用例图
Substance Painter笔记:多显示器且多分辨率显示器时的设置
Vscode configuration uses pylint syntax checker