Skip to content

Commit

Permalink
memsql - repeatString and char impl
Browse files Browse the repository at this point in the history
  • Loading branch information
gs-jp1 authored Dec 14, 2023
1 parent d54ea01 commit 0a01cb2
Showing 1 changed file with 4 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -79,7 +79,8 @@ function <<access.private>> meta::relational::functions::sqlQueryToString::memsq
dynaFnToSql('adjust', $allStates, ^ToSql(format='adddate(%s)', transform={p:String[3] | $p->at(0) + ', INTERVAL ' + $p->at(1) + ' ' + $p->at(2)->mapToDBUnitType()})),
dynaFnToSql('atan2', $allStates, ^ToSql(format='atan2(%s,%s)')),
dynaFnToSql('booland', $allStates, ^ToSql(format='every(%s)')),
dynaFnToSql('boolor', $allStates, ^ToSql(format='any(%s)')),
dynaFnToSql('boolor', $allStates, ^ToSql(format='any(%s)')),
dynaFnToSql('char', $allStates, ^ToSql(format='char(%s)')),
dynaFnToSql('concat', $allStates, ^ToSql(format='concat%s', transform={p:String[*]|$p->joinStrings('(', ', ', ')')})),
dynaFnToSql('convertDate', $allStates, ^ToSql(format='%s', transform={p:String[*] | $p->convertToDateMemSQL()})),
dynaFnToSql('convertVarchar128', $allStates, ^ToSql(format='convert(%s, CHAR)')),
Expand Down Expand Up @@ -122,7 +123,8 @@ function <<access.private>> meta::relational::functions::sqlQueryToString::memsq
dynaFnToSql('previousDayOfWeek', $allStates, ^ToSql(format='adddate(%s, INTERVAL case when %s - dayofweek(%s) >= 0 then %s - dayofweek(%s) - 7 else %s - dayofweek(%s) end DAY)', transform={p:String[1..2] | $p->formatMostRecentMemSQL('curdate()')}, parametersWithinWhenClause = [false, false])),
dynaFnToSql('quarter', $allStates, ^ToSql(format='quarter(%s)')),
dynaFnToSql('quarterNumber', $allStates, ^ToSql(format='quarter(%s)')),
dynaFnToSql('rem', $allStates, ^ToSql(format='mod(%s, %s)')),
dynaFnToSql('rem', $allStates, ^ToSql(format='mod(%s, %s)')),
dynaFnToSql('repeatString', $allStates, ^ToSql(format='%s', transform={p:String[2] | 'lpad(\'\', length(' + $p->at(0) + ') * ' + $p->at(1) + ', ' + $p->at(0) + ')'})),
dynaFnToSql('right', $allStates, ^ToSql(format='right(%s, %s)')),
dynaFnToSql('round', $allStates, ^ToSql(format='round(%s, %s)', transform=transformRound_String_MANY__String_MANY_)),
dynaFnToSql('rtrim', $allStates, ^ToSql(format='rtrim(%s)')),
Expand Down

0 comments on commit 0a01cb2

Please sign in to comment.