List:MySQL++« Previous MessageNext Message »
From:Warren Young Date:August 5 2010 2:39am
Subject:Re: How can I detect a field can accept a NULL value
View as plain text  
On Aug 4, 2010, at 1:11 PM, Orton, Steven J (IS) wrote:

> Is there a way to detect these attributes?

See examples/dbinfo.cpp

> I would like to know if mysql++ stores the comments

MySQL++ doesn't store anything.  The MySQL database server stores things.

But no, the server doesn't store the raw SQL you used to create tables, with comments,
white space and what-all.  The SQL is parsed, executed, and thrown away.

The raw SQL *may* be logged somewhere, optionally, but there is no API in MySQL++ to
access the MySQL server's log files.

I stress *may* because you certainly wouldn't want this to happen all the time.  Imagine
if it also kept the raw SQL that went into a multi-GB dump-and-load, as might be done as
part of a major DB server upgrade.  At one point, you'd have three copies: the dump, the
log, and the stored table data.

> and default values of fields

Defaults probably are accessible from the same APIs dbinfo.cpp uses.  You might have to
dig down to the C API level to find them, though.  If so, consider how MySQL++ might
expose the info, and make a proposal.
How can I detect a field can accept a NULL valueIS)4 Aug
  • Re: How can I detect a field can accept a NULL valueWarren Young5 Aug