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 ...
随机推荐
- win7-32 系统 + VS2010 配置 glew
网上下载的程序,运行时报错: C1083: 无法打开包括文件:“gl\glew.h”: No such file or directory. 百度一下,发现需要配置 glew 库. 方法如下: 下载 ...
- java-xml格式化
参考:http://www.oschina.net/code/snippet_17793_4733 package com.ddatsh; import java.io.IOException; ...
- POJ 2750 Potted Flower (线段树区间合并)
开始懵逼找不到解法,看了网上大牛们的题解才发现是区间合并... 给你n个数形成一个数列环,然后每次进行一个点的修改,并输出这个数列的最大区间和(注意是环,并且区间最大只有n-1个数) 其实只需要维护 ...
- 用js 向h5 中的table 动态添加数据 (简单实现)
//向 表格传值 function setTextareaValue(items,pp){ console.log(" 进入函数 items=="+items); var tb = ...
- Android 使用 LruCache 缓存图片
在你应用程序的 UI 界面加载一张图片是一件很简单的事情,但是当你需要在界面上加载一大堆图片的时候,情况就变得复杂起来.在很多情况下,(比如使用 ListView, GridView 或者 ViewP ...
- CSS3-给网页添加图片
给网页添加图片: 1.background-attachment: scroll--------随文本一块滚动 ; background-attachment: fixed-----固定在一个位置上 ...
- TestNg依赖详解(三)------灵活的文件配置依赖
配置型的依赖测试,让依赖测试不局限于测试代码中,在XML文件中进行灵活的依赖配置 原创文章,版权所有,允许转载,标明出处:http://blog.csdn.net/wanghantong Javaco ...
- I Hate It(线段树基础)
Time Limit: 9000/3000 MS (Java/Others) Memory Limit: 32768/32768 K (Java/Others)Total Submission( ...
- Unity Standard Assets 简介之 2D
这篇介绍2D资源包. 文件夹比较多,但是很多都是prefab的基础资源,所以我们只介绍 Prefabs 和 Scripts 文件夹. Prefabs文件夹: CharacterRobotBoy: 提供 ...
- [转]crontab环境变量设置
原文连接:http://blog.csdn.net/zc02051126/article/details/20480289 come from http://www.360doc.com/conten ...