Coder Social home page Coder Social logo

nlopes / database-schema Goto Github PK

View Code? Open in Web Editor NEW
0.0 0.0 1.0 51 KB

This crate provides a simple way to dump a database structure to a file, in SQL format.

Home Page: https://docs.rs/database-schema

License: MIT License

Rust 100.00%
database database-migration database-schema diesel mysql sqlite sqlx

database-schema's People

Contributors

dependabot[bot] avatar hmac avatar nlopes avatar

Watchers

 avatar  avatar

Forkers

hmac

database-schema's Issues

Using in unit tests

Is it possible to use this crate in-memory, without any I/O? I am writing unit tests that ensure that my SQLite DB is what I expect it to be, and for that I would ideally like to have an equivalent of .dump command, all comparable in-memory (i.e. using the insta project). Ideally, this crate would also dump the content of all the tables. Note that the SQLite DBs might also be in-memory, e.g. file:myfile.sqlite?mode=memory&cache=shared -- this would stay in memory, but will be shared among multiple connections as needed.

Usage example - comparing the entire dump of a sqlite file to the auto-managed snapshot yaml file:

insta::assert_yaml_snapshot!(sqlite_dump!("/path/to/my_file.sqlite"));

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.