4 ms·
I bumped into him and showed it to him in person one time :) Realistically, the docs are still very sparse -- I wasn't planning on posting this for another few
by obi1kenobi 4y ago
I bumped into him and showed it to him in person one time :)
Realistically, the docs are still very sparse -- I wasn't planning on posting this for another few months, but someone else noticed my project and beat me to it!
New data providers need a schema and an Adapter implementation.
For Rust, this is the Adapter trait that data providers need to implement: https://docs.rs/trustfall_core/latest/trustfall_core/interpreter/basic_adapter/trait.BasicAdapter.html https://docs.rs/trustfall_core/latest/trustfall_core/interpr...
This is the equivalent abstract class in Python: https://github.com/obi1kenobi/trustfall/blob/pytrustfall-v0.1.6/pytrustfall/trustfall/adapter.py#L22 https://github.com/obi1kenobi/trustfall/blob/pytrustfall-v0....
For Python, the package docs have some (underwhelming) additional examples of building a schema and passing an adapter to use to run a query: https://pypi.org/project/trustfall/ https://pypi.org/project/trustfall/
The process in Rust is equivalent, here's the code powering the demo in the talk: https://github.com/obi1kenobi/trustfall/blob/main/demo-hytradboi/src/main.rs#L70 https://github.com/obi1kenobi/trustfall/blob/main/demo-hytra...
I realize this is all extremely suboptimal, but like I said, I wasn't ready Please stay tuned! I'm planning to spruce all of this up in the coming weeks!