2、客户端接口
Online help
The textual interface mclient supports a limited form of online help commands.
>>?bat.is
bat.isSynced
bat.isCached
bat.isPersisten
3、MonetDB Assembly Language (MAL)
3.1 MAL Literals
3.2 MAL Variables
3.3 Instructions
A MAL instruction has purposely a simple format. It is syntactically represented by an assignment, where an expression (function call) delivers results to multiple target variables.
3.4 MAL Flow-of-control
The flow of control within a MAL program block can be changed by tagging a statement with either return, yield, barrier, catch, leave, redo, or exit
3.5 Exception handling
3.6 Functions
MAL comes with a standard functional abstraction scheme. Functions are represented by MAL instruction lists, enclosed by a function signature and end statement.
he functional abstraction scheme comes with several variations: commands, patterns, and factories.
3.7 Factories
定义可以重复执行的mal。它是跟client的session有关系,是一种function。可以用于做物化视图。
3.9类型
3.11 Boxed Variables
在Clients sessions中,可以有boxed的变量,用于做程序处理和循环控制。在session过程中有效。Session Box是在整个session过程有效。
这样,一个mal计算过程就产生了垃圾,有垃圾回收机制。
还有Globale Environment全局变量,就是在所有session都生效的变量。
3.12 Property Management
资源管理,This mal_properties module provides a generic scheme to administer property sets and a concise API to manage them.
Properties can be associated with variables, MAL blocks, and MAL instructions. The property list is initialized upon explicit request only, e.g. by the frontend parser, a box manager, or as a triggered action.
Every property should come with a function that accepts a reference to the variable and updates the property record. This function is activated either once or automatically upon each selection.
3.13 Properties at the MAL level
就是获得代码中的属性,并且可以处理。(主要是获得BAT的数据量属性,可以用于更新BAT的信息。)
3.14 The cost model problem
3.17 Property ADT implementation
addProperty(O,P) adds property P to the list associated with O. If O represents a compound structure, e.g. a BAT, we should indicate the component as well. For example, addProperty(O,P,Ia,...Ib) introduces a property shared by the components Ia..Ib (indicated with an integer index. hasProperty(O,P) is a boolean function that merely checks existence hasnotProperty(O,P) is the dual operation.
setProperty(O,P,V) changes the propety value to V. It may raise a PropertyUpdateViolation exception when this can not be realized. Note, the property value itself is changed, not the object referenced.
getProperty(O,P) retrieves the current value of a property. This may involve calling a function or running a database query.
setPropertyAttribute(O,P,A) changes the behavior of the property. For example, the attribute ’freeze’ will result in a call to the underlying function only once and to cache the result for the remainder of the objects life time.
3.18 Predefined properties
The MAL language uses a few defaults, recognizable as properties
unsafe function has side effects.Default, unsafe=off
read data can be read but not updated
append data can be appended