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

Add feature extractors for SQLException #1421

Open
vlsi opened this issue May 3, 2023 · 6 comments
Open

Add feature extractors for SQLException #1421

vlsi opened this issue May 3, 2023 · 6 comments
Labels

Comments

@vlsi
Copy link
Collaborator

vlsi commented May 3, 2023

Platform (all, jvm, js): jvm
Extension (none, kotlin 1.3): none

Code related feature

import java.sql.SQLException

val Expect<SQLException>.errorCode: FeatureExpect<SQLException, Int>
    get() = feature("errorCode", SQLException::getErrorCode)

fun Expect<SQLException>.errorCode(assertionCreator: Expect<Int>.() -> Unit) =
    feature("errorCode", SQLException::getErrorCode, assertionCreator)

val Expect<SQLException>.sqlState: FeatureExpect<SQLException, String>
    get() = feature("sqlCode", SQLException::getSQLState)

fun Expect<SQLException>.sqlState(assertionCreator: Expect<String>.() -> Unit) =
    feature("sqlCode", SQLException::getSQLState, assertionCreator)

I wonder if that can be autogenerated with something like #1358 when building Atrium.
Apparently, it does not make sense for everybody to re-generate the extractors, however, it might be nice if the accessors like that could be auto-generated in Atrium.

@robstoll
Copy link
Owner

robstoll commented May 3, 2023

I don't see a reason why we cannot generate it but until we have #1358 someone could already start and implement it manually (including samples etc.) 🙂

@rafiya2003
Copy link

can I work on this?

@robstoll
Copy link
Owner

sure, let me know in case you need more info in the description (you can also take a look at older good first issues.

@robstoll
Copy link
Owner

@rafiya2003 do you need help?

@rafiya2003
Copy link

yes

@robstoll
Copy link
Owner

robstoll commented Jul 1, 2023

what help do you need? have you started with something?

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

No branches or pull requests

3 participants