Skip to main content

%SQL.Export.Mgr

Class %SQL.Export.Mgr Extends (%RegisteredObject, %SQL.ExImData) [ Inheritance = right, Not ProcedureBlock, System = 3 ]

Export Controller for SQL Export.

Parameters

RTNPREFIX

Parameter RTNPREFIX = "SQLExport";

Properties

IsExporting

Property IsExporting As %Boolean [ InitialExpression = 0 ];

Private flag set to True when export is underway.

Methods

Reset

Method Reset()

Reset the state of this object.

GenerateExportRoutine

Method GenerateExportRoutine(sample As %Integer = 0) As %Status

Generate the Export routine.

If sample is 1 then generate code that writes sample data to a local variable.

GenDataExpr

Method GenDataExpr(col As %Integer, colno As %Integer) As %String

Compute and return the correct expression for column col.

colno is the number of the actual exported column (some columns may be skipped.

CheckTimeVersion

Method CheckTimeVersion() As %Boolean

Check compatibility to see if server have ..TimeFormat

DeleteExportRoutine

Method DeleteExportRoutine() As %Status

Delete the generated export routine.

Export

Method Export(savertn As %Boolean = 0)

Do an export from the command line.

OpenExport

Method OpenExport() As %Status

Prepares the start of an export.

Call this after generating an export routine.

ExportRows

Method ExportRows(ByRef rows As %Integer, ByRef done As %Integer) As %Status

Exports the next rows rows to the export file. On return, rows contains the number of rows exported or 0 if the export is complete.

GetSample

Method GetSample(ByRef rows As %Integer) As %String

Exports the first rows rows to a sample variable.

CloseExport

Method CloseExport() As %Status

Call this at the end of the export operation.

GetExportSize

Method GetExportSize(ByRef rows As %Integer) As %Status

Returns the number of rows in the export table in rows.

Call this after generating an export routine.