2007-12-30 17:41:49 +01:00
|
|
|
/***************************************************************************
|
|
|
|
|
2015-09-16 21:49:34 +02:00
|
|
|
CResult.h
|
2007-12-30 17:41:49 +01:00
|
|
|
|
2017-01-13 04:29:42 +01:00
|
|
|
(c) 2000-2017 Benoît Minisini <gambas@users.sourceforge.net>
|
2007-12-30 17:41:49 +01:00
|
|
|
|
2015-09-16 21:49:34 +02:00
|
|
|
This program is free software; you can redistribute it and/or modify
|
|
|
|
it under the terms of the GNU General Public License as published by
|
|
|
|
the Free Software Foundation; either version 2, or (at your option)
|
|
|
|
any later version.
|
2007-12-30 17:41:49 +01:00
|
|
|
|
2015-09-16 21:49:34 +02:00
|
|
|
This program is distributed in the hope that it will be useful,
|
|
|
|
but WITHOUT ANY WARRANTY; without even the implied warranty of
|
|
|
|
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
|
|
|
GNU General Public License for more details.
|
2007-12-30 17:41:49 +01:00
|
|
|
|
2015-09-16 21:49:34 +02:00
|
|
|
You should have received a copy of the GNU General Public License
|
|
|
|
along with this program; if not, write to the Free Software
|
|
|
|
Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston,
|
|
|
|
MA 02110-1301, USA.
|
2007-12-30 17:41:49 +01:00
|
|
|
|
|
|
|
***************************************************************************/
|
|
|
|
|
|
|
|
#ifndef __CRESULT_H
|
|
|
|
#define __CRESULT_H
|
|
|
|
|
|
|
|
#include "gambas.h"
|
|
|
|
#include "gb.db.h"
|
|
|
|
#include "deletemap.h"
|
|
|
|
#include "CDatabase.h"
|
|
|
|
#include "gb_barray.h"
|
2012-11-14 23:24:15 +01:00
|
|
|
#include "c_subcollection.h"
|
2007-12-30 17:41:49 +01:00
|
|
|
|
|
|
|
#ifndef __CRESULT_C
|
|
|
|
extern GB_DESC CResultDesc[];
|
|
|
|
extern GB_DESC CBlobDesc[];
|
|
|
|
extern GB_CLASS CLASS_Blob;
|
|
|
|
#else
|
|
|
|
|
|
|
|
#define THIS ((CRESULT *)_object)
|
|
|
|
#define BLOB ((CBLOB *)_object)
|
|
|
|
|
|
|
|
#endif
|
|
|
|
|
|
|
|
enum
|
|
|
|
{
|
2015-09-16 21:49:34 +02:00
|
|
|
RESULT_FIND = 0,
|
|
|
|
RESULT_EDIT = 1,
|
|
|
|
RESULT_CREATE = 2,
|
|
|
|
RESULT_DELETE = 3
|
2007-12-30 17:41:49 +01:00
|
|
|
};
|
|
|
|
|
|
|
|
typedef
|
2015-09-16 21:49:34 +02:00
|
|
|
struct {
|
|
|
|
GB_BASE ob;
|
|
|
|
DB_DRIVER *driver;
|
|
|
|
CCONNECTION *conn;
|
|
|
|
DB_RESULT handle;
|
|
|
|
GB_VARIANT_VALUE *buffer;
|
|
|
|
BARRAY changed;
|
|
|
|
char *edit;
|
|
|
|
DB_INFO info;
|
|
|
|
int pos;
|
|
|
|
int count;
|
|
|
|
int field;
|
|
|
|
CSUBCOLLECTION *fields;
|
|
|
|
DELETE_MAP *dmap;
|
|
|
|
unsigned available : 1;
|
|
|
|
unsigned no_seek : 1;
|
|
|
|
unsigned mode : 2;
|
|
|
|
}
|
|
|
|
CRESULT;
|
2007-12-30 17:41:49 +01:00
|
|
|
|
|
|
|
#define CBLOB DB_BLOB
|
|
|
|
|
|
|
|
CRESULT *DB_MakeResult(CCONNECTION *db, int mode, char *table, char *query);
|
|
|
|
|
|
|
|
#endif
|