Home | Trees | Index | Help |
|
---|
Package Modeling :: Package DatabaseAdaptors :: Package MySQLAdaptorLayer :: Module MySQLSQLExpression :: Class MySQLSQLExpression |
|
object
--+ |SQLExpression
--+ | MySQLSQLExpression
Method Summary | |
---|---|
Overrides default implementation to handle TEXT field properly. | |
Overrides the default method and prepares a SQL expression suitable for MySQL, counting the rows qualified by 'fetchSpec'. | |
Overrides the default behaviour to ensure that Qualifier operator 'LIKE' matches case-sensitively. | |
REMOVES 'timestamp' from the available SQL types returned by Modeling.SQLExpression, and adds 'datetime' and 'text'. | |
Inherited from SQLExpression | |
Initializer | |
| |
Adds the create clause for the supplied 'attribute' to the receiver's listString. | |
Parameters: | |
| |
| |
Adds the sqlStringForAttributeNamed(attribute.name()) to the SQLExpression's listString(). | |
Uses appendItemToListString() to add to listString() a string formatted that way: | |
Returns the dictionary of table aliases used by the SQLExpression ; the keys are relationshipPath and the values are the corresponding table aliases. | |
Returns 'NOT NULL' is flag is false, '' (empty string) otherwise. | |
Appends 'itemString' to 'aStringIO' ; if aStringIO is not empty, a comma is appended to aStringIO before 'itemString' | |
Generates the SQL DELETE statement and assigns it to self's statement() The generated statement has the following format: | |
Generates the SQL INSERT statement and assigns it to self's statement() The generated statement has the following format: | |
| |
Generates the SQL INSERT statement and assigns it to self's statement() The generated statement has the following format: | |
| |
| |
Returns the Entity bound to that SQLExpression | |
| |
Unimplemented | |
Unimplemented | |
Unimplemented | |
Examines the attribute's externalType and forwards the request to the appropriate method. | |
Unimplemented and unused: the joinClause is not used in this implementation of SQLExpression. | |
Unimplemented and not used: cf. | |
Has a different meaning depending on what the SQLExpression was made for: | |
| |
| |
| |
| |
Prepares the internal state to generate a SQL delete statement, according to entity() and parameter 'aQualifier'. | |
Generates an INSERT statement for the supplied 'row' and the SQLExpression's entity(). | |
Prepares a 'SELECT' statement. | |
Parameters: | |
Sets the object's SQL statement. | |
Tells the SQLExpression whether it should use table aliases. | |
Bind variables are not supported yet | |
Bind variables are not supported yet | |
| |
Simply calls sqlPatternFromShellPatternWithEscapeCharacter() with 'escapeChar' equal to 'self.sqlEscapeChar()' | |
Transforms the shell 'pattern', using '*' and '?' as wildcards (the former matches 0 to many characters while the second matches one character) to an valid SQL pattern. | |
Returns the attribute's columnName, prepended with the table alias for the empty string if the SQLExpression uses table aliases. | |
Returns the sql string for the attribute 'name'. | |
Given a path (see below), builds the corresponding sql string, completed with a table alias if the SQLExpression useAliases(). | |
Returns the SQL string, to be inserted in a WHERE clause, for case-insensitive comparison between a lvalue and a rvalue. | |
Returns the SQL string, to be inserted in a WHERE clause, for the supplied ``to-be-conjoined'' qualifiers. | |
Not supported yet | |
Formats the 'mxDateTime.DateTime' object 'aDate'. | |
Returns the SQL string, to be inserted in a WHERE clause, for the supplied ``to-be-disjoined'' qualifiers. | |
Returns the SQL string suitable for operator IN and NOT IN. | |
| |
Returns the SQL string for the KeyComparisonQualifier supplied. | |
Returns the SQL string for the KeyValueQualifier supplied. | |
Returns the SQL string for the supplied Qualifier | |
Formats 'aNumber' and returns the string suitable for inclusion in a SQL statement. | |
Returns the SQL WHERE clause string built from 'aQualifier' ; NB: the generated statement does not include the 'WHERE' SQL keyword. | |
Unimplemented | |
Formats 'aString' and returns the string suitable for inclusion in a SQL statement. | |
Simply calls formatValueForAttribute() and return the formatted string | |
Returns the statement assigned to this object. | |
| |
Simply returns self.statement() | |
Returns whether the SQLExpression uses table aliases. | |
Bind variables are not supported yet: return '0' (false) | |
This is set when prepareInsertExpressionWithRow() is called, and it holds the list of values to insert. | |
Returns the value type corresponding to 'externalTypeName'. | |
Returns the WHERE clause string generated for a given SQL statement. | |
Calculates the SQL statements for JOIN. | |
Prepares the SELECT statement for prepareSelectCountExpressionWithAttributes() and prepareSelectExpressionWithAttributes(). | |
Inherited from object | |
x.__delattr__('name') <==> del x.name | |
x.__getattribute__('name') <==> x.name | |
x.__hash__() <==> hash(x) | |
T.__new__(S, ...) -> a new object with type S, a subtype of T | |
helper for pickle | |
helper for pickle | |
x.__repr__() <==> repr(x) | |
x.__setattr__('name', value) <==> x.name = value | |
x.__str__() <==> str(x) |
Class Variable Summary | |
---|---|
int |
SQL92_join = 1 |
Method Details |
---|
columnTypeStringForAttribute(self, attribute)Overrides default implementation to handle TEXT field properly. It returns a different string depending on some of the attribute's properties:
About 'TEXT': a model can define a width for a TEXT field. It should be ignored when generating the database schema (for example, TEXT(30) is an invalid data type), however it might be set to request the validation mechanism to check the attribute's length at runtime, typically before an EditingContext saves its changes.
|
prepareSelectCountExpressionWithAttributes(self, attributes, lock, fetchSpec)Overrides the default method and prepares a SQL expression suitable for MySQL, counting the rows qualified by 'fetchSpec'. The SQL statement depends on whether 'fetchSpec' implies joining two or more tables:
Parameters:
|
sqlStringForSelector(self, selector, value)Overrides the default behaviour to ensure that Qualifier operator 'LIKE' matches case-sensitively. Note: this is because the SQL LIKE operator is case-insensitive by default in MySQL. Returns:
See also: SQLExpression.sqlStringForSelector() |
valueTypeForExternalTypeMapping(self)REMOVES 'timestamp' from the available SQL types returned by Modeling.SQLExpression, and adds 'datetime' and 'text'. The reason for the removal of 'timestamp' is that, in MySQL, a DateTime field is likely to be modified during an update operation, completely implicitly. This would cause weird bugs, because the framework does not expect values to change implicitly. Quoted from http://www.mysql.com/documentation/mysql/bychapter/manual_Reference.html#DATETIME:
(end of quote) |
Class Variable Details |
---|
SQL92_join
|
Home | Trees | Index | Help |
|
---|
Generated by Epydoc 2.1 on Sat Mar 4 13:36:26 2006 | http://epydoc.sf.net |