Does Xataface use any esoteric MySQL fundtions?

A place to discuss development of the Xataface core.

Does Xataface use any esoteric MySQL fundtions?

Postby ccrvic » Mon Feb 16, 2009 3:51 pm

I'm really excited about Xataface. It's by far the easiest way I've ever found of building a DB-based app...

So I've now pretty much finished two apps, and all's going well. But these are apps for me - the next app I need to write is for a customer. And this particular customer is a pain in the neck - they have historically been a Microsoft shop (although I've now got 3 Linux servers into the organisation), and I need to integrate with their current application. That sits on top of SQL Server. Bah.

I had a quick look at trying to build something out of a proxy server, converting the MySQL calls into SQL Server ones. That looks to be a non-starter; the complexity is high, and it's going to take me forever to test everything. So my next solution is to port Xataface to SQL Server.

I've had a skim over the code - a grep for "mysql_" - and nothing looks too tricky. It's unfortunate that the code doesn't use Dataface/DB.php more, but them's the breaks. So I've got to wondering whether it would be feasible to replace all the direct mysql_* calls with something like PEAR::MDB2.

This doesn't look overly complicated - is there anything obvious I've missed?

I'm used to doing this sort of thing in Perl - the DBI module has done wonders for me several times.

So - any comments? Am I biting off way more than I can chew? Should I learn to spell "results" before I go any further?

Vic.
ccrvic
 
Posts: 11
Joined: Sat Feb 14, 2009 4:56 am

Postby shannah » Mon Feb 16, 2009 6:19 pm

Hi Vic,

While it is not impossible to port over to SQL server, it will definitely be more difficult than just changing mysql_query() to odbc_query() or some such thing.

Xataface makes extensive use of MySQL features. Some examples of this include:

1. It uses show columns to get information about each table... Not sure if this is supported by SQL Server -- probably not.

2. It uses backticks around column names in SQL queries.

There are other problems that will certainly need to be overcome, but these are two that come to mind that will need some creativity and testing.
shannah
 
Posts: 4457
Joined: Wed Dec 31, 1969 5:00 pm

Postby ccrvic » Mon Feb 16, 2009 6:41 pm

shannah wrote:1. It uses show columns to get information about each table... Not sure if this is supported by SQL Server -- probably not.


SQL Server is definitely not as friendly as MySQL, but can do this.

MDB2 has a Reverse module, which gives you a tableInfo() method. This will work for MySQL as well as SQL Server

shannah wrote:2. It uses backticks around column names in SQL queries.


MDB2 has the quoteIdentifier() method. It is limited *slightly* because of limitations in the various backend (you can't quote a dot, for example), but I doubt that will be a major issue.

shannah wrote:There are other problems that will certainly need to be overcome, but these are two that come to mind that will need some creativity and testing.


If you can think of any more, please sing out. I think this might be a goer!

Vic.
ccrvic
 
Posts: 11
Joined: Sat Feb 14, 2009 4:56 am


Return to Xataface Developers

Who is online

Users browsing this forum: No registered users and 16 guests

cron
Powered by Dataface
© 2005-2007 Steve Hannah All rights reserved