repo stringlengths 6 65 | file_url stringlengths 81 311 | file_path stringlengths 6 227 | content stringlengths 0 32.8k | language stringclasses 1
value | license stringclasses 7
values | commit_sha stringlengths 40 40 | retrieved_at stringdate 2026-01-04 15:31:58 2026-01-04 20:25:31 | truncated bool 2
classes |
|---|---|---|---|---|---|---|---|---|
SeaQL/sea-orm | https://github.com/SeaQL/sea-orm/blob/51dd40b0d126d4745f5429b7be247e44941429de/sea-orm-macros/src/derives/util.rs | sea-orm-macros/src/derives/util.rs | use heck::ToUpperCamelCase;
use syn::{Field, Ident, Meta, MetaNameValue, punctuated::Punctuated, token::Comma};
/// Remove ignored fields and compound fields
pub(crate) fn field_not_ignored(field: &Field) -> bool {
let field_type = &field.ty;
let field_type = quote::quote! { #field_type }
.to_string() ... | rust | Apache-2.0 | 51dd40b0d126d4745f5429b7be247e44941429de | 2026-01-04T15:46:05.431304Z | false |
SeaQL/sea-orm | https://github.com/SeaQL/sea-orm/blob/51dd40b0d126d4745f5429b7be247e44941429de/sea-orm-macros/src/derives/model.rs | sea-orm-macros/src/derives/model.rs | use super::{
attributes::derive_attr,
util::{escape_rust_keyword, field_not_ignored, trim_starting_raw_identifier},
};
use heck::ToUpperCamelCase;
use proc_macro2::TokenStream;
use quote::{format_ident, quote};
use std::iter::FromIterator;
use syn::{Attribute, Data, Expr, Ident, LitStr};
pub(crate) struct Deri... | rust | Apache-2.0 | 51dd40b0d126d4745f5429b7be247e44941429de | 2026-01-04T15:46:05.431304Z | false |
SeaQL/sea-orm | https://github.com/SeaQL/sea-orm/blob/51dd40b0d126d4745f5429b7be247e44941429de/sea-orm-macros/src/derives/mod.rs | sea-orm-macros/src/derives/mod.rs | mod active_enum;
mod active_enum_display;
mod active_model;
mod active_model_behavior;
mod active_model_ex;
mod attributes;
mod case_style;
mod column;
mod derive_iden;
mod entity;
mod entity_loader;
mod entity_model;
mod from_query_result;
mod into_active_model;
mod migration;
mod model;
mod model_ex;
mod partial_mode... | rust | Apache-2.0 | 51dd40b0d126d4745f5429b7be247e44941429de | 2026-01-04T15:46:05.431304Z | false |
SeaQL/sea-orm | https://github.com/SeaQL/sea-orm/blob/51dd40b0d126d4745f5429b7be247e44941429de/sea-orm-macros/src/derives/into_active_model.rs | sea-orm-macros/src/derives/into_active_model.rs | use proc_macro2::TokenStream;
use quote::{format_ident, quote, quote_spanned};
use syn::{Meta, PathArguments, PathSegment, punctuated::Punctuated, token::Comma};
use super::util::GetMeta;
enum Error {
InputNotStruct,
Syn(syn::Error),
}
pub(super) struct DeriveIntoActiveModel {
pub ident: syn::Ident,
... | rust | Apache-2.0 | 51dd40b0d126d4745f5429b7be247e44941429de | 2026-01-04T15:46:05.431304Z | false |
SeaQL/sea-orm | https://github.com/SeaQL/sea-orm/blob/51dd40b0d126d4745f5429b7be247e44941429de/sea-orm-macros/src/derives/related_entity.rs | sea-orm-macros/src/derives/related_entity.rs | #[cfg(feature = "seaography")]
mod private {
use heck::ToLowerCamelCase;
use proc_macro_crate::{FoundCrate, crate_name};
use proc_macro2::{Ident, Span, TokenStream};
use quote::{quote, quote_spanned};
use crate::derives::attributes::related_attr;
enum Error {
InputNotEnum,
Inva... | rust | Apache-2.0 | 51dd40b0d126d4745f5429b7be247e44941429de | 2026-01-04T15:46:05.431304Z | false |
SeaQL/sea-orm | https://github.com/SeaQL/sea-orm/blob/51dd40b0d126d4745f5429b7be247e44941429de/sea-orm-macros/src/derives/value_type.rs | sea-orm-macros/src/derives/value_type.rs | use super::attributes::value_type_attr;
use super::value_type_match::{array_type_expr, can_try_from_u64, column_type_expr};
use proc_macro2::TokenStream;
use quote::quote;
use syn::{Field, Ident, Type, punctuated::Punctuated, spanned::Spanned, token::Comma};
#[allow(clippy::large_enum_variant)]
enum DeriveValueType {
... | rust | Apache-2.0 | 51dd40b0d126d4745f5429b7be247e44941429de | 2026-01-04T15:46:05.431304Z | false |
SeaQL/sea-orm | https://github.com/SeaQL/sea-orm/blob/51dd40b0d126d4745f5429b7be247e44941429de/sea-orm-macros/src/derives/entity_model.rs | sea-orm-macros/src/derives/entity_model.rs | use super::case_style::{CaseStyle, CaseStyleHelpers};
use super::util::{escape_rust_keyword, trim_starting_raw_identifier};
use heck::{
ToKebabCase, ToLowerCamelCase, ToShoutySnakeCase, ToSnakeCase, ToTitleCase, ToUpperCamelCase,
};
use proc_macro2::{Ident, Span, TokenStream};
use quote::quote;
use std::str::FromSt... | rust | Apache-2.0 | 51dd40b0d126d4745f5429b7be247e44941429de | 2026-01-04T15:46:05.431304Z | false |
SeaQL/sea-orm | https://github.com/SeaQL/sea-orm/blob/51dd40b0d126d4745f5429b7be247e44941429de/sea-orm-macros/src/derives/attributes.rs | sea-orm-macros/src/derives/attributes.rs | pub mod derive_attr {
use bae::FromAttributes;
/// Attributes for Models and ActiveModels
#[derive(Default, FromAttributes)]
#[allow(dead_code)]
pub struct SeaOrm {
pub column: Option<syn::Ident>,
pub entity: Option<syn::Ident>,
pub model: Option<syn::Ident>,
pub mod... | rust | Apache-2.0 | 51dd40b0d126d4745f5429b7be247e44941429de | 2026-01-04T15:46:05.431304Z | false |
SeaQL/sea-orm | https://github.com/SeaQL/sea-orm/blob/51dd40b0d126d4745f5429b7be247e44941429de/sea-orm-macros/src/derives/from_query_result.rs | sea-orm-macros/src/derives/from_query_result.rs | use super::util::GetMeta;
use proc_macro2::{Ident, TokenStream};
use quote::{ToTokens, format_ident, quote, quote_spanned};
use syn::{
Data, DataStruct, DeriveInput, Fields, Generics, Meta, ext::IdentExt, punctuated::Punctuated,
token::Comma,
};
#[derive(Debug)]
enum Error {
InputNotStruct,
}
pub(super) e... | rust | Apache-2.0 | 51dd40b0d126d4745f5429b7be247e44941429de | 2026-01-04T15:46:05.431304Z | false |
SeaQL/sea-orm | https://github.com/SeaQL/sea-orm/blob/51dd40b0d126d4745f5429b7be247e44941429de/sea-orm-macros/src/derives/model_ex.rs | sea-orm-macros/src/derives/model_ex.rs | use super::attributes::compound_attr;
use super::entity_loader::{EntityLoaderField, EntityLoaderSchema, expand_entity_loader};
use super::util::{extract_compound_entity, format_field_ident, is_compound_field};
use super::{expand_typed_column, model::DeriveModel};
use heck::ToUpperCamelCase;
use proc_macro2::{Ident, Spa... | rust | Apache-2.0 | 51dd40b0d126d4745f5429b7be247e44941429de | 2026-01-04T15:46:05.431304Z | false |
SeaQL/sea-orm | https://github.com/SeaQL/sea-orm/blob/51dd40b0d126d4745f5429b7be247e44941429de/sea-orm-macros/src/derives/primary_key.rs | sea-orm-macros/src/derives/primary_key.rs | use super::impl_iden;
use proc_macro2::{Ident, TokenStream};
use quote::{quote, quote_spanned};
use syn::{Data, DataEnum, Fields, Variant};
fn impl_primary_key_to_column(ident: &Ident, data: &Data) -> syn::Result<TokenStream> {
let variants = match data {
syn::Data::Enum(DataEnum { variants, .. }) => varia... | rust | Apache-2.0 | 51dd40b0d126d4745f5429b7be247e44941429de | 2026-01-04T15:46:05.431304Z | false |
SeaQL/sea-orm | https://github.com/SeaQL/sea-orm/blob/51dd40b0d126d4745f5429b7be247e44941429de/sea-orm-macros/src/derives/value_type_match.rs | sea-orm-macros/src/derives/value_type_match.rs | use proc_macro2::{Span, TokenStream};
use quote::quote_spanned;
use syn::{Ident, LitStr, Type};
pub fn column_type_expr(
column_type: Option<TokenStream>,
field_type: &str,
field_span: Span,
) -> TokenStream {
match column_type {
Some(column_type) => {
quote_spanned! { field_span =>... | rust | Apache-2.0 | 51dd40b0d126d4745f5429b7be247e44941429de | 2026-01-04T15:46:05.431304Z | false |
SeaQL/sea-orm | https://github.com/SeaQL/sea-orm/blob/51dd40b0d126d4745f5429b7be247e44941429de/sea-orm-macros/src/derives/typed_column.rs | sea-orm-macros/src/derives/typed_column.rs | use super::util::{
escape_rust_keyword, format_field_ident, is_compound_field, trim_starting_raw_identifier,
};
use heck::ToUpperCamelCase;
use proc_macro2::{Ident, TokenStream};
use quote::quote;
use syn::{Data, Expr, Fields, Lit, spanned::Spanned};
/// First is `struct TypedColumn`, second is the `const COLUMN`
... | rust | Apache-2.0 | 51dd40b0d126d4745f5429b7be247e44941429de | 2026-01-04T15:46:05.431304Z | false |
SeaQL/sea-orm | https://github.com/SeaQL/sea-orm/blob/51dd40b0d126d4745f5429b7be247e44941429de/sea-orm-macros/src/derives/migration.rs | sea-orm-macros/src/derives/migration.rs | use proc_macro2::TokenStream;
use quote::quote;
struct DeriveMigrationName {
ident: syn::Ident,
}
impl DeriveMigrationName {
fn new(input: syn::DeriveInput) -> Self {
let ident = input.ident;
DeriveMigrationName { ident }
}
fn expand(&self) -> TokenStream {
let ident = &self.... | rust | Apache-2.0 | 51dd40b0d126d4745f5429b7be247e44941429de | 2026-01-04T15:46:05.431304Z | false |
SeaQL/sea-orm | https://github.com/SeaQL/sea-orm/blob/51dd40b0d126d4745f5429b7be247e44941429de/sea-orm-macros/src/strum/mod.rs | sea-orm-macros/src/strum/mod.rs | //! Source code adapted from https://github.com/Peternator7/strum
#![allow(dead_code)]
pub mod enum_iter;
pub mod helpers;
| rust | Apache-2.0 | 51dd40b0d126d4745f5429b7be247e44941429de | 2026-01-04T15:46:05.431304Z | false |
SeaQL/sea-orm | https://github.com/SeaQL/sea-orm/blob/51dd40b0d126d4745f5429b7be247e44941429de/sea-orm-macros/src/strum/enum_iter.rs | sea-orm-macros/src/strum/enum_iter.rs | use proc_macro2::{Span, TokenStream};
use quote::quote;
use syn::{Data, DeriveInput, Fields, Ident};
use super::helpers::{HasStrumVariantProperties, HasTypeProperties, non_enum_error};
pub fn enum_iter_inner(ast: &DeriveInput) -> syn::Result<TokenStream> {
let name = &ast.ident;
let r#gen = &ast.generics;
... | rust | Apache-2.0 | 51dd40b0d126d4745f5429b7be247e44941429de | 2026-01-04T15:46:05.431304Z | false |
SeaQL/sea-orm | https://github.com/SeaQL/sea-orm/blob/51dd40b0d126d4745f5429b7be247e44941429de/sea-orm-macros/src/strum/helpers/type_props.rs | sea-orm-macros/src/strum/helpers/type_props.rs | use proc_macro2::TokenStream;
use quote::quote;
use std::default::Default;
use syn::{DeriveInput, Ident, Path, Visibility, parse_quote};
use super::case_style::CaseStyle;
use super::metadata::{DeriveInputExt, EnumDiscriminantsMeta, EnumMeta};
use super::occurrence_error;
pub trait HasTypeProperties {
fn get_type_... | rust | Apache-2.0 | 51dd40b0d126d4745f5429b7be247e44941429de | 2026-01-04T15:46:05.431304Z | false |
SeaQL/sea-orm | https://github.com/SeaQL/sea-orm/blob/51dd40b0d126d4745f5429b7be247e44941429de/sea-orm-macros/src/strum/helpers/case_style.rs | sea-orm-macros/src/strum/helpers/case_style.rs | use heck::{
ToKebabCase, ToLowerCamelCase, ToShoutySnakeCase, ToSnakeCase, ToTitleCase, ToUpperCamelCase,
};
use std::str::FromStr;
use syn::{
Ident, LitStr,
parse::{Parse, ParseStream},
};
#[allow(clippy::enum_variant_names)]
#[derive(Clone, Copy, Debug, PartialEq, Eq, Hash)]
pub enum CaseStyle {
Came... | rust | Apache-2.0 | 51dd40b0d126d4745f5429b7be247e44941429de | 2026-01-04T15:46:05.431304Z | false |
SeaQL/sea-orm | https://github.com/SeaQL/sea-orm/blob/51dd40b0d126d4745f5429b7be247e44941429de/sea-orm-macros/src/strum/helpers/mod.rs | sea-orm-macros/src/strum/helpers/mod.rs | pub use self::type_props::HasTypeProperties;
pub use self::variant_props::HasStrumVariantProperties;
pub mod case_style;
mod metadata;
pub mod type_props;
pub mod variant_props;
use proc_macro2::Span;
use quote::ToTokens;
pub fn non_enum_error() -> syn::Error {
syn::Error::new(Span::call_site(), "This macro only... | rust | Apache-2.0 | 51dd40b0d126d4745f5429b7be247e44941429de | 2026-01-04T15:46:05.431304Z | false |
SeaQL/sea-orm | https://github.com/SeaQL/sea-orm/blob/51dd40b0d126d4745f5429b7be247e44941429de/sea-orm-macros/src/strum/helpers/metadata.rs | sea-orm-macros/src/strum/helpers/metadata.rs | use proc_macro2::TokenStream;
use syn::{
Attribute, DeriveInput, Expr, ExprLit, Ident, Lit, LitBool, LitStr, Meta, MetaNameValue, Path,
Token, Variant, Visibility, parenthesized,
parse::{Parse, ParseStream},
parse_str, parse2,
punctuated::Punctuated,
};
use super::case_style::CaseStyle;
pub mod kw... | rust | Apache-2.0 | 51dd40b0d126d4745f5429b7be247e44941429de | 2026-01-04T15:46:05.431304Z | false |
SeaQL/sea-orm | https://github.com/SeaQL/sea-orm/blob/51dd40b0d126d4745f5429b7be247e44941429de/sea-orm-macros/src/strum/helpers/variant_props.rs | sea-orm-macros/src/strum/helpers/variant_props.rs | use std::default::Default;
use syn::{Ident, LitStr, Variant};
use super::metadata::{VariantExt, VariantMeta, kw};
use super::occurrence_error;
pub trait HasStrumVariantProperties {
fn get_variant_properties(&self) -> syn::Result<StrumVariantProperties>;
}
#[derive(Clone, Eq, PartialEq, Debug, Default)]
pub struc... | rust | Apache-2.0 | 51dd40b0d126d4745f5429b7be247e44941429de | 2026-01-04T15:46:05.431304Z | false |
SeaQL/sea-orm | https://github.com/SeaQL/sea-orm/blob/51dd40b0d126d4745f5429b7be247e44941429de/sea-orm-macros/tests/derive_value_type_test.rs | sea-orm-macros/tests/derive_value_type_test.rs | #[test]
fn when_user_import_nothing_macro_still_works_test() {
#[derive(sea_orm::DeriveValueType)]
struct MyString(String);
}
#[test]
fn when_user_alias_result_macro_still_works_test() {
#[allow(dead_code)]
type Result<T> = std::result::Result<T, ()>;
#[derive(sea_orm::DeriveValueType)]
struct ... | rust | Apache-2.0 | 51dd40b0d126d4745f5429b7be247e44941429de | 2026-01-04T15:46:05.431304Z | false |
SeaQL/sea-orm | https://github.com/SeaQL/sea-orm/blob/51dd40b0d126d4745f5429b7be247e44941429de/sea-orm-macros/tests/derive_active_enum_test.rs | sea-orm-macros/tests/derive_active_enum_test.rs | use sea_orm::{ActiveEnum, entity::prelude::StringLen};
use sea_orm_macros::{DeriveActiveEnum, EnumIter};
#[derive(Debug, EnumIter, DeriveActiveEnum, Eq, PartialEq)]
#[sea_orm(
rs_type = "String",
db_type = "Enum",
enum_name = "test_enum",
rename_all = "camelCase"
)]
enum TestEnum {
DefaultVariant,
... | rust | Apache-2.0 | 51dd40b0d126d4745f5429b7be247e44941429de | 2026-01-04T15:46:05.431304Z | false |
SeaQL/sea-orm | https://github.com/SeaQL/sea-orm/blob/51dd40b0d126d4745f5429b7be247e44941429de/sea-orm-macros/tests/derive_entity_model_column_name_test.rs | sea-orm-macros/tests/derive_entity_model_column_name_test.rs | use std::str::FromStr;
use sea_orm::Iden;
use sea_orm::Iterable;
use sea_orm::prelude::*;
use sea_orm_macros::DeriveEntityModel;
#[derive(Clone, Debug, PartialEq, Eq, DeriveEntityModel)]
#[sea_orm(table_name = "user", rename_all = "camelCase")]
pub struct Model {
#[sea_orm(primary_key)]
id: i32,
username:... | rust | Apache-2.0 | 51dd40b0d126d4745f5429b7be247e44941429de | 2026-01-04T15:46:05.431304Z | false |
SeaQL/sea-orm | https://github.com/SeaQL/sea-orm/blob/51dd40b0d126d4745f5429b7be247e44941429de/sea-orm-cli/src/lib.rs | sea-orm-cli/src/lib.rs | #[cfg(feature = "cli")]
pub mod cli;
pub mod commands;
#[cfg(feature = "cli")]
pub use cli::*;
pub use commands::*;
| rust | Apache-2.0 | 51dd40b0d126d4745f5429b7be247e44941429de | 2026-01-04T15:46:05.431304Z | false |
SeaQL/sea-orm | https://github.com/SeaQL/sea-orm/blob/51dd40b0d126d4745f5429b7be247e44941429de/sea-orm-cli/src/cli.rs | sea-orm-cli/src/cli.rs | use clap::{ArgAction, ArgGroup, Parser, Subcommand, ValueEnum};
#[cfg(feature = "codegen")]
use dotenvy::dotenv;
#[cfg(feature = "codegen")]
use crate::{handle_error, run_generate_command, run_migrate_command};
#[derive(Parser, Debug)]
#[command(
version,
author,
help_template = r#"{before-help}{name} {ve... | rust | Apache-2.0 | 51dd40b0d126d4745f5429b7be247e44941429de | 2026-01-04T15:46:05.431304Z | false |
SeaQL/sea-orm | https://github.com/SeaQL/sea-orm/blob/51dd40b0d126d4745f5429b7be247e44941429de/sea-orm-cli/src/commands/migrate.rs | sea-orm-cli/src/commands/migrate.rs | use chrono::{Local, Utc};
use regex::Regex;
use std::{
error::Error,
fmt::Display,
fs,
io::Write,
path::{Path, PathBuf},
process::Command,
};
#[cfg(feature = "cli")]
use crate::MigrateSubcommands;
#[cfg(feature = "cli")]
pub fn run_migrate_command(
command: Option<MigrateSubcommands>,
... | rust | Apache-2.0 | 51dd40b0d126d4745f5429b7be247e44941429de | 2026-01-04T15:46:05.431304Z | false |
SeaQL/sea-orm | https://github.com/SeaQL/sea-orm/blob/51dd40b0d126d4745f5429b7be247e44941429de/sea-orm-cli/src/commands/mod.rs | sea-orm-cli/src/commands/mod.rs | use std::fmt::Display;
#[cfg(feature = "codegen")]
pub mod generate;
pub mod migrate;
#[cfg(feature = "codegen")]
pub use generate::*;
pub use migrate::*;
pub fn handle_error<E>(error: E)
where
E: Display,
{
eprintln!("{error}");
::std::process::exit(1);
}
| rust | Apache-2.0 | 51dd40b0d126d4745f5429b7be247e44941429de | 2026-01-04T15:46:05.431304Z | false |
SeaQL/sea-orm | https://github.com/SeaQL/sea-orm/blob/51dd40b0d126d4745f5429b7be247e44941429de/sea-orm-cli/src/commands/generate.rs | sea-orm-cli/src/commands/generate.rs | use crate::{BannerVersion, BigIntegerType, DateTimeCrate, GenerateSubcommands};
use core::time;
use sea_orm_codegen::{
BannerVersion as CodegenBannerVersion, BigIntegerType as CodegenBigIntegerType,
DateTimeCrate as CodegenDateTimeCrate, EntityFormat, EntityTransformer, EntityWriterContext,
MergeReport, Out... | rust | Apache-2.0 | 51dd40b0d126d4745f5429b7be247e44941429de | 2026-01-04T15:46:05.431304Z | false |
SeaQL/sea-orm | https://github.com/SeaQL/sea-orm/blob/51dd40b0d126d4745f5429b7be247e44941429de/sea-orm-cli/src/bin/main.rs | sea-orm-cli/src/bin/main.rs | #[cfg_attr(
any(
feature = "runtime-async-std",
feature = "runtime-async-std-native-tls",
feature = "runtime-async-std-rustls"
),
async_std::main
)]
#[cfg_attr(
any(
feature = "runtime-tokio",
feature = "runtime-tokio-native-tls",
feature = "runtime-tokio-... | rust | Apache-2.0 | 51dd40b0d126d4745f5429b7be247e44941429de | 2026-01-04T15:46:05.431304Z | false |
SeaQL/sea-orm | https://github.com/SeaQL/sea-orm/blob/51dd40b0d126d4745f5429b7be247e44941429de/sea-orm-cli/template/migration/src/lib.rs | sea-orm-cli/template/migration/src/lib.rs | pub use sea_orm_migration::prelude::*;
mod m20220101_000001_create_table;
pub struct Migrator;
#[async_trait::async_trait]
impl MigratorTrait for Migrator {
fn migrations() -> Vec<Box<dyn MigrationTrait>> {
vec![Box::new(m20220101_000001_create_table::Migration)]
}
}
| rust | Apache-2.0 | 51dd40b0d126d4745f5429b7be247e44941429de | 2026-01-04T15:46:05.431304Z | false |
SeaQL/sea-orm | https://github.com/SeaQL/sea-orm/blob/51dd40b0d126d4745f5429b7be247e44941429de/sea-orm-cli/template/migration/src/main.rs | sea-orm-cli/template/migration/src/main.rs | use sea_orm_migration::prelude::*;
#[tokio::main]
async fn main() {
cli::run_cli(migration::Migrator).await;
}
| rust | Apache-2.0 | 51dd40b0d126d4745f5429b7be247e44941429de | 2026-01-04T15:46:05.431304Z | false |
SeaQL/sea-orm | https://github.com/SeaQL/sea-orm/blob/51dd40b0d126d4745f5429b7be247e44941429de/sea-orm-cli/template/migration/src/m20220101_000001_create_table.rs | sea-orm-cli/template/migration/src/m20220101_000001_create_table.rs | use sea_orm_migration::{prelude::*, schema::*};
#[derive(DeriveMigrationName)]
pub struct Migration;
#[async_trait::async_trait]
impl MigrationTrait for Migration {
async fn up(&self, manager: &SchemaManager) -> Result<(), DbErr> {
// Replace the sample below with your own migration scripts
todo!(... | rust | Apache-2.0 | 51dd40b0d126d4745f5429b7be247e44941429de | 2026-01-04T15:46:05.431304Z | false |
SeaQL/sea-orm | https://github.com/SeaQL/sea-orm/blob/51dd40b0d126d4745f5429b7be247e44941429de/sea-orm-sync/src/lib.rs | sea-orm-sync/src/lib.rs | #![cfg_attr(docsrs, feature(doc_cfg))]
#![warn(missing_docs)]
#![deny(
missing_debug_implementations,
clippy::missing_panics_doc,
clippy::unwrap_used,
clippy::print_stderr,
clippy::print_stdout
)]
//! <div align="center">
//!
//! <img alt="SeaORM" src="https://www.sea-ql.org/blog/img/SeaORM 2.0 B... | rust | Apache-2.0 | 51dd40b0d126d4745f5429b7be247e44941429de | 2026-01-04T15:46:05.431304Z | false |
SeaQL/sea-orm | https://github.com/SeaQL/sea-orm/blob/51dd40b0d126d4745f5429b7be247e44941429de/sea-orm-sync/src/value.rs | sea-orm-sync/src/value.rs | use crate::sea_query::{Nullable, ValueType};
use crate::{ActiveValue, Value};
mod timestamp;
use timestamp::*;
#[cfg(feature = "with-chrono")]
mod with_chrono;
#[cfg(feature = "with-chrono")]
pub use with_chrono::*;
#[cfg(feature = "with-time")]
mod with_time;
#[cfg(feature = "with-time")]
pub use with_time::*;
///... | rust | Apache-2.0 | 51dd40b0d126d4745f5429b7be247e44941429de | 2026-01-04T15:46:05.431304Z | false |
SeaQL/sea-orm | https://github.com/SeaQL/sea-orm/blob/51dd40b0d126d4745f5429b7be247e44941429de/sea-orm-sync/src/error.rs | sea-orm-sync/src/error.rs | #[cfg(feature = "sqlx-dep")]
pub use sqlx::error::Error as SqlxError;
#[cfg(feature = "sqlx-mysql")]
pub use sqlx::mysql::MySqlDatabaseError as SqlxMySqlError;
#[cfg(feature = "sqlx-postgres")]
pub use sqlx::postgres::PgDatabaseError as SqlxPostgresError;
#[cfg(feature = "sqlx-sqlite")]
pub use sqlx::sqlite::SqliteE... | rust | Apache-2.0 | 51dd40b0d126d4745f5429b7be247e44941429de | 2026-01-04T15:46:05.431304Z | false |
SeaQL/sea-orm | https://github.com/SeaQL/sea-orm/blob/51dd40b0d126d4745f5429b7be247e44941429de/sea-orm-sync/src/util.rs | sea-orm-sync/src/util.rs | /// Uses the `log` crate to perform logging.
/// This must be enabled using the feature flag `debug-print`.
/// ### Usage
/// ```
/// use sea_orm::debug_print;
///
/// #[derive(Debug)]
/// enum FooError {
/// Bar,
/// Baz,
/// }
///
/// debug_print!("{:?}", FooError::Bar);
/// ```
#[macro_export]
#[cfg(feature ... | rust | Apache-2.0 | 51dd40b0d126d4745f5429b7be247e44941429de | 2026-01-04T15:46:05.431304Z | false |
SeaQL/sea-orm | https://github.com/SeaQL/sea-orm/blob/51dd40b0d126d4745f5429b7be247e44941429de/sea-orm-sync/src/docs.rs | sea-orm-sync/src/docs.rs | //! 1. Async
//!
//! Relying on [SQLx](https://github.com/launchbadge/sqlx), SeaORM is a new library with support from day 1.
//!
//! ```
//! # use sea_orm::{error::*, tests_cfg::*, *};
//! #
//! # #[cfg(all(feature = "mock", not(feature = "sync")))]
//! # pub fn main() -> Result<(), DbErr> {
//! #
//! # let db = M... | rust | Apache-2.0 | 51dd40b0d126d4745f5429b7be247e44941429de | 2026-01-04T15:46:05.431304Z | false |
SeaQL/sea-orm | https://github.com/SeaQL/sea-orm/blob/51dd40b0d126d4745f5429b7be247e44941429de/sea-orm-sync/src/metric.rs | sea-orm-sync/src/metric.rs | use std::{sync::Arc, time::Duration};
pub(crate) type Callback = Arc<dyn Fn(&Info<'_>)>;
#[allow(unused_imports)]
pub(crate) use inner::metric;
#[derive(Debug)]
/// Query execution infos
pub struct Info<'a> {
/// Query executiuon duration
pub elapsed: Duration,
/// Query data
pub statement: &'a crate... | rust | Apache-2.0 | 51dd40b0d126d4745f5429b7be247e44941429de | 2026-01-04T15:46:05.431304Z | false |
SeaQL/sea-orm | https://github.com/SeaQL/sea-orm/blob/51dd40b0d126d4745f5429b7be247e44941429de/sea-orm-sync/src/query/select.rs | sea-orm-sync/src/query/select.rs | use crate::{
ColumnTrait, EntityTrait, Iterable, Order, PrimaryKeyToColumn, QueryFilter, QueryOrder,
QuerySelect, QueryTrait,
};
use core::fmt::Debug;
use core::marker::PhantomData;
use sea_query::{IntoColumnRef, SelectStatement, SimpleExpr};
/// Defines a structure to perform select operations
#[derive(Clone,... | rust | Apache-2.0 | 51dd40b0d126d4745f5429b7be247e44941429de | 2026-01-04T15:46:05.431304Z | false |
SeaQL/sea-orm | https://github.com/SeaQL/sea-orm/blob/51dd40b0d126d4745f5429b7be247e44941429de/sea-orm-sync/src/query/insert.rs | sea-orm-sync/src/query/insert.rs | use crate::{
ActiveModelTrait, ActiveValue, ColumnTrait, EntityName, EntityTrait, IntoActiveModel, Iterable,
PrimaryKeyTrait, QueryTrait,
};
use core::marker::PhantomData;
use sea_query::{Expr, InsertStatement, Keyword, OnConflict, SimpleExpr, Value, ValueTuple};
/// Performs INSERT operations on a ActiveModel... | rust | Apache-2.0 | 51dd40b0d126d4745f5429b7be247e44941429de | 2026-01-04T15:46:05.431304Z | false |
SeaQL/sea-orm | https://github.com/SeaQL/sea-orm/blob/51dd40b0d126d4745f5429b7be247e44941429de/sea-orm-sync/src/query/update.rs | sea-orm-sync/src/query/update.rs | use crate::{
ActiveModelTrait, ActiveValue, ColumnTrait, DbErr, EntityTrait, Iterable, PrimaryKeyToColumn,
QueryFilter, QueryTrait,
};
use core::marker::PhantomData;
use sea_query::{Expr, IntoIden, SimpleExpr, UpdateStatement};
/// Defines a structure to perform UPDATE query operations on a ActiveModel
#[deriv... | rust | Apache-2.0 | 51dd40b0d126d4745f5429b7be247e44941429de | 2026-01-04T15:46:05.431304Z | false |
SeaQL/sea-orm | https://github.com/SeaQL/sea-orm/blob/51dd40b0d126d4745f5429b7be247e44941429de/sea-orm-sync/src/query/json.rs | sea-orm-sync/src/query/json.rs | use crate::{FromQueryResult, QueryResult, error::*};
use serde_json::Map;
pub use serde_json::Value as JsonValue;
impl FromQueryResult for JsonValue {
#[allow(unused_variables, unused_mut)]
fn from_query_result(res: &QueryResult, pre: &str) -> Result<Self, DbErr> {
let mut map = Map::new();
#[a... | rust | Apache-2.0 | 51dd40b0d126d4745f5429b7be247e44941429de | 2026-01-04T15:46:05.431304Z | false |
SeaQL/sea-orm | https://github.com/SeaQL/sea-orm/blob/51dd40b0d126d4745f5429b7be247e44941429de/sea-orm-sync/src/query/debug.rs | sea-orm-sync/src/query/debug.rs | use crate::{QueryTrait, Statement, database::*};
/// This structure provides debug capabilities
#[derive(Debug)]
pub struct DebugQuery<'a, Q, T> {
/// The query to debug
pub query: &'a Q,
/// The value of the query
pub value: T,
}
macro_rules! debug_query_build {
($impl_obj:ty, $db_expr:expr) => {... | rust | Apache-2.0 | 51dd40b0d126d4745f5429b7be247e44941429de | 2026-01-04T15:46:05.431304Z | false |
SeaQL/sea-orm | https://github.com/SeaQL/sea-orm/blob/51dd40b0d126d4745f5429b7be247e44941429de/sea-orm-sync/src/query/helper.rs | sea-orm-sync/src/query/helper.rs | use crate::{
ActiveModelTrait, ColumnAsExpr, ColumnTrait, EntityTrait, Identity, IntoIdentity,
IntoSimpleExpr, Iterable, ModelTrait, PrimaryKeyToColumn, RelationDef,
};
use sea_query::{
Alias, Expr, ExprTrait, IntoCondition, IntoIden, LockBehavior, LockType, NullOrdering, SeaRc,
SelectExpr, SelectStatem... | rust | Apache-2.0 | 51dd40b0d126d4745f5429b7be247e44941429de | 2026-01-04T15:46:05.431304Z | false |
SeaQL/sea-orm | https://github.com/SeaQL/sea-orm/blob/51dd40b0d126d4745f5429b7be247e44941429de/sea-orm-sync/src/query/util.rs | sea-orm-sync/src/query/util.rs | use crate::{
ActiveModelTrait, ColumnTrait, Condition, DbBackend, DbErr, EntityTrait, ExprTrait, IdenStatic,
Identity, ModelTrait, Value,
};
use sea_query::{ColumnRef, DynIden, Expr, IntoColumnRef, TableRef, ValueTuple};
use std::str::FromStr;
#[derive(Default)]
pub struct ValueTupleBuilder(Option<ValueTuple>)... | rust | Apache-2.0 | 51dd40b0d126d4745f5429b7be247e44941429de | 2026-01-04T15:46:05.431304Z | false |
SeaQL/sea-orm | https://github.com/SeaQL/sea-orm/blob/51dd40b0d126d4745f5429b7be247e44941429de/sea-orm-sync/src/query/mod.rs | sea-orm-sync/src/query/mod.rs | pub(crate) mod combine;
mod debug;
mod delete;
mod helper;
mod insert;
mod join;
#[cfg(feature = "with-json")]
mod json;
mod loader;
mod select;
mod traits;
mod update;
mod util;
pub use combine::{SelectA, SelectB, SelectC};
pub use debug::*;
pub use delete::*;
pub use helper::*;
pub use insert::*;
#[cfg(feature = "wi... | rust | Apache-2.0 | 51dd40b0d126d4745f5429b7be247e44941429de | 2026-01-04T15:46:05.431304Z | false |
SeaQL/sea-orm | https://github.com/SeaQL/sea-orm/blob/51dd40b0d126d4745f5429b7be247e44941429de/sea-orm-sync/src/query/join.rs | sea-orm-sync/src/query/join.rs | use crate::{
ColumnTrait, EntityTrait, IdenStatic, Iterable, Linked, QueryFilter, QuerySelect, QueryTrait,
Related, Select, SelectA, SelectB, SelectThree, SelectTwo, SelectTwoMany, TopologyChain,
TopologyStar, find_linked_recursive, join_tbl_on_condition,
};
pub use sea_query::JoinType;
use sea_query::{Cond... | rust | Apache-2.0 | 51dd40b0d126d4745f5429b7be247e44941429de | 2026-01-04T15:46:05.431304Z | false |
SeaQL/sea-orm | https://github.com/SeaQL/sea-orm/blob/51dd40b0d126d4745f5429b7be247e44941429de/sea-orm-sync/src/query/combine.rs | sea-orm-sync/src/query/combine.rs | use crate::{
ColumnTrait, EntityTrait, IdenStatic, Iterable, QueryTrait, Select, SelectTwo, SelectTwoMany,
};
use core::marker::PhantomData;
use sea_query::{Iden, IntoIden, Order, SelectExpr, SelectStatement, SimpleExpr};
use std::borrow::Cow;
macro_rules! select_def {
( $ident: ident, $str: expr ) => {
... | rust | Apache-2.0 | 51dd40b0d126d4745f5429b7be247e44941429de | 2026-01-04T15:46:05.431304Z | false |
SeaQL/sea-orm | https://github.com/SeaQL/sea-orm/blob/51dd40b0d126d4745f5429b7be247e44941429de/sea-orm-sync/src/query/loader.rs | sea-orm-sync/src/query/loader.rs | use super::get_key_from_model;
use crate::{
ColumnTrait, Condition, ConnectionTrait, DbBackend, DbErr, EntityTrait, Identity, JoinType,
ModelTrait, QueryFilter, QuerySelect, Related, RelatedSelfVia, RelationDef, RelationTrait,
RelationType, Select, dynamic, query::column_tuple_in_condition, query_err,
};
us... | rust | Apache-2.0 | 51dd40b0d126d4745f5429b7be247e44941429de | 2026-01-04T15:46:05.431304Z | true |
SeaQL/sea-orm | https://github.com/SeaQL/sea-orm/blob/51dd40b0d126d4745f5429b7be247e44941429de/sea-orm-sync/src/query/traits.rs | sea-orm-sync/src/query/traits.rs | use crate::{DbBackend, Statement, StatementBuilder};
/// A Trait for any type performing queries on a Model or ActiveModel
pub trait QueryTrait {
/// Constrain the QueryStatement to [StatementBuilder] trait
type QueryStatement: StatementBuilder;
/// Get a mutable ref to the query builder
fn query(&mut... | rust | Apache-2.0 | 51dd40b0d126d4745f5429b7be247e44941429de | 2026-01-04T15:46:05.431304Z | false |
SeaQL/sea-orm | https://github.com/SeaQL/sea-orm/blob/51dd40b0d126d4745f5429b7be247e44941429de/sea-orm-sync/src/query/delete.rs | sea-orm-sync/src/query/delete.rs | use crate::{
ActiveModelTrait, ActiveValue, ColumnTrait, DbBackend, DbErr, EntityTrait, IntoActiveModel,
Iterable, PrimaryKeyToColumn, PrimaryKeyTrait, QueryFilter, QueryTrait,
query::column_tuple_in_condition,
sea_query::{IntoValueTuple, ValueTuple},
};
use core::marker::PhantomData;
use sea_query::Del... | rust | Apache-2.0 | 51dd40b0d126d4745f5429b7be247e44941429de | 2026-01-04T15:46:05.431304Z | false |
SeaQL/sea-orm | https://github.com/SeaQL/sea-orm/blob/51dd40b0d126d4745f5429b7be247e44941429de/sea-orm-sync/src/dynamic/entity.rs | sea-orm-sync/src/dynamic/entity.rs | use super::{FieldType, ModelType};
use crate::{ColumnDef, ColumnTrait, DbBackend, EntityTrait, Iterable, ModelTrait, Value};
use sea_query::{
ArrayType, BinOper, DynIden, Expr, ExprTrait, IntoColumnRef, IntoIden, IntoLikeExpr,
IntoTableRef, SelectStatement, SimpleExpr, TableRef,
};
use std::sync::Arc;
#[derive... | rust | Apache-2.0 | 51dd40b0d126d4745f5429b7be247e44941429de | 2026-01-04T15:46:05.431304Z | false |
SeaQL/sea-orm | https://github.com/SeaQL/sea-orm/blob/51dd40b0d126d4745f5429b7be247e44941429de/sea-orm-sync/src/dynamic/execute.rs | sea-orm-sync/src/dynamic/execute.rs | use crate::{
ConnectionTrait, DbBackend, DbErr, EntityTrait, FromQueryResult, QueryResult, Select,
Statement, dynamic,
};
use itertools::Itertools;
use sea_query::{DynIden, Expr, IntoIden, SelectStatement};
use std::marker::PhantomData;
#[derive(Debug)]
pub struct SelectModelAndDynModel<M>
where
M: FromQue... | rust | Apache-2.0 | 51dd40b0d126d4745f5429b7be247e44941429de | 2026-01-04T15:46:05.431304Z | false |
SeaQL/sea-orm | https://github.com/SeaQL/sea-orm/blob/51dd40b0d126d4745f5429b7be247e44941429de/sea-orm-sync/src/dynamic/model.rs | sea-orm-sync/src/dynamic/model.rs | use crate::{DbErr, QueryResult};
use sea_query::{ArrayType, DynIden, Value};
use std::sync::Arc;
#[derive(Debug, Clone, PartialEq, Eq)]
pub struct ModelType {
pub fields: Vec<FieldType>,
}
#[derive(Debug, Clone, PartialEq, Eq, Hash)]
pub struct FieldType {
pub(super) field: Arc<str>,
pub(super) type_: Arr... | rust | Apache-2.0 | 51dd40b0d126d4745f5429b7be247e44941429de | 2026-01-04T15:46:05.431304Z | false |
SeaQL/sea-orm | https://github.com/SeaQL/sea-orm/blob/51dd40b0d126d4745f5429b7be247e44941429de/sea-orm-sync/src/dynamic/mod.rs | sea-orm-sync/src/dynamic/mod.rs | //! The API of this module is not yet stable, and may have breaking changes between minor versions.
#![allow(missing_docs)]
mod entity;
mod execute;
mod model;
pub use entity::*;
pub use execute::*;
pub use model::*;
| rust | Apache-2.0 | 51dd40b0d126d4745f5429b7be247e44941429de | 2026-01-04T15:46:05.431304Z | false |
SeaQL/sea-orm | https://github.com/SeaQL/sea-orm/blob/51dd40b0d126d4745f5429b7be247e44941429de/sea-orm-sync/src/tests_cfg/rust_keyword.rs | sea-orm-sync/src/tests_cfg/rust_keyword.rs | use crate as sea_orm;
use crate::entity::prelude::*;
#[derive(Clone, Debug, PartialEq, Eq, DeriveEntityModel)]
#[sea_orm(table_name = "rust_keyword")]
pub struct Model {
#[sea_orm(primary_key)]
pub id: i32,
pub testing: i32,
pub rust: i32,
pub keywords: i32,
pub r#raw_identifier: i32,
pub r... | rust | Apache-2.0 | 51dd40b0d126d4745f5429b7be247e44941429de | 2026-01-04T15:46:05.431304Z | false |
SeaQL/sea-orm | https://github.com/SeaQL/sea-orm/blob/51dd40b0d126d4745f5429b7be247e44941429de/sea-orm-sync/src/tests_cfg/user.rs | sea-orm-sync/src/tests_cfg/user.rs | use crate as sea_orm;
use sea_orm::entity::prelude::*;
#[sea_orm::model]
#[derive(Clone, Debug, PartialEq, Eq, DeriveEntityModel)]
#[sea_orm(table_name = "user")]
pub struct Model {
#[sea_orm(primary_key)]
pub id: i32,
pub name: String,
#[sea_orm(unique)]
pub email: String,
#[sea_orm(has_one)]
... | rust | Apache-2.0 | 51dd40b0d126d4745f5429b7be247e44941429de | 2026-01-04T15:46:05.431304Z | false |
SeaQL/sea-orm | https://github.com/SeaQL/sea-orm/blob/51dd40b0d126d4745f5429b7be247e44941429de/sea-orm-sync/src/tests_cfg/cake_seaography.rs | sea-orm-sync/src/tests_cfg/cake_seaography.rs | use crate as sea_orm;
use crate::entity::prelude::*;
#[derive(Clone, Debug, PartialEq, Eq, DeriveEntityModel)]
#[sea_orm(table_name = "cake")]
pub struct Model {
#[sea_orm(primary_key)]
pub id: i32,
#[sea_orm(column_name = "name", enum_name = "Name")]
pub name: String,
}
#[derive(Copy, Clone, Debug, E... | rust | Apache-2.0 | 51dd40b0d126d4745f5429b7be247e44941429de | 2026-01-04T15:46:05.431304Z | false |
SeaQL/sea-orm | https://github.com/SeaQL/sea-orm/blob/51dd40b0d126d4745f5429b7be247e44941429de/sea-orm-sync/src/tests_cfg/serde_rename.rs | sea-orm-sync/src/tests_cfg/serde_rename.rs | #![allow(clippy::unwrap_used)]
use crate as sea_orm;
use sea_orm::entity::prelude::*;
#[cfg(feature = "with-json")]
use serde::{Deserialize, Serialize};
#[derive(Clone, Debug, PartialEq, Eq, DeriveEntityModel)]
#[cfg_attr(feature = "with-json", derive(Serialize, Deserialize))]
#[sea_orm(table_name = "user")]
#[cfg_at... | rust | Apache-2.0 | 51dd40b0d126d4745f5429b7be247e44941429de | 2026-01-04T15:46:05.431304Z | false |
SeaQL/sea-orm | https://github.com/SeaQL/sea-orm/blob/51dd40b0d126d4745f5429b7be247e44941429de/sea-orm-sync/src/tests_cfg/indexes.rs | sea-orm-sync/src/tests_cfg/indexes.rs | //! An entity definition for testing table index creation.
use crate as sea_orm;
use crate::entity::prelude::*;
#[derive(Clone, Debug, PartialEq, Eq, DeriveEntityModel)]
#[sea_orm(schema_name = "public", table_name = "indexes")]
pub struct Model {
#[sea_orm(primary_key)]
pub indexes_id: i32,
#[sea_orm(uniq... | rust | Apache-2.0 | 51dd40b0d126d4745f5429b7be247e44941429de | 2026-01-04T15:46:05.431304Z | false |
SeaQL/sea-orm | https://github.com/SeaQL/sea-orm/blob/51dd40b0d126d4745f5429b7be247e44941429de/sea-orm-sync/src/tests_cfg/cake_filling.rs | sea-orm-sync/src/tests_cfg/cake_filling.rs | use crate as sea_orm;
use sea_orm::entity::prelude::*;
#[sea_orm::compact_model]
#[derive(Clone, Debug, PartialEq, Eq, DeriveEntityModel)]
#[sea_orm(table_name = "cake_filling")]
pub struct Model {
#[sea_orm(primary_key, auto_increment = false)]
pub cake_id: i32,
#[sea_orm(primary_key, auto_increment = fal... | rust | Apache-2.0 | 51dd40b0d126d4745f5429b7be247e44941429de | 2026-01-04T15:46:05.431304Z | false |
SeaQL/sea-orm | https://github.com/SeaQL/sea-orm/blob/51dd40b0d126d4745f5429b7be247e44941429de/sea-orm-sync/src/tests_cfg/cake.rs | sea-orm-sync/src/tests_cfg/cake.rs | use crate as sea_orm;
use sea_orm::entity::prelude::*;
#[cfg(feature = "with-json")]
use serde::{Deserialize, Serialize};
#[sea_orm::model]
#[derive(Clone, Debug, PartialEq, Eq, DeriveEntityModel)]
#[cfg_attr(feature = "with-json", derive(Serialize, Deserialize))]
#[sea_orm(table_name = "cake")]
pub struct Model {
... | rust | Apache-2.0 | 51dd40b0d126d4745f5429b7be247e44941429de | 2026-01-04T15:46:05.431304Z | false |
SeaQL/sea-orm | https://github.com/SeaQL/sea-orm/blob/51dd40b0d126d4745f5429b7be247e44941429de/sea-orm-sync/src/tests_cfg/sea_orm_active_enums.rs | sea-orm-sync/src/tests_cfg/sea_orm_active_enums.rs | use crate as sea_orm;
use crate::entity::prelude::*;
#[derive(Debug, Clone, PartialEq, Eq, EnumIter, DeriveActiveEnum)]
#[sea_orm(rs_type = "String", db_type = "Enum", enum_name = "tea")]
pub enum Tea {
#[sea_orm(string_value = "EverydayTea")]
EverydayTea,
#[sea_orm(string_value = "BreakfastTea")]
Brea... | rust | Apache-2.0 | 51dd40b0d126d4745f5429b7be247e44941429de | 2026-01-04T15:46:05.431304Z | false |
SeaQL/sea-orm | https://github.com/SeaQL/sea-orm/blob/51dd40b0d126d4745f5429b7be247e44941429de/sea-orm-sync/src/tests_cfg/filling.rs | sea-orm-sync/src/tests_cfg/filling.rs | use crate as sea_orm;
use sea_orm::entity::prelude::*;
#[cfg(feature = "with-json")]
use serde::{Deserialize, Serialize};
#[sea_orm::compact_model]
#[derive(Clone, Debug, PartialEq, Eq, DeriveEntityModel)]
#[cfg_attr(feature = "with-json", derive(Serialize, Deserialize))]
#[sea_orm(table_name = "filling")]
pub struct... | rust | Apache-2.0 | 51dd40b0d126d4745f5429b7be247e44941429de | 2026-01-04T15:46:05.431304Z | false |
SeaQL/sea-orm | https://github.com/SeaQL/sea-orm/blob/51dd40b0d126d4745f5429b7be247e44941429de/sea-orm-sync/src/tests_cfg/lunch_set.rs | sea-orm-sync/src/tests_cfg/lunch_set.rs | use super::sea_orm_active_enums::*;
use crate as sea_orm;
use crate::entity::prelude::*;
#[derive(Clone, Debug, PartialEq, Eq, DeriveEntityModel)]
#[sea_orm(table_name = "lunch_set")]
pub struct Model {
#[sea_orm(primary_key)]
pub id: i32,
pub name: String,
pub tea: Tea,
}
#[derive(Copy, Clone, Debug,... | rust | Apache-2.0 | 51dd40b0d126d4745f5429b7be247e44941429de | 2026-01-04T15:46:05.431304Z | false |
SeaQL/sea-orm | https://github.com/SeaQL/sea-orm/blob/51dd40b0d126d4745f5429b7be247e44941429de/sea-orm-sync/src/tests_cfg/entity_linked.rs | sea-orm-sync/src/tests_cfg/entity_linked.rs | use crate::entity::prelude::*;
use sea_query::{Expr, ExprTrait, IntoCondition};
#[derive(Debug)]
pub struct CakeToFilling;
impl Linked for CakeToFilling {
type FromEntity = super::cake::Entity;
type ToEntity = super::filling::Entity;
fn link(&self) -> Vec<RelationDef> {
vec![
super::... | rust | Apache-2.0 | 51dd40b0d126d4745f5429b7be247e44941429de | 2026-01-04T15:46:05.431304Z | false |
SeaQL/sea-orm | https://github.com/SeaQL/sea-orm/blob/51dd40b0d126d4745f5429b7be247e44941429de/sea-orm-sync/src/tests_cfg/post_tag.rs | sea-orm-sync/src/tests_cfg/post_tag.rs | use crate as sea_orm;
use sea_orm::entity::prelude::*;
#[sea_orm::model]
#[derive(Clone, Debug, PartialEq, DeriveEntityModel, Eq)]
#[sea_orm(table_name = "post_tag")]
pub struct Model {
#[sea_orm(primary_key, auto_increment = false)]
pub post_id: i32,
#[sea_orm(primary_key, auto_increment = false)]
pub... | rust | Apache-2.0 | 51dd40b0d126d4745f5429b7be247e44941429de | 2026-01-04T15:46:05.431304Z | false |
SeaQL/sea-orm | https://github.com/SeaQL/sea-orm/blob/51dd40b0d126d4745f5429b7be247e44941429de/sea-orm-sync/src/tests_cfg/fruit.rs | sea-orm-sync/src/tests_cfg/fruit.rs | use crate as sea_orm;
use crate::entity::prelude::*;
#[cfg(feature = "with-json")]
use serde::{Deserialize, Serialize};
#[sea_orm::compact_model]
#[derive(Clone, Debug, PartialEq, Eq, DeriveEntityModel)]
#[cfg_attr(feature = "with-json", derive(Serialize, Deserialize))]
#[sea_orm(table_name = "fruit")]
pub struct Mod... | rust | Apache-2.0 | 51dd40b0d126d4745f5429b7be247e44941429de | 2026-01-04T15:46:05.431304Z | false |
SeaQL/sea-orm | https://github.com/SeaQL/sea-orm/blob/51dd40b0d126d4745f5429b7be247e44941429de/sea-orm-sync/src/tests_cfg/registry.rs | sea-orm-sync/src/tests_cfg/registry.rs | #[cfg(test)]
mod test {
#[test]
fn test_entity_registry() {
let entities: Vec<_> = inventory::iter::<crate::EntityRegistry>().collect();
for target in [
"sea_orm::tests_cfg::cake",
"sea_orm::tests_cfg::cake_compact",
"sea_orm::tests_cfg::cake_expanded",
... | rust | Apache-2.0 | 51dd40b0d126d4745f5429b7be247e44941429de | 2026-01-04T15:46:05.431304Z | false |
SeaQL/sea-orm | https://github.com/SeaQL/sea-orm/blob/51dd40b0d126d4745f5429b7be247e44941429de/sea-orm-sync/src/tests_cfg/mod.rs | sea-orm-sync/src/tests_cfg/mod.rs | #![allow(unused_imports, dead_code)]
//! Configurations for test cases and examples. Not intended for actual use.
#[cfg(feature = "entity-registry")]
mod registry;
pub mod cake;
pub mod cake_compact;
pub mod cake_expanded;
pub mod cake_filling;
pub mod cake_filling_price;
pub mod entity_linked;
pub mod filling;
pub ... | rust | Apache-2.0 | 51dd40b0d126d4745f5429b7be247e44941429de | 2026-01-04T15:46:05.431304Z | false |
SeaQL/sea-orm | https://github.com/SeaQL/sea-orm/blob/51dd40b0d126d4745f5429b7be247e44941429de/sea-orm-sync/src/tests_cfg/cake_compact.rs | sea-orm-sync/src/tests_cfg/cake_compact.rs | use crate as sea_orm;
use crate::entity::prelude::*;
#[cfg(feature = "with-json")]
use serde::{Deserialize, Serialize};
#[derive(Clone, Debug, PartialEq, Eq, DeriveEntityModel)]
#[cfg_attr(feature = "with-json", derive(Serialize, Deserialize))]
#[sea_orm(table_name = "cake")]
pub struct Model {
#[sea_orm(primary_... | rust | Apache-2.0 | 51dd40b0d126d4745f5429b7be247e44941429de | 2026-01-04T15:46:05.431304Z | false |
SeaQL/sea-orm | https://github.com/SeaQL/sea-orm/blob/51dd40b0d126d4745f5429b7be247e44941429de/sea-orm-sync/src/tests_cfg/post.rs | sea-orm-sync/src/tests_cfg/post.rs | use crate as sea_orm;
use sea_orm::entity::prelude::*;
#[sea_orm::model]
#[derive(Clone, Debug, PartialEq, Eq, DeriveEntityModel)]
#[sea_orm(table_name = "post")]
pub struct Model {
#[sea_orm(primary_key)]
pub id: i32,
pub user_id: i32,
pub title: String,
#[sea_orm(belongs_to, from = "user_id", to ... | rust | Apache-2.0 | 51dd40b0d126d4745f5429b7be247e44941429de | 2026-01-04T15:46:05.431304Z | false |
SeaQL/sea-orm | https://github.com/SeaQL/sea-orm/blob/51dd40b0d126d4745f5429b7be247e44941429de/sea-orm-sync/src/tests_cfg/vendor.rs | sea-orm-sync/src/tests_cfg/vendor.rs | use crate as sea_orm;
use crate::entity::prelude::*;
#[derive(Clone, Debug, PartialEq, Eq, DeriveEntityModel)]
#[sea_orm(table_name = "vendor")]
pub struct Model {
#[sea_orm(primary_key)]
pub id: i32,
pub name: String,
}
#[derive(Copy, Clone, Debug, EnumIter, DeriveRelation)]
pub enum Relation {}
impl Re... | rust | Apache-2.0 | 51dd40b0d126d4745f5429b7be247e44941429de | 2026-01-04T15:46:05.431304Z | false |
SeaQL/sea-orm | https://github.com/SeaQL/sea-orm/blob/51dd40b0d126d4745f5429b7be247e44941429de/sea-orm-sync/src/tests_cfg/ingredient.rs | sea-orm-sync/src/tests_cfg/ingredient.rs | use crate as sea_orm;
use sea_orm::entity::prelude::*;
#[cfg(feature = "with-json")]
use serde::{Deserialize, Serialize};
#[sea_orm::model]
#[derive(Clone, Debug, PartialEq, Eq, DeriveEntityModel)]
#[cfg_attr(feature = "with-json", derive(Serialize, Deserialize))]
#[sea_orm(table_name = "ingredient")]
pub struct Mode... | rust | Apache-2.0 | 51dd40b0d126d4745f5429b7be247e44941429de | 2026-01-04T15:46:05.431304Z | false |
SeaQL/sea-orm | https://github.com/SeaQL/sea-orm/blob/51dd40b0d126d4745f5429b7be247e44941429de/sea-orm-sync/src/tests_cfg/tag.rs | sea-orm-sync/src/tests_cfg/tag.rs | use crate as sea_orm;
use sea_orm::entity::prelude::*;
#[sea_orm::model]
#[derive(Clone, Debug, PartialEq, Eq, DeriveEntityModel)]
#[sea_orm(table_name = "tag")]
pub struct Model {
#[sea_orm(primary_key)]
pub id: i32,
pub tag: String,
#[sea_orm(has_many, via = "post_tag")]
pub posts: HasMany<super:... | rust | Apache-2.0 | 51dd40b0d126d4745f5429b7be247e44941429de | 2026-01-04T15:46:05.431304Z | false |
SeaQL/sea-orm | https://github.com/SeaQL/sea-orm/blob/51dd40b0d126d4745f5429b7be247e44941429de/sea-orm-sync/src/tests_cfg/cake_filling_price.rs | sea-orm-sync/src/tests_cfg/cake_filling_price.rs | use crate as sea_orm;
use crate::entity::prelude::*;
#[derive(Clone, Debug, PartialEq, Eq, DeriveEntityModel)]
#[sea_orm(schema_name = "public", table_name = "cake_filling_price")]
pub struct Model {
#[sea_orm(primary_key, auto_increment = false)]
pub cake_id: i32,
#[sea_orm(primary_key, auto_increment = f... | rust | Apache-2.0 | 51dd40b0d126d4745f5429b7be247e44941429de | 2026-01-04T15:46:05.431304Z | false |
SeaQL/sea-orm | https://github.com/SeaQL/sea-orm/blob/51dd40b0d126d4745f5429b7be247e44941429de/sea-orm-sync/src/tests_cfg/cake_expanded.rs | sea-orm-sync/src/tests_cfg/cake_expanded.rs | use crate as sea_orm;
use crate::entity::prelude::*;
#[derive(Copy, Clone, Default, Debug, DeriveEntity)]
pub struct Entity;
impl EntityName for Entity {
fn table_name(&self) -> &'static str {
"cake"
}
}
#[derive(Clone, Debug, PartialEq, Eq, DeriveModel, DeriveActiveModel)]
pub struct Model {
pub... | rust | Apache-2.0 | 51dd40b0d126d4745f5429b7be247e44941429de | 2026-01-04T15:46:05.431304Z | false |
SeaQL/sea-orm | https://github.com/SeaQL/sea-orm/blob/51dd40b0d126d4745f5429b7be247e44941429de/sea-orm-sync/src/tests_cfg/comment.rs | sea-orm-sync/src/tests_cfg/comment.rs | use crate as sea_orm;
use sea_orm::entity::prelude::*;
#[sea_orm::model]
#[derive(Clone, Debug, PartialEq, Eq, DeriveEntityModel)]
#[sea_orm(table_name = "comment")]
pub struct Model {
#[sea_orm(primary_key)]
pub id: i32,
pub comment: String,
pub user_id: i32,
pub post_id: i32,
#[sea_orm(belong... | rust | Apache-2.0 | 51dd40b0d126d4745f5429b7be247e44941429de | 2026-01-04T15:46:05.431304Z | false |
SeaQL/sea-orm | https://github.com/SeaQL/sea-orm/blob/51dd40b0d126d4745f5429b7be247e44941429de/sea-orm-sync/src/tests_cfg/profile.rs | sea-orm-sync/src/tests_cfg/profile.rs | use crate as sea_orm;
use sea_orm::entity::prelude::*;
#[sea_orm::model]
#[derive(Clone, Debug, PartialEq, Eq, DeriveEntityModel)]
#[sea_orm(table_name = "profile")]
pub struct Model {
#[sea_orm(primary_key)]
pub id: i32,
pub picture: String,
#[sea_orm(unique)]
pub user_id: i32,
#[sea_orm(belon... | rust | Apache-2.0 | 51dd40b0d126d4745f5429b7be247e44941429de | 2026-01-04T15:46:05.431304Z | false |
SeaQL/sea-orm | https://github.com/SeaQL/sea-orm/blob/51dd40b0d126d4745f5429b7be247e44941429de/sea-orm-sync/src/tests_cfg/lunch_set_expanded.rs | sea-orm-sync/src/tests_cfg/lunch_set_expanded.rs | use super::sea_orm_active_enums::*;
use crate as sea_orm;
use crate::entity::prelude::*;
#[derive(Copy, Clone, Default, Debug, DeriveEntity)]
pub struct Entity;
impl EntityName for Entity {
fn table_name(&self) -> &'static str {
"lunch_set"
}
}
#[derive(Clone, Debug, PartialEq, Eq, DeriveModel, Deriv... | rust | Apache-2.0 | 51dd40b0d126d4745f5429b7be247e44941429de | 2026-01-04T15:46:05.431304Z | false |
SeaQL/sea-orm | https://github.com/SeaQL/sea-orm/blob/51dd40b0d126d4745f5429b7be247e44941429de/sea-orm-sync/src/value/timestamp.rs | sea-orm-sync/src/value/timestamp.rs | macro_rules! impl_timestamp {
($ty:ident, $inner:ident, $from:ident, $to:ident) => {
impl std::convert::From<$inner> for $ty {
fn from(value: $inner) -> Self {
Self(value)
}
}
impl std::convert::From<$ty> for sea_orm::Value {
fn from(sourc... | rust | Apache-2.0 | 51dd40b0d126d4745f5429b7be247e44941429de | 2026-01-04T15:46:05.431304Z | false |
SeaQL/sea-orm | https://github.com/SeaQL/sea-orm/blob/51dd40b0d126d4745f5429b7be247e44941429de/sea-orm-sync/src/value/with_time.rs | sea-orm-sync/src/value/with_time.rs | use super::impl_timestamp;
use crate as sea_orm;
use crate::{DbErr, TryGetError, prelude::TimeDateTimeWithTimeZone};
use std::ops::{Deref, DerefMut};
/// A OffsetDateTime mapped to i64 in database
#[derive(derive_more::Debug, Copy, Clone, PartialEq, Eq, Hash)]
#[debug("{_0:?}")]
pub struct TimeUnixTimestamp(pub TimeDa... | rust | Apache-2.0 | 51dd40b0d126d4745f5429b7be247e44941429de | 2026-01-04T15:46:05.431304Z | false |
SeaQL/sea-orm | https://github.com/SeaQL/sea-orm/blob/51dd40b0d126d4745f5429b7be247e44941429de/sea-orm-sync/src/value/with_chrono.rs | sea-orm-sync/src/value/with_chrono.rs | use super::impl_timestamp;
use crate as sea_orm;
use crate::{DbErr, TryGetError, prelude::ChronoDateTimeUtc};
use std::ops::{Deref, DerefMut};
/// A DataTime<Utc> mapped to i64 in database
#[derive(derive_more::Debug, Copy, Clone, PartialEq, Eq, Hash)]
#[debug("{_0:?}")]
pub struct ChronoUnixTimestamp(pub ChronoDateTi... | rust | Apache-2.0 | 51dd40b0d126d4745f5429b7be247e44941429de | 2026-01-04T15:46:05.431304Z | false |
SeaQL/sea-orm | https://github.com/SeaQL/sea-orm/blob/51dd40b0d126d4745f5429b7be247e44941429de/sea-orm-sync/src/entity/active_model_ex.rs | sea-orm-sync/src/entity/active_model_ex.rs | use super::compound::{HasMany, HasOne};
use crate::{ActiveModelTrait, DbErr, EntityTrait, ModelTrait, TryIntoModel};
use core::ops::{Index, IndexMut};
/// Container for belongs_to or has_one relation
#[derive(Debug, Default, Clone)]
pub enum HasOneModel<E: EntityTrait> {
/// Unspecified value, do nothing
#[def... | rust | Apache-2.0 | 51dd40b0d126d4745f5429b7be247e44941429de | 2026-01-04T15:46:05.431304Z | false |
SeaQL/sea-orm | https://github.com/SeaQL/sea-orm/blob/51dd40b0d126d4745f5429b7be247e44941429de/sea-orm-sync/src/entity/link.rs | sea-orm-sync/src/entity/link.rs | use crate::{EntityTrait, QuerySelect, RelationDef, Select, join_tbl_on_condition};
use sea_query::{
Alias, CommonTableExpression, Condition, IntoIden, IntoTableRef, JoinType, UnionType,
};
/// Same as [RelationDef]
pub type LinkDef = RelationDef;
/// A Trait for links between Entities
pub trait Linked {
#[all... | rust | Apache-2.0 | 51dd40b0d126d4745f5429b7be247e44941429de | 2026-01-04T15:46:05.431304Z | false |
SeaQL/sea-orm | https://github.com/SeaQL/sea-orm/blob/51dd40b0d126d4745f5429b7be247e44941429de/sea-orm-sync/src/entity/prelude.rs | sea-orm-sync/src/entity/prelude.rs | pub use crate::{
ActiveEnum, ActiveModelBehavior, ActiveModelTrait, ColumnDef, ColumnTrait, ColumnType,
ColumnTypeTrait, ConnectionTrait, CursorTrait, DatabaseConnection, DbConn, EntityName,
EntityTrait, EnumIter, ForeignKeyAction, Iden, IdenStatic, Linked, LoaderTrait, ModelTrait,
PaginatorTrait, Prima... | rust | Apache-2.0 | 51dd40b0d126d4745f5429b7be247e44941429de | 2026-01-04T15:46:05.431304Z | false |
SeaQL/sea-orm | https://github.com/SeaQL/sea-orm/blob/51dd40b0d126d4745f5429b7be247e44941429de/sea-orm-sync/src/entity/active_enum.rs | sea-orm-sync/src/entity/active_enum.rs | use crate::{ColIdx, ColumnDef, DbErr, Iterable, QueryResult, TryFromU64, TryGetError, TryGetable};
use sea_query::{DynIden, Expr, ExprTrait, Nullable, SimpleExpr, Value, ValueType};
/// A Rust representation of enum defined in database.
///
/// # Implementations
///
/// You can implement [ActiveEnum] manually by hand ... | rust | Apache-2.0 | 51dd40b0d126d4745f5429b7be247e44941429de | 2026-01-04T15:46:05.431304Z | false |
SeaQL/sea-orm | https://github.com/SeaQL/sea-orm/blob/51dd40b0d126d4745f5429b7be247e44941429de/sea-orm-sync/src/entity/base_entity.rs | sea-orm-sync/src/entity/base_entity.rs | use crate::{
ActiveModelBehavior, ActiveModelTrait, ColumnTrait, Delete, DeleteMany, DeleteOne,
FromQueryResult, Identity, Insert, InsertMany, ModelTrait, PrimaryKeyArity, PrimaryKeyToColumn,
PrimaryKeyTrait, QueryFilter, Related, RelationBuilder, RelationTrait, RelationType, Select,
Update, UpdateMany,... | rust | Apache-2.0 | 51dd40b0d126d4745f5429b7be247e44941429de | 2026-01-04T15:46:05.431304Z | true |
SeaQL/sea-orm | https://github.com/SeaQL/sea-orm/blob/51dd40b0d126d4745f5429b7be247e44941429de/sea-orm-sync/src/entity/column.rs | sea-orm-sync/src/entity/column.rs | use crate::{
ColumnDef, ColumnType, DbBackend, EntityName, Iden, IdenStatic, IntoSimpleExpr, Iterable,
};
use sea_query::{
BinOper, DynIden, Expr, ExprTrait, IntoIden, IntoLikeExpr, SeaRc, SelectStatement, Value,
};
use std::{borrow::Cow, str::FromStr};
mod types;
pub use types::*;
pub(crate) mod macros {
... | rust | Apache-2.0 | 51dd40b0d126d4745f5429b7be247e44941429de | 2026-01-04T15:46:05.431304Z | false |
SeaQL/sea-orm | https://github.com/SeaQL/sea-orm/blob/51dd40b0d126d4745f5429b7be247e44941429de/sea-orm-sync/src/entity/relation.rs | sea-orm-sync/src/entity/relation.rs | use crate::{
EntityTrait, Identity, IdentityOf, Iterable, QuerySelect, Select, join_tbl_on_condition,
};
use core::marker::PhantomData;
use sea_query::{
Condition, ConditionType, DynIden, ForeignKeyCreateStatement, IntoIden, JoinType,
TableForeignKey, TableRef,
};
use std::{fmt::Debug, sync::Arc};
/// Defi... | rust | Apache-2.0 | 51dd40b0d126d4745f5429b7be247e44941429de | 2026-01-04T15:46:05.431304Z | false |
SeaQL/sea-orm | https://github.com/SeaQL/sea-orm/blob/51dd40b0d126d4745f5429b7be247e44941429de/sea-orm-sync/src/entity/active_model.rs | sea-orm-sync/src/entity/active_model.rs | use super::{ActiveValue, ActiveValue::*};
use crate::{
ColumnTrait, Condition, ConnectionTrait, DbBackend, DeleteResult, EntityName, EntityTrait,
IdenStatic, Iterable, PrimaryKeyArity, PrimaryKeyToColumn, PrimaryKeyTrait, QueryFilter,
Related, RelatedSelfVia, RelationDef, RelationTrait, Value,
error::*,... | rust | Apache-2.0 | 51dd40b0d126d4745f5429b7be247e44941429de | 2026-01-04T15:46:05.431304Z | true |
SeaQL/sea-orm | https://github.com/SeaQL/sea-orm/blob/51dd40b0d126d4745f5429b7be247e44941429de/sea-orm-sync/src/entity/column_def.rs | sea-orm-sync/src/entity/column_def.rs | use sea_query::{SimpleExpr, Value};
// The original `sea_orm::ColumnType` enum was dropped since 0.11.0
// It was replaced by `sea_query::ColumnType`, we reexport it here to keep the `ColumnType` symbol
pub use sea_query::ColumnType;
/// Defines a Column for an Entity
#[derive(Debug, Clone, PartialEq)]
pub struct Col... | rust | Apache-2.0 | 51dd40b0d126d4745f5429b7be247e44941429de | 2026-01-04T15:46:05.431304Z | false |
SeaQL/sea-orm | https://github.com/SeaQL/sea-orm/blob/51dd40b0d126d4745f5429b7be247e44941429de/sea-orm-sync/src/entity/partial_model.rs | sea-orm-sync/src/entity/partial_model.rs | use crate::{EntityTrait, FromQueryResult, IdenStatic, Iterable, ModelTrait, QuerySelect};
use sea_query::Expr;
/// A trait for a part of [Model](super::model::ModelTrait)
pub trait PartialModelTrait: FromQueryResult {
/// Select specific columns this [PartialModel] needs
///
/// No need to implement this m... | rust | Apache-2.0 | 51dd40b0d126d4745f5429b7be247e44941429de | 2026-01-04T15:46:05.431304Z | false |
SeaQL/sea-orm | https://github.com/SeaQL/sea-orm/blob/51dd40b0d126d4745f5429b7be247e44941429de/sea-orm-sync/src/entity/active_model_ex_.rs | sea-orm-sync/src/entity/active_model_ex_.rs | order::ActiveModelEx {
id: NotSet, // auto-increment
total: Set(22.into()),
bakery_id: NotSet, // to be auto-set
customer_id: NotSet, // to be auto-set
placed_at: Utc::now(),
bakery: Set(bakery), // will auto-set bakery_id above
customer: Some(customer::ActiveModelEx {
id: NotSet, //... | rust | Apache-2.0 | 51dd40b0d126d4745f5429b7be247e44941429de | 2026-01-04T15:46:05.431304Z | false |
SeaQL/sea-orm | https://github.com/SeaQL/sea-orm/blob/51dd40b0d126d4745f5429b7be247e44941429de/sea-orm-sync/src/entity/registry.rs | sea-orm-sync/src/entity/registry.rs | use crate::{EntitySchemaInfo, Schema, SchemaBuilder};
#[derive(derive_more::Debug)]
/// The data structure submitted by your Entity to the Entity Registry.
pub struct EntityRegistry {
/// Please use `module_path!()`.
pub module_path: &'static str,
/// Function that returns schema info for the Entity.
#... | rust | Apache-2.0 | 51dd40b0d126d4745f5429b7be247e44941429de | 2026-01-04T15:46:05.431304Z | false |
SeaQL/sea-orm | https://github.com/SeaQL/sea-orm/blob/51dd40b0d126d4745f5429b7be247e44941429de/sea-orm-sync/src/entity/model.rs | sea-orm-sync/src/entity/model.rs | use crate::{
ActiveModelBehavior, ActiveModelTrait, ColumnTrait, ConnectionTrait, DbErr, DeleteResult,
EntityTrait, IntoActiveModel, Iterable, Linked, PrimaryKeyArity, PrimaryKeyToColumn,
PrimaryKeyTrait, QueryFilter, QueryResult, Related, Select, SelectModel, SelectorRaw,
Statement, TryGetError, find_l... | rust | Apache-2.0 | 51dd40b0d126d4745f5429b7be247e44941429de | 2026-01-04T15:46:05.431304Z | false |
SeaQL/sea-orm | https://github.com/SeaQL/sea-orm/blob/51dd40b0d126d4745f5429b7be247e44941429de/sea-orm-sync/src/entity/mod.rs | sea-orm-sync/src/entity/mod.rs | /// This modules contains types and traits for an Entity, ActiveMode, Model, PrimaryKey, ForeignKey and Relations.
///
/// // An Entity
/// A unit struct implements [EntityTrait](crate::EntityTrait) representing a table in the database.
///
/// This trait contains the properties of an entity including
///
/// - The Ta... | rust | Apache-2.0 | 51dd40b0d126d4745f5429b7be247e44941429de | 2026-01-04T15:46:05.431304Z | false |
SeaQL/sea-orm | https://github.com/SeaQL/sea-orm/blob/51dd40b0d126d4745f5429b7be247e44941429de/sea-orm-sync/src/entity/primary_key.rs | sea-orm-sync/src/entity/primary_key.rs | use super::{ColumnTrait, IdenStatic, Iterable};
use crate::{TryFromU64, TryGetableMany};
use sea_query::{FromValueTuple, IntoValueTuple};
use std::fmt::Debug;
/// A Trait for to be used to define a Primary Key.
///
/// A primary key can be derived manually
///
/// ### Example
/// ```text
/// use sea_orm::entity::prelu... | rust | Apache-2.0 | 51dd40b0d126d4745f5429b7be247e44941429de | 2026-01-04T15:46:05.431304Z | false |
SeaQL/sea-orm | https://github.com/SeaQL/sea-orm/blob/51dd40b0d126d4745f5429b7be247e44941429de/sea-orm-sync/src/entity/identity.rs | sea-orm-sync/src/entity/identity.rs | use crate::{ColumnTrait, EntityTrait, IdenStatic};
use sea_query::{Alias, DynIden, Iden, IntoIden, SeaRc};
use std::{borrow::Cow, fmt::Write};
/// List of column identifier
#[derive(Debug, Clone, PartialEq, Eq, Hash)]
pub enum Identity {
/// Column identifier consists of 1 column
Unary(DynIden),
/// Column... | rust | Apache-2.0 | 51dd40b0d126d4745f5429b7be247e44941429de | 2026-01-04T15:46:05.431304Z | false |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.