Uploaded image for project: 'Moodle'
  1. Moodle
  2. MDL-72184

Create DML method "cast int to char"

    XMLWordPrintable

Details

    • MOODLE_311_STABLE, MOODLE_401_STABLE
    • MOODLE_401_STABLE
    • Hide

      Covered by automated testing (PHPUnit)

      Must be checked on all supported databases (Postgres, MySQL, SQL Server, Oracle)

      $ vendor/bin/phpunit --filter 'dml_test::test_cast_to_char'
      $ vendor/bin/phpunit --testsuite core_reportbuilder_testsuite
      

      Show
      Covered by automated testing (PHPUnit) Must be checked on all supported databases (Postgres, MySQL, SQL Server, Oracle) $ vendor/bin/phpunit --filter 'dml_test::test_cast_to_char' $ vendor/bin/phpunit --testsuite core_reportbuilder_testsuite

    Description

      See also MDL-72182, we found that there is no standard way to cast int to char and the sql_concat() works only in specific cases

      This suggests to add proper DML function and use the build-in functions of the databases (for example, to_char() in oracle). Then replace the sql_concat() in the dashboards reset.

      Attachments

        Issue Links

          Activity

            People

              pholden Paul Holden
              marina Marina Glancy
              David Matamoros David Matamoros
              Jun Pataleta Jun Pataleta
              CiBoT CiBoT
              David Woloszyn, Huong Nguyen, Jake Dallimore, Meirza, Michael Hawkins, Raquel Ortega, Safat Shahin, Stevani Andolo, Carlos Castillo, David Matamoros, Mikel Martín Corrales, Paul Holden
              Votes:
              0 Vote for this issue
              Watchers:
              7 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved:
                28/Nov/22

                Time Tracking

                  Estimated:
                  Original Estimate - 0 minutes
                  0m
                  Remaining:
                  Remaining Estimate - 0 minutes
                  0m
                  Logged:
                  Time Spent - 3 hours, 15 minutes
                  3h 15m