Browse Source

Fix inadvertent TQt string conversions

This closes Bug 782
tags/r14.0.0
Timothy Pearson 8 years ago
parent
commit
735d75d6ce
100 changed files with 342 additions and 342 deletions
  1. +3
    -3
      chalk/colorspaces/wetsticky/kis_wet_sticky_colorspace.cc
  2. +1
    -1
      chalk/core/tiles/kis_tileddatamanager.cc
  3. +3
    -3
      chalk/ui/squeezedcombobox.h
  4. +1
    -1
      filters/karbon/msod/msod.cc
  5. +1
    -1
      filters/kpresenter/ooimpress/ooimpressexport.cc
  6. +9
    -9
      filters/kspread/csv/csvdialog.cpp
  7. +2
    -2
      filters/kspread/csv/status.html
  8. +1
    -1
      filters/kword/mswrite/structures_generated.h
  9. +1
    -1
      filters/kword/pdf/xpdf/xpdf/XPDFTree.cc
  10. +1
    -1
      filters/kword/starwriter/status.html
  11. +3
    -3
      filters/olefilters/powerpoint97/powerpoint.cc
  12. +1
    -1
      filters/olefilters/powerpoint97/pptSlide.cpp
  13. +1
    -1
      filters/olefilters/powerpoint97/pptSlide.h
  14. +1
    -1
      filters/olefilters/powerpoint97/pptdoc.cc
  15. +1
    -1
      filters/olefilters/powerpoint97/pptxml.cc
  16. +10
    -10
      kchart/csvimportdialog.cc
  17. +5
    -5
      kexi/3rdparty/kexisql/src/build.c
  18. +1
    -1
      kexi/3rdparty/kexisql/src/func.c
  19. +5
    -5
      kexi/3rdparty/kexisql/src/insert.c
  20. +1
    -1
      kexi/3rdparty/kexisql/src/main.c
  21. +8
    -8
      kexi/3rdparty/kexisql/src/parse.c
  22. +1
    -1
      kexi/3rdparty/kexisql/src/parse.h
  23. +6
    -6
      kexi/3rdparty/kexisql/src/sqliteInt.h
  24. +1
    -1
      kexi/3rdparty/kexisql/src/tokenize.c
  25. +1
    -1
      kexi/3rdparty/kexisql/src/vdbe.c
  26. +3
    -3
      kexi/3rdparty/kexisql3/src/alter.c
  27. +3
    -3
      kexi/3rdparty/kexisql3/src/btree.c
  28. +10
    -10
      kexi/3rdparty/kexisql3/src/build.c
  29. +6
    -6
      kexi/3rdparty/kexisql3/src/expr.c
  30. +1
    -1
      kexi/3rdparty/kexisql3/src/func.c
  31. +5
    -5
      kexi/3rdparty/kexisql3/src/insert.c
  32. +4
    -4
      kexi/3rdparty/kexisql3/src/keywordhash.h
  33. +7
    -7
      kexi/3rdparty/kexisql3/src/parse.c
  34. +2
    -2
      kexi/3rdparty/kexisql3/src/parse.h
  35. +1
    -1
      kexi/3rdparty/kexisql3/src/prepare.c
  36. +8
    -8
      kexi/3rdparty/kexisql3/src/select.c
  37. +6
    -6
      kexi/3rdparty/kexisql3/src/sqliteInt.h
  38. +2
    -2
      kexi/3rdparty/kexisql3/src/vacuum.c
  39. +2
    -2
      kexi/3rdparty/kexisql3/src/vdbe.c
  40. +6
    -6
      kexi/3rdparty/kexisql3/src/where.c
  41. +6
    -6
      kexi/kexidb/connection.cpp
  42. +1
    -1
      kexi/kexidb/cursor.cpp
  43. +6
    -6
      kexi/kexidb/driver.cpp
  44. +1
    -1
      kexi/kexidb/driver.h
  45. +5
    -5
      kexi/kexidb/driver_p.h
  46. +3
    -3
      kexi/kexidb/drivers/mySQL/mysqldriver.cpp
  47. +2
    -2
      kexi/kexidb/drivers/mySQL/mysqlkeywords.cpp
  48. +2
    -2
      kexi/kexidb/drivers/pqxx/pqxxconnection.h
  49. +2
    -2
      kexi/kexidb/drivers/pqxx/pqxxconnection_p.h
  50. +2
    -2
      kexi/kexidb/drivers/pqxx/pqxxcursor.cpp
  51. +2
    -2
      kexi/kexidb/drivers/pqxx/pqxxcursor.h
  52. +1
    -1
      kexi/kexidb/drivers/pqxx/pqxxdriver.cpp
  53. +2
    -2
      kexi/kexidb/drivers/pqxx/pqxxdriver.h
  54. +2
    -2
      kexi/kexidb/drivers/pqxx/pqxxpreparedstatement.h
  55. +4
    -4
      kexi/kexidb/drivers/sqlite/sqlitedriver.cpp
  56. +1
    -1
      kexi/kexidb/expression.cpp
  57. +1
    -1
      kexi/kexidb/field.cpp
  58. +1
    -1
      kexi/kexidb/indexschema.cpp
  59. +5
    -5
      kexi/kexidb/indexschema.h
  60. +1
    -1
      kexi/kexidb/keywords.cpp
  61. +1
    -1
      kexi/kexidb/lookupfieldschema.cpp
  62. +18
    -18
      kexi/kexidb/parser/sqlparser.cpp
  63. +14
    -14
      kexi/kexidb/parser/sqlparser.h
  64. +1
    -1
      kexi/kexidb/parser/sqlscanner.cpp
  65. +1
    -1
      kexi/kexidb/queryschema.cpp
  66. +2
    -2
      kexi/kexidb/queryschema.h
  67. +2
    -2
      kexi/kexidb/queryschemaparameter.h
  68. +2
    -2
      kexi/migration/pqxx/pqxxmigrate.h
  69. +2
    -2
      kexi/plugins/importexport/csv/kexicsvexport.cpp
  70. +2
    -2
      kexi/plugins/importexport/csv/kexicsvexportwizard.cpp
  71. +20
    -20
      kexi/plugins/importexport/csv/kexicsvimportdialog.cpp
  72. +2
    -2
      kexi/plugins/importexport/csv/kexicsvwidgets.h
  73. +2
    -2
      kexi/plugins/queries/kexidynamicqueryparameterdialog.h
  74. +10
    -10
      kexi/plugins/queries/kexiquerydesignerguieditor.cpp
  75. +2
    -2
      kexi/plugins/queries/kexiquerydesignerguieditor.h
  76. +2
    -2
      kexi/plugins/queries/kexiquerydesignersql.h
  77. +2
    -2
      kexi/plugins/queries/kexiquerydesignersqlhistory.h
  78. +2
    -2
      kexi/plugins/queries/kexiquerypart.h
  79. +2
    -2
      kexi/plugins/queries/kexiqueryview.h
  80. +5
    -5
      kexi/widget/kexidatasourcecombobox.cpp
  81. +2
    -2
      kexi/widget/kexiquerydesignersqleditor.h
  82. +2
    -2
      kexi/widget/kexiqueryparameters.h
  83. +3
    -3
      kivio/kiviopart/kiviosdk/kivio_common.cpp
  84. +19
    -19
      kpresenter/KPrCanvas.cpp
  85. +1
    -1
      kpresenter/KPrClosedLineObject.cpp
  86. +2
    -2
      kpresenter/KPrCommand.cpp
  87. +3
    -3
      kpresenter/KPrDocument.cpp
  88. +1
    -1
      kpresenter/KPrGroupObject.cpp
  89. +2
    -2
      kpresenter/KPrObjectProperties.cpp
  90. +1
    -1
      kpresenter/KPrPage.cpp
  91. +2
    -2
      kpresenter/KPrQuadricBezierCurveObjectIface.h
  92. +3
    -3
      kpresenter/KPrSVGPathParser.cpp
  93. +2
    -2
      kpresenter/KPrSVGPathParser.h
  94. +1
    -1
      kpresenter/KPrSideBar.cpp
  95. +2
    -2
      kpresenter/KPrView.cpp
  96. +3
    -3
      kpresenter/global.h
  97. +10
    -10
      kspread/dialogs/kspread_dlg_csv.cc
  98. +1
    -1
      kspread/kspread_functions_math.cc
  99. +2
    -2
      kspread/kspread_global.h
  100. +1
    -1
      lib/kformula/contextstyle.cc

+ 3
- 3
chalk/colorspaces/wetsticky/kis_wet_sticky_colorspace.cc View File

