亚洲欧美第一页_禁久久精品乱码_粉嫩av一区二区三区免费野_久草精品视频

? 歡迎來到蟲蟲下載站! | ?? 資源下載 ?? 資源專輯 ?? 關于我們
? 蟲蟲下載站

?? sqlitedatareader.cs

?? sqlite 3.3.8 支持加密的版本
?? CS
?? 第 1 頁 / 共 3 頁
字號:
?/********************************************************
 * ADO.NET 2.0 Data Provider for SQLite Version 3.X
 * Written by Robert Simpson (robert@blackcastlesoft.com)
 * 
 * Released to the public domain, use at your own risk!
 ********************************************************/

namespace System.Data.SQLite
{
  using System;
  using System.Data;
  using System.Data.Common;
  using System.Collections.Generic;
  using System.Globalization;
  using System.Reflection;

  /// <summary>
  /// SQLite implementation of DbDataReader.
  /// </summary>
  public sealed class SQLiteDataReader : DbDataReader
  {
    /// <summary>
    /// Underlying command this reader is attached to
    /// </summary>
    private SQLiteCommand   _command;
    /// <summary>
    /// Index of the current statement in the command being processed
    /// </summary>
    private int             _activeStatementIndex;
    /// <summary>
    /// Current statement being Read()
    /// </summary>
    private SQLiteStatement _activeStatement;
    /// <summary>
    /// State of the current statement being processed.
    /// -1 = First Step() executed, so the first Read() will be ignored
    ///  0 = Actively reading
    ///  1 = Finished reading
    ///  2 = Non-row-returning statement, no records
    /// </summary>
    private int             _readingState;
    /// <summary>
    /// Number of records affected by the insert/update statements executed on the command
    /// </summary>
    private int             _rowsAffected;
    /// <summary>
    /// Count of fields (columns) in the row-returning statement currently being processed
    /// </summary>
    private int             _fieldCount;
    /// <summary>
    /// Datatypes of active fields (columns) in the current statement, used for type-restricting data
    /// </summary>
    private SQLiteType[]    _fieldTypeArray;

    /// <summary>
    /// The behavior of the datareader
    /// </summary>
    private CommandBehavior _commandBehavior;

    /// <summary>
    /// If set, then dispose of the command object when the reader is finished
    /// </summary>
    internal bool           _disposeCommand;

    /// <summary>
    /// Internal constructor, initializes the datareader and sets up to begin executing statements
    /// </summary>
    /// <param name="cmd">The SQLiteCommand this data reader is for</param>
    /// <param name="behave">The expected behavior of the data reader</param>
    internal SQLiteDataReader(SQLiteCommand cmd, CommandBehavior behave)
    {
      _command = cmd;
      _commandBehavior = behave;
      _activeStatementIndex = -1;
      _activeStatement = null;
      _rowsAffected = -1;
      _fieldCount = -1;

      if (_command != null)
        NextResult();
    }

    /// <summary>
    /// Closes the datareader, potentially closing the connection as well if CommandBehavior.CloseConnection was specified.
    /// </summary>
    public override void Close()
    {
      if (_command != null)
      {
        while (NextResult())
        {
        }
        _command.ClearDataReader();

        if (_disposeCommand)
          ((IDisposable)_command).Dispose();
      }

      // If the datareader's behavior includes closing the connection, then do so here.
      if ((_commandBehavior & CommandBehavior.CloseConnection) != 0)
        _command.Connection.Close();

      _command = null;
      _activeStatement = null;
      _fieldTypeArray = null;
    }

    /// <summary>
    /// Disposes the datareader.  Calls Close() to ensure everything is cleaned up.
    /// </summary>
    protected override void Dispose(bool disposing)
    {
      base.Dispose(disposing);
      GC.SuppressFinalize(this);
    }

    /// <summary>
    /// Throw an error if the datareader is closed
    /// </summary>
    private void CheckClosed()
    {
      if (_command == null)
        throw new InvalidOperationException("DataReader has been closed");
    }

    /// <summary>
    /// Throw an error if a row is not loaded
    /// </summary>
    private void CheckValidRow()
    {
      if (_readingState != 0)
        throw new InvalidOperationException("No current row");
    }

    /// <summary>
    /// Enumerator support
    /// </summary>
    /// <returns>Returns a DbEnumerator object.</returns>
    public override Collections.IEnumerator GetEnumerator()
    {
      return new DbEnumerator(this);
    }

