本文整理汇总了C#中Mono.Data.Sqlite.SqliteDataReader类的典型用法代码示例。如果您正苦于以下问题:C# SqliteDataReader类的具体用法?C# SqliteDataReader怎么用?C# SqliteDataReader使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。
SqliteDataReader类属于Mono.Data.Sqlite命名空间,在下文中一共展示了SqliteDataReader类的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C#代码示例。
示例1: ExecuteQuery
static public SqliteDataReader ExecuteQuery(string sqlQuery)
{
dbCommand = OpenDB("monsters.db").CreateCommand();
dbCommand.CommandText = sqlQuery;
reader = dbCommand.ExecuteReader();
return reader;
}
示例2: Decode
/// <summary>
/// Decode the specified sdr.
/// </summary>
/// <param name="sdr">Sdr.</param>
public override void Decode (SqliteDataReader sdr)
{
ID = System.Convert.ToInt32(sdr ["ID"]);
Name = System.Convert.ToString(sdr ["Name"]);
Motion = System.Convert.ToString(sdr ["Motion"]);
MotionTransition= System.Convert.ToSingle(sdr ["MotionTransition"]);
MotionSpeed = System.Convert.ToSingle(sdr ["MotionSpeed"]);
}
示例3: Decode
/// <summary>
/// Decode the specified sdr.
/// </summary>
/// <param name="sdr">Sdr.</param>
public override void Decode (SqliteDataReader sdr)
{
ID = System.Convert.ToInt32(sdr ["ID"]);
Name = System.Convert.ToString(sdr ["Name"]);
ShapeID = System.Convert.ToInt32(sdr ["ShapeID"]);
Weapon = System.Convert.ToString(sdr ["Weapon"]);
Describe = System.Convert.ToString(sdr ["Describe"]);
}
示例4: ExecuteQuery
public SqliteDataReader ExecuteQuery(string q)
{
databaseCommand = databaseConnection.CreateCommand();
databaseCommand.CommandText = q;
reader = databaseCommand.ExecuteReader();
return reader;
}
示例5: FromReader
/// <summary>Convert from DataReader to Task object</summary>
TodoItem FromReader (SqliteDataReader r) {
var t = new TodoItem();
t.ID = Convert.ToInt32 (r ["_id"]);
t.Name = r ["Name"].ToString ();
t.Notes = r ["Notes"].ToString ();
t.Done = Convert.ToInt32 (r ["Done"]) == 1 ? true : false;
return t;
}
示例6: DBFill
/// <summary>
/// DBFill
/// </summary>
/// <param name="reader"></param>
/// <param name="slide"></param>
public static void DBFill(SqliteDataReader reader, Slide slide)
{
slide.SlideID = Convert.ToInt32(reader["slide_id"]);
slide.SlideText = HttpUtility.UrlDecode(reader["slide_text"].ToString(), System.Text.Encoding.Default);
slide.SlideIndex = Convert.ToInt32(reader["slide_index"]);
slide.PhotoID = Convert.ToInt32(reader["photo_id"]);
slide.Photo = Photo.Get(slide.PhotoID);
}
示例7: Decode
/// <summary>
/// Decode the specified sdr.
/// </summary>
/// <param name="sdr">Sdr.</param>
public override void Decode (SqliteDataReader sdr)
{
ID = System.Convert.ToInt32(sdr ["ID"]);
Name = System.Convert.ToString(sdr ["Name"]);
ShapeID = System.Convert.ToInt32(sdr ["Shape"]);
Level = System.Convert.ToInt32(sdr ["Level"]);
Blueprint = System.Convert.ToString(sdr ["AI"]);
}
示例8: CreateMatchingTable
MatchingTable CreateMatchingTable(SqliteDataReader reader)
{
return new MatchingTable(
reader["id"].ToString(),
reader["host"].ToString(),
reader["guest"].ToString()
);
}
示例9: FromReader
/// <summary>Convert from DataReader to Task object</summary>
private TodoItem FromReader (SqliteDataReader r) {
var t = new TodoItem {
ID = Convert.ToInt32 (r["_id"]),
Name = r["Name"].ToString (),
Notes = r["Notes"].ToString (),
Done = (Convert.ToInt32 (r["Done"]) == 1)
};
return t;
}
示例10: BlockData
public BlockData(SqliteDataReader reader)
{
ID = reader.GetInt32(0);
File = reader.GetString(1);
Width = reader.GetInt32(2);
Height = reader.GetInt32(3);
AvailableWidth = reader.GetInt32(4);
AvailableHeight = reader.GetInt32(5);
}
示例11: HyenaSqliteArrayDataReader
internal HyenaSqliteArrayDataReader (SqliteDataReader reader)
{
rows = new List<object[]> ();
column_names = new Dictionary<string, int> ();
closed = false;
current_row = -1;
ReadAllRows (reader);
reader.Dispose ();
}
示例12: Decode
/// <summary>
/// Decode the specified sdr.
/// </summary>
/// <param name="sdr">Sdr.</param>
public override void Decode (SqliteDataReader sdr)
{
ID = System.Convert.ToInt32(sdr ["ID"]);
Name = System.Convert.ToString(sdr ["Name"]);
ShapeID = System.Convert.ToInt32(sdr ["ShapeID"]);
State = System.Convert.ToInt32(sdr ["State"]);
Blueprint = System.Convert.ToString(sdr ["AI"]);
Describe = System.Convert.ToString(sdr ["Describe"]);
}
示例13: Decode
/// <summary>
/// Decode the specified sdr.
/// </summary>
/// <param name="sdr">Sdr.</param>
public override void Decode (SqliteDataReader sdr)
{
ID = System.Convert.ToInt32(sdr ["ID"]);
Name = System.Convert.ToString(sdr ["Name"]);
AnimationID = System.Convert.ToInt32(sdr ["AnimationID"]);
DecodeEffect(
System.Convert.ToString(sdr ["Effect"])
);
}
示例14: Decode
/// <summary>
/// Decode the specified sdr.
/// </summary>
/// <param name="sdr">Sdr.</param>
public override void Decode (SqliteDataReader sdr)
{
ID = System.Convert.ToInt32(sdr ["ID"]);
Name = System.Convert.ToString(sdr ["Name"]);
SelfBuffID = System.Convert.ToInt32(sdr ["SelfBuffID"]);
TargetBuffID = System.Convert.ToInt32(sdr ["TargetBuffID"]);
SelfActionID = System.Convert.ToInt32(sdr ["SelfActionID"]);
TargetActionID = System.Convert.ToInt32(sdr ["TargetActionID"]);
AttackDistance = System.Convert.ToSingle(sdr ["AttackDistance"]);
}
示例15: Decode
/// <summary>
/// Decode the specified sdr.
/// </summary>
/// <param name="sdr">Sdr.</param>
public override void Decode (SqliteDataReader sdr)
{
ID = System.Convert.ToInt32(sdr ["id"]);
OffsetPosition = MathfEx.ToVector3(System.Convert.ToString(sdr ["lockPosition"]));
OffsetPositionLerp = System.Convert.ToSingle(sdr ["lockPositionLerp"]);
OffsetEulerAngles = MathfEx.ToVector3(System.Convert.ToString(sdr ["lockRotation"]));
OffsetEulerAnglesLerp = System.Convert.ToSingle(sdr ["lockRotationLerp"]);
FieldOfView = System.Convert.ToSingle(sdr ["fieldOfView"]);
IsRelative = System.Convert.ToInt32 (sdr ["Relative"]) != 0 ? true : false;
}