~drizzle-trunk/drizzle/development

« back to all changes in this revision

Viewing changes to drizzled/plugin/storage_engine.h

  • Committer: Lee Bieber
  • Date: 2010-12-24 05:08:44 UTC
  • mfrom: (2026.1.2 build)
  • Revision ID: kalebral@gmail.com-20101224050844-9jll4ywf0rmhxaf4
Merge Brian - Update to tests, we just want to look at our own tables, not global.
Merge Brian - Final bits of encapsulation work

Show diffs side-by-side

added added

removed removed

Lines of Context:
207
207
 
208
208
  virtual ~StorageEngine();
209
209
 
 
210
protected:
210
211
  virtual int doGetTableDefinition(Session &session,
211
212
                                   const drizzled::TableIdentifier &identifier,
212
213
                                   message::Table &table_message)
219
220
  }
220
221
 
221
222
  /* Old style cursor errors */
222
 
protected:
223
223
  void print_keydup_error(uint32_t key_nr, const char *msg, Table &table);
224
224
  void print_error(int error, myf errflag, Table *table= NULL);
225
225
  virtual bool get_error_message(int error, String *buf);
254
254
  {
255
255
    return 0;
256
256
  }
 
257
 
257
258
  virtual Cursor *create(Table &)= 0;
258
259
  /* args: path */
259
260
  virtual bool flush_logs() { return false; }
284
285
  virtual int doRenameTable(Session &session,
285
286
                            const drizzled::TableIdentifier &from, const drizzled::TableIdentifier &to)= 0;
286
287
 
287
 
public:
288
 
 
289
 
  int renameTable(Session &session, const drizzled::TableIdentifier &from, const drizzled::TableIdentifier &to);
 
288
  virtual int doDropTable(Session &session,
 
289
                          const drizzled::TableIdentifier &identifier)= 0;
290
290
 
291
291
  virtual void doGetTableIdentifiers(CachedDirectory &directory,
292
292
                                     const drizzled::SchemaIdentifier &schema_identifier,
293
293
                                     TableIdentifier::vector &set_of_identifiers)= 0;
294
294
 
295
 
  virtual int doDropTable(Session &session,
296
 
                          const drizzled::TableIdentifier &identifier)= 0;
 
295
  virtual bool doDoesTableExist(Session& session, const drizzled::TableIdentifier &identifier);
 
296
 
 
297
  virtual bool doCanCreateTable(const drizzled::TableIdentifier &identifier)
 
298
  { (void)identifier;  return true; }
 
299
 
 
300
public:
 
301
 
 
302
  friend class AddSchemaNames;
 
303
  friend class AddTableIdentifier;
 
304
  friend class AlterSchema;
 
305
  friend class CanCreateTable;
 
306
  friend class CreateSchema;
 
307
  friend class DropSchema;
 
308
  friend class DropTable;
 
309
  friend class DropTables;
 
310
  friend class FindEngineByName;
 
311
  friend class Ha_delete_table_error_handler;
 
312
  friend class StorageEngineCloseConnection;
 
313
  friend class StorageEngineDoesTableExist;
 
314
  friend class StorageEngineGetSchemaDefinition;
 
315
  friend class StorageEngineGetTableDefinition;
 
316
 
 
317
  int renameTable(Session &session, const drizzled::TableIdentifier &from, const drizzled::TableIdentifier &to);
297
318
 
298
319
  /* Class Methods for operating on plugin */
299
320
  static bool addPlugin(plugin::StorageEngine *engine);
307
328
                             const drizzled::TableIdentifier &identifier,
308
329
                             bool include_temporary_tables= true);
309
330
 
310
 
  virtual bool doDoesTableExist(Session& session, const drizzled::TableIdentifier &identifier);
311
 
 
312
331
  static plugin::StorageEngine *findByName(const std::string &find_str);
313
332
  static plugin::StorageEngine *findByName(Session& session, const std::string &find_str);
314
333
 
326
345
 
327
346
  // Check to see if any SE objects to creation.
328
347
  static bool canCreateTable(const drizzled::TableIdentifier &identifier);
329
 
  virtual bool doCanCreateTable(const drizzled::TableIdentifier &identifier)
330
 
  { (void)identifier;  return true; }
331
348
 
332
349
  // @note All schema methods defined here
333
350
  static void getIdentifiers(Session &session, SchemaIdentifier::vector &schemas);
340
357
  static bool alterSchema(const drizzled::message::Schema &schema_message);
341
358
 
342
359
  // @note make private/protected
 
360
protected:
343
361
  virtual void doGetSchemaIdentifiers(SchemaIdentifier::vector&)
344
362
  { }
345
363
 
357
375
  virtual bool doDropSchema(const drizzled::SchemaIdentifier&)
358
376
  { return false; }
359
377
 
 
378
public:
360
379
  static inline const std::string &resolveName(const StorageEngine *engine)
361
380
  {
362
381
    return engine == NULL ? UNKNOWN_STRING : engine->getName();