Opened 19 years ago

Closed 18 years ago

Last modified 17 years ago

#240 closed enhancement (wontfix)

DB helper classes and pgsql support (3rd attempt)

Reported by: fvilas@… Owned by: Isaac Richards
Priority: minor Milestone: 0.20
Component: mythtv Version: head
Severity: low Keywords:
Cc: telenieko@… Ticket locked: yes

Description

Provides database helper functions as members of a class hierarchy, and PostgreSQL support.

Attachments (14)

pg.sql (1.6 KB) - added by fvilas@… 19 years ago.
Needed to init the database, like database/mc.sql
pgsql_support.patch-7095.gz (45.9 KB) - added by fvilas@… 19 years ago.
diff against svn 7095
dbhelper_classes.tar.gz (4.5 KB) - added by fvilas@… 19 years ago.
database helper classes. Un-tar these in libs/libmythtv.
pgsql_support.patch-7144.gz (45.9 KB) - added by fvilas@… 19 years ago.
diff against svn 7144. If there are still conflicts, please explain.
pgsql_support.patch-7144-new.gz (45.3 KB) - added by fvilas@… 19 years ago.
diff against svn 7144. If there are still conflicts, please explain. (should be fixed)
pgsql_support.patch-7191.gz (45.3 KB) - added by fvilas@… 19 years ago.
diff against svn 7191
pgsql_support.patch-7206.gz (45.2 KB) - added by fvilas@… 19 years ago.
diff against svn 7206
pgsql_support.patch-7226.gz (45.3 KB) - added by fvilas@… 19 years ago.
diff against svn 7226
db_update.7396.tar.gz (46.8 KB) - added by fvilas@… 19 years ago.
contains diff against 7396 and additional files needed. This supersedes all previous files on this ticket.
db_update.8525.tar.gz (40.7 KB) - added by fvilas@… 18 years ago.
diff and other necessary files.
db_update.8886.tar.gz (41.3 KB) - added by fvilas@… 18 years ago.
required files and diff against 8886
pgsql_support.patch-9520.gz (42.5 KB) - added by fvilas@… 18 years ago.
patch for pgsql support in svn 9520 (additional files now included in patch)
pgsql_support.patch-9591.gz (42.6 KB) - added by fvilas@… 18 years ago.
patch for pgsql support in svn 9591
pgsql_support.patch-9869.gz (40.2 KB) - added by fvilas 18 years ago.
patch for pgsql support in svn 9869

Download all attachments as: .zip

Change History (33)

Changed 19 years ago by fvilas@…

Attachment: pg.sql added

Needed to init the database, like database/mc.sql

Changed 19 years ago by fvilas@…

Attachment: pgsql_support.patch-7095.gz added

diff against svn 7095

Changed 19 years ago by fvilas@…

Attachment: dbhelper_classes.tar.gz added

database helper classes. Un-tar these in libs/libmythtv.

comment:1 Changed 19 years ago by Isaac Richards

Resolution: fixed
Status: newclosed

Patch is unuseable, due to unresolved conflicts.

comment:2 Changed 19 years ago by Isaac Richards

Resolution: fixed
Status: closedreopened

comment:3 Changed 19 years ago by Isaac Richards

Resolution: invalid
Status: reopenedclosed

Changed 19 years ago by fvilas@…

Attachment: pgsql_support.patch-7144.gz added

diff against svn 7144. If there are still conflicts, please explain.

comment:4 Changed 19 years ago by anonymous

Resolution: invalid
Status: closedreopened

comment:5 Changed 19 years ago by cardoe@…

I see you picked up some Design Patterns ideas and some true OOP C++ for this patch. However I'd still say in it's current form it still needs some rework and redesign. Isaac, I'm willing to work on this with you this weekend or whenever to get this fixed to where it needs to be before it gets commited.

comment:6 Changed 19 years ago by fvilas@…

When I setup this ticket, I left things in the default settings.

I'm open to any help I can get on this, since I'd like to get it accepted and continue to try to improve the db backend. It also wouldn't hurt not to have to merge changes after an "svn up" on my box about once a week. Let me know where I need to start.

comment:7 Changed 19 years ago by Isaac Richards

Resolution: invalid
Status: reopenedclosed

Grep for 'mine'. The patch will NOT compile, let alone work properly.

Changed 19 years ago by fvilas@…

diff against svn 7144. If there are still conflicts, please explain. (should be fixed)

comment:8 Changed 19 years ago by fvilas@…

Resolution: invalid
Status: closedreopened

The patch issues should be fixed with the new one. I should have done a "make clean && make" before creating/submitting the patch... lesson learned.

Changed 19 years ago by fvilas@…

Attachment: pgsql_support.patch-7191.gz added

