C++ EasyQtSql Introduction














































C++ EasyQtSql Introduction



Introduction

EasyQtSql is a lightweight header based only C++11 library for quick and
easy SQL querying with QtSql classes.

Easy SQL is a data access helper for QtSql.

Features:

Header only C++11 library

Easy to use-just include header files

Small size, simple code

SQL execution with less C++ code compared to QtSql library

Easier DB error handling

Easier parameters binding & result reading

RAIl transactions

Not an ORM library - you can write, optimize & execute SQL queries
as you want

Getting Started

You need to
install:

C++11 compiler

Qt5 library

Qt Creator
4.7.2- recommended (for automated test running)

QtSql module
with the required SQL database drivers compiled / installed

 

Running the tests

Tests are implemented with QtTest module. To run the tests you can use Qt Creator.


ClASSES

The classes in the Easy QTsql library are follows:

Class Database -

It is a QSqlDatabase wrapper.

Class DBException -

It is Exception class for SQL errors handling.

Class DeleteQuery-

It is a QSqlQuery wrapper for DELETE FROM WHERE..
query execution.

Struct In -

Act as an Input SQL parameters wrapper.

Struct InOut -

It is a Bidirectional SQL parameters wrapper.


Class InsertQuery -

It is a QSqlQuery wrapper for INSERT INTO table query execution.


Class NonQueryResult -

Act as an QSqlQuery wrapper for non-select query results in  reading.


Struct Out -

It is an Output SQL parameters wrapper.

Struct ParamDirectionWrapper -

Base parameters wrapper struct

Class PreparedQuery -

It is a Class for query preparation and execution

Class QueryResult -

It is an QSqlQuery wrapper with handy data fetch methods

Class SqlFactory -

It is used for cloning data.

Class Transaction -

Act as an QSqlDatabase transaction wrapper

Class UpdateQuery -

It is an QSqlQuery wrapper for UPDATE  %u2026 SET %u2026WHERE %u2026.query execution

Class Util-

        It has Utility functions.



Comments

  • shalini
    30-Jul-2021 07:17:49 PM
    Great 

  • aman
    30-Jul-2021 07:08:22 PM
    Good job bro