Skip to content
Snippets Groups Projects
  • Robert Roland's avatar
    5e32fb96
    Convert ID Integer columns to strings (#13107) · 5e32fb96
    Robert Roland authored
    * Convert ID Integer columns to strings
    
    Converts any ID (PK or FK) column that's derived from a :type/Integer to
    a string in query middleware (at the end of query processing.)
    
    JavaScript treats all numbers as floats, with a 52 bit mantissa. Any
    integer larger than 52 bits ends up looking like a strange floating
    point number.
    
    This will allow the UI to properly display a number n where n > 2^52 or
    n < -2^52
    
    Resolves #5816
    
    [ci all]
    
    * code review feedback
    
    * skip the reduce phase if there are no columns to update
    
    * handle joins properly
    
    joins have two :field-id values in them. handle them appropriately
    
    * update cloverage build
    
    * update tools.namespace for newer cloverage
    
    * handle all query types more gracefully
    
    Only in cases where we have an explicit :field-id do we try to do the
    coercions to strings. It's important to not filter the :fields clause in
    such a way that anything is left out - if they were, the keep-indexed
    call would modify the wrong values in the result.
    Convert ID Integer columns to strings (#13107)
    Robert Roland authored
    * Convert ID Integer columns to strings
    
    Converts any ID (PK or FK) column that's derived from a :type/Integer to
    a string in query middleware (at the end of query processing.)
    
    JavaScript treats all numbers as floats, with a 52 bit mantissa. Any
    integer larger than 52 bits ends up looking like a strange floating
    point number.
    
    This will allow the UI to properly display a number n where n > 2^52 or
    n < -2^52
    
    Resolves #5816
    
    [ci all]
    
    * code review feedback
    
    * skip the reduce phase if there are no columns to update
    
    * handle joins properly
    
    joins have two :field-id values in them. handle them appropriately
    
    * update cloverage build
    
    * update tools.namespace for newer cloverage
    
    * handle all query types more gracefully
    
    Only in cases where we have an explicit :field-id do we try to do the
    coercions to strings. It's important to not filter the :fields clause in
    such a way that anything is left out - if they were, the keep-indexed
    call would modify the wrong values in the result.
Code owners
Assign users and groups as approvers for specific file changes. Learn more.