Please check the build logs for more information.
See Builds for ideas on how to fix a failed build, or Metadata for how to configure docs.rs builds.
If you believe this is docs.rs' fault, open an issue.
Overview
GeekORM is a simple Object Relation Mapper for empowering your Rust development.
✨ Features
- Focus on simplicity
- Rely on Derive Macros to generate code for your structs
- Using
Table - Using
Data
- Using
- Dynamically generate functions and corresponding SQL queries
.save(...)- Inserting new rows.update(...)- Updating existing rows.delete(...)- Deleting rows
- Support for Backends Drivers
- Automatic Migration Generation
geekorm-cli init- Setup your migrations
- Extensive crate features
rand: Generate random strings (set lenght, set prefix, set enviroment)hashorpassword: Generate secure Hashes of passwords (set algorithm)- and more...
- Documentation
📦 Installation
🦀 Library
You can install the library from crates.io:
# OR
Along with the backend driver for geekorm:
# OR
🛠️ CLI
If you want to manage your models and migrations using geekorm, you'll need to install the geekorm-cli command line tool.
🏃 Getting Started
GeekORM is easy to setup and use in your Rust project.
🏎️ Setting Up Migrations
The first thing you'll need to decide is if you want to use the geekorm-cli to manage your migrations or if you want to manage them manually.
You can use the geekorm-cli to help you manage your migrations.
This will prompt you to enter some information about your setup and will generate a crate or a module for you to use.
Once you have setup your project, 2 new commands will be available to you:
# Generate a new migration (creates a new folders in your migrations directory)
# Validate your migrations (runs from your initial migration to the latest)
🚀 Writing your first model
Once you have installed geekorm, you can start using the derive macros like the following:
use Result;
use *;
/// Using the `Table` derive macro to generate the `Users` table
async
🏄 Create Features
There are a number of opt-in features supported by GeekORM.
Features can be added either using cargo add geekorm -F all or added them directly in your Cargo.toml file.
all: Enable all the major stable featuresnew: GenerateTable::new(...)functionshelpers: Generate a number of helper functions- Select
Table::select_by_primary_key() - Select column
Table::select_by_{field}()
- Select
rand: Support Generating random stringshash: Support Generating password hashes- Backends
libsql: Add LibSQL backend supportrusqlite: Add Rusqlite backend support
🧑🤝🧑 Maintainers / Contributors
🦸 Support
Please create GitHub Issues if there are bugs or feature requests.
This project uses Semantic Versioning (v2) and with major releases, breaking changes will occur.
📓 License
This project is licensed under the terms of the MIT open source license. Please refer to MIT for the full terms.