/images/avatar.jpg

Jorge Ortiz-Fuentes' DevBites

Using Oracle db26ai from Rust with the sibyl crate (2)

WARNING:

This article closely mirrors the one about Using Oracle from Rust with oracle, as both are designed to be self-contained. You can read them either independently, sequentially, or use them to compare what they can offer to you.

In this article, I will use the sibyl crate to modify data, create and drop new tables and indexes, and perform a vector search from Rust code. I have already explained how to use it to make queries in different ways and how to easily set up an environment to work with it. If you want to read that first, I will wait for you here.

Using Oracle db26ai from Rust with the oracle crate (2)

WARNING:

This article closely mirrors the one about Using Oracle from Rust with sibyl, as both are designed to be self-contained. You can read them either independently, sequentially, or use them to compare what they can offer to you.

In this article, I will use the oracle crate to modify data, create and drop new tables and indexes, and perform a vector search from Rust code. I have already explained how to use it to make queries in different ways and how to easily set up an environment to work with it. If you want to read that first, I will wait for you here.

Using Oracle db26ai from Rust with the sibyl crate

WARNING:

This article shares many parts and its structure with the one about Using Oracle from Rust with oracle, because I wanted both to be self-contained. You can read them independently, one after the other or use them to compare what they can offer to you.

If you have already set up your database instance using the other article, you are good to go. Jump straight to the "First 'contact' with the Oracle DB instance" section.

Using Oracle db26ai from Rust with the oracle crate

WARNING:

This article shares many parts and its structure with the one about Using Oracle from Rust with sibyl, because I wanted both to be self-contained. You can read them independently, one after the other or use them to compare what they can offer to you.

If you have already set up your database instance using the other article, you are good to go. Jump straight to the "First 'contact' with the Oracle DB instance" section.

Rust unit testing: basic HTTP testing

In previous articles in this series, I have highlighted the importance of unit testing your code. However, I must reckon that most of the examples I have used were mostly isolated. There weren't many connections between one scenario and the next, and, admittedly, not a single application that integrated all the scenarios as a whole.

I hope this has fulfilled the purpose of sharing knowledge about unit testing in Rust. But one of the first challenges I had to overcome once I had learned the very basics of writing automated tests was integrating them into a real codebase. But it is hard to walk this path alone, since the first (real) tests are also the hardest.

Rust unit testing: file writing

This is the third and last article on file I/O testing, and yet again, the focus is on the technique for injecting a dependency so we can use it in the tests. In this article, I will cover a writing scenario that requires us to access the test double after invoking our code to check the written contents.

Writing to a file

If you are just a regular villain, your henchmen are close to you. You have recruited them personally, know what they can do, and call each one of them by their name… Well, not really, because you don't care about their names. But you don't have any issues letting them know what you want from them, because they are always around you. Those times are long gone and deeply missed.