Sequelize: Feature: String Functions like LEFT()

Created on 20 Jan 2016  路  3Comments  路  Source: sequelize/sequelize

I would really appreciate being able to SELECT a substring of text, especially when retrieving a list of items to show as previews. Does anyone know whether this exists or is being worked on?

Thanks!

Most helpful comment

attributes for find supports a syntax like:

attributes: [
  [db.fn('LEFT', db.col('mycolumn'), 10), 'mycolumn_cut']
]

All 3 comments

attributes for find supports a syntax like:

attributes: [
  [db.fn('LEFT', db.col('mycolumn'), 10), 'mycolumn_cut']
]

Thanks! This is exactly what I needed!

attributes for find supports a syntax like:

attributes: [
  [db.fn('LEFT', db.col('mycolumn'), 10), 'mycolumn_cut']
]

what is db?

Was this page helpful?
0 / 5 - 0 ratings

Related issues

GuilhermeReda picture GuilhermeReda  路  3Comments

evantahler picture evantahler  路  3Comments

dylanpyle picture dylanpyle  路  3Comments

wibud picture wibud  路  3Comments

couds picture couds  路  3Comments