Opened 17 years ago

Closed 17 years ago

#297 closed task (fixed)

Move all sql from .aspx pages to dataviews

Reported by: bweaver Owned by: dbmulg
Priority: major Milestone: Beta 3
Component: Public Website App. Version: 1.5.915
Severity: Keywords:
Cc: Database Engine: N/A
Operating System: N/A

Description

To begin supporting all the database engines, we need to have as little hardcoded sql as possible in source code. A vast majority of it should be in the dataviews, so the proper per-engine sql can be pulled at runtime.

Specifically, the following pages need to have their sql moved out of the code-behind file and into one or more dataviews (or possibly baked into the SecureData class, if it is sql that is completely cross-db-engine compliant and possibly reused by several other classes, such as the sql in Search.aspx):

Browse.aspx
CartView.aspx
Literature.aspx
Search.aspx
TaxonomyDetail.aspx

Some of those pages may be orphaned (i.e. not linked to by anything). If they are, we shouldn't change them but we might want to remove them.

Change History (4)

comment:1 by bweaver, 17 years ago

(In [958]) - Several fixes for postgresql installer code

  • Latest schema from dev1
  • Tweaked dataview editor to fix bug when porting dataviews to postgresql (sql of previous save being overwritten due to sec_dataview_id viewstate variable not being reset in cerain situations)
  • Fixed all hardcoded sql to explicitly specify DbType.Int32 when needed as postgresql does not do implicit conversions of parameters from string to int
Changed some hardcoded sql to use CONCAT instead of + or
for string concatenators (so it works on all 4 database engines w/o changing it as DataManager can munge CONCAT into whatever it needs to)
  • Refs #297, changed cartview.aspx to use dataview instead of hardcoded sql (this was the first test case for postgresql, so I went ahead and changed the page too)
  • All dataviews smoke tested for postgresql
  • Now able to run CT, Admin Tool and website against postgresql backend (tested reading only, not writing)

comment:2 by dbmulg, 17 years ago

Status: new → addressed

(In [1044]) Fixes #297;
Add basic taxonmygenus, taxonomyfamily pages, need more works.

comment:3 by bweaver, 17 years ago

Status: addressed → released

comment:4 by bweaver, 17 years ago

Resolution: → fixed
Status: released → closed
Note: See TracTickets for help on using tickets.