有没有办法按续集中列的长度(字符)来命令我的结果?
例如,如果我搜索“lor”,我想得到以下结果:
results
________________
lor
lorem
lorem ip
lorem ips
lorem ipsum
感激不尽的任何建议
答案 0 :(得分:1)
您可以使用order: [
[sequelize.fn('length', sequelize.col('column_name')), 'DESC']
]
,例如:
DATA_PERIOD = 0.01 # 1/100 of a second
def outer_func():
index = 0
def parser(x):
index += 1
datetime = datetime.strptime(index * DATA_PERIOD,'%f')
return datetime
return parser
parser = outer_func()