DBload


Synopsis

DBload concatenates the contents of a file into a single string.

Input ports

file_name string
process_load int

Parameters

None

Output ports

statement string
processing int

Description

DBload concatenates the contents of a file into a single string. The concatenation includes all characters in the file; it does not ignore nonprinting characters such as Tab and End of Line.

This module is useful for converting a long SQL statement in a file into a form that can be used as input to a Database Kit module that requires a SQL statement as input: DBquery, DBdelete, DBinsert, DBupdate, or DBmiscStatement.

Input ports

file_name

The name of the file whose contents are to be concatenated.

process_load

A trigger that initiates execution of the load and concatenate operation. When this value changes to a value greater than 0, the operation is executed.

Parameters

None

Output ports

statement

A string that consists of the concatenated file contents.

processing

A return value that indicates the processing status of the load and concatenate operation. This value is set to 1 while the operation is being processed and is cleared to 0 to indicate that the operation has completed.

File

v/db.v

See Also

•