unit ConnectionModule;

interface

uses
  Aurelius.Drivers.Interfaces,
  Aurelius.Drivers.{DATABASEDRIVERUSES}, {DRIVERADDITIONALUSES}
  System.SysUtils, System.Classes;

type
  {CONNMODULE_CLASSNAME} = class(TDataModule)
  private
  public
    class function CreateConnection: IDBConnection;
    class function CreateFactory: IDBConnectionFactory;
    {XDATAPOOLDECLARATION}
  end;

var
  {CONNMODULE_VARNAME}: {CONNMODULE_CLASSNAME};

implementation

{%CLASSGROUP 'System.Classes.TPersistent'}

uses {XDATAIMPLEMENTATIONUSES}
  Aurelius.Drivers.Base;

{$R *.dfm}

{ TMyConnectionModule }

class function {CONNMODULE_CLASSNAME}.CreateConnection: IDBConnection;
{CREATE_CONNECTION}

class function {CONNMODULE_CLASSNAME}.CreateFactory: IDBConnectionFactory;
begin
  Result := TDBConnectionFactory.Create(
    function: IDBConnection
    begin
      Result := CreateConnection;
    end
  );
end;

{XDATAPOOLIMPLEMENTATION}

end.
