is not used any more and exists only for history. Post new tickets on the Github account. n'est plus utilisée, et existe uniquement pour son historique. Postez les nouveaux tickets sur le compte github.

Opened 13 years ago

Closed 13 years ago

Last modified 11 years ago

#871 closed enhancement (fixed)

jDbTools should provides a way to translate any field type

Reported by: laurentj Owned by: laurentj
Priority: high Milestone: Jelix 1.2 beta
Component: jelix:db Version: 1.1
Severity: normal Keywords:
Cc: Blocked By:
Blocking: Documentation needed: no
Hosting Provider: Php version:


in jDao, there are some attemps to unify database field types. This feature will be needed also in jDbTools for future method like createTable, alterTable etc, so we won't have to create some install script for each database.

jDbTools should then provide a method which will give, for any field type, the corresponding native type for the current used database, the corresponding native type, and the corresponding php type.

jDao should then use this method. This will be a enhancement in jDao file : the developer could indicate any type for properties.

I will provide a patch

Attachments (2)

t871_v1.patch (175.3 KB) - added by laurentj 13 years ago.
patch v1
t871_v1.1.patch (175.1 KB) - added by laurentj 13 years ago.
patch v1.1

Download all attachments as: .zip

Change History (9)

comment:1 Changed 13 years ago by laurentj

  • Owner set to laurentj
  • Status changed from new to assigned

Changed 13 years ago by laurentj

patch v1

comment:2 Changed 13 years ago by laurentj

all tests passed. I think I should add more test to be sure that I didn't introduce a regression..

comment:3 Changed 13 years ago by laurentj

  • review set to review?

This is a huge patch, perhaps I will commit it directly. But if someone could do a review it will be cool.

Changed 13 years ago by laurentj

patch v1.1

comment:4 Changed 13 years ago by laurentj

fixed a little bug on unitests with appears on ubuntu.

comment:5 Changed 13 years ago by laurentj

  • Documentation needed set
  • Resolution set to fixed
  • review review? deleted
  • Status changed from assigned to closed

no review. no time. landed ! r1358. Create new tickets for regression or new bugs on jDao.

The full change log:

  • Dao files can now refers to any database field type, although it doesn't support blob fields yet
  • support of a new attribute autoincrement on the property element in jdao
  • better support of long numerical values
  • new properties on jDbField: unifiedType, unsigned, minLength, maxLength minValue maxValue
  • new methods on jDbTools: getTypeInfo, unifiedToPhpType, stringToPhpValue, escapeValue, getBooleanValue, encloseName
  • no more static properties on jDaoCompiler
  • Api of jDaoParser and jDaoGenerator has changed
  • new properties on jDaoProperty: unifiedType, autoIncrement, and the signature of the constructor has changed
  • removed the deprecated method jDb::getProfil and you should use jDb::getProfile instead

comment:6 Changed 12 years ago by laurentj

  • Blocking 861 removed

comment:7 Changed 11 years ago by laurentj

  • Documentation needed unset
Note: See TracTickets for help on using tickets.