This repository has been archived by the owner on May 11, 2019. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 0
/
db.pl
44 lines (41 loc) · 1.69 KB
/
db.pl
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
use DBSQL;
1;
sub GovDBOpen {
# database, username, password
if (!$ENV{REMOTE_DB}) {
do "/home/govtrack/website/perl/db_open.pl";
} else {
DBSQL::Open("database=govtrack;host=govtrack.us", "govtrack_sandbox", "");
}
}
sub DBClose { DBSQL::Close(); }
sub DBSelectByID { return DBSQL::SelectByID(@_); }
sub DBSelectFirst { return DBSQL::SelectFirst(@_); }
sub DBSelectAll { return DBSQL::SelectAll(@_); }
sub DBSelectVector { return DBSQL::SelectVector(@_); }
sub DBSelectVectorDistinct { return DBSQL::SelectVectorDistinct(@_); }
sub DBSelect { return DBSQL::Select(@_); }
sub DBExecuteSelect { return DBSQL::ExecuteSelect(@_); }
sub DBDelete { return DBSQL::Delete(@_); }
sub DBDeleteByID { return DBSQL::DeleteByID(@_); }
sub DBInsert { return DBSQL::Insert(@_); }
sub DBUpdate { return DBSQL::Update(@_); }
sub DBUpdateByID { return DBSQL::UpdateByID(@_); }
sub DBExecute { return DBSQL::Execute(@_); }
sub DBEscape { return DBSQL::Escape(@_); }
sub DBSpecEQ { return DBSQL::SpecEQ(@_); }
sub DBSpecNE { return DBSQL::SpecNE(@_); }
sub DBSpecLE { return DBSQL::SpecLE(@_); }
sub DBSpecGE { return DBSQL::SpecGE(@_); }
sub DBSpecLT { return DBSQL::SpecLT(@_); }
sub DBSpecGT { return DBSQL::SpecGT(@_); }
sub DBSpecContains { return DBSQL::SpecContains(@_); }
sub DBSpecStartsWith { return DBSQL::SpecStartsWith(@_); }
sub DBSpecEndsWith { return DBSQL::SpecEndsWith(@_); }
sub DBSpec { return DBSQL::Spec(@_); }
sub DBSpecNot { return DBSQL::SpecNot(@_); }
sub DBSpecOrNull { return DBSQL::SpecOrNull(@_); }
sub DBSpecIn { return DBSQL::SpecIn(@_); }
sub MakeDBDate { return DBSQL::MakeDBDate(@_); }
sub GetDBDate { return DBSQL::GetDBDate(@_); }
sub GetDBTimestamp { return DBSQL::GetDBTimestamp(@_); }