haxetink / tink_sql

SQL embedded into Haxe
MIT License
53 stars 16 forks source link

Driver-specific options #38

Closed kevinresol closed 5 years ago

kevinresol commented 7 years ago

For things like these: https://github.com/haxetink/tink_sql/blob/5240624/src/tink/sql/drivers/node/MySql.hx#L31

kevinresol commented 7 years ago

@back2dos any insight on this?

back2dos commented 7 years ago

Hmm, how about instantiating the driver by hand and altering it slightly?

class MySql implements Driver {
  // ...
  public function new(settings, ?connectionLimit = 3) {
    this.settings = settings;
    this.connectionLimit = connectionLimit;
  }
  // ...
}

(if this is something that comes up a lot, maybe you want to group the specific settings into an additional object).