System.Data.SQLite

Check-in [344585ae76]
Login

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

Overview
Comment:Merge updates from trunk.
Downloads: Tarball | ZIP archive
Timelines: family | ancestors | descendants | both | preRelease
Files: files | file ages | folders
SHA1: 344585ae7646d75d1333af2061e299282418c786
User & Date: mistachkin 2015-08-18 22:17:58.122
Context
2015-08-18
22:47
Rebuild the CHM file. check-in: e514a4a71d user: mistachkin tags: preRelease
22:17
Merge updates from trunk. check-in: 344585ae76 user: mistachkin tags: preRelease
22:13
Update the included FTS5 extension to the latest trunk code. check-in: 6458f27af1 user: mistachkin tags: trunk
19:24
Update the release date. check-in: f44cbd25de user: mistachkin tags: preRelease
Changes
Unified Diff Ignore Whitespace Patch
Changes to SQLite.Interop/src/ext/fts5.c.
4683
4684
4685
4686
4687
4688
4689
4690
4691
4692
4693
4694
4695
4696
4697
  const char **azConfig;          /* Array of arguments for Fts5Config */
  const char *zNearsetCmd = "nearset";
  int nConfig;                    /* Size of azConfig[] */
  Fts5Config *pConfig = 0;
  int iArg = 1;

  if( nArg<1 ){
    char *zErr = sqlite3_mprintf("wrong number of arguments to function %s",
        bTcl ? "fts5_expr_tcl" : "fts5_expr"
    );
    sqlite3_result_error(pCtx, zErr, -1);
    sqlite3_free(zErr);
    return;
  }








|







4683
4684
4685
4686
4687
4688
4689
4690
4691
4692
4693
4694
4695
4696
4697
  const char **azConfig;          /* Array of arguments for Fts5Config */
  const char *zNearsetCmd = "nearset";
  int nConfig;                    /* Size of azConfig[] */
  Fts5Config *pConfig = 0;
  int iArg = 1;

  if( nArg<1 ){
    zErr = sqlite3_mprintf("wrong number of arguments to function %s",
        bTcl ? "fts5_expr_tcl" : "fts5_expr"
    );
    sqlite3_result_error(pCtx, zErr, -1);
    sqlite3_free(zErr);
    return;
  }

13255
13256
13257
13258
13259
13260
13261
13262
13263
13264
13265
13266
13267
13268
13269
*/
static void fts5SourceIdFunc(
  sqlite3_context *pCtx,          /* Function call context */
  int nArg,                       /* Number of args */
  sqlite3_value **apVal           /* Function arguments */
){
  assert( nArg==0 );
  sqlite3_result_text(pCtx, "fts5: 2015-08-15 16:32:50 f65a9b4ab2c6f0b7028e16e2a0f83fd6d58ae1cd", -1, SQLITE_TRANSIENT);
}

