~drizzle-trunk/drizzle/development

« back to all changes in this revision

Viewing changes to drizzled/message/schema_reader.cc

  • Committer: Brian Aker
  • Date: 2009-12-18 18:31:01 UTC
  • mfrom: (1241.2.7 build)
  • Revision ID: brian@gaz-20091218183101-igqg1dtowpa0o70s
Fixed from Monty.

Show diffs side-by-side

added added

removed removed

Lines of Context:
1
1
/* -*- mode: c++; c-basic-offset: 2; indent-tabs-mode: nil; -*-
2
2
 *  vim:expandtab:shiftwidth=2:tabstop=2:smarttab:
3
3
 *
4
 
 *  Copyright (C) 2009 Sun Microsystems, Inc.
 
4
 *  Copyright (C) 2009 Sun Microsystems
5
5
 *
6
6
 *  This program is free software; you can redistribute it and/or modify
7
7
 *  it under the terms of the GNU General Public License as published by
21
21
#include <fstream>
22
22
#include <string>
23
23
#include <drizzled/message/schema.pb.h>
24
 
 
25
24
using namespace std;
26
 
using namespace drizzled;
27
 
 
28
25
 
29
26
/*
30
27
  Written from Google proto example
31
28
*/
32
29
 
33
 
static void printSchema(const message::Schema *schema)
 
30
static void printSchema(const drizzled::message::Schema *schema)
34
31
{
35
32
  cout << "CREATE SCHEMA `" << schema->name() << "` ";
36
33
  if (schema->has_collation())
37
34
    cout << "COLLATE `" << schema->collation() << "` ";
38
 
 
39
 
  for (int option_nr=0; option_nr < schema->engine().options_size(); option_nr++)
40
 
  {
41
 
    cout << " " << schema->engine().options(option_nr).name() << " = "
42
 
         << "'" << schema->engine().options(option_nr).state() << "'";
43
 
  }
44
 
 
45
35
  cout << ";" << endl;
46
36
}
47
37
 
54
44
    return -1;
55
45
  }
56
46
 
57
 
  message::Schema schema;
 
47
  drizzled::message::Schema schema;
58
48
 
59
49
  {
60
50
    // Read the existing address book.