This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
extern crate gtk; | |
use gtk::*; | |
fn main() { | |
if gtk::init().is_err() { | |
eprintln!("failed to initialize GTK Application"); | |
std::process::exit(1); | |
} | |
let window = Window::new(WindowType::Toplevel); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
use uuid::Uuid; | |
use models::{Agent, Room}; | |
use schema::room_agent; | |
#[derive(Associations, Queryable, Debug)] | |
#[table_name = "room_agent"] | |
#[belongs_to(Agent)] | |
#[belongs_to(Room)] | |
pub struct RoomAgent { |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
-- table room | |
DELETE FROM room; | |
INSERT INTO room (id) | |
SELECT uuid_generate_v4() | |
FROM | |
generate_series(1, 3); | |
-- table room |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
error_chain! { | |
foreign_links { | |
Diesel(::diesel::result::Error); | |
Json(::serde_json::Error); | |
Mqtt(::rumqtt::Error); | |
Utf8(::std::string::FromUtf8Error); | |
Uuid(::uuid::ParseError); | |
} | |
errors { |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
drop extension "uuid-ossp" cascade; | |
create extension "uuid-ossp"; | |
drop type abac_attribute cascade; | |
create type abac_attribute as ( | |
value text, | |
key text, | |
namespace_id uuid | |
); |
OlderNewer