System.Data.SQLite
Check-in [80d9c54709]
Not logged in

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

Overview
Comment:Changes to support the 'vtab-onepass' functionality in the SQLite core library.
Downloads: Tarball | ZIP archive | SQL archive
Timelines: family | ancestors | descendants | both | trunk
Files: files | file ages | folders
SHA1:80d9c547093990ec7cee8577af82494e8b52c767
User & Date: mistachkin 2015-09-29 16:58:09
Original Comment: Changes to suppor the 'vtab-onepass' functionality in the SQLite core library.
Context
2015-09-30
18:48
Update SQLite core library to the latest trunk code. check-in: a67fce442b user: mistachkin tags: trunk
2015-09-29
16:58
Changes to support the 'vtab-onepass' functionality in the SQLite core library. check-in: 80d9c54709 user: mistachkin tags: trunk
05:10
Update Eagle in externals to the beta 34 release. check-in: 70020f6f06 user: mistachkin tags: trunk
2015-09-28
20:19
Managed only changes to support the SQLite core library 'vtab-onepass' branch. Closed-Leaf check-in: 0f9de2621e user: mistachkin tags: vtab-onepass
Changes
Hide Diffs Unified Diffs Ignore Whitespace Patch

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

671
672
673
674
675
676
677























678
679
680
681
682
683
684
....
1013
1014
1015
1016
1017
1018
1019


















1020
1021
1022
1023
1024
1025
1026
....
1103
1104
1105
1106
1107
1108
1109












1110
1111
1112
1113
1114
1115
1116
....
1332
1333
1334
1335
1336
1337
1338







1339
1340
1341
1342
1343
1344
1345
....
7173
7174
7175
7176
7177
7178
7179















































7180
7181
7182
7183
7184
7185
7186
        /// </summary>
        Match = 64
    }
    #endregion

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
























    #region SQLiteIndexConstraint Helper Class
    /// <summary>
    /// This class represents the native sqlite3_index_constraint structure
    /// from the SQLite core library.
    /// </summary>
    public sealed class SQLiteIndexConstraint
    {
................................................................................
                return true;

            return false;
        }

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



















        #region Public Properties
        private SQLiteIndexConstraintUsage[] constraintUsages;
        /// <summary>
        /// An array of <see cref="SQLiteIndexConstraintUsage" /> object
        /// instances, each containing information to be supplied to the SQLite
        /// core library.
        /// </summary>
................................................................................
        /// indicates that a default estimated rows value should be used.
        /// </summary>
        public long? EstimatedRows
        {
            get { return estimatedRows; }
            set { estimatedRows = value; }
        }












        #endregion
    }
    #endregion

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

    #region SQLiteIndex Helper Class
................................................................................

            if (index.Outputs.CanUseEstimatedRows() &&
                index.Outputs.EstimatedRows.HasValue)
            {
                SQLiteMarshal.WriteInt64(pIndex, offset,
                    index.Outputs.EstimatedRows.GetValueOrDefault());
            }







        }
        #endregion

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

        #region Public Properties
        private SQLiteIndexInputs inputs;
................................................................................
        /// </returns>
        protected virtual bool SetEstimatedRows(
            SQLiteIndex index
            )
        {
            return SetEstimatedRows(index, null);
        }















































        #endregion
        #endregion

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

        #region Public Properties
        /// <summary>







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







 







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







 







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







 







>
>
>
>
>
>
>







 







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







