umbrello/umbrello
#include <sqlwriter.h>
Protected Member Functions | |
virtual void | printAutoIncrements (QTextStream &sql, UMLEntityAttributeList entAttList) |
virtual void | printCheckConstraints (QTextStream &sql, UMLClassifierListItemList constrList) |
virtual void | printEntityAttributes (QTextStream &sql, UMLEntityAttributeList entityAttributeList) |
virtual void | printForeignKeyConstraints (QTextStream &sql, UMLClassifierListItemList constrList) |
virtual void | printIndex (QTextStream &sql, UMLEntity *ent, UMLEntityAttributeList entAttList) |
virtual void | printUniqueConstraints (QTextStream &sql, UMLClassifierListItemList constrList) |
Protected Member Functions inherited from SimpleCodeGenerator | |
QString | findFileName (UMLPackage *concept, const QString &ext) |
bool | hasAbstractOps (UMLClassifier *c) |
bool | hasDefaultValueAttr (UMLClassifier *c) |
QString | indent () |
void | initFromParentDocument () |
QString | overwritableName (UMLPackage *concept, const QString &name, const QString &ext) |
Protected Member Functions inherited from CodeGenerator | |
bool | openFile (QFile &file, const QString &name) |
QString | overwritableName (const QString &name, const QString &extension) |
void | writeListedCodeDocsToFile (CodeDocumentList *docs) |
Protected Attributes | |
UMLEntity * | m_pEntity |
Protected Attributes inherited from SimpleCodeGenerator | |
QString | className_ |
QString | fileName_ |
bool | m_createDirHierarchyForPackages |
QString | m_endl |
QMap< UMLPackage *, QString > | m_fileMap |
QString | m_indentation |
int | m_indentLevel |
Protected Attributes inherited from CodeGenerator | |
bool | m_applyToAllRemaining |
QHash< QString, CodeDocument * > | m_codeDocumentDictionary |
UMLDoc * | m_document |
Additional Inherited Members | |
Public Slots inherited from SimpleCodeGenerator | |
void | syncCodeToDocument () |
Public Slots inherited from CodeGenerator | |
virtual void | checkAddUMLObject (UMLObject *obj) |
virtual void | checkRemoveUMLObject (UMLObject *obj) |
virtual void | syncCodeToDocument () |
Signals inherited from CodeGenerator | |
void | codeGenerated (UMLClassifier *concept, bool generated) |
void | showGeneratedFile (const QString &filename) |
Static Public Member Functions inherited from CodeGenerator | |
static QString | cleanName (const QString &name) |
static void | findObjectsRelated (UMLClassifier *c, UMLPackageList &cList) |
static QString | formatDoc (const QString &text, const QString &linePrefix=" *", int lineWidth=80) |
static QString | formatSourceCode (const QString &code, const QString &indentation) |
Detailed Description
Class SQLWriter is a code generator for UMLClassifier objects.
Create an instance of this class, and feed it a UMLClassifier when calling writeClass and it will generate a sql source file for that concept.
Definition at line 29 of file sqlwriter.h.
Constructor & Destructor Documentation
SQLWriter::SQLWriter | ( | ) |
Definition at line 176 of file sqlwriter.cpp.
|
virtual |
Definition at line 180 of file sqlwriter.cpp.
Member Function Documentation
|
virtual |
Reimplement method from CodeGenerator.
Reimplemented from CodeGenerator.
Reimplemented in MySQLWriter, and PostgreSQLWriter.
Definition at line 313 of file sqlwriter.cpp.
|
virtual |
Returns "SQL".
Implements CodeGenerator.
Reimplemented in MySQLWriter, and PostgreSQLWriter.
Definition at line 305 of file sqlwriter.cpp.
|
protectedvirtual |
Handles AutoIncrements.
The derived classes provide the actual body.
- Parameters
-
sql The Stream we should print to entAttList The List of Entity Attributes that we want to auto increment
Reimplemented in MySQLWriter, and PostgreSQLWriter.
Definition at line 580 of file sqlwriter.cpp.
|
protectedvirtual |
Prints out Check Constraints as "ALTER TABLE" statements.
- Parameters
-
sql The stream we should print to constrList The checkConstraints to be printed
Reimplemented in MySQLWriter.
Definition at line 591 of file sqlwriter.cpp.
|
protectedvirtual |
Prints out attributes as columns in the table.
- Parameters
-
sql the stream we should print to entityAttributeList the attributes to be printed
Definition at line 364 of file sqlwriter.cpp.
|
protectedvirtual |
Prints out foreign key constraints as "ALTER TABLE" statements.
- Parameters
-
sql the stream we should print to constrList the foreignkey constraints to be printed
Reimplemented in MySQLWriter.
Definition at line 467 of file sqlwriter.cpp.
|
protectedvirtual |
Prints out Indexes as "CREATE INDEX " statements.
- Parameters
-
sql The Stream we should print to ent The Entity's attributes on which we want to create an Index entAttList The list of entityattributes to create an index upon
Definition at line 543 of file sqlwriter.cpp.
|
protectedvirtual |
Prints out unique constraints (including primary key) as "ALTER TABLE" statements.
- Parameters
-
sql the stream we should print to constrList the unique constraints to be printed
Definition at line 423 of file sqlwriter.cpp.
|
virtual |
Get list of reserved keywords.
Reimplemented from CodeGenerator.
Definition at line 346 of file sqlwriter.cpp.
|
virtual |
Call this method to generate sql code for a UMLClassifier.
- Parameters
-
c the class to generate code for
Implements SimpleCodeGenerator.
Definition at line 188 of file sqlwriter.cpp.
Member Data Documentation
|
protected |
Definition at line 47 of file sqlwriter.h.
The documentation for this class was generated from the following files:
Documentation copyright © 1996-2014 The KDE developers.
Generated on Tue Oct 14 2014 23:06:02 by doxygen 1.8.7 written by Dimitri van Heesch, © 1997-2006
KDE's Doxygen guidelines are available online.