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

Implement query function #3

Open
MitchellWeg opened this issue Jul 10, 2022 · 0 comments · May be fixed by #8
Open

Implement query function #3

MitchellWeg opened this issue Jul 10, 2022 · 0 comments · May be fixed by #8

Comments

@MitchellWeg
Copy link
Contributor

Implement a query function on the Connection object which allows the user to query for specific data.

query should return something (possibly a vec of the underlying datatype?). It shoud also allow the user to unmarshall it into a struct.

Example:

struct BarFoo {
   foo: i32,
   bar: String
}

for row in &conn.query("select foo, bar FROM foobar", &[]).unwrap() {
  let my_foo_bar = BarFoo {
   foo: row.get(0),
   bar: row.get(1),
  }
}
@MitchellWeg MitchellWeg linked a pull request Jul 30, 2022 that will close this issue
4 tasks
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

Successfully merging a pull request may close this issue.

1 participant