Introduction of SQLite
SQLite is a lightweight, server-less database, it's great for embedding into client application. It works across Windows, iOS, Android, browers.
Code snippets
Create database connection
var connection = new SQLiteAsyncConnection("testdb.sqlite");
Create table
await connection.CreateTableAync<MyClass>();
Insert Data
await connection.InsertAsync(new MyClass());
Build up your class
public class MyClass
{
[PrimaryKey]
public string Id { get; set; }
public DateTime CreatedOn { get; set; }
public string Name { get; set; }
[Ignore]
public ComplexClass IgnoreMe { get; set; }
}
Querying
var items = connection.Table<MyClass>()
.Where(x=>x.Name == "Bob")
.FirstOrDefault();
Starting off
var file = await Windows.ApplicationModel.Package.Current.InstalledLocation.GetFileAsync("Assets\\dbfile.sqlite");
try
{
await file.CopyAsync(ApplicationData.Current.LocalFolder);
}
catch
{
}
sqlite:
sqlite-net:
https://github.com/praeclarum/sqlite-net
sqlite-net-wp8:
https://github.com/peterhuene/sqlite-net-wp8
Sample:
Introduction of SQLite的更多相关文章
- [转]MBTiles移动存储简介
首先奉上官网地址http://mapbox.com/developers/mbtiles/#storing_tiles 由于英文水平有限,看资料很费眼睛,特将它翻译成中文 存储瓦片 地图制作者面对一个 ...
- An Introduction To The SQLite C/C++ Interface
1. Summary The following two objects and eight methods comprise the essential elements of the SQLite ...
- [Sqlite3] Sqlite Introduction
Check whether you have sqlite3 installed: sqlite3 -version To create a new db: sqlite3 <filename. ...
- About SQLite
About SQLite See Also... Features When to use SQLite Frequently Asked Questions Well-known Users Boo ...
- C# & SQLite - Storing Images
Download source code - 755 KB Introduction This article is to demonstrate how to load images into ...
- SQLite Helper (C#) z
http://www.codeproject.com/Articles/746191/SQLite-Helper-Csharp Introduction I have written a small ...
- java链接sqlite资料整理
0.SQLite三种JDBC驱动的区别 摘自http://blog.sina.com.cn/s/blog_654337ca01016x4n.html 在DBeaver中看到SQLite有三种JDBC驱 ...
- dashDB - Introduction and DB Tools
dashDB - Introduction dashDB is a database that is designed for performance and scale. It offers sea ...
- Architecture of SQLite
Introduction This document describes the architecture of the SQLite library. The information here is ...
随机推荐
- C语言面试
最全的C语言试题总结 第一部分:基本概念及其它问答题 1.关键字static的作用是什么? 这个简单的问题很少有人能回答完全.在C语言中,关键字static有三个明显的作用: 1). 在函数体,一个被 ...
- 驱动开发之 创建线程函数PsCreateSystemThread
PsCreateSystemThread 创建一个执行在内核模式的系统线程. 注意:创建线程必须用函数PsTerminateSystemThread强制线程结束.否则该线程是无法自动退出的. 函数原型 ...
- 使用 json_in_java
// */ // ]]> java_in_json Table of Contents 1. Java 使用 Json 1.1. 下载地址: 1.2. 构造 json 字符串 1.3. 解析 j ...
- 保利威视Polyv点播集成
demo和文档下载地址http://dev.polyv.net/2014/08/sdk/ 1.demo是eclipse的,所以导入android studio有几个要注意的地方 导入方式 在app的b ...
- 【criteria CascadeType】级联的不同情况
使用criteria进行增删改查操作,可能会发生级联删除的情况,例如对员工表进行删除,可能会级联删除掉部门表中的某一条信息[类似这样的情况] 对此,我们可以在实体类中对级联的关系进行管理: 对于cri ...
- 【bootstrapValidator 不验证】使用bootstrapValidator 验证效果不起作用
虽然在页面ready的时候 就绑定了验证表单 ,但是在点击提交按钮之后 依旧没有验证的效果 . 那就在提交按钮的点击事件中 添加一句话: $(document).ready( function () ...
- 从新注册 .DLL CMD 运行regsvr32 *.dll注册该DLL 或 regsvr32 /s *.DLL 求证
从新注册 .DLL CMD 运行regsvr32 *.dll注册该DLL 或 regsvr32 /s *.DLL 求证
- js获取浏览器地址
<script type="text/javascript"> window.onload = function(){ var txt=""; va ...
- Python基础7- 流程控制之循环
循环: 把一段代码重复性的执行N次,直到满足某个条件为止. 为了在合适的时候,停止重复执行,需要让程序出现满足停止循环的条件.Python中有三种循环(实质只有两种): while循环 for循环 嵌 ...
- three.js入门3
为什么要用three.js Three.js为我们封装了底层的WebGl接口,使我们在无需掌握繁冗的图形学知识的基础下可以轻松的创建三维场景.相比较使用底层的WebGL我们可以使用更少的代码,大大的降 ...