Skip to content

Commit

Permalink
Do the driver initialization before loading the database queries
Browse files Browse the repository at this point in the history
because we must know the drivers when the query files are loaded
  • Loading branch information
stcarrez committed Nov 11, 2015
1 parent 0b2e654 commit b5bd407
Showing 1 changed file with 5 additions and 6 deletions.
11 changes: 5 additions & 6 deletions src/ado-drivers.adb
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
-----------------------------------------------------------------------
-- ADO Drivers -- Database Drivers
-- Copyright (C) 2010, 2011, 2012, 2013 Stephane Carrez
-- Copyright (C) 2010, 2011, 2012, 2013, 2015 Stephane Carrez
-- Written by Stephane Carrez (Stephane.Carrez@gmail.com)
--
-- Licensed under the Apache License, Version 2.0 (the "License");
Expand All @@ -23,9 +23,7 @@ with Ada.IO_Exceptions;
with ADO.Queries.Loaders;
package body ADO.Drivers is

use Util.Log;

Log : constant Loggers.Logger := Loggers.Create ("ADO.Drivers");
Log : constant Util.Log.Loggers.Logger := Util.Log.Loggers.Create ("ADO.Drivers");

-- Global configuration properties (loaded by Initialize).
Global_Config : Util.Properties.Manager;
Expand Down Expand Up @@ -55,12 +53,13 @@ package body ADO.Drivers is
begin
Global_Config := Util.Properties.Manager (Config);

-- Initialize the drivers.
ADO.Drivers.Initialize;

-- Configure the XML query loader.
ADO.Queries.Loaders.Initialize (Global_Config.Get ("ado.queries.paths", ".;db"),
Global_Config.Get ("ado.queries.load", "false") = "true");

-- Initialize the drivers.
ADO.Drivers.Initialize;
end Initialize;

-- ------------------------------
Expand Down

0 comments on commit b5bd407

Please sign in to comment.