System.Data.SQLite
Check-in [4ebae8bc82]
Not logged in

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

Overview
Comment:Fix-up spacing on section separators.
Downloads: Tarball | ZIP archive | SQL archive
Timelines: family | ancestors | tkt-e235a52c82
Files: files | file ages | folders
SHA1: 4ebae8bc8233dac2ffaf9060738e1cbcdb94ff95
User & Date: mistachkin 2013-01-29 06:35:36
Context
2013-01-29
06:35
Fix-up spacing on section separators. Closed-Leaf check-in: 4ebae8bc82 user: mistachkin tags: tkt-e235a52c82
05:33
Enhance test case for ticket [e235a52c82] to demonstrate the effects that different default isolation levels have on created transactions. check-in: a354a124a5 user: mistachkin tags: tkt-e235a52c82
Changes
Hide Diffs Side-by-Side Diffs Ignore Whitespace Patch

Changes to Tests/tkt-e235a52c82.eagle.

    54     54         {
    55     55           public sealed class Query${id}
    56     56           {
    57     57             private IDbConnection connection;
    58     58             private IDbTransaction transaction;
    59     59             private bool opened;
    60     60   
    61         -          ///////////////////////////////////////////////////////////////////////
           61  +          /////////////////////////////////////////////////////////////////////
    62     62   
    63     63             private void EnsureConnection()
    64     64             {
    65     65               if (connection == null)
    66     66               {
    67     67                 connection = new SQLiteConnection("Data Source=${dataSource};" +
    68     68                     "Default IsolationLevel=${isolationLevel};");
................................................................................
    74     74                 opened = true;
    75     75               }
    76     76   
    77     77               if (transaction == null)
    78     78                 transaction = connection.BeginTransaction();
    79     79             }
    80     80   
    81         -          ///////////////////////////////////////////////////////////////////////
           81  +          /////////////////////////////////////////////////////////////////////
    82     82   
    83     83             private void ReleaseConnection()
    84     84             {
    85     85               if (connection == null)
    86     86                 throw new Exception("cannot release connection");
    87     87   
    88     88               if (opened)
    89     89               {
    90     90                 connection.Close();
    91     91                 opened = false;
    92     92               }
    93     93             }
    94     94   
    95         -          ///////////////////////////////////////////////////////////////////////
           95  +          /////////////////////////////////////////////////////////////////////
    96     96   
    97     97             private IDbCommand CreateCommand(
    98     98               string commandText
    99     99               )
   100    100             {
   101    101               if (connection == null)
   102    102                 throw new Exception("cannot create command");
................................................................................
   103    103   
   104    104               IDbCommand command = connection.CreateCommand();
   105    105               command.CommandText = commandText;
   106    106   
   107    107               return command;
   108    108             }
   109    109   
   110         -          ///////////////////////////////////////////////////////////////////////
          110  +          /////////////////////////////////////////////////////////////////////
   111    111   
   112    112             public object ExecuteReader(
   113    113               string commandText
   114    114               )
   115    115             {
   116    116               object result;
   117    117               EnsureConnection();
................................................................................
   123    123               }
   124    124               catch
   125    125               {
   126    126                 ReleaseConnection();
   127    127                 throw;
   128    128               }
   129    129   
   130         -            /////////////////////////////////////////////////////////////////////
          130  +            ///////////////////////////////////////////////////////////////////
   131    131   
   132    132               try
   133    133               {
   134    134                 result = reader.GetValue(0);
   135    135               }
   136    136               catch
   137    137               {
................................................................................
   140    140                 throw;
   141    141               }
   142    142   
   143    143               return result;
   144    144             }
   145    145           }
   146    146   
   147         -        /////////////////////////////////////////////////////////////////////////
          147  +        ///////////////////////////////////////////////////////////////////////
   148    148   
   149    149           public static class Test${id}
   150    150           {
   151    151             public static string\[\] GetData()
   152    152             {
   153    153               return new string\[\] {
   154    154                 new Query${id}().ExecuteReader("${sql}").ToString(),
   155    155                 new Query${id}().ExecuteReader("${sql}").ToString()
   156    156               };
   157    157             }
   158    158   
   159         -          ///////////////////////////////////////////////////////////////////////
          159  +          /////////////////////////////////////////////////////////////////////
   160    160   
   161    161             public static void Main()
   162    162             {
   163    163               // do nothing.
   164    164             }
   165    165           }
   166    166         }