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 Carrillo David Carrillo
              Jun Pataleta Jun Pataleta
              CiBoT CiBoT
              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