List:MySQL++« Previous MessageNext Message »
From:Warren Young Date:October 27 2008 11:43pm
Subject:Re: Insert policy design question
View as plain text  
Rick Gutleber wrote:
> 
> Can you explain why this is so? 

MySQL++ knows when the left hand side of operator<< is a Query, as 
opposed to any other C++ IOstream, doing quoting and escaping only in 
that case.  You wouldn't want this:

	cout << String("foo") << endl;

to produce this:

	"foo"

ostringstream is similarly generic.  MySQL++ doesn't know that you're 
going to use the buffer for SQL queries, so it doesn't quote and escape 
strings.

If you're asking how MySQL++ knows, search for dynamic_cast in 
lib/manip.cpp.  (And other places.)
Thread
Insert policy design questionRick Gutleber27 Oct
Re: Insert policy design questionRick Gutleber27 Oct
  • Re: Insert policy design questionDrew M.27 Oct
    • Re: Insert policy design questionWarren Young27 Oct
      • Re: Insert policy design questionRick Gutleber28 Oct
        • Re: Insert policy design questionWarren Young28 Oct
          • Re: Insert policy design questionRick Gutleber28 Oct
            • Re: Insert policy design questionWarren Young28 Oct
              • Re: Insert policy design questionRick Gutleber28 Oct
                • Re: Insert policy design questionWarren Young28 Oct
                  • Re: Insert policy design questionRick Gutleber29 Oct
                    • SVN down?Rick Gutleber6 Nov
                      • Re: SVN down?Warren Young6 Nov
                  • Query::tellp( )Rick Gutleber29 Oct
                    • Re: Query::tellp( )Warren Young29 Oct
    • Re: Insert policy design questionRick Gutleber27 Oct
      • Re: Insert policy design questionDrew M.28 Oct
        • Re: Insert policy design questionRick Gutleber28 Oct
        • Re: Insert policy design questionWarren Young28 Oct
  • Re: Insert policy design questionWarren Young28 Oct
    • Re: Insert policy design questionRick Gutleber28 Oct