Gossamer Forum
Home : Products : Gossamer Links : Development, Plugins and Globals :

$links_db->type->{"Add_Date"} reports field type incorrectly

(Page 2 of 2)
> >
Quote Reply
Re: [Alex] $links_db->type->{"Add_Date"} reports field type incorrectly In reply to
Alex, thanks 4 your response!
Quote:
This is the proper behavior, as otherwise you run into problems because Oracle calls an INT a NUMBER, and it calls a TEXT field a CLOB. The point of the def file is to provide a common interface so you can work on a TEXT field and not worry about the differences between Oracle or MS SQL.
I understand what you wrote, but I think this is not related to my problem.

Yogi suggested to resync the def with table data, on admin interface, and it was a correct suggestion.
It worked correctly. Now the type of my Add_Date, Mod_Date, Expire_Date are reported correctly as 'DATETIME'.

I assume the original problem as solved.

Quote:
Look at GT/SQL/Type.pm to see a list of types GT::SQL supports.
Yes, I already found Type.pm earlier, and that calmed me down a bit.

Just a last question:
If Yogi is right, then def files are always resync-ed when table data is changed through admin interface.
I hope, that resync is always done, when GT::SQL::Creator is used. Is that true?

Best regards,
Webmaster33


Paid Support
from Webmaster33. Expert in Perl programming & Gossamer Threads applications. (click here for prices)
Webmaster33's products (upd.2004.09.26) | Private message | Contact me | Was my post helpful? Donate my help...
Quote Reply
Re: [webmaster33] $links_db->type->{"Add_Date"} reports field type incorrectly In reply to
Hi,

Any changes you make throught GT::SQL::* will keep the def file up to date. If you make changes outside of GT::SQL or through Raw SQL, then you must resync the def file for GT::SQL to pick up your new changes.

Cheers,

Alex
--
Gossamer Threads Inc.
Quote Reply
Re: [Alex] $links_db->type->{"Add_Date"} reports field type incorrectly In reply to
Thanks, Alex! Great!

Code:
resync the def file for GT::SQL to pick up your new changes.
I do not really want to do that, but how is it possible to do resync from plugin? What function to call?

Best regards,
Webmaster33


Paid Support
from Webmaster33. Expert in Perl programming & Gossamer Threads applications. (click here for prices)
Webmaster33's products (upd.2004.09.26) | Private message | Contact me | Was my post helpful? Donate my help...
Quote Reply
Re: [webmaster33] $links_db->type->{"Add_Date"} reports field type incorrectly In reply to
Probably something like:

$table->set_defaults();
$table->save_schema();
> >