#ifndef __DB_SQL_EDITOR_WR_H__
#define __DB_SQL_EDITOR_WR_H__


#include "Grt.h"
#include "GrtManager.h"
#include "TreeModel.h"
#include "GrtTemplates.h"
#include "sqlide/db_sql_editor_be.h"
#include "recordset_wr.h"
#include "sql_editor_wr.h"


namespace MySQL {
namespace Grt {
namespace Db {


using namespace System;
using namespace System::Runtime::InteropServices;
using namespace System::Collections::Generic;


public ref class Db_sql_editor
{
private:
  ::Db_sql_editor *_inner;

public:
  Db_sql_editor(MySQL::Grt::GrtManager ^grt_manager) : _inner(new ::Db_sql_editor(grt_manager->get_unmanaged_object())) {}
  Db_sql_editor(::Db_sql_editor *inner) : _inner(inner) {}

  Sql::Sql_editor ^ sql_editor() { return gcnew Sql::Sql_editor(_inner->sql_editor()); }

  void reset() { _inner->reset(); }
  void exec_sql(String ^sql) { _inner->exec_sql(NativeToCppString(sql)); }
  int recordset_count() { return _inner->recordset_count(); }
  Recordset ^ recordset(int index);
};


};  // namespace Db
};  // namespace Grt
};  // namespace MySQL


#endif // __DB_SQL_EDITOR_WR_H__