#ifdef _WIN32
__declspec(dllexport)
#endif
int sqlite3_fts5_init(
  sqlite3 *db,







|







13255
13256
13257
13258
13259
13260
13261
13262
13263
13264
13265
13266
13267
13268
13269
*/
static void fts5SourceIdFunc(
  sqlite3_context *pCtx,          /* Function call context */
  int nArg,                       /* Number of args */
  sqlite3_value **apVal           /* Function arguments */
){
  assert( nArg==0 );
  sqlite3_result_text(pCtx, "fts5: 2015-08-18 19:09:28 8599402092537ab3df8926eb900661c12d738d4c", -1, SQLITE_TRANSIENT);
}

#ifdef _WIN32
__declspec(dllexport)
#endif
int sqlite3_fts5_init(
  sqlite3 *db,
Changes to System.Data.SQLite/SQLiteFunction.cs.
1188
1189
1190
1191
1192
1193
1194













1195
1196
1197
1198


1199
1200
1201
1202

1203
1204
1205
1206
1207
1208
1209
    string param0,
    string param1,
    string param2
  );

  /////////////////////////////////////////////////////////////////////////////














  /// <summary>
  /// This class implements a SQLite function using a <see cref="Delegate" />.
  /// All the virtual methods of the <see cref="SQLiteFunction" /> class are
  /// implemented using calls to the <see cref="Delegate.DynamicInvoke" />


  /// method.  The arguments are presented in the same order they appear in
  /// the associated <see cref="SQLiteFunction" /> methods with one exception:
  /// the first argument is the name of the virtual method being implemented.
  /// </summary>

  public class SQLiteDelegateFunction : SQLiteFunction
  {
      #region Private Constants
      /// <summary>
      /// This error message is used by the overridden virtual methods when
      /// a required <see cref="Delegate" /> property (e.g.
      /// <see cref="Callback1" /> or <see cref="Callback2" />) has not been







>
>
>
>
>
>
>
>
>
>
>
>
>



|
>
>
|



>







1188
1189
1190
1191
1192
1193
1194
1195
1196
1197
1198
1199
1200
1201
1202
1203
1204
1205
1206
1207
1208
1209
1210
1211
1212
1213
1214
1215
1216
1217
1218
1219
1220
1221
1222
1223
1224
1225
    string param0,
    string param1,
    string param2
  );

  /////////////////////////////////////////////////////////////////////////////

#if !PLATFORM_COMPACTFRAMEWORK
  /// <summary>
  /// This class implements a SQLite function using a <see cref="Delegate" />.
  /// All the virtual methods of the <see cref="SQLiteFunction" /> class are
  /// implemented using calls to the <see cref="SQLiteInvokeDelegate" />,
  /// <see cref="SQLiteStepDelegate" />, <see cref="SQLiteFinalDelegate" />,
  /// and <see cref="SQLiteCompareDelegate" /> strongly typed delegate types
  /// or via the <see cref="Delegate.DynamicInvoke" /> method.
  /// The arguments are presented in the same order they appear in
  /// the associated <see cref="SQLiteFunction" /> methods with one exception:
  /// the first argument is the name of the virtual method being implemented.
  /// </summary>
#else
  /// <summary>
  /// This class implements a SQLite function using a <see cref="Delegate" />.
  /// All the virtual methods of the <see cref="SQLiteFunction" /> class are
  /// implemented using calls to the <see cref="SQLiteInvokeDelegate" />,
  /// <see cref="SQLiteStepDelegate" />, <see cref="SQLiteFinalDelegate" />,
  /// and <see cref="SQLiteCompareDelegate" /> strongly typed delegate types.
  /// The arguments are presented in the same order they appear in
  /// the associated <see cref="SQLiteFunction" /> methods with one exception:
  /// the first argument is the name of the virtual method being implemented.
  /// </summary>
#endif
  public class SQLiteDelegateFunction : SQLiteFunction
  {
      #region Private Constants
      /// <summary>
      /// This error message is used by the overridden virtual methods when
      /// a required <see cref="Delegate" /> property (e.g.
      /// <see cref="Callback1" /> or <see cref="Callback2" />) has not been
1502
1503
1504
1505
1506
1507
1508

1509
1510



1511
1512
1513
1514
1515
1516
1517

          if (invokeDelegate != null)
          {
              return invokeDelegate.Invoke("Invoke", args); /* throw */
          }
          else
          {

              return callback1.DynamicInvoke(
                  GetInvokeArgs(args, false)); /* throw */



          }
      }

      /////////////////////////////////////////////////////////////////////////

      /// <summary>
      /// This virtual method is part of the implementation for aggregate







>


>
>
>







1518
1519
1520
1521
1522
1523
1524
1525
1526
1527
1528
1529
1530
1531
1532
1533
1534
1535
1536
1537

          if (invokeDelegate != null)
          {
              return invokeDelegate.Invoke("Invoke", args); /* throw */
          }
          else
          {
#if !PLATFORM_COMPACTFRAMEWORK
              return callback1.DynamicInvoke(
                  GetInvokeArgs(args, false)); /* throw */
#else
              throw new NotImplementedException();
#endif
          }
      }

      /////////////////////////////////////////////////////////////////////////

      /// <summary>
      /// This virtual method is part of the implementation for aggregate
1548
1549
1550
1551
1552
1553
1554

1555
1556
1557
1558
1559
1560
1561



