GithubHelp home page GithubHelp logo

eqcola / ada-ado Goto Github PK

View Code? Open in Web Editor NEW

This project forked from stcarrez/ada-ado

0.0 0.0 0.0 2.09 MB

Ada Database Objects

License: Apache License 2.0

Makefile 0.82% M4 0.50% Shell 0.45% Ada 98.23%

ada-ado's Introduction

Ada Database Objects

Build Status Test Status Download License Commits

Ada Database Objects is an Ada05 library that provides object relational mapping to access a database in Ada05. The library supports MySQL, SQLite as databases. Most of the concepts developped for ADO come from the Java Hibernate ORM.

You need at least one of these databases (or both).

To build ADO, you will need:

You should have installed either MySQL or SQLite before running the configure script. For Windows, please read the file 'win32/README' that gives some installation hints.

Build with the following commands:

   ./configure
   make

The unit tests are built and executed using:

   make test

And unit tests are executed with:

   bin/ado_harness -config test-mysql.properties

or

   bin/ado_harness -config test-sqlite.properties

Samples

The samples can be built using:

      gnatmake -Psamples

Before launching the samples, the database must have been created. For SQLite, use:

      make samples.db

Documentation

The Ada Database Objects sources as well as a wiki documentation is provided on:

https://github.com/stcarrez/ada-ado/wiki

Database Drivers

The MySQL and SQLite development headers and runtime are necessary for building the ADO driver. The configure script will use them to enable the ADO drivers.

MySQL Development installation

      sudo apt-get install libmysqlclient-dev

SQLite Development installation

      sudo apt-get install libsqlite3-dev

For Windows, check win32/README to install the libraries.

Database Creation

Create the tests database by using the Dynamo command. (Dynamo is available at: https://github.com/stcarrez/dynamo) Note: change 'root' and 'password' to a MySQL user that has admin access rights ('create database' and 'grant option' privileges).

      dynamo create-database db/regtests root password

The default database connection string is defined in dynamo.xml. You can also specify the connection string and create the schema by using:

      dynamo create-database db/regtests 'mysql://localhost:3306/ado_test?user=ado' root password

To create manually the database, you can proceed to the following steps:

  1. Create the 'ado_test' database in MySQL
         mysql -u root
         mysql> create database ado_test;
  1. Create the 'ado' user and give the access rights:
         mysql> grant select, insert, update, delete,
                      create, drop, create temporary tables, execute,
                      show view on `ado_test`.* to ado@'localhost';
         mysql> flush privileges;
  1. Create the tables
         mysql> use ado_test
         mysql> source db/regtests/mysql/create-ado-mysql.sql

ada-ado's People

Contributors

stcarrez 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.