• Open Menu Close Menu
  • Apple
  • Shopping Bag
  • Apple
  • Mac
  • iPad
  • iPhone
  • Watch
  • TV
  • Music
  • Support
  • Search apple.com
  • Shopping Bag

Lists

Open Menu Close Menu
  • Terms and Conditions
  • Lists hosted on this site
  • Email the Postmaster
  • Tips for posting to public mailing lists
I'm making a Firebird plugin for WebObjects
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

I'm making a Firebird plugin for WebObjects


  • Subject: I'm making a Firebird plugin for WebObjects
  • From: Aaron Rosenzweig <email@hidden>
  • Date: Sat, 19 Aug 2006 17:41:47 -0400

Hey WOFriends - I may just have come across an area where the WebObjects API is not flexible enough.

I'm so close to finishing a plugin for Firebird that will allow us to "Synchronize Schema". Really! I can see the option available in EOModeler now and it works...almost!

This stumbling block I'm at may be impossible to get over. From what I can tell, "RENAME TABLE" syntax is not standard syntax; however, many databases support it. Firebird is not one of them. What I need is this:

        public NSArray statementsToRenameTableNamed(String s, String s1, NSDictionary nsdictionary)
        {
            return new NSArray(_expressionForString("rename table " + s + " to " + s1));
        }

Scratching my head, I tried a syntax that works in MySQL but fails in Firebird (again, probably not standard SQL):

create table NEW_PERSON select * from PERSON;

I thought, if the above worked, I could then immediately afterwards delete the original table. 

I'm running out of ideas WOFriends... and we're so close. Seems like just about everything else is working. Here is a sample output of the "Synchronize Schema" command I currently have:

alter table PERSON_COMPANY drop constraint PERSON_COMPANY_company_FK 
alter table PERSON_COMPANY drop constraint PERSON_COMPANY_person_FK 
drop table EO_PK_TABLE
alter table PERSON drop constraint PERSON_PK
rename table PERSON to EO_OLD_PERSON
CREATE table PERSON (FIRST_NAME VARCHAR(255) NOT NULL, ID BIGINT NOT NULL, LAST_NAME VARCHAR(255) NOT NULL, START_DATE DATE, TITLE VARCHAR(255))
insert into PERSON (FIRST_NAME, ID, LAST_NAME, TITLE) select FIRST_NAME, ID, LAST_NAME, TITLE from EO_OLD_PERSON
drop table EO_OLD_PERSON
/* The 'Create Primary Key Support' option is unavailable. */
alter table PERSON add constraint PERSON_PK  primary key (ID)
alter table PERSON_COMPANY add constraint PERSON_COMPANY_person_FK foreign key (PERSON_ID) references PERSON (ID)
alter table PERSON_COMPANY add constraint PERSON_COMPANY_company_FK foreign key (COMPANY_ID) references COMPANY (ID)

-- Aaron

http://lasvegas.roadmarketing.net/

http://www.jewelryluv.com/

http://www.cocoanutstech.com/


 _______________________________________________
Do not post admin requests to the list. They will be ignored.
Webobjects-dev mailing list      (email@hidden)
Help/Unsubscribe/Update your Subscription:

This email sent to email@hidden

  • Prev by Date: Re: Lets Start doing it
  • Next by Date: WebObjects Foundation
  • Previous by thread: Re: Lets Start doing it
  • Next by thread: Missing com.apple.client.directtoweb
  • Index(es):
    • Date
    • Thread