github ts-safeql/safeql @ts-safeql/eslint-plugin@3.6.0

latest releases: @ts-safeql/test-utils@0.0.35, @ts-safeql/shared@3.6.0, @ts-safeql/generate@3.6.0...
one day ago

Minor Changes

  • d215453: Added support for literal inference. SafeQL will now be able to infer string literals from your queries:

    // Before:
    sql<{ col: string }>`SELECT ${"value"} FROM table`;
    sql<{ col: string }>`SELECT CASE WHEN ${condition} THEN 'a' ELSE 'b' END`;
    
    // After:
    sql<{ col: "value" }>`SELECT ${"value"} FROM table`;
    sql<{ col: "a" | "b" }>`SELECT CASE WHEN ${condition} THEN 'a' ELSE 'b' END`;

    This behavior could be disabled or adjusted in the connections.inferLiterals.

Don't miss a new safeql release

NewReleases is sending notifications on new releases.