Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

EXC_BREAKPOINT String.wrap<T> #1307

Open
milan-galitein opened this issue Feb 20, 2025 · 0 comments
Open

EXC_BREAKPOINT String.wrap<T> #1307

milan-galitein opened this issue Feb 20, 2025 · 0 comments

Comments

@milan-galitein
Copy link

milan-galitein commented Feb 20, 2025

Image

I got one sentry related to this. this is not reproducible but one of my client has faced this.

at the time of creating table using try! db.run(table.create(ifNotExists: true) { t in inside create method, in below code block

let clauses: [Expressible?] = [ create(Table.identifier, tableName(), temporary ? .temporary : nil, ifNotExists), "".wrap(builder.definitions) as Expression<Void>, withoutRowid ? Expression<Void>(literal: "WITHOUT ROWID") : nil ]

"".wrap(builder.definitions) as Expression => May be due to below reason crash happen

builder.definitions is empty then crash happen


And also second crash in Screenshot you can see. below is code for it.

`extension Expressible {

// naïve compiler for statements that can’t be bound, e.g., CREATE TABLE
// FIXME: make internal (0.13.0)
public func asSQL() -> String {
    let expressed = expression
    var idx = 0
    return expressed.template.reduce("") { template, character in
        let transcoded: String

        if character == "?" {
            transcoded = transcode(expressed.bindings[idx])
            idx += 1
        } else {
            transcoded = String(character)
        }
        return template + transcoded
    }
}

}`

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant