Skip to content

Releases: iloElias/maestro

1.3.1 Database DDL creation performance changes

13 Oct 16:22
Compare
Choose a tag to compare
[fix] - table reference by type fixed

1.3.0 Table creation changes

10 Oct 02:09
Compare
Choose a tag to compare

The priority of __construct() was moved to compose() method. The functionality was not removed, but is available to use for custom object build.
The compose() method has now the same properties as a __construct() had previous updates. Use compose method to custom database table builds.

1.2.8 Hot fix to update query builder

10 Oct 01:43
Compare
Choose a tag to compare
[update] - update query builder updated

1.2.7 Hot fix on table fetching method

07 Oct 05:26
Compare
Choose a tag to compare

1.2.6 Updated conditional handlers(where, in, having)

06 Oct 23:05
Compare
Choose a tag to compare
[doc] - better empty params handling

1.2.5 Updated conditionals, group and custom operations

05 Oct 20:03
Compare
Choose a tag to compare
[update] - updated conditionals, added group and custom operations

1.2.4 Updated conditionals, conditional group and custom operations added

05 Oct 16:59
Compare
Choose a tag to compare
[update] - updated conditionals, added group and custom operations

1.2.3 Query builder update

05 Oct 04:23
Compare
Choose a tag to compare

New way of processing data to avoid SQL injection

1.2.2 Function declaration moved to database

29 Sep 06:36
Compare
Choose a tag to compare

To improve the code and fix some bugs, the database function declaration was moved to the database constructor:

<?php

namespace Maestro\Example;

use Ilias\Maestro\Abstract\Database;
use Ilias\Maestro\Types\Postgres;

final class MaestroDb extends Database
{
  public Hr $hr;
  public Social $social;
  
  public function __construct()
  {
    self::declareFunction(
      'generate_four_digit_auth_code',
      Postgres::TEXT,
      'CREATE OR REPLACE FUNCTION generate_four_digit_auth_code() RETURNS TEXT AS $$ BEGIN RETURN CAST(FLOOR(1000 + RANDOM() * 9000) AS TEXT); END; $$ LANGUAGE plpgsql;'
    );
  }
}

1.2.1 Function declaration

29 Sep 06:03
Compare
Choose a tag to compare

Now you can add functions to your database:

<?php

namespace Maestro\Example;
use Ilias\Maestro\Abstract\Schema;
use Ilias\Maestro\Types\Postgres;

final class Hr extends Schema
{
  public User $user;
  public AuthCode $authCode;

  public function __construct()
  {
    self::declareFunction(
      'generate_four_digit_auth_code',
      Postgres::TEXT,
      'CREATE OR REPLACE FUNCTION generate_four_digit_auth_code() RETURNS TEXT AS $$ BEGIN RETURN CAST(FLOOR(1000 + RANDOM() * 9000) AS TEXT); END; $$ LANGUAGE plpgsql;'
    );
  }
}