System.Data.SQLite
Check-in [d0b0a52b9a]
Not logged in

Many hyperlinks are disabled.
Use anonymous login to enable hyperlinks.

Overview
Comment:Add tests for ticket [baf42ee135] and get them passing.
Downloads: Tarball | ZIP archive | SQL archive
Timelines: family | ancestors | descendants | both | tkt-baf42ee135
Files: files | file ages | folders
SHA1: d0b0a52b9a742aabcc59f94f65545777fbd64b3a
User & Date: mistachkin 2018-03-08 16:09:49
Context
2018-03-08
16:23
Some further related cleanup in the GetSchemaTable method. Closed-Leaf check-in: 36be86807a user: mistachkin tags: tkt-baf42ee135
16:09
Add tests for ticket [baf42ee135] and get them passing. check-in: d0b0a52b9a user: mistachkin tags: tkt-baf42ee135
14:14
Improve handling of base catalog/table name in GetSchemaTable, pursuant to [baf42ee135]. check-in: 9f02226408 user: mistachkin tags: tkt-baf42ee135
Changes
Hide Diffs Side-by-Side Diffs Ignore Whitespace Patch

Changes to Setup/data/verify.lst.

   895    895     Tests/tkt-a799e3978f.eagle
   896    896     Tests/tkt-a7d04fb111.eagle
   897    897     Tests/tkt-aba4549801.eagle
   898    898     Tests/tkt-ac47dd230a.eagle
   899    899     Tests/tkt-ae5267b863.eagle
   900    900     Tests/tkt-b167206ad3.eagle
   901    901     Tests/tkt-b4a7ddc83f.eagle
          902  +  Tests/tkt-baf42ee135.eagle
   902    903     Tests/tkt-bb4b04d457.eagle
   903    904     Tests/tkt-c010fa6584.eagle
   904    905     Tests/tkt-c28d7fe915.eagle
   905    906     Tests/tkt-ccfa69fc32.eagle
   906    907     Tests/tkt-d4728aecb7.eagle
   907    908     Tests/tkt-da685c0bac.eagle
   908    909     Tests/tkt-da9f18d039.eagle

Changes to System.Data.SQLite/SQLiteDataReader.cs.

  1481   1481           temp = columnToParent[n].DatabaseName;
  1482   1482           if (String.IsNullOrEmpty(temp) == false) row[SchemaTableOptionalColumn.BaseCatalogName] = temp;
  1483   1483   
  1484   1484           string dataType = null;
  1485   1485           // If we have a table-bound column, extract the extra information from it
  1486   1486           if (String.IsNullOrEmpty(strColumn) == false)
  1487   1487           {
  1488         -          string baseCatalogName = null;
         1488  +          string baseCatalogName = String.Empty;
  1489   1489   
  1490   1490             if (row[SchemaTableOptionalColumn.BaseCatalogName] != DBNull.Value)
  1491   1491                 baseCatalogName = (string)row[SchemaTableOptionalColumn.BaseCatalogName];
  1492   1492   
  1493         -          string baseTableName = null;
         1493  +          string baseTableName = String.Empty;
  1494   1494   
  1495   1495             if (row[SchemaTableColumn.BaseTableName] != DBNull.Value)
  1496   1496                 baseTableName = (string)row[SchemaTableColumn.BaseTableName];
  1497   1497   
  1498   1498             string collSeq = null;
  1499   1499             bool bNotNull = false;
  1500   1500             bool bPrimaryKey = false;

Added Tests/tkt-baf42ee135.eagle.

            1  +###############################################################################
            2  +#
            3  +# tkt-baf42ee135.eagle --
            4  +#
            5  +# Written by Joe Mistachkin.
            6  +# Released to the public domain, use at your own risk!
            7  +#
            8  +###############################################################################
            9  +
           10  +package require Eagle
           11  +package require Eagle.Library
           12  +package require Eagle.Test
           13  +
           14  +runTestPrologue
           15  +
           16  +###############################################################################
           17  +
           18  +package require System.Data.SQLite.Test
           19  +runSQLiteTestPrologue
           20  +
           21  +###############################################################################
           22  +
           23  +runTest {test tkt-baf42ee135-1.1 {base catalog/table name not set} -setup {
           24  +  setupDb [set fileName tkt-baf42ee135-1.1.db]
           25  +} -body {
           26  +  sql execute $db {
           27  +    CREATE TABLE ""(x);
           28  +  }
           29  +
           30  +  set dataReader [sql execute -execute reader -format datareader \
           31  +      -alias $db "SELECT x FROM \"\";"]
           32  +
           33  +  set dataTable [$dataReader -alias GetSchemaTable]
           34  +
           35  +  getRowsFromDataTable $dataTable
           36  +} -cleanup {
           37  +  unset -nocomplain dataTable dataReader
           38  +
           39  +  cleanupDb $fileName
           40  +
           41  +  unset -nocomplain db fileName
           42  +} -constraints {eagle command.object monoBug28 command.sql compile.DATA SQLite\
           43  +System.Data.SQLite} -result {{{ColumnName x} {ColumnOrdinal 0} {ColumnSize\
           44  +2147483647} NumericPrecision NumericScale {IsUnique False} {IsKey False}\
           45  +BaseServerName {BaseCatalogName main} {BaseColumnName x} {BaseSchemaName\
           46  +sqlite_default_schema} BaseTableName {DataType System.Object} {AllowDBNull\
           47  +True} {ProviderType 13} {IsAliased False} {IsExpression False} {IsAutoIncrement\
           48  +False} {IsRowVersion False} {IsHidden False} {IsLong False} {IsReadOnly False}\
           49  +ProviderSpecificDataType DefaultValue DataTypeName {CollationType BINARY}}}}
           50  +
           51  +###############################################################################
           52  +
           53  +runSQLiteTestEpilogue
           54  +runTestEpilogue