https://github.com/clancey/simpledatabase
Extension of Sqlite-net to make Databases simple for Mobile
https://github.com/clancey/simpledatabase
database sqlite-orm
Last synced: 5 months ago
JSON representation
Extension of Sqlite-net to make Databases simple for Mobile
- Host: GitHub
- URL: https://github.com/clancey/simpledatabase
- Owner: Clancey
- License: apache-2.0
- Created: 2013-01-01T20:59:07.000Z (almost 13 years ago)
- Default Branch: main
- Last Pushed: 2024-05-22T03:43:20.000Z (over 1 year ago)
- Last Synced: 2025-05-15T08:38:53.640Z (7 months ago)
- Topics: database, sqlite-orm
- Language: C#
- Homepage:
- Size: 4.57 MB
- Stars: 12
- Watchers: 3
- Forks: 1
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
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](https://github.com/praeclarum/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
```cs
Database.Main.RowsInSection(section);
Database.Main.NumberOfSections();
Database.Main.ObjectForRow(section, row);
Database.Main.SectionHeader(section);
Database.Main.QuickJump();
```
Model Attributes
===
Add attributes for OrderBy and Grouping
```cs
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
```cs
var artist = new { Id = "Foo"};
var group = Database.Main.GetGroupInfo().Clone();
group.Filter = "ArtistId = @ArtistId";
group.Params["@ArtistId"] = artist.Id;
Database.Main.RowsInSection(group , section);
```
#Open Source Software
This project was built on the shoulders of giants!
- [SQLite-net](https://github.com/praeclarum/sqlite-net)