/SimpleDatabase

Extension of Sqlite-net to make Databases simple for Mobile

Primary LanguageC#Apache License 2.0Apache-2.0

Simple Database

Creating fast, responsive and grouped Tableviews is hard. Espcially with very large data sets. Simple Database takes care of this for you by extending SQLite-net

Available on Nuget

https://www.nuget.org/packages/Clancey.SimpleDatabase/

API

Simple tables gives you the interface you need to populate a ListView

Database.Main.RowsInSection<T>(section);

Database.Main.NumberOfSections<T>();

Database.Main.ObjectForRow<T>(section, row);

Database.Main.SectionHeader<T>(section);

Database.Main.QuickJump<T>();

Model Attributes

Add attributes for OrderBy and Grouping

class MyClass
{
	[Indexed, PrimaryKey]
	public string Id {get;set;}

	//Typically this is just one letter, and the first letter of the displayed text
	[GroupBy]
	public virtual string IndexCharacter {get;set;}

	[OrderBy]
	public string Name {get;set;}
}

GroupInfo

Sometimes you need to filter or Add dynamically compose a query. Simple Auth uses named parameters

var artist = new { Id = "Foo"};
var group = Database.Main.GetGroupInfo<Song>().Clone();
group.Filter = "ArtistId = @ArtistId";
group.Params["@ArtistId"] = artist.Id;

Database.Main.RowsInSection<Song>(group , section);

#Open Source Software This project was built on the shoulders of giants!