671
672
673
674
675
676
677
678
679
680
681
682
683
684
685
686
687
688
689
690
691
692
693
694
695
696
697
698
699
700
701
702
703
704
705
706
707
....
1036
1037
1038
1039
1040
1041
1042
1043
1044
1045
1046
1047
1048
1049
1050
1051
1052
1053
1054
1055
1056
1057
1058
1059
1060
1061
1062
1063
1064
1065
1066
1067
....
1144
1145
1146
1147
1148
1149
1150
1151
1152
1153
1154
1155
1156
1157
1158
1159
1160
1161
1162
1163
1164
1165
1166
1167
1168
1169
....
1385
1386
1387
1388
1389
1390
1391
1392
1393
1394
1395
1396
1397
1398
1399
1400
1401
1402
1403
1404
1405
....
7233
7234
7235
7236
7237
7238
7239
7240
7241
7242
7243
7244
7245
7246
7247
7248
7249
7250
7251
7252
7253
7254
7255
7256
7257
7258
7259
7260
7261
7262
7263
7264
7265
7266
7267
7268
7269
7270
7271
7272
7273
7274
7275
7276
7277
7278
7279
7280
7281
7282
7283
7284
7285
7286
7287
7288
7289
7290
7291
7292
7293
        /// </summary>
        Match = 64
    }
    #endregion

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

    #region SQLiteIndexFlags Enumeration
    /// <summary>
    /// These are the allowed values for the index flags from the
    /// <see cref="ISQLiteManagedModule.BestIndex" /> method.
    /// </summary>
    [Flags()]
    public enum SQLiteIndexFlags
    {
        /// <summary>
        /// No special handling.  This is the default.
        /// </summary>
        None = 0x0,

        /// <summary>
        /// This value indicates that the scan of the index will visit at
        /// most one row.
        /// </summary>
        ScanUnique = 0x1
    }
    #endregion

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

    #region SQLiteIndexConstraint Helper Class
    /// <summary>
    /// This class represents the native sqlite3_index_constraint structure
    /// from the SQLite core library.
    /// </summary>
    public sealed class SQLiteIndexConstraint
    {
................................................................................
                return true;

            return false;
        }

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

        /// <summary>
        /// Determines if the native flags field can be used, based on the
        /// available version of the SQLite core library.
        /// </summary>
        /// <returns>
        /// Non-zero if the <see cref="Flags" /> property is supported by the
        /// SQLite core library.
        /// </returns>
        public bool CanUseFlags()
        {
            if (UnsafeNativeMethods.sqlite3_libversion_number() >= 3008012)
                return true;

            return false;
        }

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

        #region Public Properties
        private SQLiteIndexConstraintUsage[] constraintUsages;
        /// <summary>
        /// An array of <see cref="SQLiteIndexConstraintUsage" /> object
        /// instances, each containing information to be supplied to the SQLite
        /// core library.
        /// </summary>
................................................................................
        /// indicates that a default estimated rows value should be used.
        /// </summary>
        public long? EstimatedRows
        {
            get { return estimatedRows; }
            set { estimatedRows = value; }
        }

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

        private SQLiteIndexFlags? idxFlags;
        /// <summary>
        /// The flags that should be used with this index.
        /// </summary>
        public SQLiteIndexFlags? IdxFlags
        {
            get { return idxFlags; }
            set { idxFlags = value; }
        }
        #endregion
    }
    #endregion

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

    #region SQLiteIndex Helper Class
................................................................................

            if (index.Outputs.CanUseEstimatedRows() &&
                index.Outputs.EstimatedRows.HasValue)
            {
                SQLiteMarshal.WriteInt64(pIndex, offset,
                    index.Outputs.EstimatedRows.GetValueOrDefault());
            }

            if (index.Outputs.CanUseFlags() &&
                index.Outputs.IdxFlags.HasValue)
            {
                SQLiteMarshal.WriteInt32(pIndex, offset,
                   (int)index.Outputs.IdxFlags.GetValueOrDefault());
            }
        }
        #endregion

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

        #region Public Properties
        private SQLiteIndexInputs inputs;
................................................................................
        /// </returns>
        protected virtual bool SetEstimatedRows(
            SQLiteIndex index
            )
        {
            return SetEstimatedRows(index, null);
        }

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

        /// <summary>
        /// Modifies the specified <see cref="SQLiteIndex" /> object instance
        /// to contain the specified flags.
        /// </summary>
        /// <param name="index">
        /// The <see cref="SQLiteIndex" /> object instance to modify.
        /// </param>
        /// <param name="idxFlags">
        /// The index flags value to use.  Using a null value means that the
        /// default value provided by the SQLite core library should be used.
        /// </param>
        /// <returns>
        /// Non-zero upon success.
        /// </returns>
        protected virtual bool SetIdxFlags(
            SQLiteIndex index,
            SQLiteIndexFlags? idxFlags
            )
        {
            if ((index == null) || (index.Outputs == null))
                return false;

            index.Outputs.IdxFlags = idxFlags;
            return true;
        }

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

        /// <summary>
        /// Modifies the specified <see cref="SQLiteIndex" /> object instance
        /// to contain the default index flags.
        /// </summary>
        /// <param name="index">
        /// The <see cref="SQLiteIndex" /> object instance to modify.
        /// </param>
        /// <returns>
        /// Non-zero upon success.
        /// </returns>
        protected virtual bool SetIdxFlags(
            SQLiteIndex index
            )
        {
            return SetIdxFlags(index, null);
        }
        #endregion
        #endregion

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

        #region Public Properties
        /// <summary>