more
This commit is contained in:
parent
2ad90daa5f
commit
68d4eb2c18
|
@ -0,0 +1,18 @@
|
|||
#if !defined(_TD_SCHEMA_H_)
|
||||
#define _TD_SCHEMA_H_
|
||||
|
||||
#include <stdint.h>
|
||||
|
||||
#include "type.h"
|
||||
|
||||
typedef struct _scolumn {
|
||||
td_datatype_t type;
|
||||
int32_t bytes;
|
||||
} SColumn;
|
||||
|
||||
typedef struct SSchema {
|
||||
int32_t numOfCols;
|
||||
SColumn *columns;
|
||||
} SSchema;
|
||||
|
||||
#endif // _TD_SCHEMA_H_
|
|
@ -0,0 +1,30 @@
|
|||
#if !defined(_TD_TYPE_H_)
|
||||
#define _TD_TYPE_H_
|
||||
|
||||
typedef enum {
|
||||
TD_DATATYPE_INVLD = 0,
|
||||
TD_DATATYPE_BOOL,
|
||||
TD_DATATYPE_TINYINT,
|
||||
TD_DATATYPE_SMALLINT,
|
||||
TD_DATATYPE_INT,
|
||||
TD_DATATYPE_BIGINT,
|
||||
TD_DATATYPE_FLOAT,
|
||||
TD_DATATYPE_DOUBLE,
|
||||
TD_DATATYPE_VARCHAR,
|
||||
TD_DATATYPE_NCHAR,
|
||||
TD_DATATYPE_BINARY
|
||||
} td_datatype_t;
|
||||
|
||||
// TODO: finish below
|
||||
#define TD_DATATYPE_BOOL_NULL
|
||||
#define TD_DATATYPE_TINYINT_NULL
|
||||
#define TD_DATATYPE_SMALLINT_NULL
|
||||
#define TD_DATATYPE_INT_NULL
|
||||
#define TD_DATATYPE_BIGINT_NULL
|
||||
#define TD_DATATYPE_FLOAT_NULL
|
||||
#define TD_DATATYPE_DOUBLE_NULL
|
||||
#define TD_DATATYPE_VARCHAR_NULL
|
||||
#define TD_DATATYPE_NCHAR_NULL
|
||||
#define TD_DATATYPE_BINARY_NULL
|
||||
|
||||
#endif // _TD_TYPE_H_
|
|
@ -0,0 +1,18 @@
|
|||
#if !defined(_TD_DATA_H_)
|
||||
#define _TD_DATA_H_
|
||||
|
||||
#include <stdint.h>
|
||||
|
||||
// ---- Row data interface
|
||||
typedef struct {
|
||||
int32_t numOfRows;
|
||||
char * data;
|
||||
} SRData;
|
||||
|
||||
// ---- Column data interface
|
||||
typedef struct {
|
||||
int32_t numOfPoints;
|
||||
char *data;
|
||||
} SCData;
|
||||
|
||||
#endif // _TD_DATA_H_
|
|
@ -31,6 +31,7 @@ typedef struct STSDBRepo
|
|||
void *pTableDict;
|
||||
|
||||
/* Map from super tableName->table
|
||||
* TODO: may use dict
|
||||
*/
|
||||
void *pSTableDict;
|
||||
|
||||
|
|
Loading…
Reference in New Issue