Class CODBFORMATTER

Name

CODBFORMATTER  --  Class CODBFORMATTER format output for result in codb-query library.

Synopsis

 CODBFormatter() --> CODBFORMATTER object
 

Description

Class CODBFORMATTER format output for result of codb_execute().

Attributes

No attributes

Methods

CODBFORMATTER Constructor CODBFORMATTER class.
SHOW Format codb_execute() result.

Method CODBFORMATTER:CODBFORMATTER()

 CODBFormatter() --> CODBFORMATTER object

CODBFormatter() inits new CODBFORMATTER object and returns it. Object have two internal formatting parameters: <obj:options:hide_titles> - hide column titles and <obj:options:delim> - string for separation of columns.

Method CODBFORMATTER:SHOW()

 show(<res>) --> sResult

Example:

 db := codb_connect()
 e := codb_get_error( db )
 if e != NIL
 ?? "ERROR codb_connect(): " + e + chr(10)
 return 1
 endif
 fmt := CODBFormatter()
 fmt:obj:options:hide_titles := .T.
 res := codb_execute( db, 'show databases' )
 ? fmt:show()
 codb_close( db )
 

Platforms

No depends of platform.