[Owncloud] oracle support

Diederik de Haas didi.debian at cknow.org
Mon Jul 23 20:14:58 UTC 2012


On Monday 23 July 2012 20:12:07 Jörn Friedrich Dreyer wrote:
> However, I would need to fix at least 248 matches 
> of ' *PREFIX*' and even more occurances of unescaped column names. In 
> the future we might add a code smell for unescaped SQL identifiers in 
> our CI server (hint hint ... this is a very good use case for CI by the 
> way).
> 
> Maybe someone of you does?

Why not extract all database code into various (DB-)classes and then use 
polymophism for the oracle (or pgsql or ...) specific implementation? (and make 
the value of '*PREFIX*' a constant).
Then instead of (for example) "INSERT INTO Contacts ....", you'd call DBContact-
>create(....)

And these are excellent cases for unit testing :-)

Just a thought.

Diederik



More information about the Owncloud mailing list