database.php 1.5 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657
  1. <?php
  2. return
  3. [
  4. /*
  5. * ---------------------------------------------------------
  6. * Default
  7. * ---------------------------------------------------------
  8. *
  9. * Default configuration to use.
  10. */
  11. 'default' => 'test',
  12. /*
  13. * ---------------------------------------------------------
  14. * Configurations
  15. * ---------------------------------------------------------
  16. *
  17. * You can define as many database configurations as you want.
  18. *
  19. * dsn : PDO data source name
  20. * username : (optional) Username of the database server
  21. * password : (optional) Password of the database server
  22. * persistent : (optional) Set to true to make the connection persistent
  23. * log_queries: (optional) Enable query logging?
  24. * reconnect : (optional) Should the connection automatically be reestablished?
  25. * options : (optional) An array of PDO options
  26. * queries : (optional) Queries that will be executed right after a connection has been made
  27. */
  28. 'configurations' =>
  29. [
  30. 'test' =>
  31. [
  32. 'dsn' => 'mysql:dbname=hello_world;host=tfb-database;',
  33. 'username' => 'benchmarkdbuser',
  34. 'password' => 'benchmarkdbpass',
  35. 'persistent' => true,
  36. 'log_queries' => false,
  37. 'reconnect' => false,
  38. 'queries' =>
  39. [
  40. 'SET NAMES UTF8',
  41. ],
  42. ],
  43. 'sqlite' =>
  44. [
  45. 'dsn' => 'sqlite:' . MAKO_APPLICATION_PATH . '/storage/database/test.sqlite',
  46. 'log_queries' => false,
  47. 'reconnect' => false,
  48. 'queries' =>
  49. [
  50. "PRAGMA encoding = 'UTF-8'",
  51. ],
  52. ],
  53. ],
  54. ];