Home | Trees | Index | Help |
|
---|
Package Modeling :: Package DatabaseAdaptors :: Package PostgresqlAdaptorLayer :: Module PostgresqlSQLExpression :: Class PostgresqlSQLExpression |
|
object
--+ |SQLExpression
--+ | PostgresqlSQLExpression
Method Summary | |
---|---|
Overrides default implementation to handle TEXT field properly. | |
Postgresql interprets strings, hence the escape char is a double backslash | |
Overrides default behaviour so that '%' is changed to '%' instead of '%': postgresql interprets backslashes in strings | |
Adds the following SQL types to the set returned by Modeling.SQLExpression: | |
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 from retrieving the number of rows corresponding to the request. | |
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()' | |
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 | |
Returns the appropriate SQL string corresponding to 'selector' | |
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. | |
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 | |
---|---|
Inherited from SQLExpression | |
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.
|
sqlEscapeChar(self)Postgresql interprets strings, hence the escape char is a double backslash |
sqlPatternFromShellPatternWithEscapeCharacter(self, pattern, escapeChar)Overrides default behaviour so that '%' is changed to '%' instead of '%': postgresql interprets backslashes in strings |
valueTypeForExternalTypeMapping(self)Adds the following SQL types to the set returned by Modeling.SQLExpression:
Quoted from the Postgresql's documentation http://www.postgresql.org/docs/view.php?version=7.3&idoc=1&file=datatype-datetime.html: The time type can be specified as time or as time without time zone [...] Writing just 'timestamp' is equivalent to 'timestamp without time zone'. [...] Note: Prior to PostgreSQL 7.3, writing just timestamp was equivalent to timestamp with time zone. This was changed for SQL spec compliance. (end of quote) Warning: do NOT use 'datetime' with postgresql-server v7.3 or higher: support for 'datetime' has been dropped in v7.3 ; it is kept here for compatibility with postgresql v7.2. |
Home | Trees | Index | Help |
|
---|
Generated by Epydoc 2.1 on Sat Mar 4 13:36:22 2006 | http://epydoc.sf.net |