Re: [Tutor] How to write database-agnostic python code? (Is this even possible?)

2017-09-12 Thread boB Stepp
On Tue, Sep 12, 2017 at 8:58 PM, boB Stepp wrote: > On Tue, Sep 12, 2017 at 2:17 PM, Mats Wichmann wrote: >> On 09/12/2017 01:05 PM, boB Stepp wrote: >>> As I continue to read about SQL, one thing jumps out: There are many >>> differences between how SQL statements are implemented among the >>>

Re: [Tutor] How to write database-agnostic python code? (Is this even possible?)

2017-09-12 Thread boB Stepp
On Tue, Sep 12, 2017 at 2:17 PM, Mats Wichmann wrote: > On 09/12/2017 01:05 PM, boB Stepp wrote: >> As I continue to read about SQL, one thing jumps out: There are many >> differences between how SQL statements are implemented among the >> different database products. Even for relatively simple,

Re: [Tutor] How to write database-agnostic python code? (Is this even possible?)

2017-09-12 Thread Albert-Jan Roskam
(sorry for top posting) There are various SQL abstraction layers for this. I have only used Sqlalchemy. This package has two APIs: query and ORM. You might want to look at the query API. This is closer to SQL than ORM. You can use straight(obj) to inspect the SQL that's emitted

Re: [Tutor] How to write database-agnostic python code? (Is this even possible?)

2017-09-12 Thread Mats Wichmann
On 09/12/2017 01:05 PM, boB Stepp wrote: > As I continue to read about SQL, one thing jumps out: There are many > differences between how SQL statements are implemented among the > different database products. Even for relatively simple, > straightforward things like field concatenation. One DB

[Tutor] How to write database-agnostic python code? (Is this even possible?)

2017-09-12 Thread boB Stepp
As I continue to read about SQL, one thing jumps out: There are many differences between how SQL statements are implemented among the different database products. Even for relatively simple, straightforward things like field concatenation. One DB might use "||" as the operator. Another uses "+"