[Zope] Please help me ! Postgre DA Field Types
fowlertrainer at anonym.hu
fowlertrainer at anonym.hu
Tue Apr 27 04:25:59 EDT 2004
Hello !
I want to continue the my project.
http://www.zope.org/Members/fowlertrainer
I need to get all of the base field types with postgresql da.
http://www.zope.org/Members/spinwing/ZSQL_Results
rec = context.retrieve_fields_from_test_table()
print "-" * 80
print "Table field names"
print "-" * 80
for name in rec.names():
print name
print "-" * 80
print "Fields definitions"
print "-" * 80
dict = rec.data_dictionary()
for key in dict.keys():
print dict[key]
Base field types:
- char
- varchar
- int
- smallint
- bigint
- float
- decimal
- boolean
- blob
- memo
- double prec.
- text
- date
- time
- timestamp
The fields must be named f*, where * is the type of field. Example:
fint, fchar, fmemo.
Because I have not postgresql server (windows :-( ), anybody help me
to I get the field types ?
Example - The MySQL field types:
{'name': 'fbool', 'type': 'i', 'null': 1, 'width': 0}
{'name': 'fbit', 'type': 'i', 'null': 1, 'width': 0}
{'name': 'fdate', 'type': 'd', 'null': 1, 'width': 0}
{'name': 'ftime', 'type': 't', 'null': 1, 'width': 0}
{'name': 'fdouble', 'type': 'n', 'null': 1, 'width': 0}
{'name': 'fyear', 'type': 'i', 'null': 1, 'width': 0}
{'name': 'fdatetime', 'type': 'd', 'null': 1, 'width': 0}
{'name': 'finteger', 'type': 'i', 'null': 1, 'width': 0}
{'name': 'fchar', 'type': 't', 'null': 1, 'width': 0}
{'name': 'ftext', 'type': 't', 'null': 1, 'width': 0}
{'name': 'fvarchar', 'type': 't', 'null': 1, 'width': 0}
{'name': 'fts', 'type': 'd', 'null': 0, 'width': 0}
{'name': 'ftinyint', 'type': 'i', 'null': 1, 'width': 0}
{'name': 'id', 'type': 'i', 'null': 1, 'width': 0}
{'name': 'fblob', 'type': 't', 'null': 1, 'width': 0}
{'name': 'fmediumint', 'type': 'i', 'null': 1, 'width': 0}
{'name': 'fsmallint', 'type': 'i', 'null': 1, 'width': 0}
{'name': 'fnumeric', 'type': 'n', 'null': 1, 'width': 0}
{'name': 'fint', 'type': 'i', 'null': 1, 'width': 0}
{'name': 'fdecimal', 'type': 'n', 'null': 1, 'width': 0}
{'name': 'fbigint', 'type': 'l', 'null': 1, 'width': 0}
{'name': 'ffloat', 'type': 'n', 'null': 1, 'width': 0}
{'name': 'freal', 'type': 'n', 'null': 1, 'width': 0}
Can anybody help me ?
Thanx for it.
--
Üdv/Kind of Regards:
fowlertrainer at anonym.hu
mailto:fowlertrainer at anonym.hu
More information about the Zope
mailing list