diff against svn 7191

Changed 19 years ago by fvilas@…

Attachment: pgsql_support.patch-7206.gz added

diff against svn 7206

Changed 19 years ago by fvilas@…

Attachment: pgsql_support.patch-7226.gz added

diff against svn 7226

Changed 19 years ago by fvilas@…

Attachment: db_update.7396.tar.gz added

contains diff against 7396 and additional files needed. This supersedes all previous files on this ticket.

comment:9 Changed 19 years ago by fvilas@…

Comments on this are welcome... Please let me know what else we need to do to get a more DB agnostic backend. If this model works, someone (me or someone else, I don't care) can start on a class for SQLite, which should finish making the "I want a random DB" people happy, temporarily.

comment:10 Changed 19 years ago by Isaac Richards

(In [7420]) Bunch of numRowsEffected -> size, " -> ', and a few datetime formatting changes from bug #240.

Refs #240.

comment:11 Changed 19 years ago by bjm <bjm@…>

Priority: minormajor
Type: enhancementdefect

Quoting such as single quotes in a program title fail to save properly creating a rule with an empty title.

To reproduce, chosse something like "Isaac's Storm" on The History Channel. Press "R" or set a new rule from the recording options page. The frontend reports:

2005-10-09 13:38:19.920 Connecting to backend server: 192.168.0.33:6543 (try 1of 5)
2005-10-09 13:39:05.112 DB Error (simpledbstorage update):
Query was:

No error type from QSqlError?  Strange...

comment:12 Changed 19 years ago by Isaac Richards

Priority: majorminor
Type: defectenhancement

File a new bug for stuff that's actually in svn.

comment:13 Changed 18 years ago by danielk

Milestone: 0.20
Severity: mediumlow
Version: head

Pushing this enhancement ticket to 0.20.

Changed 18 years ago by fvilas@…

Attachment: db_update.8525.tar.gz added

diff and other necessary files.

Changed 18 years ago by fvilas@…

Attachment: db_update.8886.tar.gz added

required files and diff against 8886

comment:14 Changed 18 years ago by fvilas@…

The diff against 8886 fixes the "No error type from QSqlError? Strange..." errors that were introduced when using PostgreSQL. If anyone is keeping up with these patches, please post any errors you are receiving, so I can try to get them fixed.

What changes, design or otherwise, are still required to get this submitted?

Changed 18 years ago by fvilas@…

Attachment: pgsql_support.patch-9520.gz added

patch for pgsql support in svn 9520 (additional files now included in patch)

Changed 18 years ago by fvilas@…

Attachment: pgsql_support.patch-9591.gz added

patch for pgsql support in svn 9591

Changed 18 years ago by fvilas

Attachment: pgsql_support.patch-9869.gz added

patch for pgsql support in svn 9869

comment:15 Changed 18 years ago by Isaac Richards

Resolution: wontfix
Status: reopenedclosed

Marking as 'wontfix'.

Don't really want to deal with the hassle of supporting multiple database types.

Any change away from mysql will likely be to an embedded db with a server speaking the myth protocol & abstracting many of the more complex queries so simple clients wouldn't have speak SQL.

comment:16 Changed 18 years ago by anonymous

That, is a sad decission.

I thought linux was all about choice. I guess mythtv isn't.

What I don't get is mysql is required via qt, not via myth directly. Now qt supports both DB backends, so abstraction should be possible, where mythtv doesn't care about which DB backend is used.

So if mythtv uses direct mysql access, then why does it depend on QT having mysql support?

Also, and I know it's kinda to little to late I suppose, what feature does mythtv require form mysql that postgres doesn't have, which would make it so hard to support? I ask this because in all my applications I have written, I try to not depend on the database. I have either a class/c-file/list of defines for my accessing a database, and use those function calls, wether it's mysql or postgres or what not. Sure there might be a little overhead when using a function to translate to your database of choice, but it would allow the users to choose, without forcing anything onto the user.

I switched away from mythtv year and a half ago, because I got fedup of maintaining 2 databases, Linux is all about choice, and I didn't feel good about being forced to either switch to mysql for all my database needs or having to deal with maintaining both. I read about 0.20 possible support of postgres and figured it was worth trying again, this makes me wanting to leave, though I do like myth a lot.

comment:17 Changed 17 years ago by telenieko@…

Cc: telenieko@… added

+1 for database abstraction !!

comment:18 Changed 17 years ago by rwhite@…

Now that MySQL has begun its abandonment of the open source community by forking its offering so that the "community server edition" is a second class citizen, will the database independence effort be restarted?

comment:19 Changed 17 years ago by Janne Grunau

Ticket locked: set

no, the plan is still to use a embedded database

Note: See TracTickets for help on using tickets.