GithubHelp home page GithubHelp logo

chencai01 / sqlitehelper Goto Github PK

View Code? Open in Web Editor NEW

This project forked from jchristn/sqlitehelper

0.0 1.0 0.0 1009 KB

Simple wrapper for Sqlite databases written in C#.

License: MIT License

C# 100.00%

sqlitehelper's Introduction

alt tag

SqliteHelper

NuGet Version NuGet

Simple database wrapper for Sqlite written in C#.

Description

SqliteHelper is a simple database wrapper for Sqlite databases written in C#.

Core features:

  • dynamic query building using expression objects
  • support for nested queries within expressions
  • support for SELECT, INSERT, UPDATE, and DELETE, or raw queries
  • built-in sanitization

Important

For .NET Framework, you may need to add the System.Data.SQLite.Core NuGet package, clean, and then re-build. This should place x86 and x64 folders in your build output.

This is particularly helpful if you are experiencing the exception System.DllNotFoundException: Unable to load DLL 'SQLite.Interop.dll': The specified module could not be found.

Help and Support

Please contact me for any issues or enhancement requests! I'm at joel dot christner at gmail dot com.

New in v1.2.0

  • Migrate to Microsoft.Data.Sqlite

A Note on Sanitization

Use of parameterized queries vs building queries dynamically is a sensitive subject. Proponents of parameterized queries have data on their side - that parameterization does the right thing to prevent SQL injection and other issues. I do not disagree with them. However, it is worth noting that with proper care, you CAN build systems that allow you to dynamically build queries, and you SHOULD do so as long as you build in the appropriate safeguards.

If you find an injection attack that will defeat the sanitization layer built into this project, please let me know!

Simple Example

Refer to projects SampleApp, TestNetFramework, and TestNetCore for examples.

Select with Pagination

Use indexStart, maxResults, and orderByClause to retrieve paginated results. The query will retrieve maxResults records starting at row number indexStart using an ordering based on orderByClause. See the example in the SampleApp project.

Version History

Please refer to CHANGELOG.md.

sqlitehelper's People

Watchers

James Cloos avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.