00001
#ifndef SQLINSERT_H
00002
#define SQLINSERT_H
00003
00004
#include "Expression.h"
00005
#include "TupleDescription.h"
00006
00007
using namespace Borealis;
00008
00009 class SQLInsert
00010 {
00011
public:
00012 SQLInsert(string table, vector<ptr<Expression> > args) :
00013 _table(table), _args(args) {}
00014 ~SQLInsert() {}
00015
00016
00017
void setup(
const ExprContext& ctxt)
throw (
AuroraException);
00018
00019 TupleDescription
getInsertTupleDescription()
const
00020
{
00021
return _insert_schema;
00022 }
00023
00024 string
getTableName()
const {
return _table; }
00025
00026
void evalInto(
char *buf,
EvalContext& ctxt);
00027
00028 const string
as_string()
const
00029
{
00030
return "SQLInsert(schema:" +
to_string(_insert_schema)
00031 +
" args:" +
to_string(_args) +
")";
00032 }
00033
00034
public:
00035
static ptr<SQLInsert>
parse(string expr,
const ExprContext& ctxt,
00036 string table_name)
00037
throw (ExprException);
00038
00039
private:
00040 string _table;
00041 TupleDescription _insert_schema;
00042
00043 vector<ptr<Expression> > _args;
00044 };
00045
00046
#endif // SQLINSERT_H