    /// <summary>
    /// Not implemented.  Returns 0
    /// </summary>
    public override int Depth
    {
      get
      {
        CheckClosed();
        return 0;
      }
    }

    /// <summary>
    /// Returns the number of columns in the current resultset
    /// </summary>
    public override int FieldCount
    {
      get
      {
        CheckClosed();
        return _fieldCount;
      }
    }

    /// <summary>
    /// SQLite is inherently un-typed.  All datatypes in SQLite are natively strings.  The definition of the columns of a table
    /// and the affinity of returned types are all we have to go on to type-restrict data in the reader.
    /// 
    /// This function attempts to verify that the type of data being requested of a column matches the datatype of the column.  In
    /// the case of columns that are not backed into a table definition, we attempt to match up the affinity of a column (int, double, string or blob)
    /// to a set of known types that closely match that affinity.  It's not an exact science, but its the best we can do.
    /// </summary>
    /// <returns>
    /// This function throws an InvalidTypeCast() exception if the requested type doesn't match the column's definition or affinity.
    /// </returns>
    /// <param name="i">The index of the column to type-check</param>
    /// <param name="typ">The type we want to get out of the column</param>
    private TypeAffinity VerifyType(int i, DbType typ)
    {
      CheckClosed();
      CheckValidRow();
      TypeAffinity affinity = _activeStatement._sql.ColumnAffinity(_activeStatement, i);

      switch (affinity)
      {
        case TypeAffinity.Int64:
          if (typ == DbType.Int16) return affinity;
          if (typ == DbType.Int32) return affinity;
          if (typ == DbType.Int64) return affinity;
          if (typ == DbType.Boolean) return affinity;
          if (typ == DbType.Byte) return affinity;
          if (typ == DbType.DateTime && _command.Connection._sql._datetimeFormat == SQLiteDateFormats.Ticks) return affinity;
          break;
        case TypeAffinity.Double:
          if (typ == DbType.Single) return affinity;
          if (typ == DbType.Double) return affinity;
          if (typ == DbType.Decimal) return affinity;
          break;
        case TypeAffinity.Text:
          if (typ == DbType.SByte) return affinity;
          if (typ == DbType.String) return affinity;
          if (typ == DbType.SByte) return affinity;
          if (typ == DbType.Guid) return affinity;
          if (typ == DbType.DateTime) return affinity;
          break;
        case TypeAffinity.Blob:
          if (typ == DbType.Guid) return affinity;
          if (typ == DbType.String) return affinity;
          if (typ == DbType.Binary) return affinity;
          break;
      }

      throw new InvalidCastException();
    }

    /// <summary>
    /// Retrieves the column as a boolean value
    /// </summary>
    /// <param name="i">The index of the column to retrieve</param>
    /// <returns>bool</returns>
    public override bool GetBoolean(int i)
    {
      VerifyType(i, DbType.Boolean);
      return Convert.ToBoolean(GetValue(i), CultureInfo.CurrentCulture);
    }

    /// <summary>
    /// Retrieves the column as a single byte value
    /// </summary>
    /// <param name="i">The index of the column to retrieve</param>
    /// <returns>byte</returns>
    public override byte GetByte(int i)
    {
      VerifyType(i, DbType.Byte);
      return Convert.ToByte(_activeStatement._sql.GetInt32(_activeStatement, i));
    }

    /// <summary>
    /// Retrieves a column as an array of bytes (blob)
    /// </summary>
    /// <param name="i">The index of the column to retrieve</param>
    /// <param name="fieldOffset">The zero-based index of where to begin reading the data</param>
    /// <param name="buffer">The buffer to write the bytes into</param>
    /// <param name="bufferoffset">The zero-based index of where to begin writing into the array</param>
    /// <param name="length">The number of bytes to retrieve</param>
    /// <returns>The actual number of bytes written into the array</returns>
    /// <remarks>
    /// To determine the number of bytes in the column, pass a null value for the buffer.  The total length will be returned.
    /// </remarks>
    public override long GetBytes(int i, long fieldOffset, byte[] buffer, int bufferoffset, int length)
    {
      VerifyType(i, DbType.Binary);
      return _activeStatement._sql.GetBytes(_activeStatement, i, (int)fieldOffset, buffer, bufferoffset, length);
    }

