58 lines
1.6 KiB
C
58 lines
1.6 KiB
C
|
/*
|
||
|
* Copyright (C) 2012 - Juan Ferrer Toribio
|
||
|
*
|
||
|
* 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 3 of the License, 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, see <http://www.gnu.org/licenses/>.
|
||
|
*/
|
||
|
|
||
|
#ifndef SQL_INSERT_H
|
||
|
#define SQL_INSERT_H
|
||
|
|
||
|
#define SQL_TYPE_INSERT (sql_insert_get_type ())
|
||
|
#define SQL_INSERT(obj) (G_TYPE_CHECK_INSTANCE_CAST (obj, SQL_TYPE_INSERT, SqlInsert))
|
||
|
#define SQL_IS_INSERT(obj) (G_TYPE_CHECK_INSTANCE_TYPE (obj, SQL_TYPE_INSERT))
|
||
|
|
||
|
#include "sql-stmt.h"
|
||
|
#include "sql-field.h"
|
||
|
#include "sql-value.h"
|
||
|
#include "sql-table.h"
|
||
|
#include "sql-set.h"
|
||
|
|
||
|
typedef struct _SqlInsert SqlInsert;
|
||
|
typedef struct _SqlInsertClass SqlInsertClass;
|
||
|
|
||
|
/**
|
||
|
* SqlInsert:
|
||
|
* @table: an #SqlTable
|
||
|
* @field: (element-type Sql.Field): list of #SqlField
|
||
|
* @expr: (element-type Sql.Expr): list of #SqlExpr
|
||
|
**/
|
||
|
struct _SqlInsert
|
||
|
{
|
||
|
SqlStmt parent;
|
||
|
SqlTable * table;
|
||
|
SqlList * fields; // List of SqlField
|
||
|
SqlList * values; // List of SqlSet
|
||
|
};
|
||
|
|
||
|
struct _SqlInsertClass
|
||
|
{
|
||
|
/* <private> */
|
||
|
SqlStmtClass parent;
|
||
|
};
|
||
|
|
||
|
GType sql_insert_get_type ();
|
||
|
SqlObject * sql_insert_new ();
|
||
|
void sql_insert_set_table_from_name (SqlInsert * obj, const gchar * table);
|
||
|
|
||
|
#endif
|