For more information... RTFM!
NAVIGATION
PAGES THAT LINK HERE
ACCOUNT LOGIN

You are not logged in

Powered by Interchange version 5.7.0

flag

Controls Interchange flags.  For example, flags affect database access and transactions for those databases able to support these features.

See also:  [tag].

Summary

  • [flag type table value]

Parameter Description Default
type The name of the flag to set. None
flag Alias for type. None
name Alias for type. None
tables The name of the table(s) to flag. None
table Alias for tables. None
value New (boolean) value for the flag. None
read Flag the table as read-only. None
write Flag the table as writable. None
transactions Reopens the table in transactions mode. No
commit Attempt to commit transactions. No
rollback Attempt to rollback transactions. No
show Show the status of the flag change operation. No

Examples

Perl example

$Tag->flag({
    type => $type,
    table => $table,
    value => $value,
});

or similarly with positional parameters:

$Tag->flag($type, $attribute_hash_reference);

Description

The [flag] tag controls database access and transactions.  For example, flags affect database access and transactions for those databases able to support these features.  Also see the [tag] tag.

If a GDBM-based database is to be modified, it must be flagged writable on the page that performs the write operation.

For example, to mark the products GDBM table as writable, you can call:

[flag type="write" table="products" value="1"]

This must be done before ANY access to that table.

Note

Note

Note that tables in SQL databases are always writable (if allowed by the SQL database itself), and in-memory tables will never be written.

Parameters

type

The name of the flag to set.

tables

The name of the table(s) to flag.

value

New (boolean) value for the flag.

read

Flag the table read-only

write

Flag the table as writable.

transactions

Reopens the table in transactions mode if the Safe Perl module is not active (i.e. in a GlobalSub, a global UserTag or a call to "[perl global=1]").  The limitation exists because it is not possible to reopen a connection to a table from within a

Safe Link to an external page compartment.

commit

Attempts to commit transactions

rollback

Attempts to rollback transactions

show

Normally, the [flag] tag returns nothing to the page.  Setting 'show=1' causes the tag to return status, if any.

Category:  Interchange tags
Last modified by: Kevin Walsh
Modification date: Monday 17 July 2006 at 8:17 PM (CDT)
Home  |  Legal nonsense  |  Privacy policy  |  Donations  |  Contact us