question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Null string-literals not working within Arrays

See original GitHub issue

A simple way to reproduce this would be to add "NULL" for strList in PgArraySupportSuite:

  val testRec1 = ArrayBean(33L, List(101, 102, 103), Buffer(1L, 3L, 5L, 7L), List(1,7), List("robert}; drop table students--", "NULL"),
    Some(Vector("str1", "str3", "", " ")), List(uuid1, uuid2), List(Institution(113)), None)

What happens is that "NULL" String-literal gets interpreted as an actual null within the DB.

Issue Analytics

  • State:closed
  • Created 7 years ago
  • Comments:8 (4 by maintainers)

github_iconTop GitHub Comments

1reaction
tmingleicommented, Feb 7, 2017

Fixed. Can you help check?

0reactions
tmingleicommented, Feb 8, 2017

Just released slick-pg v0.15.0-M4.

Read more comments on GitHub >

github_iconTop Results From Across the Web

c++ - Inconsistency between std::string and string literals
String literals by definition have a (hidden) null character at the ... is consistent with how auto iterator work any other C-style array....
Read more >
When a var really isn't a var (ft. String Literals) - Zig NEWS
String literals are constant single-item Pointers to null-terminated byte arrays. ... A: It is an array with a null value at the end....
Read more >
String.raw() - JavaScript - MDN Web Docs
raw() is called with an object whose raw property doesn't have a length property or a non-positive length , it returns an empty...
Read more >
Strings: C-strings vs. strings as objects
Recall that a C-string is implemented as a null-terminated array of type char. No built-in string type in C. · NOT every character...
Read more >
Zig Language Reference
String literals are constant single-item Pointers to null-terminated byte arrays. The type of string literals encodes both the length, and the fact that ......
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found