1562
1563
1564
1565
1566
1567
1568
          if (stepDelegate != null)
          {
              stepDelegate.Invoke(
                  "Step", args, stepNumber, ref contextData); /* throw */
          }
          else
          {

              object[] newArgs = GetStepArgs(
                  args, stepNumber, contextData, false);

              /* IGNORED */
              callback1.DynamicInvoke(newArgs); /* throw */

              UpdateStepArgs(newArgs, ref contextData, false);



          }
      }

      /////////////////////////////////////////////////////////////////////////

      /// <summary>
      /// This virtual method is part of the implementation for aggregate







>







>
>
>







1568
1569
1570
1571
1572
1573
1574
1575
1576
1577
1578
1579
1580
1581
1582
1583
1584
1585
1586
1587
1588
1589
1590
1591
1592
          if (stepDelegate != null)
          {
              stepDelegate.Invoke(
                  "Step", args, stepNumber, ref contextData); /* throw */
          }
          else
          {
#if !PLATFORM_COMPACTFRAMEWORK
              object[] newArgs = GetStepArgs(
                  args, stepNumber, contextData, false);

              /* IGNORED */
              callback1.DynamicInvoke(newArgs); /* throw */

              UpdateStepArgs(newArgs, ref contextData, false);
#else
              throw new NotImplementedException();
#endif
          }
      }

      /////////////////////////////////////////////////////////////////////////

      /// <summary>
      /// This virtual method is part of the implementation for aggregate
1592
1593
1594
1595
1596
1597
1598

1599
1600



1601
1602
1603
1604
1605
1606
1607

          if (finalDelegate != null)
          {
              return finalDelegate.Invoke("Final", contextData); /* throw */
          }
          else
          {

              return callback1.DynamicInvoke(GetFinalArgs(
                  contextData, false)); /* throw */



          }
      }

      /////////////////////////////////////////////////////////////////////////

      /// <summary>
      /// This virtual method is part of the implementation for collating







>


>
>
>







1616
1617
1618
1619
1620
1621
1622
1623
1624
1625
1626
1627
1628
1629
1630
1631
1632
1633
1634
1635

          if (finalDelegate != null)
          {
              return finalDelegate.Invoke("Final", contextData); /* throw */
          }
          else
          {
#if !PLATFORM_COMPACTFRAMEWORK
              return callback1.DynamicInvoke(GetFinalArgs(
                  contextData, false)); /* throw */
#else
              throw new NotImplementedException();
#endif
          }
      }

      /////////////////////////////////////////////////////////////////////////

      /// <summary>
      /// This virtual method is part of the implementation for collating
1640
1641
1642
1643
1644
1645
1646

1647
1648
1649
1650
1651
1652
1653
1654
1655
1656



1657
1658
1659
1660
1661
1662
1663
          if (compareDelegate != null)
          {
              return compareDelegate.Invoke(
                  "Compare", param1, param2); /* throw */
          }
          else
          {

              object result = callback1.DynamicInvoke(GetCompareArgs(
                  param1, param2, false)); /* throw */

              if (result is int)
                  return (int)result;

              throw new InvalidOperationException(
                  UnsafeNativeMethods.StringFormat(
                  CultureInfo.CurrentCulture,
                  ResultInt32Error, "Compare"));



          }
      }
      #endregion
  }

  /////////////////////////////////////////////////////////////////////////////








>










>
>
>







1668
1669
1670
1671
1672
1673
1674
1675
1676
1677
1678
1679
1680
1681
1682
1683
1684
1685
1686
1687
1688
1689
1690
1691
1692
1693
1694
1695
          if (compareDelegate != null)
          {
              return compareDelegate.Invoke(
                  "Compare", param1, param2); /* throw */
          }
          else
          {
#if !PLATFORM_COMPACTFRAMEWORK
              object result = callback1.DynamicInvoke(GetCompareArgs(
                  param1, param2, false)); /* throw */

              if (result is int)
                  return (int)result;

              throw new InvalidOperationException(
                  UnsafeNativeMethods.StringFormat(
                  CultureInfo.CurrentCulture,
                  ResultInt32Error, "Compare"));
#else
              throw new NotImplementedException();
#endif
          }
      }
      #endregion
  }

  /////////////////////////////////////////////////////////////////////////////