/*
_____       _    _    Corso   Italia,  178
(_|__   .  (_   |_|_  56125           Pisa
(_|_) |)|(()_)()| |   tel.  +39  050 46380
  |   |               picosoft@picosoft.it

 Copyright (C) Picosoft s.r.l. 1995-2002

 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.

 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.

 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., 675 Mass Ave, Cambridge, MA 02139, USA.

*/
/* static char rcsid[] = "$Id: datatype.h 5.1 2000/05/16 14:21:57 picoSoft Exp Marco $"; */
# ifndef datatype_h
# define datatype_h  

typedef enum ftipo {
      bst = 'B',
      pIsam = 'P',
      sort = 'S'
} tFileType;

typedef enum rtipo{
      Standard = 0,
      Alias = 1,
      SortRel  = 2
} tRelationType;

class Sort;

typedef union {  
   int     id_isam;    /* handle ISAM   */
   int     id_bst;     /* handle *FILE  */
   Sort *  id_sort;    /* ! */
} accessType;

typedef enum {
/*
 *    "C"
 */
   T_CSTRING,
   T_SHORT,
   T_LONG,
   T_FLOAT,
   T_DOUBLE,
   T_PACKED_ORDERED,
   T_BLOB,
   T_CLOB,
   T_UNKNOWN
} DataType;
typedef enum {
   T_NODATE,
   T_DATE,
   T_TIME,
   T_TIMESTAMP
} DateTime;
# define TIMEST_INTFMT "YYYYMMDDHHNNSSTTT"
# define TIMEST_STRFMT "YYYY-MM-DD HH:NN:SS.TTT"
# define TIMEST_TS_FMT "{ts 'YYYY-MM-DD HH:NN:SS.TTT'}"
# define DATE_DT_FMT "{d 'YYYY-MM-DD'}"
# define DATE_STRFMT "YYYY-MM-DD"
# define DATE_INTFMT "YYYYMMDD"
# define TIME_INTFMT "HHNNSSTTT"
# define TIME_TM_FMT "{t 'HH:NN:SS.TTT'}"
# define TIME_STRFMT "HH:NN:SS.TTT"
# define TIMESTAMPPREC (sizeof(TIMEST_STRFMT)-1)
# define RIVCHAR "\x7F"
typedef enum {
      UNSIGNED,
      INTERNAL_LEADING,
      EXTERNAL_LEADING,
      INTERNAL_TRAILING,
      EXTERNAL_TRAILING
} SignType;


# endif
