GithubHelp home page GithubHelp logo

sqlitewrap's Introduction

SqliteWrap

This is very simple Sqlite 3 wrapper for Delphi and FreePascal. It is based on Tim Anderson's Simplewrapper. I was using his wrapper for long time, include my contributions. However it lost simplicity later and contains lot of duplicated features.

I start with code cleaning and create my own wrapper code as separate project. It have similar interface is Tim's wrapper, but is is very close to Sqlite API.

Paypal donate

Features

  • Require SQLite3 at least version 3.7.1.
  • It is not component, just units. Include this wraper to your project uses and create classes for handling of database.
  • It is not integrated into Delphi database model.
  • Very lightweight code.
  • You can use any SQL command and walk through result set.
  • You can use prepared queries.
  • You can use parametrized queries.
  • You can use transactions, include savepoints!
  • You can define your own UDF (User defined SQL functions).
  • You can define your own collates.
  • Sqlite Backup API supported.

Sample

procedure sample;
var
  database: TSqliteDatabase;
  tab: TSqliteTable;
  s: string;
begin
  database := TSqliteDatabase.Create('somedatabase.db3');
  try
    database.AddParamInt(':key', 123456);
    tab := database.GetTable('SELECT * FROM some_table WHERE ROWID=:key');
    try
      while not tab.EOF do
      begin
        s := tab.FieldAsString(tab.FieldIndex['ROWID']);
        //do something with 'S' variable...
        //...
        //...then go to next row.
        tab.next;
      end;
    finally
      tab.free;
    end;
  finally
    database.free;
  end;
end;

sqlitewrap's People

Contributors

geby avatar

Stargazers

Steven Kamradt avatar Sara Tasche avatar Charalampos Michael avatar ERDesigns - Ernst Reidinga avatar Renat Suleymanov avatar Gustavo 'Gus' Carreno avatar Edwin Yip avatar 球球 avatar

Watchers

 avatar  avatar

Forkers

khongten001

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.