Skip to content
Snippets Groups Projects
This project is mirrored from https://github.com/metabase/metabase. Pull mirroring updated .
  1. Feb 23, 2023
  2. Feb 22, 2023
  3. Feb 21, 2023
    • Cam Saul's avatar
      Fix reflection warnings; kondo config & parallel test improvements (#28378) · 56b28e5b
      Cam Saul authored
      
      * MISC improvements
      
      * Update test/metabase/models/secret_test.clj
      
      Co-authored-by: default avatarmetamben <103100869+metamben@users.noreply.github.com>
      
      * Update .clj-kondo/hooks/clojure/test.clj
      
      Co-authored-by: default avatarmetamben <103100869+metamben@users.noreply.github.com>
      
      * Update .clj-kondo/hooks/clojure/test.clj
      
      Co-authored-by: default avatarmetamben <103100869+metamben@users.noreply.github.com>
      
      ---------
      
      Co-authored-by: default avatarmetamben <103100869+metamben@users.noreply.github.com>
      Unverified
      56b28e5b
    • john-metabase's avatar
      Improves consistency of substring in MBQL (#28067) · a39b710e
      john-metabase authored
      
      * Improves consistency of substring in MBQL
      
      Standard SQL SUBSTRING() uses a 1-based start index, with various drivers
      handling a 0 start index in different ways. To make the behavior of substring
      consistent across drivers, we will always convert a 0 start index in MBQL
      to a 1 in SQL. The ->honeysql implementation of substring has been generalized
      and drivers can now override just the name of the substring function, or the
      entire expression if necessary. SQL Server now calls the parent implementation.
      
      Resolves #12445
      
      * Fixes substring from 0 in Mongo
      
      * Adds arg to substring parent call
      
      * Fix docs and helper text for substring()
      
      * Adds schema to require positive integer index for substring
      
      * WIP, adds frontend validation for substring index arg
      
      * Adds frontend test for substring arg validation
      
      * Updates substring test to expect exception on index 0
      
      * Update src/metabase/driver/sql/query_processor.clj
      
      Co-authored-by: default avatarmetamben <103100869+metamben@users.noreply.github.com>
      
      * Use s/if instead of s/conditional
      
      * Fix substring call in mysql substring spec
      
      * Reverts driver and sql.qp changes for substring index
      
      * Reverts changes to dispatch-by-clause-name-or-class
      
      * Fixes typeinferencer test substring index
      
      * Adds test for canonicalizing substring
      
      * Fixes substring canonicalization with extra args
      
      * Updates string extracts test to account for substring canonicalization
      
      * Rewrites resolver validation application
      
      * Adds test case for frontend expression validation errors
      
      * Fixes frontend compiler spec for new substring validation
      
      ---------
      
      Co-authored-by: default avatarmetamben <103100869+metamben@users.noreply.github.com>
      Unverified
      a39b710e
    • dpsutton's avatar
      Custom migrations (#28175) · 30e731e3
      dpsutton authored
      
      * Custom migrations
      
      Current syntax:
      
      specify the migration with
      ```
        - changeSet:
            id: v46.00-080
            author: dpsutton
            comment: Uppercases all Card names
            changes:
              - customChange:
                  class: "metabase.db.custom_migrations.ReversibleUppercaseCards"
      ```
      
      and in the new namespace metabase.db.custom-migrations:
      
      ```clojure
      (defmigration UppercaseCards
        (db/execute! {:update :report_card
                      :set    {:name :%upper.name}}))
      
      (def-reversible-migration ReversibleUppercaseCards
        (db/execute! {:update :report_card
                      :set    {:name :%upper.name}})
        (db/execute! {:update :report_card
                      :set    {:name :%lower.name}}))
      ```
      
      * Use db provided by liquibase
      
      * edit docstring
      
      * set *warn-on-reflection* to fix lint error & rebase
      
      ---------
      
      Co-authored-by: default avatarNoah Moss <noahbmoss@gmail.com>
      Co-authored-by: default avatarNoah Moss <32746338+noahmoss@users.noreply.github.com>
      Unverified
      30e731e3
Loading