1 |
dpavlin |
1 |
use strict; |
2 |
|
|
use warnings; |
3 |
|
|
|
4 |
|
|
package SQLSession::Model::Page; |
5 |
|
|
use Jifty::DBI::Schema; |
6 |
|
|
use SQLSession::Model::Database; |
7 |
|
|
|
8 |
|
|
use SQLSession::Record schema { |
9 |
|
|
column name => |
10 |
|
|
type is 'text', |
11 |
dpavlin |
14 |
label is 'Name of query', |
12 |
dpavlin |
1 |
distinct, |
13 |
|
|
hints is 'Short name of this page', |
14 |
|
|
mandatory; |
15 |
|
|
|
16 |
|
|
column sql_query => |
17 |
|
|
type is 'text', |
18 |
|
|
label is 'SQL query', |
19 |
|
|
mandatory, |
20 |
|
|
distinct, |
21 |
|
|
hints is 'Use this area to enter SQL query', |
22 |
|
|
render as 'textarea'; |
23 |
|
|
|
24 |
|
|
column on_database => |
25 |
|
|
refers_to SQLSession::Model::Database by 'name'; |
26 |
|
|
}; |
27 |
|
|
|
28 |
|
|
# Your model-specific methods go here. |
29 |
|
|
|
30 |
|
|
1; |
31 |
|
|
|