Tryton - Issues

 

Issue7266

Title Add cast method on field
Priority feature Status resolved
Superseder Nosy List ced, reviewbot, roundup-bot
Type feature request Components trytond
Assigned To ced Keywords review
Reviews 37141002
View: 37141002

Created on 2018-03-26.16:10:29 by ced, last changed by roundup-bot.

Messages
New changeset 7eb99a6315ef by Cédric Krier in branch 'default':
Use sql_cast from Field
http://hg.tryton.org/modules/sale/rev/7eb99a6315ef
New changeset 2d3bcbb80d97 by Cédric Krier in branch 'default':
Use sql_cast from Field
http://hg.tryton.org/modules/party/rev/2d3bcbb80d97
New changeset f00d059dc35a by Cédric Krier in branch 'default':
Use sql_cast from Field
http://hg.tryton.org/modules/account/rev/f00d059dc35a
New changeset f9835a33da50 by Cédric Krier in branch 'default':
Add sql_cast on Field
http://hg.tryton.org/trytond/rev/f9835a33da50
review37141002 updated at https://codereview.tryton.org/37141002/#ps40001
review37141002 updated at https://codereview.tryton.org/37141002/#ps20001
review37141002 updated at https://codereview.tryton.org/37141002/#ps1
msg39424 (view) Author: [hidden] (ced) (Tryton committer) (Tryton translator) Date: 2018-03-26.16:10:29
issue7264 showed that there are particular cases where we need to perform a cast on an expression to get the right type for a field. But SQLite does not support DATE, DATETIME nor TIME as cast type.
So I propose to add a generic sql_cast method on field that will return the SQL expression cast.
This will also simplify the write of such expression which implied to use sql_type etc.
History
Date User Action Args
2018-04-30 15:26:54roundup-botsetmessages: + msg40468
2018-04-30 15:26:25roundup-botsetmessages: + msg40467
2018-04-30 15:26:08roundup-botsetmessages: + msg40466
2018-04-30 14:59:05roundup-botsetstatus: testing -> resolved
nosy: + roundup-bot
messages: + msg40464
2018-03-27 22:44:52reviewbotsetmessages: + msg39466
2018-03-26 18:19:00reviewbotsetmessages: + msg39433
2018-03-26 16:48:20reviewbotsetnosy: + reviewbot
messages: + msg39427
2018-03-26 16:13:29cedsetstatus: in-progress -> testing
reviews: 37141002
keyword: + review
2018-03-26 16:10:29cedcreate

Showing 10 items. Show all history (warning: this could be VERY long)