    /// <summary>
    /// Returns the column as a single character
    /// </summary>
    /// <param name="i">The index of the column to retrieve</param>
    /// <returns>char</returns>
    public override char GetChar(int i)
    {
      VerifyType(i, DbType.SByte);
      return Convert.ToChar(_activeStatement._sql.GetInt32(_activeStatement, i));
    }

    /// <summary>
    /// Retrieves a column as an array of chars (blob)
    /// </summary>
    /// <param name="i">The index of the column to retrieve</param>
    /// <param name="fieldoffset">The zero-based index of where to begin reading the data</param>
    /// <param name="buffer">The buffer to write the characters into</param>
    /// <param name="bufferoffset">The zero-based index of where to begin writing into the array</param>
    /// <param name="length">The number of bytes to retrieve</param>
    /// <returns>The actual number of characters written into the array</returns>
    /// <remarks>
    /// To determine the number of characters in the column, pass a null value for the buffer.  The total length will be returned.
    /// </remarks>
    public override long GetChars(int i, long fieldoffset, char[] buffer, int bufferoffset, int length)
    {
      VerifyType(i, DbType.String);
      return _activeStatement._sql.GetChars(_activeStatement, i, (int)fieldoffset, buffer, bufferoffset, length);
    }

    /// <summary>
    /// Retrieves the name of the back-end datatype of the column
    /// </summary>

?? 快捷鍵說明

復制代碼 Ctrl + C
搜索代碼 Ctrl + F
全屏模式 F11
切換主題 Ctrl + Shift + D
顯示快捷鍵 ?
增大字號 Ctrl + =
減小字號 Ctrl + -
亚洲欧美第一页_禁久久精品乱码_粉嫩av一区二区三区免费野_久草精品视频
岛国精品一区二区| 色噜噜狠狠色综合欧洲selulu| 亚洲男人的天堂在线aⅴ视频| 国产情人综合久久777777| 国产无遮挡一区二区三区毛片日本| 欧美日韩一级二级三级| 欧美一区二区在线播放| 欧美xfplay| 国产精品成人网| 一区在线观看免费| 国产日韩欧美a| 久久品道一品道久久精品| 777亚洲妇女| 精品欧美乱码久久久久久| 欧美日韩精品免费| 欧美午夜精品理论片a级按摩| 91久久精品网| 91精品国产91久久久久久最新毛片| 欧美日韩卡一卡二| 日韩精品一区二区三区蜜臀| 久久久久久免费毛片精品| 国产精品每日更新| 亚洲欧洲制服丝袜| 日韩中文欧美在线| 免费高清视频精品| 石原莉奈在线亚洲二区| 亚洲成a人片在线观看中文| 蜜桃久久久久久| 国产91清纯白嫩初高中在线观看| 色综合天天在线| 日韩欧美亚洲一区二区| 国产精品动漫网站| 亚洲人亚洲人成电影网站色| 国产精品国产a| 一区二区三区在线播| 粉嫩欧美一区二区三区高清影视| 欧美一区二区在线免费播放| 亚洲欧美日韩精品久久久久| 蜜臀久久99精品久久久画质超高清 | 日本乱人伦一区| 欧美不卡在线视频| 久久人人97超碰com| 五月天激情综合网| 欧美日韩中文国产| 亚洲精品欧美在线| 一本色道a无线码一区v| 国产欧美视频在线观看| 国产乱理伦片在线观看夜一区| 欧美电影一区二区| 亚洲成人第一页| 91久久香蕉国产日韩欧美9色| 国产精品乱码一区二区三区软件 | 欧美色视频一区| 一区二区三区四区精品在线视频| 岛国av在线一区| 中文字幕在线播放不卡一区| 国产99精品国产| 久久夜色精品国产噜噜av| 久久aⅴ国产欧美74aaa| 久久中文字幕电影| 国产制服丝袜一区| 26uuu国产电影一区二区| 极品美女销魂一区二区三区| 久久久久高清精品| 国产精品1区2区3区| 欧美一区二区在线免费播放| 国产精品美女一区二区三区| 琪琪久久久久日韩精品| 欧美大度的电影原声| 韩国三级在线一区| 青青草国产精品97视觉盛宴| 欧美本精品男人aⅴ天堂| 亚洲成人自拍偷拍| 欧美精品一区二区三区高清aⅴ| 美女脱光内衣内裤视频久久网站| 717成人午夜免费福利电影| 国产成人免费在线观看| 国产精品久久久久久久午夜片 | 黄色成人免费在线| 久久婷婷综合激情| 欧美日本国产一区| 成人av在线播放网站| 91久久精品网| 91在线无精精品入口| 视频一区视频二区在线观看| 国产精品丝袜久久久久久app| 3d成人h动漫网站入口| 欧美亚一区二区| 欧美精品久久久久久久久老牛影院 | 精品国产一区二区三区久久久蜜月| 成人激情av网| 亚洲一区二区欧美日韩 | 欧美日韩免费在线视频| 麻豆精品国产传媒mv男同| 亚洲欧美日韩国产中文在线| 亚洲综合另类小说| 亚洲综合色区另类av| 亚洲人成电影网站色mp4| 亚洲视频你懂的| 日韩精品一区二区三区视频播放 | 日本亚洲免费观看| 精品理论电影在线| 国产精品美女视频| 久久综合色一综合色88| 99久久99久久精品免费看蜜桃| 亚洲另类一区二区| 国产日本欧洲亚洲| 亚洲天堂成人在线观看| 亚洲 欧美综合在线网络| 精品一区二区三区免费| jlzzjlzz欧美大全| 欧洲激情一区二区| 91久久久免费一区二区| 日韩一卡二卡三卡四卡| 精品99一区二区三区| 日韩精品一区二区三区在线观看| 91久久精品一区二区三区| 99九九99九九九视频精品| 亚洲国产中文字幕| 91精品久久久久久久久99蜜臂| 日本在线不卡一区| 青青草伊人久久| 亚洲精品日韩一| 国产一区二区三区在线观看精品| 久久99精品国产麻豆婷婷| 国产精品正在播放| 91色porny蝌蚪| 欧美日韩免费不卡视频一区二区三区| 欧美探花视频资源| 色婷婷久久99综合精品jk白丝| 欧美日韩精品一区二区三区| 精品国产一区二区亚洲人成毛片| 久久精品视频免费| 亚洲精品成人精品456| 一区二区在线观看免费视频播放| 视频一区国产视频| 国产成人综合在线播放| 欧美亚州韩日在线看免费版国语版| 3d成人h动漫网站入口| 久久综合精品国产一区二区三区 | 午夜久久久久久久久| 国产专区欧美精品| 欧美精品在欧美一区二区少妇| 久久久精品蜜桃| 五月婷婷激情综合网| 成人av网站大全| 欧美精品一区二区三区蜜桃视频| ww亚洲ww在线观看国产| 午夜精品久久久久久久久久久| 91麻豆免费观看| 亚洲美女在线一区| 成人av免费观看| 久久日韩粉嫩一区二区三区| 亚洲成av人影院| 欧美日韩一区二区欧美激情| 亚洲精选视频免费看| 精品一区二区三区香蕉蜜桃| 欧美日韩专区在线| 亚洲人成精品久久久久| 色综合色综合色综合色综合色综合 | 久久精品亚洲一区二区三区浴池| 亚洲激情图片小说视频| 亚洲激情在线激情| 国产成人综合视频| 久久精品一二三| 国产亚洲欧美一区在线观看| 成人精品免费网站| 中文字幕视频一区二区三区久| 懂色av一区二区三区免费看| 国产欧美一区视频| av成人老司机| 91精品国产美女浴室洗澡无遮挡| 国产精品久久久久9999吃药| 国产一区二区三区| 欧美精品 日韩| 亚洲资源在线观看| 欧美日韩成人一区| 国产精品色在线| 国产精品影视天天线| 国产欧美一区二区三区沐欲| 懂色av中文字幕一区二区三区| 成人免费一区二区三区在线观看| 成人综合在线观看| 亚洲欧美日韩一区| 欧美另类videos死尸| 99久久99久久综合| 亚洲免费电影在线| 懂色av中文一区二区三区| 夜夜操天天操亚洲| 91在线视频观看| 亚洲一区成人在线| 欧美v国产在线一区二区三区| 蜜乳av一区二区| 26uuu国产日韩综合| 一本一道综合狠狠老| 精品夜夜嗨av一区二区三区| 亚洲国产欧美在线| 国产区在线观看成人精品| 这里只有精品免费| 国产美女在线观看一区|