8
Written from Google proto example
11
void printSchema(const drizzle::Schema *schema)
13
cout << "CREATE SCHEMA `" << schema->name() << "` ";
14
if (schema->has_collation())
15
cout << "COLLATE `" << schema->collation() << "` ";
16
if (schema->has_characterset())
17
cout << "CHARACTER SET `" << schema->characterset() <<"` ";
21
int main(int argc, char* argv[])
23
GOOGLE_PROTOBUF_VERIFY_VERSION;
26
cerr << "Usage: " << argv[0] << " SCHEMA" << endl;
30
drizzle::Schema schema;
33
// Read the existing address book.
34
fstream input(argv[1], ios::in | ios::binary);
35
if (!schema.ParseFromIstream(&input))
37
cerr << "Failed to parse schema." << endl;