campo-sirio/ba/ba8201.h
guy 8e02f3d7cf Patch level : 2.1 nopatch
Files correlati     : ba8
Ricompilazione Demo : [ ]
Commento            :

Corretta gestione attributo Hidden


git-svn-id: svn://10.65.10.50/trunk@11809 c028cbd2-c16b-5b4b-a496-9718f37d4682
2004-03-05 11:37:01 +00:00

72 lines
1.5 KiB
C++
Executable File

#ifndef __SQLITE_H
#define __SQLITE_H
#ifndef __SHEET_H
#include <sheet.h>
#endif
///////////////////////////////////////////////////////////
// TSQL_query
///////////////////////////////////////////////////////////
struct TSQL_column_info : public TObject
{
TString _name;
int _width;
bool _numeric;
};
enum TQueryExportFormat { fmt_unknown, fmt_html, fmt_txt, fmt_slk, fmt_campo };
class TSQL_query : public TObject
{
TString _sql;
TRecnotype _firstrow, _pagesize, _items;
TArray _column;
TArray _page;
protected:
void reset();
bool save_as_html(const TFilename& path);
bool save_as_silk(const TFilename& path);
bool save_as_text(const TFilename& path);
bool save_as_campo(const TFilename& path);
public:
void set(const char* sql);
virtual int on_get_items(int argc, char** values, char** columns);
TRecnotype items() const;
const TString_array* row(TRecnotype n);
unsigned int columns() const;
const TSQL_column_info& column_info(unsigned int c) const;
const TToken_string& sheet_head() const; // Used by TQuery_sheet
bool save_as(const char* filename, TQueryExportFormat = fmt_unknown);
TSQL_query(const char* sql);
virtual ~TSQL_query() { }
};
///////////////////////////////////////////////////////////
// TQuery_sheet
///////////////////////////////////////////////////////////
class TQuery_sheet : public TSheet
{
TSQL_query& _query;
protected:
virtual void get_row(long r, TToken_string& row);
virtual long get_items() const;
public:
TQuery_sheet(TSQL_query& sql);
};
#endif