1 /**
2 * Copyright © DiamondMVC 2018
3 * License: MIT (https://github.com/DiamondMVC/Diamond/blob/master/LICENSE)
4 * Author: Jacob Jensen (bausshf)
5 */
6 module diamond.database;
7 
8 import std.variant : Variant;
9 
10 public
11 {
12   import std.datetime : Date, DateTime, Clock, SysTime;
13 
14   import diamond.data.mapping.attributes;
15 
16   import diamond.data.mapping.engines.mysql.model;
17 
18   version (Diamond_PostgreSqlDev)
19   {
20     import diamond.data.mapping.engines.postgresql.model;
21   }
22 
23   import MySql = diamond.data.mapping.engines.mysql;
24   version (Diamond_PostgreSqlDev)
25   {
26     import PostgreSql = diamond.data.mapping.engines.postgresql;
27   }
28 
29   /// A variant db parameter type.
30   alias DbParam = Variant;
31 
32   import diamond.database.mongo;
33 }
34 
35 /// Gets an associative array to use for specialized parameters.
36 auto getParams()
37 {
38   DbParam[string] params;
39 
40   return params;
41 }
42 
43 /// Gets a static-sized array to use for raw sql statements.
44 auto getParams(size_t count)
45 {
46   return new DbParam[count];
47 }