This repository has been archived on 2024-07-15. You can view files and clone it, but cannot push or open issues or pull requests.
hedera/sql/sql-insert.h

62 lines
1.8 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(object) (G_TYPE_CHECK_INSTANCE_CAST (object, SQL_TYPE_INSERT, SqlInsert))
#define SQL_IS_INSERT(object) (G_TYPE_CHECK_INSTANCE_TYPE (object, SQL_TYPE_INSERT))
#include "sql-stmt.h"
#include "sql-field.h"
#include "sql-value.h"
#include "sql-table.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;
GSList * field; // List of SqlField
GSList * expr; // List of GSList of SqlExpr
GSList * iter;
};
struct _SqlInsertClass
{
/* <private> */
SqlStmtClass parent;
};
GType sql_insert_get_type ();
SqlInsert * sql_insert_new ();
void sql_insert_set_table (SqlInsert * obj, SqlTable * table);
void sql_insert_add_row (SqlInsert * obj);
void sql_insert_add_field (SqlInsert * obj, SqlField * field);
void sql_insert_add_expr (SqlInsert * obj, SqlExpr * expr);
void sql_insert_clean (SqlInsert * obj);
#endif