613-518-1166 info@zimdatabases.com

ZIM Language Reference

SET COMPILEMODE

< All Topics

SET COMPILEMODE

Controls the behavior of the Compiler.

Syntax

SET COMPILEMODE SQLMODE | ZIMMODE | SERVERMODE

Comments

The COMPILEMODE option is set to SQLMODE by default. The compiler generates SQL database code—that is, code bound to a particular SQL database type.

In ZIMMODE, EntType, RelType, and so on, are ignored. The compiler generates standard Zim code.

In SERVERMODE the compiler generates Zim Server code when the objects are defined as “zimserv” (or an alias of it). SERVERMODE is the preferred setting since ZIM execution is most often more efficient. Also,  Zim Server requests if all entity sets and relationships in the command are for the same Zim server.

When COMPILEMODE is SQLMODE, Zim generates code that is bound to a particular SQL database type. By setting COMPILEMODE to ZIMMODE, Zim generates standard Zim code.

If a program has been compiled with SERVERMODE or SQLMODE on, the program is flagged as compiled for a server and can only be executed in SERVERMODE or SQLMODE. In ZIMMODE, these types are ignored and all entity sets and relationships are assumed to be part of the local Zim database. During compilation in ZIMMODE, no server requests are stored in the compiled code and the program is flagged as compiled for Zim. Executing such a program never results in server access.

Example

To compile a Zim Client-server application to run as a standard Zim application, enter

> set compilemode zimmode

 

See Also

COMPILE

SET EXECUTEMODE

SET SQLCOMPILE

UPDATE

Was this article helpful?
0 out Of 5 Stars
5 Stars 0%
4 Stars 0%
3 Stars 0%
2 Stars 0%
1 Stars 0%
How can we improve this article?
Table of Contents