use crate::common::symbol::Symbol;
#[derive(Debug, Clone, PartialEq)]
pub struct DatabaseEntry {
pub oid: u32,
pub name: Symbol,
pub owner: Symbol,
pub encoding: Option<Symbol>,
pub locale: Option<Symbol>,
pub tablespace: Option<Symbol>,
pub connection_limit: Option<i64>,
pub allow_connections: bool,
pub is_template: bool,
}
impl DatabaseEntry {
pub fn new(
oid: u32,
name: Symbol,
resolved_owner: Symbol,
encoding: Option<Symbol>,
locale: Option<Symbol>,
tablespace: Option<Symbol>,
connection_limit: Option<i64>,
) -> Self {
Self {
oid,
name,
owner: resolved_owner,
encoding,
locale,
tablespace,
connection_limit,
allow_connections: true, is_template: false, }
}
}