Sha256: 3efcc7c7760144cc54c31177cced1c92f8ab1bf604868827176b13204a5c4e2c
Contents?: true
Size: 940 Bytes
Versions: 9
Compression:
Stored size: 940 Bytes
Contents
# frozen_string_literal: true module RailsWorkflow module Db module Mysql COUNT_STATUSES = <<-SQL SELECT status, cnt FROM ( SELECT @row_number:=CASE WHEN @status=status THEN @row_number+1 ELSE 1 END AS row_number, cnt, @status:=status as status FROM ( SELECT count(*) AS cnt, a.status FROM rails_workflow_processes a LEFT JOIN rails_workflow_processes b ON a.status=b.status GROUP BY a.status,a.id ) tmp, (SELECT @row_number:=0,@status:=-1) AS t ) t1 WHERE row_number = 1 SQL end end end
Version data entries
9 entries across 9 versions & 1 rubygems