1 /** 
2  Just about the most useless module around, but I wanted to keep it nice and tidy
3  */
4 module dpq.column;
5 
6 /**
7  Used internally to keep track of colums and their AS names when selected/inserted.
8  */
9 package struct Column
10 {
11 	string column;
12 	string _asName;
13 
14 	@property string asName()
15 	{
16 		return _asName.length > 0 ? _asName : column;
17 	}
18 
19 	@property void asName(string n)
20 	{
21 		_asName = n;
22 	}
23 	//alias column this;
24 
25 	unittest
26 	{
27 		import std.stdio;
28 		writeln(" * Column");
29 		writeln("\t * asName");
30 
31 		Column c = Column("col", "col2");
32 		assert(c.asName != c.column);
33 
34 		c = Column("col");
35 		assert(c.asName == c.column);
36 	}
37 }