@@ -48,7 +48,7 @@ enum WetStickyChannelIndex {
HUE_CHANNEL_INDEX,
SATURATION_CHANNEL_INDEX,
LIGHTNESS_CHANNEL_INDEX,
LITQUID_CONTENT_CHANNEL_INDEX,
LIQUID_CONTENT_CHANNEL_INDEX,
DRYING_RATE_CHANNEL_INDEX,
MISCIBILITY_CHANNEL_INDEX,
GRAVITATIONAL_DIRECTION_INDEX,
@@ -513,7 +513,7 @@ TQString KisWetStickyColorSpace::channelValueText(const TQ_UINT8 *U8_pixel, TQ_U
return TQString().setNum(pixel -> saturation);
case LIGHTNESS_CHANNEL_INDEX:
return TQString().setNum(pixel -> lightness);
case LITQUID_CONTENT_CHANNEL_INDEX:
case LIQUID_CONTENT_CHANNEL_INDEX:
return TQString().setNum(pixel -> liquid_content);
case DRYING_RATE_CHANNEL_INDEX:
return TQString().setNum(pixel -> drying_rate);
@@ -569,7 +569,7 @@ TQString KisWetStickyColorSpace::normalisedChannelValueText(const TQ_UINT8 *U8_p
return TQString().setNum(pixel -> saturation);
case LIGHTNESS_CHANNEL_INDEX:
return TQString().setNum(pixel -> lightness);
case LITQUID_CONTENT_CHANNEL_INDEX:
case LIQUID_CONTENT_CHANNEL_INDEX:
return TQString().setNum(static_cast<float>(pixel -> liquid_content) / UINT8_MAX);
case DRYING_RATE_CHANNEL_INDEX:
return TQString().setNum(static_cast<float>(pixel -> drying_rate) / UINT8_MAX);


+ 1
- 1
chalk/core/tiles/kis_tileddatamanager.cc View File

@@ -837,7 +837,7 @@ TQ_UINT8* KisTiledDataManager::pixelPtr(TQ_INT32 x, TQ_INT32 y, bool writable)
{
// Ahem, this is a bit not as good. The point is, this function needs the tile data,
// but it might be swapped out. This code swaps it in, but at function exit it might
// be swapped out again! THIS MAKES THE RETURNED POINTER TQUITE VOLATILE
// be swapped out again! THIS MAKES THE RETURNED POINTER QUITE VOLATILE
return pixelPtrSafe(x, y, writable) -> data();
}



+ 3
- 3
chalk/ui/squeezedcombobox.h View File

@@ -20,8 +20,8 @@

/** @file squeezedcombobox.h */

#ifndef STQUEEZEDCOMBOBOX_H
#define STQUEEZEDCOMBOBOX_H
#ifndef SQUEEZEDCOMBOBOX_H
#define SQUEEZEDCOMBOBOX_H

class TQTimer;

@@ -134,4 +134,4 @@ private:
SqueezedComboBoxTip* m_tooltip;
};

#endif // STQUEEZEDCOMBOBOX_H
#endif // SQUEEZEDCOMBOBOX_H

+ 1
- 1
filters/karbon/msod/msod.cc View File

@@ -77,7 +77,7 @@ void Msod::drawShape(
"SEAL", // Seal
"ARC", // Arc
"LINE", // Line
"PLATQUE", // Plaque
"PLAQUE", // Plaque
"CAN", // Can
"DONUT", // Donut
"TEXTSIMPLE", // Textsimple


+ 1
- 1
filters/kpresenter/ooimpress/ooimpressexport.cc View File

@@ -725,7 +725,7 @@ void OoImpressExport::appendObjects(TQDomDocument & doccontent, TQDomNode &objec
case 12: // polyline
appendPolyline( doccontent, o, drawPage );
break;
case 13: //OT_TQUADRICBEZIERCURVE = 13
case 13: //OT_QUADRICBEZIERCURVE = 13
case 14: //OT_CUBICBEZIERCURVE = 14
//todo
// "draw:path"


+ 9
- 9
filters/kspread/csv/csvdialog.cpp View File

@@ -159,7 +159,7 @@ void CSVDialog::fillTable( )
{
int row, column;
bool lastCharDelimiter = false;
enum { S_START, S_TQUOTED_FIELD, S_MAYBE_END_OF_TQUOTED_FIELD, S_END_OF_TQUOTED_FIELD,
enum { S_START, S_QUOTED_FIELD, S_MAYBE_END_OF_QUOTED_FIELD, S_END_OF_QUOTED_FIELD,
S_MAYBE_NORMAL_FIELD, S_NORMAL_FIELD } state = S_START;

TQChar x;
@@ -214,7 +214,7 @@ void CSVDialog::fillTable( )
case S_START :
if (x == m_textquote)
{
state = S_TQUOTED_FIELD;
state = S_QUOTED_FIELD;
}
else if (x == m_delimiter)
{
@@ -235,21 +235,21 @@ void CSVDialog::fillTable( )
state = S_MAYBE_NORMAL_FIELD;
}
break;
case S_TQUOTED_FIELD :
case S_QUOTED_FIELD :
if (x == m_textquote)
{
state = S_MAYBE_END_OF_TQUOTED_FIELD;
state = S_MAYBE_END_OF_QUOTED_FIELD;
}
else
{
field += x;
}
break;
case S_MAYBE_END_OF_TQUOTED_FIELD :
case S_MAYBE_END_OF_QUOTED_FIELD :
if (x == m_textquote)
{
field += x;
state = S_TQUOTED_FIELD;
state = S_QUOTED_FIELD;
}
else if (x == m_delimiter || x == '\n')
{
@@ -272,10 +272,10 @@ void CSVDialog::fillTable( )
}
else
{
state = S_END_OF_TQUOTED_FIELD;
state = S_END_OF_QUOTED_FIELD;
}
break;
case S_END_OF_TQUOTED_FIELD :
case S_END_OF_QUOTED_FIELD :
if (x == m_delimiter || x == '\n')
{
setText(row - m_startRow, column - m_startCol, field);
@@ -300,7 +300,7 @@ void CSVDialog::fillTable( )
if (x == m_textquote)
{
field = TQString();
state = S_TQUOTED_FIELD;
state = S_QUOTED_FIELD;
break;
}
case S_NORMAL_FIELD :


+ 2
- 2
filters/kspread/csv/status.html View File

@@ -98,11 +98,11 @@ Let's try to draw the graph of the state machine using ascii-art.
/--\
| |
| v &quot;
/--[START]-------->[TQUOTED_FIELD] (**)
/--[START]-------->[QUOTED_FIELD] (**)
other| ^ ^ | ^
(*) | | | DEL or | &quot; | &quot; (*)
| | | EOL v | other
| | \----[MAYBE_END_OF_TQUOTED_FIELD]--------> Error
| | \----[MAYBE_END_OF_QUOTED_FIELD]--------> Error
| |
| | DEL or
| | EOL


+ 1
- 1
filters/kword/mswrite/structures_generated.h View File

@@ -70,7 +70,7 @@ namespace MSWrite
//
// Structure Fields:
//
// name #RETQUIRED
// name #REQUIRED
// type #IMPLIED "Word"
// default #IMPLIED ""
// description #IMPLIED "" (also valid for Structures)


+ 1
- 1
filters/kword/pdf/xpdf/xpdf/XPDFTree.cc View File

@@ -142,7 +142,7 @@ externaldef(xpdftreeclassrec) XPDFTreeClassRec xpdfTreeClassRec = {
XtNumber(actions), // num_actions
resources, // resources
XtNumber(resources), // num_resources
NULLTQUARK, // xrm_class
NULLQUARK, // xrm_class
TRUE, // compress_motion
XtExposeCompressMaximal, // compress_exposure
TRUE, // compress_enterleave


+ 1
- 1
filters/kword/starwriter/status.html View File

@@ -3,7 +3,7 @@
<HTML>
<HEAD>
<TITLE>StarWriter 5.x filter for KWord</TITLE>
<META HTTP-ETQUIV="Content-Type" CONTENT="text/html; charset=iso-8859-1">
<META HTTP-EQUIV="Content-Type" CONTENT="text/html; charset=iso-8859-1">
<META NAME="GENERATOR" CONTENT="Quanta Plus">
</HEAD>
<BODY>


+ 3
- 3
filters/olefilters/powerpoint97/powerpoint.cc View File

@@ -104,9 +104,9 @@ void Powerpoint::invokeHandler(
{ "EXPLAINATOM", 4039, 0 /* &Powerpoint::opExPlainAtom */ },
{ "EXPLAINLINK", 4054, 0 /* &Powerpoint::opExPlainLink */ },
{ "EXPLAINLINKATOM", 4036, 0 /* &Powerpoint::opExPlainLinkAtom */ },
{ "EXTQUICKTIME", 4073, 0 /* &Powerpoint::opExQuickTime */ },
{ "EXTQUICKTIMEMOVIE", 4074, 0 /* &Powerpoint::opExQuickTimeMovie */ },
{ "EXTQUICKTIMEMOVIEDATA", 4075, 0 /* &Powerpoint::opExQuickTimeMovieData */ },
{ "EXQUICKTIME", 4073, 0 /* &Powerpoint::opExQuickTime */ },
{ "EXQUICKTIMEMOVIE", 4074, 0 /* &Powerpoint::opExQuickTimeMovie */ },
{ "EXQUICKTIMEMOVIEDATA", 4075, 0 /* &Powerpoint::opExQuickTimeMovieData */ },
{ "EXSUBSCRIPTION", 4076, 0 /* &Powerpoint::opExSubscription */ },
{ "EXSUBSCRIPTIONSECTION", 4077, 0 /* &Powerpoint::opExSubscriptionSection */ },
{ "EXTERNALOBJECT", 4027, 0 /* &Powerpoint::opExternalObject */ },


+ 1
- 1
filters/olefilters/powerpoint97/pptSlide.cpp View File

@@ -97,7 +97,7 @@ void PptSlide::addText(TQString text, TQ_UINT16 type)
case OTHER_TEXT:
case CENTER_BODY_TEXT:
case HALF_BODY_TEXT:
case TQUARTER_BODY_TEXT:
case QUARTER_BODY_TEXT:
TQStringList data(TQStringList::split(TQChar('\r'), text, true));
for (j = 0; j < data.count(); j++)
{


+ 1
- 1
filters/olefilters/powerpoint97/pptSlide.h View File

@@ -38,7 +38,7 @@ DESCRIPTION
#define CENTER_BODY_TEXT 5 //center body(subtitle in title slide)
#define CENTER_TITLE_TEXT 6 //center title(title in title slide)
#define HALF_BODY_TEXT 7 //half body(body in two-column slide)
#define TQUARTER_BODY_TEXT 8 //quarter body(body in four-body slide)
#define QUARTER_BODY_TEXT 8 //quarter body(body in four-body slide)
//--

//--char style types


+ 1
- 1
filters/olefilters/powerpoint97/pptdoc.cc View File

@@ -68,7 +68,7 @@ void PptDoc::gotSlide(
case OTHER_TEXT:
case CENTER_BODY_TEXT:
case HALF_BODY_TEXT:
case TQUARTER_BODY_TEXT:
case QUARTER_BODY_TEXT:
for (j = 0; j < data.count(); j++)
{
ourSlide.body.append(data[j]);


+ 1
- 1
filters/olefilters/powerpoint97/pptxml.cc View File

@@ -258,7 +258,7 @@ void PptXml::setPlaceholder(PptSlide &slide)
break;
case OTHER_TEXT:
case HALF_BODY_TEXT:
case TQUARTER_BODY_TEXT:
case QUARTER_BODY_TEXT:
y = 130;
if(m_half)
{


+ 10
- 10
kchart/csvimportdialog.cc View File

@@ -170,7 +170,7 @@ void CSVImportDialog::fillTable( )
{
int row, column;
bool lastCharDelimiter = false;
enum { S_START, S_TQUOTED_FIELD, S_MAYBE_END_OF_TQUOTED_FIELD, S_END_OF_TQUOTED_FIELD,
enum { S_START, S_QUOTED_FIELD, S_MAYBE_END_OF_QUOTED_FIELD, S_END_OF_QUOTED_FIELD,
S_MAYBE_NORMAL_FIELD, S_NORMAL_FIELD } state = S_START;

TQChar x;
@@ -225,7 +225,7 @@ void CSVImportDialog::fillTable( )
case S_START :
if (x == m_textquote)
{
state = S_TQUOTED_FIELD;
state = S_QUOTED_FIELD;
}
else if (x == m_delimiter)
{
@@ -246,10 +246,10 @@ void CSVImportDialog::fillTable( )
state = S_MAYBE_NORMAL_FIELD;
}
break;
case S_TQUOTED_FIELD :
case S_QUOTED_FIELD :
if (x == m_textquote)
{
state = S_MAYBE_END_OF_TQUOTED_FIELD;
state = S_MAYBE_END_OF_QUOTED_FIELD;
}
else if (x == '\n')
{
@@ -268,11 +268,11 @@ void CSVImportDialog::fillTable( )
field += x;
}
break;
case S_MAYBE_END_OF_TQUOTED_FIELD :
case S_MAYBE_END_OF_QUOTED_FIELD :
if (x == m_textquote)
{
field += x;
state = S_TQUOTED_FIELD;
state = S_QUOTED_FIELD;
}
else if (x == m_delimiter || x == '\n')
{
@@ -295,10 +295,10 @@ void CSVImportDialog::fillTable( )
}
else
{
state = S_END_OF_TQUOTED_FIELD;
state = S_END_OF_QUOTED_FIELD;
}
break;
case S_END_OF_TQUOTED_FIELD :
case S_END_OF_QUOTED_FIELD :
if (x == m_delimiter || x == '\n')
{
setText(row - m_startRow, column - m_startCol, field);
@@ -320,14 +320,14 @@ void CSVImportDialog::fillTable( )
}
else
{
state = S_END_OF_TQUOTED_FIELD;
state = S_END_OF_QUOTED_FIELD;
}
break;
case S_MAYBE_NORMAL_FIELD :
if (x == m_textquote)
{
field = TQString();
state = S_TQUOTED_FIELD;
state = S_QUOTED_FIELD;
break;
}
case S_NORMAL_FIELD :


+ 5
- 5
kexi/3rdparty/kexisql/src/build.c View File

@@ -526,7 +526,7 @@ void sqliteStartTable(
/* Begin generating the code that will insert the table record into
** the SQLITE_MASTER table. Note in particular that we must go ahead
** and allocate the record number for the table entry now. Before any
** PRIMARY KEY or UNITQUE keywords are parsed. Those keywords will cause
** PRIMARY KEY or UNIQUE keywords are parsed. Those keywords will cause
** indices to be created and the table record must come before the
** indices. Hence, the record number for the table must be allocated
** now.
@@ -1461,7 +1461,7 @@ void sqliteDeferForeignKey(Parse *pParse, int isDeferred){
** Create a new index for an SQL table. pIndex is the name of the index
** and pTable is the name of the table that is to be indexed. Both will
** be NULL for a primary key or an index that is created to satisfy a
** UNITQUE constraint. If pTable and pIndex are NULL, use pParse->pNewTable
** UNIQUE constraint. If pTable and pIndex are NULL, use pParse->pNewTable
** as the table to be indexed. pParse->pNewTable is a table that is
** currently being constructed by a CREATE TABLE statement.
**
@@ -1531,7 +1531,7 @@ void sqliteCreateIndex(
** index, then we will continue to process this index.
**
** If pName==0 it means that we are
** dealing with a primary key or UNITQUE constraint. We have to invent our
** dealing with a primary key or UNIQUE constraint. We have to invent our
** own name.
*/
if( pName && !db->init.busy ){
@@ -1673,7 +1673,7 @@ void sqliteCreateIndex(
** we don't want to recreate it.
**
** If pTable==0 it means this index is generated as a primary key
** or UNITQUE constraint of a CREATE TABLE statement. Since the table
** or UNIQUE constraint of a CREATE TABLE statement. Since the table
** has just been created, it contains no data and the index initialization
** step can be skipped.
*/
@@ -1767,7 +1767,7 @@ void sqliteDropIndex(Parse *pParse, SrcList *pName){
goto exit_drop_index;
}
if( pIndex->autoIndex ){
sqliteErrorMsg(pParse, "index associated with UNITQUE "
sqliteErrorMsg(pParse, "index associated with UNIQUE "
"or PRIMARY KEY constraint cannot be dropped", 0);
goto exit_drop_index;
}


+ 1
- 1
kexi/3rdparty/kexisql/src/func.c View File

@@ -285,7 +285,7 @@ static void versionFunc(sqlite_func *context, int argc, const char **argv){
** change. This function may disappear. Do not write code that depends
** on this function.
**
** Implementation of the TQUOTE() function. This function takes a single
** Implementation of the QUOTE() function. This function takes a single
** argument. If the argument is numeric, the return value is the same as
** the argument. If the argument is NULL, the return value is the string
** "NULL". Otherwise, the argument is enclosed in single quotes with


+ 5
- 5
kexi/3rdparty/kexisql/src/insert.c View File

@@ -567,7 +567,7 @@ insert_cleanup:
** aIdxUsed!=0 and aIdxUsed[i]!=0.
**
** This routine also generates code to check constraints. NOT NULL,
** CHECK, and UNITQUE constraints are all checked. If a constraint fails,
** CHECK, and UNIQUE constraints are all checked. If a constraint fails,
** then the appropriate action is performed. There are five possible
** actions: ROLLBACK, ABORT, FAIL, REPLACE, and IGNORE.
**
@@ -595,7 +595,7 @@ insert_cleanup:
** value for that column. If the default value
** is NULL, the action is the same as ABORT.
**
** UNITQUE REPLACE The other row that conflicts with the row
** UNIQUE REPLACE The other row that conflicts with the row
** being inserted is removed.
**
** CHECK REPLACE Illegal. The results in an exception.
@@ -753,7 +753,7 @@ void sqliteGenerateConstraintChecks(
}
}

/* Test all UNITQUE constraints by creating entries for each UNITQUE
/* Test all UNIQUE constraints by creating entries for each UNIQUE
** index and making sure that duplicate entries do not already exist.
** Add the new records to the indices as we go.
*/
@@ -777,7 +777,7 @@ void sqliteGenerateConstraintChecks(

/* Find out what action to take in case there is an indexing conflict */
onError = pIdx->onError;
if( onError==OE_None ) continue; /* pIdx is not a UNITQUE index */
if( onError==OE_None ) continue; /* pIdx is not a UNIQUE index */
if( overrideError!=OE_Default ){
onError = overrideError;
}else if( pParse->db->onError!=OE_Default ){
@@ -843,7 +843,7 @@ void sqliteGenerateConstraintChecks(
default: assert(0);
}
contAddr = sqliteVdbeCurrentAddr(v);
#if NULL_DISTINCT_FOR_UNITQUE
#if NULL_DISTINCT_FOR_UNIQUE
sqliteVdbeChangeP2(v, jumpInst1, contAddr);
#endif
sqliteVdbeChangeP2(v, jumpInst2, contAddr);


+ 1
- 1
kexi/3rdparty/kexisql/src/main.c View File

@@ -90,7 +90,7 @@ int sqliteInitCallback(void *pInit, int argc, char **argv, char **azColName){
db->init.iDb = 0;
}else{
/* If the SQL column is blank it means this is an index that
** was created to be the PRIMARY KEY or to fulfill a UNITQUE
** was created to be the PRIMARY KEY or to fulfill a UNIQUE
** constraint for a CREATE TABLE. The index should have already
** been created when we processed the CREATE TABLE. All we have
** to do here is record the root page number for that index.


+ 8
- 8
kexi/3rdparty/kexisql/src/parse.c View File

@@ -711,7 +711,7 @@ static const YYCODETYPE yyFallback[] = {
0, /* FLOAT => nothing */
0, /* NULL => nothing */
0, /* PRIMARY => nothing */
0, /* UNITQUE => nothing */
0, /* UNIQUE => nothing */
0, /* CHECK => nothing */
0, /* REFERENCES => nothing */
0, /* COLLATE => nothing */
@@ -840,7 +840,7 @@ static const char *yyTokenName[] = {
"STAR", "SLASH", "REM", "CONCAT",
"UMINUS", "UPLUS", "BITNOT", "STRING",
"JOIN_KW", "INTEGER", "CONSTRAINT", "DEFAULT",
"FLOAT", "NULL", "PRIMARY", "UNITQUE",
"FLOAT", "NULL", "PRIMARY", "UNIQUE",
"CHECK", "REFERENCES", "COLLATE", "ON",
"DELETE", "UPDATE", "INSERT", "SET",
"DEFERRABLE", "FOREIGN", "DROP", "UNION",
@@ -935,7 +935,7 @@ static const char *yyRuleName[] = {
/* 53 */ "ccons ::= NULL onconf",
/* 54 */ "ccons ::= NOT NULL onconf",
/* 55 */ "ccons ::= PRIMARY KEY sortorder onconf",
/* 56 */ "ccons ::= UNITQUE onconf",
/* 56 */ "ccons ::= UNIQUE onconf",
/* 57 */ "ccons ::= CHECK LP expr RP onconf",
/* 58 */ "ccons ::= REFERENCES nm idxlist_opt refargs",
/* 59 */ "ccons ::= defer_subclause",
@@ -962,7 +962,7 @@ static const char *yyRuleName[] = {
/* 80 */ "conslist ::= tcons",
/* 81 */ "tcons ::= CONSTRAINT nm",
/* 82 */ "tcons ::= PRIMARY KEY LP idxlist RP onconf",
/* 83 */ "tcons ::= UNITQUE LP idxlist RP onconf",
/* 83 */ "tcons ::= UNIQUE LP idxlist RP onconf",
/* 84 */ "tcons ::= CHECK expr onconf",
/* 85 */ "tcons ::= FOREIGN KEY LP idxlist RP REFERENCES nm idxlist_opt refargs defer_subclause_opt",
/* 86 */ "defer_subclause_opt ::=",
@@ -1115,7 +1115,7 @@ static const char *yyRuleName[] = {
/* 233 */ "expritem ::= expr",
/* 234 */ "expritem ::=",
/* 235 */ "cmd ::= CREATE uniqueflag INDEX nm ON nm dbnm LP idxlist RP onconf",
/* 236 */ "uniqueflag ::= UNITQUE",
/* 236 */ "uniqueflag ::= UNIQUE",
/* 237 */ "uniqueflag ::=",
/* 238 */ "idxlist_opt ::=",
/* 239 */ "idxlist_opt ::= LP idxlist RP",
@@ -2183,7 +2183,7 @@ static void yy_reduce(
#line 191 "parse.y"
{sqliteCreateIndex(pParse,0,0,0,yymsp[0].minor.yy372,0,0);}
#line 2185 "parse.c"
/* No destructor defined for UNITQUE */
/* No destructor defined for UNIQUE */
break;
case 57:
/* No destructor defined for CHECK */
@@ -2342,7 +2342,7 @@ static void yy_reduce(
#line 238 "parse.y"
{sqliteCreateIndex(pParse,0,0,yymsp[-2].minor.yy320,yymsp[0].minor.yy372,0,0);}
#line 2344 "parse.c"
/* No destructor defined for UNITQUE */
/* No destructor defined for UNIQUE */
/* No destructor defined for LP */
/* No destructor defined for RP */
break;
@@ -3428,7 +3428,7 @@ static void yy_reduce(
#line 740 "parse.y"
{ yygotominor.yy372 = OE_Abort; }
#line 3430 "parse.c"
/* No destructor defined for UNITQUE */
/* No destructor defined for UNIQUE */
break;
case 237:
#line 741 "parse.y"


+ 1
- 1
kexi/3rdparty/kexisql/src/parse.h View File

@@ -92,7 +92,7 @@
#define TK_FLOAT 92
#define TK_NULL 93
#define TK_PRIMARY 94
#define TK_UNITQUE 95
#define TK_UNIQUE 95
#define TK_CHECK 96
#define TK_REFERENCES 97
#define TK_COLLATE 98


+ 6
- 6
kexi/3rdparty/kexisql/src/sqliteInt.h View File

@@ -45,16 +45,16 @@
/*
** If the following macro is set to 1, then NULL values are considered
** distinct when determining whether or not two entries are the same
** in a UNITQUE index. This is the way PostgreSQL, Oracle, DB2, MySQL,
** in a UNIQUE index. This is the way PostgreSQL, Oracle, DB2, MySQL,
** OCELOT, and Firebird all work. The SQL92 spec explicitly says this
** is the way things are suppose to work.
**
** If the following macro is set to 0, the NULLs are indistinct for
** a UNITQUE index. In this mode, you can only have a single NULL entry
** for a column declared UNITQUE. This is the way Informix and SQL Server
** a UNIQUE index. In this mode, you can only have a single NULL entry
** for a column declared UNIQUE. This is the way Informix and SQL Server
** work.
*/
#define NULL_DISTINCT_FOR_UNITQUE 1
#define NULL_DISTINCT_FOR_UNIQUE 1

/*
** The maximum number of attached databases. This must be at least 2
@@ -563,7 +563,7 @@ struct FKey {
** occurs. IGNORE means that the particular row that caused the constraint
** error is not inserted or updated. Processing continues and no error
** is returned. REPLACE means that preexisting database rows that caused
** a UNITQUE constraint violation are removed so that the new insert or
** a UNIQUE constraint violation are removed so that the new insert or
** update can proceed. Processing continues and no error is reported.
**
** RESTRICT, SETNULL, and CASCADE actions apply only to foreign keys.
@@ -623,7 +623,7 @@ struct Index {
Table *pTable; /* The SQL table being indexed */
int tnum; /* Page containing root of this index in database file */
u8 onError; /* OE_Abort, OE_Ignore, OE_Replace, or OE_None */
u8 autoIndex; /* True if is automatically created (ex: by UNITQUE) */
u8 autoIndex; /* True if is automatically created (ex: by UNIQUE) */
u8 iDb; /* Index in sqlite.aDb[] of where this index is stored */
Index *pNext; /* The next index associated with the same table */
};


+ 1
- 1
kexi/3rdparty/kexisql/src/tokenize.c View File

@@ -130,7 +130,7 @@ static Keyword aKeywordTable[] = {
{ "TRANSACTION", TK_TRANSACTION, },
{ "TRIGGER", TK_TRIGGER, },
{ "UNION", TK_UNION, },
{ "UNITQUE", TK_UNITQUE, },
{ "UNIQUE", TK_UNIQUE, },
{ "UPDATE", TK_UPDATE, },
{ "USING", TK_USING, },
{ "VACUUM", TK_VACUUM, },


+ 1
- 1
kexi/3rdparty/kexisql/src/vdbe.c View File

@@ -2741,7 +2741,7 @@ case OP_IsUnique: {
/* The last four bytes of the key are different from R. Convert the
** last four bytes of the key into an integer and push it onto the
** stack. (These bytes are the record number of an entry that
** violates a UNITQUE constraint.)
** violates a UNIQUE constraint.)
*/
pTos++;
pTos->i = v;


+ 3
- 3
kexi/3rdparty/kexisql3/src/alter.c View File

@@ -231,7 +231,7 @@ static void reloadTableSchema(Parse *pParse, Table *pTab, const char *zName){

#ifndef SQLITE_OMIT_TRIGGER
/* Now, if the table is not stored in the temp database, reload any temp
** triggers. Don't use IN(...) in case SQLITE_OMIT_SUBTQUERY is defined.
** triggers. Don't use IN(...) in case SQLITE_OMIT_SUBQUERY is defined.
*/
if( (zWhere=whereTempTriggers(pParse, pTab)) ){
sqlite3VdbeOp3(v, OP_ParseSchema, 1, 0, zWhere, P3_DYNAMIC);
@@ -407,7 +407,7 @@ void sqlite3AlterFinishAddColumn(Parse *pParse, Token *pColDef){
pDflt = 0;
}

/* Check that the new column is not specified as PRIMARY KEY or UNITQUE.
/* Check that the new column is not specified as PRIMARY KEY or UNIQUE.
** If there is a NOT NULL constraint, then the default value for the
** column must not be NULL.
*/
@@ -416,7 +416,7 @@ void sqlite3AlterFinishAddColumn(Parse *pParse, Token *pColDef){
return;
}
if( pNew->pIndex ){
sqlite3ErrorMsg(pParse, "Cannot add a UNITQUE column");
sqlite3ErrorMsg(pParse, "Cannot add a UNIQUE column");
return;
}
if( pCol->notNull && !pDflt ){


+ 3
- 3
kexi/3rdparty/kexisql3/src/btree.c View File

@@ -3644,7 +3644,7 @@ static void assemblePage(
/* Forward reference */
static int balance(MemPage*, int);

#ifndef SQLITE_OMIT_TQUICKBALANCE
#ifndef SQLITE_OMIT_QUICKBALANCE
/*
** This version of balance() handles the common special case where
** a new entry is being inserted on the extreme right-end of the
@@ -3732,7 +3732,7 @@ static int balance_quick(MemPage *pPage, MemPage *pParent){
releasePage(pNew);
return balance(pParent, 0);
}
#endif /* SQLITE_OMIT_TQUICKBALANCE */
#endif /* SQLITE_OMIT_QUICKBALANCE */

/*
** The ISAUTOVACUUM macro is used within balance_nonroot() to determine
@@ -3822,7 +3822,7 @@ static int balance_nonroot(MemPage *pPage){
assert( pParent );
TRACE(("BALANCE: begin page %d child of %d\n", pPage->pgno, pParent->pgno));

#ifndef SQLITE_OMIT_TQUICKBALANCE
#ifndef SQLITE_OMIT_QUICKBALANCE
/*
** A special case: If a new entry has just been inserted into a
** table (that is, a btree with integer keys and all data at the leaves)


+ 10
- 10
kexi/3rdparty/kexisql3/src/build.c View File

@@ -746,7 +746,7 @@ void sqlite3StartTable(
/* Begin generating the code that will insert the table record into
** the SQLITE_MASTER table. Note in particular that we must go ahead
** and allocate the record number for the table entry now. Before any
** PRIMARY KEY or UNITQUE keywords are parsed. Those keywords will cause
** PRIMARY KEY or UNIQUE keywords are parsed. Those keywords will cause
** indices to be created and the table record must come before the
** indices. Hence, the record number for the table must be allocated
** now.
@@ -2011,7 +2011,7 @@ static void sqlite3RefillIndex(Parse *pParse, Index *pIndex, int memRootPage){
** Create a new index for an SQL table. pName1.pName2 is the name of the index
** and pTblList is the name of the table that is to be indexed. Both will
** be NULL for a primary key or an index that is created to satisfy a
** UNITQUE constraint. If pTable and pIndex are NULL, use pParse->pNewTable
** UNIQUE constraint. If pTable and pIndex are NULL, use pParse->pNewTable
** as the table to be indexed. pParse->pNewTable is a table that is
** currently being constructed by a CREATE TABLE statement.
**
@@ -2104,7 +2104,7 @@ void sqlite3CreateIndex(
** index, then we will continue to process this index.
**
** If pName==0 it means that we are
** dealing with a primary key or UNITQUE constraint. We have to invent our
** dealing with a primary key or UNIQUE constraint. We have to invent our
** own name.
*/
if( pName ){
@@ -2211,12 +2211,12 @@ void sqlite3CreateIndex(

if( pTab==pParse->pNewTable ){
/* This routine has been called to create an automatic index as a
** result of a PRIMARY KEY or UNITQUE clause on a column definition, or
** a PRIMARY KEY or UNITQUE clause following the column definitions.
** result of a PRIMARY KEY or UNIQUE clause on a column definition, or
** a PRIMARY KEY or UNIQUE clause following the column definitions.
** i.e. one of:
**
** CREATE TABLE t(x PRIMARY KEY, y);
** CREATE TABLE t(x, y, UNITQUE(x, y));
** CREATE TABLE t(x, y, UNIQUE(x, y));
**
** Either way, check to see if the table already has such an index. If
** so, don't bother creating this one. This only applies to
@@ -2285,7 +2285,7 @@ void sqlite3CreateIndex(
** we don't want to recreate it.
**
** If pTblName==0 it means this index is generated as a primary key
** or UNITQUE constraint of a CREATE TABLE statement. Since the table
** or UNIQUE constraint of a CREATE TABLE statement. Since the table
** has just been created, it contains no data and the index initialization
** step can be skipped.
*/
@@ -2309,11 +2309,11 @@ void sqlite3CreateIndex(
if( pStart && pEnd ){
/* A named index with an explicit CREATE INDEX statement */
zStmt = sqlite3MPrintf("CREATE%s INDEX %.*s",
onError==OE_None ? "" : " UNITQUE",
onError==OE_None ? "" : " UNIQUE",
pEnd->z - pName->z + 1,
pName->z);
}else{
/* An automatic index created by a PRIMARY KEY or UNITQUE constraint */
/* An automatic index created by a PRIMARY KEY or UNIQUE constraint */
/* zStmt = sqlite3MPrintf(""); */
zStmt = 0;
}
@@ -2428,7 +2428,7 @@ void sqlite3DropIndex(Parse *pParse, SrcList *pName){
goto exit_drop_index;
}
if( pIndex->autoIndex ){
sqlite3ErrorMsg(pParse, "index associated with UNITQUE "
sqlite3ErrorMsg(pParse, "index associated with UNIQUE "
"or PRIMARY KEY constraint cannot be dropped", 0);
goto exit_drop_index;
}


+ 6
- 6
kexi/3rdparty/kexisql3/src/expr.c View File

@@ -478,7 +478,7 @@ ExprList *sqlite3ExprListDup(ExprList *p){
** called with a NULL argument.
*/
#if !defined(SQLITE_OMIT_VIEW) || !defined(SQLITE_OMIT_TRIGGER) \
|| !defined(SQLITE_OMIT_SUBTQUERY)
|| !defined(SQLITE_OMIT_SUBQUERY)
SrcList *sqlite3SrcListDup(SrcList *p){
SrcList *pNew;
int i;
@@ -698,7 +698,7 @@ static int exprNodeIsConstant(void *pArg, Expr *pExpr){
case TK_DOT:
case TK_AGG_FUNCTION:
case TK_AGG_COLUMN:
#ifndef SQLITE_OMIT_SUBTQUERY
#ifndef SQLITE_OMIT_SUBQUERY
case TK_SELECT:
case TK_EXISTS:
#endif
@@ -1190,7 +1190,7 @@ static int nameResolverStep(void *pArg, Expr *pExpr){
*/
return is_agg;
}
#ifndef SQLITE_OMIT_SUBTQUERY
#ifndef SQLITE_OMIT_SUBQUERY
case TK_SELECT:
case TK_EXISTS:
#endif
@@ -1273,7 +1273,7 @@ struct QueryCoder {
** of allowed values. The second form causes the SELECT to generate
** a temporary table.
*/
#ifndef SQLITE_OMIT_SUBTQUERY
#ifndef SQLITE_OMIT_SUBQUERY
void sqlite3CodeSubselect(Parse *pParse, Expr *pExpr){
int testAddr = 0; /* One-time test address */
Vdbe *v = sqlite3GetVdbe(pParse);
@@ -1414,7 +1414,7 @@ void sqlite3CodeSubselect(Parse *pParse, Expr *pExpr){
}
return;
}
#endif /* SQLITE_OMIT_SUBTQUERY */
#endif /* SQLITE_OMIT_SUBQUERY */

/*
** Generate an instruction that will put the integer describe by
@@ -1649,7 +1649,7 @@ void sqlite3ExprCode(Parse *pParse, Expr *pExpr){
sqlite3VdbeOp3(v, OP_Function, constMask, nExpr, (char*)pDef, P3_FUNCDEF);
break;
}
#ifndef SQLITE_OMIT_SUBTQUERY
#ifndef SQLITE_OMIT_SUBQUERY
case TK_EXISTS:
case TK_SELECT: {
sqlite3CodeSubselect(pParse, pExpr);


+ 1
- 1
kexi/3rdparty/kexisql3/src/func.c View File

@@ -545,7 +545,7 @@ static void versionFunc(
** change. This function may disappear. Do not write code that depends
** on this function.
**
** Implementation of the TQUOTE() function. This function takes a single
** Implementation of the QUOTE() function. This function takes a single
** argument. If the argument is numeric, the return value is the same as
** the argument. If the argument is NULL, the return value is the string
** "NULL". Otherwise, the argument is enclosed in single quotes with


+ 5
- 5
kexi/3rdparty/kexisql3/src/insert.c View File

@@ -746,7 +746,7 @@ insert_cleanup:
** aIdxUsed!=0 and aIdxUsed[i]!=0.
**
** This routine also generates code to check constraints. NOT NULL,
** CHECK, and UNITQUE constraints are all checked. If a constraint fails,
** CHECK, and UNIQUE constraints are all checked. If a constraint fails,
** then the appropriate action is performed. There are five possible
** actions: ROLLBACK, ABORT, FAIL, REPLACE, and IGNORE.
**
@@ -774,7 +774,7 @@ insert_cleanup:
** value for that column. If the default value
** is NULL, the action is the same as ABORT.
**
** UNITQUE REPLACE The other row that conflicts with the row
** UNIQUE REPLACE The other row that conflicts with the row
** being inserted is removed.
**
** CHECK REPLACE Illegal. The results in an exception.
@@ -927,7 +927,7 @@ void sqlite3GenerateConstraintChecks(
}
}

/* Test all UNITQUE constraints by creating entries for each UNITQUE
/* Test all UNIQUE constraints by creating entries for each UNIQUE
** index and making sure that duplicate entries do not already exist.
** Add the new records to the indices as we go.
*/
@@ -951,7 +951,7 @@ void sqlite3GenerateConstraintChecks(

/* Find out what action to take in case there is an indexing conflict */
onError = pIdx->onError;
if( onError==OE_None ) continue; /* pIdx is not a UNITQUE index */
if( onError==OE_None ) continue; /* pIdx is not a UNIQUE index */
if( overrideError!=OE_Default ){
onError = overrideError;
}else if( onError==OE_Default ){
@@ -1015,7 +1015,7 @@ void sqlite3GenerateConstraintChecks(
break;
}
}
#if NULL_DISTINCT_FOR_UNITQUE
#if NULL_DISTINCT_FOR_UNIQUE
sqlite3VdbeJumpHere(v, jumpInst1);
#endif
sqlite3VdbeJumpHere(v, jumpInst2);


+ 4
- 4
kexi/3rdparty/kexisql3/src/keywordhash.h View File

@@ -8,8 +8,8 @@ static int keywordCode(const char *z, int n){
"CASECASTCOLLATECOLUMNCOMMITCONFLICTCONSTRAINTERSECTCREATECROSS"
"CURRENT_DATECURRENT_TIMESTAMPLANDESCDETACHDISTINCTDROPRAGMATCH"
"FAILIMITFROMFULLGROUPDATEIMMEDIATEINSERTINSTEADINTOFFSETISNULL"
"JOINORDEREPLACEOUTERESTRICTPRIMARYTQUERYRIGHTROLLBACKROWHENUNION"
"UNITQUEUSINGVACUUMVALUESVIEWHERE";
"JOINORDEREPLACEOUTERESTRICTPRIMARYQUERYRIGHTROLLBACKROWHENUNION"
"UNIQUEUSINGVACUUMVALUESVIEWHERE";
static const unsigned char aHash[127] = {
91, 80, 106, 90, 0, 4, 0, 0, 113, 0, 83, 0, 0,
94, 44, 76, 92, 0, 105, 108, 96, 0, 0, 10, 0, 0,
@@ -76,8 +76,8 @@ static int keywordCode(const char *z, int n){
TK_FROM, TK_JOIN_KW, TK_GROUP, TK_UPDATE, TK_IMMEDIATE,
TK_INSERT, TK_INSTEAD, TK_INTO, TK_OF, TK_OFFSET,
TK_SET, TK_ISNULL, TK_JOIN, TK_ORDER, TK_REPLACE,
TK_JOIN_KW, TK_RESTRICT, TK_PRIMARY, TK_TQUERY, TK_JOIN_KW,
TK_ROLLBACK, TK_ROW, TK_WHEN, TK_UNION, TK_UNITQUE,
TK_JOIN_KW, TK_RESTRICT, TK_PRIMARY, TK_QUERY, TK_JOIN_KW,
TK_ROLLBACK, TK_ROW, TK_WHEN, TK_UNION, TK_UNIQUE,
TK_USING, TK_VACUUM, TK_VALUES, TK_VIEW, TK_WHERE,
};
int h, i;


+ 7
- 7
kexi/3rdparty/kexisql3/src/parse.c View File

@@ -682,7 +682,7 @@ static const YYCODETYPE yyFallback[] = {
0, /* CONST_FUNC => nothing */
0, /* SEMI => nothing */
30, /* EXPLAIN => ID */
30, /* TQUERY => ID */
30, /* QUERY => ID */
30, /* PLAN => ID */
30, /* BEGIN => ID */
0, /* TRANSACTION => nothing */
@@ -770,7 +770,7 @@ static const YYCODETYPE yyFallback[] = {
0, /* DEFAULT => nothing */
0, /* NULL => nothing */
0, /* PRIMARY => nothing */
0, /* UNITQUE => nothing */
0, /* UNIQUE => nothing */
0, /* CHECK => nothing */
0, /* REFERENCES => nothing */
0, /* COLLATE => nothing */
@@ -910,7 +910,7 @@ static const char *const yyTokenName[] = {
"STAR", "SLASH", "REM", "CONCAT",
"UMINUS", "UPLUS", "BITNOT", "STRING",
"JOIN_KW", "CONSTRAINT", "DEFAULT", "NULL",
"PRIMARY", "UNITQUE", "CHECK", "REFERENCES",
"PRIMARY", "UNIQUE", "CHECK", "REFERENCES",
"COLLATE", "AUTOINCR", "ON", "DELETE",
"UPDATE", "INSERT", "SET", "DEFERRABLE",
"FOREIGN", "DROP", "UNION", "ALL",
@@ -962,7 +962,7 @@ static const char *const yyRuleName[] = {
/* 5 */ "ecmd ::= explain cmdx SEMI",
/* 6 */ "explain ::=",
/* 7 */ "explain ::= EXPLAIN",
/* 8 */ "explain ::= EXPLAIN TQUERY PLAN",
/* 8 */ "explain ::= EXPLAIN QUERY PLAN",
/* 9 */ "cmd ::= BEGIN transtype trans_opt",
/* 10 */ "trans_opt ::=",
/* 11 */ "trans_opt ::= TRANSACTION",
@@ -1011,7 +1011,7 @@ static const char *const yyRuleName[] = {
/* 54 */ "ccons ::= NULL onconf",
/* 55 */ "ccons ::= NOT NULL onconf",
/* 56 */ "ccons ::= PRIMARY KEY sortorder onconf autoinc",
/* 57 */ "ccons ::= UNITQUE onconf",
/* 57 */ "ccons ::= UNIQUE onconf",
/* 58 */ "ccons ::= CHECK LP expr RP onconf",
/* 59 */ "ccons ::= REFERENCES nm idxlist_opt refargs",
/* 60 */ "ccons ::= defer_subclause",
@@ -1040,7 +1040,7 @@ static const char *const yyRuleName[] = {
/* 83 */ "conslist ::= tcons",
/* 84 */ "tcons ::= CONSTRAINT nm",
/* 85 */ "tcons ::= PRIMARY KEY LP idxlist autoinc RP onconf",
/* 86 */ "tcons ::= UNITQUE LP idxlist RP onconf",
/* 86 */ "tcons ::= UNIQUE LP idxlist RP onconf",
/* 87 */ "tcons ::= CHECK expr onconf",
/* 88 */ "tcons ::= FOREIGN KEY LP idxlist RP REFERENCES nm idxlist_opt refargs defer_subclause_opt",
/* 89 */ "defer_subclause_opt ::=",
@@ -1199,7 +1199,7 @@ static const char *const yyRuleName[] = {
/* 242 */ "expritem ::= expr",
/* 243 */ "expritem ::=",
/* 244 */ "cmd ::= CREATE uniqueflag INDEX nm dbnm ON nm LP idxlist RP onconf",
/* 245 */ "uniqueflag ::= UNITQUE",
/* 245 */ "uniqueflag ::= UNIQUE",
/* 246 */ "uniqueflag ::=",
/* 247 */ "idxlist_opt ::=",
/* 248 */ "idxlist_opt ::= LP idxlist RP",


+ 2
- 2
kexi/3rdparty/kexisql3/src/parse.h View File

@@ -10,7 +10,7 @@
#define TK_CONST_FUNC 10
#define TK_SEMI 11
#define TK_EXPLAIN 12
#define TK_TQUERY 13
#define TK_QUERY 13
#define TK_PLAN 14
#define TK_BEGIN 15
#define TK_TRANSACTION 16
@@ -98,7 +98,7 @@
#define TK_DEFAULT 98
#define TK_NULL 99
#define TK_PRIMARY 100
#define TK_UNITQUE 101
#define TK_UNIQUE 101
#define TK_CHECK 102
#define TK_REFERENCES 103
#define TK_COLLATE 104


+ 1
- 1
kexi/3rdparty/kexisql3/src/prepare.c View File

@@ -77,7 +77,7 @@ int sqlite3InitCallback(void *pInit, int argc, char **argv, char **azColName){
}
}else{
/* If the SQL column is blank it means this is an index that
** was created to be the PRIMARY KEY or to fulfill a UNITQUE
** was created to be the PRIMARY KEY or to fulfill a UNIQUE
** constraint for a CREATE TABLE. The index should have already
** been created when we processed the CREATE TABLE. All we have
** to do here is record the root page number for that index.


+ 8
- 8
kexi/3rdparty/kexisql3/src/select.c View File

@@ -518,7 +518,7 @@ static int selectInnerLoop(
break;
}

#ifndef SQLITE_OMIT_SUBTQUERY
#ifndef SQLITE_OMIT_SUBQUERY
/* If we are creating a set for an "expr IN (SELECT ...)" construct,
** then there should be a single item on the stack. Write this
** item into the set table with bogus data.
@@ -562,7 +562,7 @@ static int selectInnerLoop(
}
break;
}
#endif /* #ifndef SQLITE_OMIT_SUBTQUERY */
#endif /* #ifndef SQLITE_OMIT_SUBQUERY */

/* Send the data to the callback function or to a subroutine. In the
** case of a subroutine, the subroutine itself is responsible for
@@ -671,7 +671,7 @@ static void generateSortTail(
sqlite3VdbeAddOp(v, OP_Insert, iParm, 0);
break;
}
#ifndef SQLITE_OMIT_SUBTQUERY
#ifndef SQLITE_OMIT_SUBQUERY
case SRT_Set: {
assert( nColumn==1 );
sqlite3VdbeAddOp(v, OP_NotNull, -1, sqlite3VdbeCurrentAddr(v)+3);
@@ -773,7 +773,7 @@ static const char *columnType(NameContext *pNC, Expr *pExpr){
}
break;
}
#ifndef SQLITE_OMIT_SUBTQUERY
#ifndef SQLITE_OMIT_SUBQUERY
case TK_SELECT: {
NameContext sNC;
Select *pS = pExpr->pSelect;
@@ -1058,7 +1058,7 @@ static int prepSelectStmt(Parse *pParse, Select *p){
return 0;
}
if( pFrom->zName==0 ){
#ifndef SQLITE_OMIT_SUBTQUERY
#ifndef SQLITE_OMIT_SUBQUERY
/* A sub-query in the FROM clause of a SELECT */
assert( pFrom->pSelect!=0 );
if( pFrom->zAlias==0 ){
@@ -2664,7 +2664,7 @@ int sqlite3Select(
** only a single column may be output.
*/
assert( eDest!=SRT_Exists || pEList->nExpr==1 );
#ifndef SQLITE_OMIT_SUBTQUERY
#ifndef SQLITE_OMIT_SUBQUERY
if( (eDest==SRT_Mem || eDest==SRT_Set) && pEList->nExpr>1 ){
sqlite3ErrorMsg(pParse, "only a single result allowed for "
"a SELECT that is part of an expression");
@@ -2692,7 +2692,7 @@ int sqlite3Select(

/* Generate code for all sub-queries in the FROM clause
*/
#if !defined(SQLITE_OMIT_SUBTQUERY) || !defined(SQLITE_OMIT_VIEW)
#if !defined(SQLITE_OMIT_SUBQUERY) || !defined(SQLITE_OMIT_VIEW)
for(i=0; i<pTabList->nSrc; i++){
const char *zSavedAuthContext = 0;
int needRestoreContext;
@@ -3098,7 +3098,7 @@ int sqlite3Select(
generateSortTail(pParse, p, v, pEList->nExpr, eDest, iParm);
}

#ifndef SQLITE_OMIT_SUBTQUERY
#ifndef SQLITE_OMIT_SUBQUERY
/* If this was a subquery, we have now converted the subquery into a
** temporary table. So delete the subquery structure from the parent
** to prevent this subquery from being evaluated again and to force the


+ 6
- 6
kexi/3rdparty/kexisql3/src/sqliteInt.h View File

@@ -104,16 +104,16 @@
/*
** If the following macro is set to 1, then NULL values are considered
** distinct when determining whether or not two entries are the same
** in a UNITQUE index. This is the way PostgreSQL, Oracle, DB2, MySQL,
** in a UNIQUE index. This is the way PostgreSQL, Oracle, DB2, MySQL,
** OCELOT, and Firebird all work. The SQL92 spec explicitly says this
** is the way things are suppose to work.
**
** If the following macro is set to 0, the NULLs are indistinct for
** a UNITQUE index. In this mode, you can only have a single NULL entry
** for a column declared UNITQUE. This is the way Informix and SQL Server
** a UNIQUE index. In this mode, you can only have a single NULL entry
** for a column declared UNIQUE. This is the way Informix and SQL Server
** work.
*/
#define NULL_DISTINCT_FOR_UNITQUE 1
#define NULL_DISTINCT_FOR_UNIQUE 1

/*
** The maximum number of attached databases. This must be at least 2
@@ -700,7 +700,7 @@ struct FKey {
** occurs. IGNORE means that the particular row that caused the constraint
** error is not inserted or updated. Processing continues and no error
** is returned. REPLACE means that preexisting database rows that caused
** a UNITQUE constraint violation are removed so that the new insert or
** a UNIQUE constraint violation are removed so that the new insert or
** update can proceed. Processing continues and no error is reported.
**
** RESTRICT, SETNULL, and CASCADE actions apply only to foreign keys.
@@ -779,7 +779,7 @@ struct Index {
Table *pTable; /* The SQL table being indexed */
int tnum; /* Page containing root of this index in database file */
u8 onError; /* OE_Abort, OE_Ignore, OE_Replace, or OE_None */
u8 autoIndex; /* True if is automatically created (ex: by UNITQUE) */
u8 autoIndex; /* True if is automatically created (ex: by UNIQUE) */
u8 iDb; /* Index in sqlite.aDb[] of where this index is stored */
char *zColAff; /* String defining the affinity of each column */
Index *pNext; /* The next index associated with the same table */


+ 2
- 2
kexi/3rdparty/kexisql3/src/vacuum.c View File

@@ -212,8 +212,8 @@ int sqlite3RunVacuum(char **pzErrMsg, sqlite3 *db){
" FROM sqlite_master WHERE sql LIKE 'CREATE INDEX %' ", 0);
if( rc!=SQLITE_OK ) goto end_of_vacuum;
rc = execExecSql(db,
"SELECT 'CREATE UNITQUE INDEX vacuum_db.' || substr(sql,21,100000000) "
" FROM sqlite_master WHERE sql LIKE 'CREATE UNITQUE INDEX %'", 0);
"SELECT 'CREATE UNIQUE INDEX vacuum_db.' || substr(sql,21,100000000) "
" FROM sqlite_master WHERE sql LIKE 'CREATE UNIQUE INDEX %'", 0);
if( rc!=SQLITE_OK ) goto end_of_vacuum;
rc = execExecSql(db,
"SELECT 'CREATE VIEW vacuum_db.' || substr(sql,13,100000000) "


+ 2
- 2
kexi/3rdparty/kexisql3/src/vdbe.c View File

@@ -1676,7 +1676,7 @@ case OP_BitNot: { /* same as TK_BITNOT, no-push */
*/
/*
** The magic Explain opcode are only inserted when explain==2 (which
** is to say when the EXPLAIN TQUERY PLAN syntax is used.)
** is to say when the EXPLAIN QUERY PLAN syntax is used.)
** This opcode records information from the optimizer. It is the
** the same as a no-op. This opcodesnever appears in a real VM program.
*/
@@ -2956,7 +2956,7 @@ case OP_IsUnique: { /* no-push */
}

/* The final varint of the key is different from R. Push it onto
** the stack. (The record number of an entry that violates a UNITQUE
** the stack. (The record number of an entry that violates a UNIQUE
** constraint.)
*/
pTos++;


+ 6
- 6
kexi/3rdparty/kexisql3/src/where.c View File

@@ -170,7 +170,7 @@ struct ExprMaskSet {
#define WHERE_IDX_ONLY 0x0800 /* Use index only - omit table */
#define WHERE_ORDERBY 0x1000 /* Output will appear in correct order */
#define WHERE_REVERSE 0x2000 /* Scan in reverse order */
#define WHERE_UNITQUE 0x4000 /* Selects no more than one row */
#define WHERE_UNIQUE 0x4000 /* Selects no more than one row */

/*
** Initialize a preallocated WhereClause structure.
@@ -747,7 +747,7 @@ or_not_possible:
** clause and the match can still be a success.
**
** All terms of the ORDER BY that match against the index must be either
** ASC or DESC. (Terms of the ORDER BY clause past the end of a UNITQUE
** ASC or DESC. (Terms of the ORDER BY clause past the end of a UNIQUE
** index do not need to satisfy this constraint.) The *pbRev value is
** set to 1 if the ORDER BY clause is all DESC and it is set to 0 if
** the ORDER BY clause is all ASC.
@@ -915,7 +915,7 @@ static double bestIndex(
if( pTerm->operator & WO_EQ ){
/* Rowid== is always the best pick. Look no further. Because only
** a single row is generated, output is always in sorted order */
*pFlags = WHERE_ROWID_EQ | WHERE_UNITQUE;
*pFlags = WHERE_ROWID_EQ | WHERE_UNIQUE;
*pnEq = 1;
TRACE(("... best is rowid\n"));
return 0.0;
@@ -1007,7 +1007,7 @@ static double bestIndex(
nEq = i;
if( pProbe->onError!=OE_None && (flags & WHERE_COLUMN_IN)==0
&& nEq==pProbe->nColumn ){
flags |= WHERE_UNITQUE;
flags |= WHERE_UNIQUE;
}
TRACE(("...... nEq=%d inMult=%.9g cost=%.9g\n", nEq, inMultiplier, cost));

@@ -1169,7 +1169,7 @@ static void codeEqualityTerm(
if( pX->op!=TK_IN ){
assert( pX->op==TK_EQ );
sqlite3ExprCode(pParse, pX->pRight);
#ifndef SQLITE_OMIT_SUBTQUERY
#ifndef SQLITE_OMIT_SUBQUERY
}else{
int iTab;
int *aIn;
@@ -1514,7 +1514,7 @@ WhereInfo *sqlite3WhereBegin(
/* If the total query only selects a single row, then the ORDER BY
** clause is irrelevant.
*/
if( (andFlags & WHERE_UNITQUE)!=0 && ppOrderBy ){
if( (andFlags & WHERE_UNIQUE)!=0 && ppOrderBy ){
*ppOrderBy = 0;
}



+ 6
- 6
kexi/kexidb/connection.cpp View File

@@ -671,7 +671,7 @@ TQString Connection::currentDatabase() const

bool Connection::useTemporaryDatabaseIfNeeded(TQString &tmpdbName)
{
if (!m_driver->isFileDriver() && m_driver->beh->USING_DATABASE_RETQUIRED_TO_CONNECT
if (!m_driver->isFileDriver() && m_driver->beh->USING_DATABASE_REQUIRED_TO_CONNECT
&& !isDatabaseUsed()) {
//we have no db used, but it is required by engine to have used any!
tmpdbName = anyAvailableDatabaseName();
@@ -884,8 +884,8 @@ TQString Connection::createTableStatement( const KexiDB::TableSchema& tableSchem
sql += ", ";
TQString v = escapeIdentifier(field->name()) + " ";
const bool autoinc = field->isAutoIncrement();
const bool pk = field->isPrimaryKey() || (autoinc && m_driver->beh->AUTO_INCREMENT_RETQUIRES_PK);
//TODO: warning: ^^^^^ this allows only one autonumber per table when AUTO_INCREMENT_RETQUIRES_PK==true!
const bool pk = field->isPrimaryKey() || (autoinc && m_driver->beh->AUTO_INCREMENT_REQUIRES_PK);
//TODO: warning: ^^^^^ this allows only one autonumber per table when AUTO_INCREMENT_REQUIRES_PK==true!
if (autoinc && m_driver->beh->SPECIAL_AUTO_INCREMENT_DEF) {
if (pk)
v += m_driver->beh->AUTO_INCREMENT_TYPE + " " + m_driver->beh->AUTO_INCREMENT_PK_FIELD_OPTION;
@@ -918,7 +918,7 @@ TQString Connection::createTableStatement( const KexiDB::TableSchema& tableSchem
if (pk)
v += " PRIMARY KEY";
if (!pk && field->isUniqueKey())
v += " UNITQUE";
v += " UNIQUE";
///@todo IS this ok for all engines?: if (!autoinc && !field->isPrimaryKey() && field->isNotNull())
if (!autoinc && !pk && field->isNotNull())
v += " NOT NULL"; //only add not null option if no autocommit is set
@@ -2481,7 +2481,7 @@ bool Connection::resultExists(const TQString& sql, bool &success, bool addLimitT
{
KexiDB::Cursor *cursor;
//optimization
if (m_driver->beh->SELECT_1_SUBTQUERY_SUPPORTED) {
if (m_driver->beh->SELECT_1_SUBQUERY_SUPPORTED) {
//this is at least for sqlite
if (addLimitTo1 && sql.left(6).upper() == "SELECT")
m_sql = TQString("SELECT 1 FROM (") + sql + ") LIMIT 1"; // is this safe?;
@@ -3279,7 +3279,7 @@ bool Connection::insertRow(QuerySchema &query, RowData& data, RowEditBuffer& buf
if (b.isEmpty()) {
// empty row inserting requested:
if (!getROWID && !pkey) {
KexiDBWarn << "MASTER TABLE's PKEY RETQUIRED FOR INSERTING EMPTY ROWS: INSERT CANCELLED" << endl;
KexiDBWarn << "MASTER TABLE's PKEY REQUIRED FOR INSERTING EMPTY ROWS: INSERT CANCELLED" << endl;
setError(ERR_INSERT_NO_MASTER_TABLES_PKEY,
i18n("Could not insert row because master table has no primary key defined."));
return false;


+ 1
- 1
kexi/kexidb/cursor.cpp View File

@@ -166,7 +166,7 @@ bool Cursor::open()

//luci: WHAT_EXACTLY_SHOULD_THAT_BE?
// if (!m_readAhead) // jowenn: to ensure before first state, without cluttering implementation code
if (m_conn->driver()->beh->_1ST_ROW_READ_AHEAD_RETQUIRED_TO_KNOW_IF_THE_RESULT_IS_EMPTY) {
if (m_conn->driver()->beh->_1ST_ROW_READ_AHEAD_REQUIRED_TO_KNOW_IF_THE_RESULT_IS_EMPTY) {
// KexiDBDbg << "READ AHEAD:" << endl;
m_readAhead = getNextRecord(); //true if any record in this query
// KexiDBDbg << "READ AHEAD = " << m_readAhead << endl;


+ 6
- 6
kexi/kexidb/driver.cpp View File

@@ -49,12 +49,12 @@ DriverBehaviour::DriverBehaviour()
, AUTO_INCREMENT_FIELD_OPTION("AUTO_INCREMENT")
, AUTO_INCREMENT_PK_FIELD_OPTION("AUTO_INCREMENT PRIMARY KEY")
, SPECIAL_AUTO_INCREMENT_DEF(false)
, AUTO_INCREMENT_RETQUIRES_PK(false)
, AUTO_INCREMENT_REQUIRES_PK(false)
, ROW_ID_FIELD_RETURNS_LAST_AUTOINCREMENTED_VALUE(false)
, TQUOTATION_MARKS_FOR_IDENTIFIER('"')
, USING_DATABASE_RETQUIRED_TO_CONNECT(true)
, _1ST_ROW_READ_AHEAD_RETQUIRED_TO_KNOW_IF_THE_RESULT_IS_EMPTY(false)
, SELECT_1_SUBTQUERY_SUPPORTED(false)
, QUOTATION_MARKS_FOR_IDENTIFIER('"')
, USING_DATABASE_REQUIRED_TO_CONNECT(true)
, _1ST_ROW_READ_AHEAD_REQUIRED_TO_KNOW_IF_THE_RESULT_IS_EMPTY(false)
, SELECT_1_SUBQUERY_SUPPORTED(false)
, SQL_KEYWORDS(0)
{
}
@@ -350,7 +350,7 @@ TQCString Driver::escapeIdentifier(const TQCString& str, int options) const
return quote + TQCString(str).replace( quote, "\"\"" ) + quote;
}
else if (needOuterQuotes) {
const char quote = beh->TQUOTATION_MARKS_FOR_IDENTIFIER.latin1();
const char quote = beh->QUOTATION_MARKS_FOR_IDENTIFIER.latin1();
return quote + drv_escapeIdentifier(str) + quote;
} else {
return drv_escapeIdentifier(str);


+ 1
- 1
kexi/kexidb/driver.h View File

@@ -319,7 +319,7 @@ class KEXI_DB_EXPORT Driver : public TQObject, public KexiDB::Object
Implement escaping for any character like " or ' as your
database engine requires. Do not append or prepend any quotation
marks characters - it is automatically done by escapeIdentifier() using
DriverBehaviour::TQUOTATION_MARKS_FOR_IDENTIFIER.
DriverBehaviour::QUOTATION_MARKS_FOR_IDENTIFIER.
*/
virtual TQString drv_escapeIdentifier( const TQString& str ) const = 0;


+ 5
- 5
kexi/kexidb/driver_p.h View File

@@ -72,7 +72,7 @@ class KEXI_DB_EXPORT DriverBehaviour

/*! True if autoincrement requires field to be declared as primary key.
This is true for SQLite. False by default. */
bool AUTO_INCREMENT_RETQUIRES_PK : 1;
bool AUTO_INCREMENT_REQUIRES_PK : 1;

/*! Name of a field (or built-in function) with autoincremented unique value,
typically returned by Connection::drv_lastInsertRowID().
@@ -114,7 +114,7 @@ class KEXI_DB_EXPORT DriverBehaviour
/*! Quotation marks used for escaping identifier (see Driver::escapeIdentifier()).
Default value is '"'. Change it for your driver.
*/
TQChar TQUOTATION_MARKS_FOR_IDENTIFIER;
TQChar QUOTATION_MARKS_FOR_IDENTIFIER;
/*! True if using database is requied to perform real connection.
This is true for may engines, e.g. for PostgreSQL, where connections
@@ -122,16 +122,16 @@ class KEXI_DB_EXPORT DriverBehaviour
This flag is unused for file-based db drivers,
by default set to true and used for all other db drivers.
*/
bool USING_DATABASE_RETQUIRED_TO_CONNECT : 1;
bool USING_DATABASE_REQUIRED_TO_CONNECT : 1;

/*! True if before we know whether the fetched result of executed query
is empty or not, we need to fetch first record. Particularly, it's true for SQLite.
The flag is used in Cursor::open(). By default this flag is false. */
bool _1ST_ROW_READ_AHEAD_RETQUIRED_TO_KNOW_IF_THE_RESULT_IS_EMPTY : 1;
bool _1ST_ROW_READ_AHEAD_REQUIRED_TO_KNOW_IF_THE_RESULT_IS_EMPTY : 1;

/*! True if "SELECT 1 from (subquery)" is supported. False by default.
Used in Connection::resultExists() for optimization. It's set to true for SQLite driver. */
bool SELECT_1_SUBTQUERY_SUPPORTED : 1;
bool SELECT_1_SUBQUERY_SUPPORTED : 1;

/*! Keywords that need to be escaped for the driver. Set this before calling
Driver::initSQLKeywords. */


+ 3
- 3
kexi/kexidb/drivers/mySQL/mysqldriver.cpp View File

@@ -63,9 +63,9 @@ MySqlDriver::MySqlDriver(TQObject *parent, const char *name, const TQStringList

beh->ROW_ID_FIELD_NAME="LAST_INSERT_ID()";
beh->ROW_ID_FIELD_RETURNS_LAST_AUTOINCREMENTED_VALUE=true;
beh->_1ST_ROW_READ_AHEAD_RETQUIRED_TO_KNOW_IF_THE_RESULT_IS_EMPTY=false;
beh->USING_DATABASE_RETQUIRED_TO_CONNECT=false;
beh->TQUOTATION_MARKS_FOR_IDENTIFIER='`';
beh->_1ST_ROW_READ_AHEAD_REQUIRED_TO_KNOW_IF_THE_RESULT_IS_EMPTY=false;
beh->USING_DATABASE_REQUIRED_TO_CONNECT=false;
beh->QUOTATION_MARKS_FOR_IDENTIFIER='`';
beh->SQL_KEYWORDS = keywords;
initSQLKeywords(331);


+ 2
- 2
kexi/kexidb/drivers/mySQL/mysqlkeywords.cpp View File

@@ -177,7 +177,7 @@ namespace KexiDB {
"MASTER_SSL_KEY",
"MASTER_USER",
"MAX_CONNECTIONS_PER_HOUR",
"MAX_TQUERIES_PER_HOUR",
"MAX_QUERIES_PER_HOUR",
"MAX_ROWS",
"MAX_UPDATES_PER_HOUR",
"MEDIUM",
@@ -246,7 +246,7 @@ namespace KexiDB {
"REPAIR",
"REPEATABLE",
"REPLICATION",
"RETQUIRE",
"REQUIRE",
"RESET",
"RESTORE",
"RETURNS",


+ 2
- 2
kexi/kexidb/drivers/pqxx/pqxxconnection.h View File

@@ -17,8 +17,8 @@
* Boston, MA 02110-1301, USA.
*/

#ifndef PTQXXCONNECTION_H
#define PTQXXCONNECTION_H
#ifndef PQXXCONNECTION_H
#define PQXXCONNECTION_H

#include <tqstringlist.h>



+ 2
- 2
kexi/kexidb/drivers/pqxx/pqxxconnection_p.h View File

@@ -27,8 +27,8 @@
// Copyright: See COPYING file that comes with this distribution
//
//
#ifndef PTQXXSQLCONNECTIONINTERNAL_H
#define PTQXXSQLCONNECTIONINTERNAL_H
#ifndef PQXXSQLCONNECTIONINTERNAL_H
#define PQXXSQLCONNECTIONINTERNAL_H

#include <kexidb/connection_p.h>
#include <pqxx/pqxx>


+ 2
- 2
kexi/kexidb/drivers/pqxx/pqxxcursor.cpp View File

@@ -44,7 +44,7 @@ static TQByteArray pgsqlByteaToByteArray(const pqxx::result::field& r)
pqxxSqlCursor::pqxxSqlCursor(KexiDB::Connection* conn, const TQString& statement, uint options):
Cursor(conn,statement, options)
{
// KexiDBDrvDbg << "PTQXXSQLCURSOR: constructor for query statement" << endl;
// KexiDBDrvDbg << "PQXXSQLCURSOR: constructor for query statement" << endl;
my_conn = static_cast<pqxxSqlConnection*>(conn)->d->pqxxsql;
m_options = Buffered;
m_res = 0;
@@ -57,7 +57,7 @@ pqxxSqlCursor::pqxxSqlCursor(KexiDB::Connection* conn, const TQString& statement
pqxxSqlCursor::pqxxSqlCursor(Connection* conn, QuerySchema& query, uint options )
: Cursor( conn, query, options )
{
// KexiDBDrvDbg << "PTQXXSQLCURSOR: constructor for query schema" << endl;
// KexiDBDrvDbg << "PQXXSQLCURSOR: constructor for query schema" << endl;
my_conn = static_cast<pqxxSqlConnection*>(conn)->d->pqxxsql;
m_options = Buffered;
m_res = 0;


+ 2
- 2
kexi/kexidb/drivers/pqxx/pqxxcursor.h View File

@@ -17,8 +17,8 @@
* Boston, MA 02110-1301, USA.
*/

#ifndef KEXIDB_CURSOR_PTQXX_H
#define KEXIDB_CURSOR_PTQXX_H
#ifndef KEXIDB_CURSOR_PQXX_H
#define KEXIDB_CURSOR_PQXX_H

#include <kexidb/cursor.h>
#include <kexidb/connection.h>


+ 1
- 1
kexi/kexidb/drivers/pqxx/pqxxdriver.cpp View File

@@ -47,7 +47,7 @@ pqxxSqlDriver::pqxxSqlDriver( TQObject *parent, const char *name, const TQString
beh->AUTO_INCREMENT_FIELD_OPTION = "";
beh->AUTO_INCREMENT_PK_FIELD_OPTION = "PRIMARY KEY";
beh->ALWAYS_AVAILABLE_DATABASE_NAME = "template1";
beh->TQUOTATION_MARKS_FOR_IDENTIFIER = '"';
beh->QUOTATION_MARKS_FOR_IDENTIFIER = '"';
beh->SQL_KEYWORDS = keywords;
initSQLKeywords(233);



+ 2
- 2
kexi/kexidb/drivers/pqxx/pqxxdriver.h View File

@@ -17,8 +17,8 @@
* Boston, MA 02110-1301, USA.
*/

#ifndef KEXIDB_DRIVER_PTQXX_H
#define KEXIDB_DRIVER_PTQXX_H
#ifndef KEXIDB_DRIVER_PQXX_H
#define KEXIDB_DRIVER_PQXX_H

#include <tqstringlist.h>



+ 2
- 2
kexi/kexidb/drivers/pqxx/pqxxpreparedstatement.h View File

@@ -22,8 +22,8 @@
// Description:
//
//
#ifndef PTQXXPREPAREDSTATEMENT_H
#define PTQXXPREPAREDSTATEMENT_H
#ifndef PQXXPREPAREDSTATEMENT_H
#define PQXXPREPAREDSTATEMENT_H
#include <kexidb/preparedstatement.h>
#include <kexidb/connection_p.h>



+ 4
- 4
kexi/kexidb/drivers/sqlite/sqlitedriver.cpp View File

@@ -66,11 +66,11 @@ SQLiteDriver::SQLiteDriver( TQObject *parent, const char *name, const TQStringLi
beh->AUTO_INCREMENT_FIELD_OPTION = ""; //not available
beh->AUTO_INCREMENT_TYPE = "INTEGER";
beh->AUTO_INCREMENT_PK_FIELD_OPTION = "PRIMARY KEY";
beh->AUTO_INCREMENT_RETQUIRES_PK = true;
beh->AUTO_INCREMENT_REQUIRES_PK = true;
beh->ROW_ID_FIELD_NAME = "OID";
beh->_1ST_ROW_READ_AHEAD_RETQUIRED_TO_KNOW_IF_THE_RESULT_IS_EMPTY=true;
beh->TQUOTATION_MARKS_FOR_IDENTIFIER='"';
beh->SELECT_1_SUBTQUERY_SUPPORTED = true;
beh->_1ST_ROW_READ_AHEAD_REQUIRED_TO_KNOW_IF_THE_RESULT_IS_EMPTY=true;
beh->QUOTATION_MARKS_FOR_IDENTIFIER='"';
beh->SELECT_1_SUBQUERY_SUPPORTED = true;
beh->SQL_KEYWORDS = keywords;
initSQLKeywords(29);



+ 1
- 1
kexi/kexidb/expression.cpp View File

@@ -564,7 +564,7 @@ bool ConstExpr::validate(ParseInfo& parseInfo)

//=========================================
QueryParameterExpr::QueryParameterExpr(const TQString& message)
: ConstExpr( TQUERY_PARAMETER, message )
: ConstExpr( QUERY_PARAMETER, message )
, m_type(Field::Text)
{
m_cl = KexiDBExpr_QueryParameter;


+ 1
- 1
kexi/kexidb/field.cpp View File

@@ -598,7 +598,7 @@ TQString Field::debugString() const
if (m_constraints & Field::AutoInc)
dbg += " AUTOINC";
if (m_constraints & Field::Unique)
dbg += " UNITQUE";
dbg += " UNIQUE";
if (m_constraints & Field::PrimaryKey)
dbg += " PKEY";
if (m_constraints & Field::ForeignKey)


+ 1
- 1
kexi/kexidb/indexschema.cpp View File

@@ -157,7 +157,7 @@ TQString IndexSchema::debugString()
+ (m_isForeignKey ? "FOREIGN KEY " : "")
+ (m_isAutoGenerated ? "AUTOGENERATED " : "")
+ (m_primary ? "PRIMARY " : "")
+ ((!m_primary) && m_unique ? "UNITQUE " : "")
+ ((!m_primary) && m_unique ? "UNIQUE " : "")
+ FieldList::debugString();
}



+ 5
- 5
kexi/kexidb/indexschema.h View File

@@ -118,7 +118,7 @@ class KEXI_DB_EXPORT IndexSchema : public FieldList, public SchemaData
Auto-generated index is one-field index
that was automatically generated
for CREATE TABLE statement when the field has
UNITQUE or PRIMARY KEY constraint enabled.
UNIQUE or PRIMARY KEY constraint enabled.
Any newly created IndexSchema object
has this flag set to false.
@@ -137,16 +137,16 @@ class KEXI_DB_EXPORT IndexSchema : public FieldList, public SchemaData
/*! Sets PRIMARY KEY flag. \sa isPrimary().
Note: Setting PRIMARY KEY on (true),
UNITQUE flag will be also implicity set. */
UNIQUE flag will be also implicity set. */
void setPrimaryKey(bool set);

/*! \return true if this is unique index.
This can be one or multifield. */
bool isUnique() const;
/*! Sets UNITQUE flag. \sa isUnique().
Note: Setting UNITQUE off (false), PRIMARY KEY flag will
be also implicity set off, because this UNITQUE
/*! Sets UNIQUE flag. \sa isUnique().
Note: Setting UNIQUE off (false), PRIMARY KEY flag will
be also implicity set off, because this UNIQUE
is the requirement for PRIMARY KEYS. */
void setUnique(bool set);



+ 1
- 1
kexi/kexidb/keywords.cpp View File

@@ -82,7 +82,7 @@ namespace KexiDB {
"THEN",
"TRANSACTION",
"UNION",
"UNITQUE",
"UNIQUE",
"UPDATE",
"USING",
"VALUES",


+ 1
- 1
kexi/kexidb/lookupfieldschema.cpp View File

@@ -169,7 +169,7 @@ LookupFieldSchema *LookupFieldSchema::loadFromDom(const TQDomElement& lookupEl)
| <type>table|query|sql|valuelist|fieldlist</type> #required because there can be table and query with the same name
"fieldlist" (basically a list of column names of a table/query,
"Field List" as in MSA)
<name>string</name> #table/query name, etc. or KEXISQL SELECT TQUERY
<name>string</name> #table/query name, etc. or KEXISQL SELECT QUERY
<values><value>...</value> #for "valuelist" type
<value>...</value>
</values>


+ 18
- 18
kexi/kexidb/parser/sqlparser.cpp View File

@@ -174,12 +174,12 @@
DISTINCT = 363,
DOMAIN_TOKEN = 364,
SQL_DOUBLE = 365,
DOUBLE_TQUOTED_STRING = 366,
DOUBLE_QUOTED_STRING = 366,
DROP = 367,
ELSE = 368,
END = 369,
END_EXEC = 370,
ETQUAL = 371,
EQUAL = 371,
ESCAPE = 372,
EXCEPT = 373,
SQL_EXCEPTION = 374,
@@ -296,7 +296,7 @@
PARTIAL = 485,
SQL_PASCAL = 486,
PERSISTENT = 487,
CTQL_PI = 488,
CQL_PI = 488,
PLI = 489,
POSITION = 490,
PRECISION = 491,
@@ -308,8 +308,8 @@
PROCEDURE = 497,
PRODUCT = 498,
PUBLIC = 499,
TQUARTER = 500,
TQUIT = 501,
QUARTER = 500,
QUIT = 501,
RAND = 502,
READ_ONLY = 503,
REAL = 504,
@@ -381,7 +381,7 @@
TWO_DIGITS = 570,
UCASE = 571,
UNION = 572,
UNITQUE = 573,
UNIQUE = 573,
SQL_UNKNOWN = 574,
UPDATE = 575,
UPPER = 576,
@@ -389,7 +389,7 @@
USER = 578,
IDENTIFIER = 579,
IDENTIFIER_DOT_ASTERISK = 580,
TQUERY_PARAMETER = 581,
QUERY_PARAMETER = 581,
USING = 582,
VALUE = 583,
VALUES = 584,
@@ -524,12 +524,12 @@
#define DISTINCT 363
#define DOMAIN_TOKEN 364
#define SQL_DOUBLE 365
#define DOUBLE_TQUOTED_STRING 366
#define DOUBLE_QUOTED_STRING 366
#define DROP 367
#define ELSE 368
#define END 369
#define END_EXEC 370
#define ETQUAL 371
#define EQUAL 371
#define ESCAPE 372
#define EXCEPT 373
#define SQL_EXCEPTION 374
@@ -646,7 +646,7 @@
#define PARTIAL 485
#define SQL_PASCAL 486
#define PERSISTENT 487
#define CTQL_PI 488
#define CQL_PI 488
#define PLI 489
#define POSITION 490
#define PRECISION 491
@@ -658,8 +658,8 @@
#define PROCEDURE 497
#define PRODUCT 498
#define PUBLIC 499
#define TQUARTER 500
#define TQUIT 501
#define QUARTER 500
#define QUIT 501
#define RAND 502
#define READ_ONLY 503
#define REAL 504
@@ -731,7 +731,7 @@
#define TWO_DIGITS 570
#define UCASE 571
#define UNION 572
#define UNITQUE 573
#define UNIQUE 573
#define SQL_UNKNOWN 574
#define UPDATE 575
#define UPPER 576
@@ -739,7 +739,7 @@
#define USER 578
#define IDENTIFIER 579
#define IDENTIFIER_DOT_ASTERISK 580
#define TQUERY_PARAMETER 581
#define QUERY_PARAMETER 581
#define USING 582
#define VALUE 583
#define VALUES 584
@@ -1290,8 +1290,8 @@ static const char *const yytname[] =
"DEC", "DECLARE", "DEFAULT", "DEFERRABLE", "DEFERRED", "SQL_DELETE",
"DESC", "DESCRIBE", "DESCRIPTOR", "DIAGNOSTICS", "DICTIONARY",
"DIRECTORY", "DISCONNECT", "DISPLACEMENT", "DISTINCT", "DOMAIN_TOKEN",
"SQL_DOUBLE", "DOUBLE_TQUOTED_STRING", "DROP", "ELSE", "END", "END_EXEC",
"ETQUAL", "ESCAPE", "EXCEPT", "SQL_EXCEPTION", "EXEC", "EXECUTE",
"SQL_DOUBLE", "DOUBLE_QUOTED_STRING", "DROP", "ELSE", "END", "END_EXEC",
"EQUAL", "ESCAPE", "EXCEPT", "SQL_EXCEPTION", "EXEC", "EXECUTE",
"EXISTS", "EXP", "EXPONENT", "EXTERNAL", "EXTRACT", "SQL_FALSE", "FETCH",
"FIRST", "SQL_FLOAT", "FLOOR", "FN", "FOR", "FOREIGN", "FORTRAN",
"FOUND", "FOUR_DIGITS", "FROM", "FULL", "GET", "GLOBAL", "GO", "GOTO",
@@ -1308,7 +1308,7 @@ static const char *const yytname[] =
"NOW", "SQL_NULL", "SQL_IS", "SQL_IS_NULL", "SQL_IS_NOT_NULL", "NULLIF",
"NUMERIC", "OCTET_LENGTH", "ODBC", "OF", "SQL_OFF", "SQL_ON", "ONLY",
"OPEN", "OPTION", "OR", "ORDER", "OUTER", "OUTPUT", "OVERLAPS", "PAGE",
"PARTIAL", "SQL_PASCAL", "PERSISTENT", "CTQL_PI", "PLI", "POSITION",