aboutsummaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorTeddy Wing2022-03-27 05:58:36 +0200
committerTeddy Wing2022-03-27 05:58:36 +0200
commita4ff3950de526c6a6325c47ce334acf9576028ef (patch)
treecfce5435617cf1d8d4229634ba22f6df8de1371e /src
parent16a1ddd78452db64a5aa44b1fae12459f4077875 (diff)
downloadyaqlite-a4ff3950de526c6a6325c47ce334acf9576028ef.tar.bz2
Add license (GNU GPLv3+)v0.0.1
Diffstat (limited to 'src')
-rw-r--r--src/insert.rs17
-rw-r--r--src/lib.rs17
-rw-r--r--src/main.rs17
-rw-r--r--src/select.rs17
-rw-r--r--src/sqlite.rs34
-rw-r--r--src/yaml.rs17
-rw-r--r--src/yaml/sql.rs17
-rw-r--r--src/yaml/write.rs17
8 files changed, 153 insertions, 0 deletions
diff --git a/src/insert.rs b/src/insert.rs
index 9c15fc7..59c8850 100644
--- a/src/insert.rs
+++ b/src/insert.rs
@@ -1,3 +1,20 @@
+// Copyright (c) 2022 Teddy Wing
+//
+// This file is part of Yaqlite.
+//
+// Yaqlite is free software: you can redistribute it and/or modify it
+// under the terms of the GNU General Public License as published by
+// the Free Software Foundation, either version 3 of the License, or
+// (at your option) any later version.
+//
+// Yaqlite is distributed in the hope that it will be useful, but
+// WITHOUT ANY WARRANTY; without even the implied warranty of
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+// General Public License for more details.
+//
+// You should have received a copy of the GNU General Public License
+// along with Yaqlite. If not, see <https://www.gnu.org/licenses/>.
+
/// Insert YAML `data` records into the given database.
pub fn insert(
dbconn: &mut rusqlite::Connection,
diff --git a/src/lib.rs b/src/lib.rs
index a9a5ff6..10240fa 100644
--- a/src/lib.rs
+++ b/src/lib.rs
@@ -1,3 +1,20 @@
+// Copyright (c) 2022 Teddy Wing
+//
+// This file is part of Yaqlite.
+//
+// Yaqlite is free software: you can redistribute it and/or modify it
+// under the terms of the GNU General Public License as published by
+// the Free Software Foundation, either version 3 of the License, or
+// (at your option) any later version.
+//
+// Yaqlite is distributed in the hope that it will be useful, but
+// WITHOUT ANY WARRANTY; without even the implied warranty of
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+// General Public License for more details.
+//
+// You should have received a copy of the GNU General Public License
+// along with Yaqlite. If not, see <https://www.gnu.org/licenses/>.
+
pub mod insert;
pub mod select;
pub mod sqlite;
diff --git a/src/main.rs b/src/main.rs
index bb979b2..484eae3 100644
--- a/src/main.rs
+++ b/src/main.rs
@@ -1,3 +1,20 @@
+// Copyright (c) 2022 Teddy Wing
+//
+// This file is part of Yaqlite.
+//
+// Yaqlite is free software: you can redistribute it and/or modify it
+// under the terms of the GNU General Public License as published by
+// the Free Software Foundation, either version 3 of the License, or
+// (at your option) any later version.
+//
+// Yaqlite is distributed in the hope that it will be useful, but
+// WITHOUT ANY WARRANTY; without even the implied warranty of
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+// General Public License for more details.
+//
+// You should have received a copy of the GNU General Public License
+// along with Yaqlite. If not, see <https://www.gnu.org/licenses/>.
+
use clap::Parser;
use rusqlite;
use yaml_rust::yaml;
diff --git a/src/select.rs b/src/select.rs
index e058044..17e9248 100644
--- a/src/select.rs
+++ b/src/select.rs
@@ -1,3 +1,20 @@
+// Copyright (c) 2022 Teddy Wing
+//
+// This file is part of Yaqlite.
+//
+// Yaqlite is free software: you can redistribute it and/or modify it
+// under the terms of the GNU General Public License as published by
+// the Free Software Foundation, either version 3 of the License, or
+// (at your option) any later version.
+//
+// Yaqlite is distributed in the hope that it will be useful, but
+// WITHOUT ANY WARRANTY; without even the implied warranty of
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+// General Public License for more details.
+//
+// You should have received a copy of the GNU General Public License
+// along with Yaqlite. If not, see <https://www.gnu.org/licenses/>.
+
/// Select a record matching `record_id` from `dbconn` as YAML.
pub fn select<C>(
dbconn: &rusqlite::Connection,
diff --git a/src/sqlite.rs b/src/sqlite.rs
index f6fccd3..5ecc586 100644
--- a/src/sqlite.rs
+++ b/src/sqlite.rs
@@ -1,3 +1,37 @@
+// Copyright (c) 2022 Teddy Wing
+//
+// This file is part of Yaqlite.
+//
+// Yaqlite is free software: you can redistribute it and/or modify it
+// under the terms of the GNU General Public License as published by
+// the Free Software Foundation, either version 3 of the License, or
+// (at your option) any later version.
+//
+// Yaqlite is distributed in the hope that it will be useful, but
+// WITHOUT ANY WARRANTY; without even the implied warranty of
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+// General Public License for more details.
+//
+// You should have received a copy of the GNU General Public License
+// along with Yaqlite. If not, see <https://www.gnu.org/licenses/>.
+
+// Copyright (c) 2022 Teddy Wing
+//
+// This file is part of Yaqlite.
+//
+// Yaqlite is free software: you can redistribute it and/or modify it
+// under the terms of the GNU General Public License as published by
+// the Free Software Foundation, either version 3 of the License, or
+// (at your option) any later version.
+//
+// Yaqlite is distributed in the hope that it will be useful, but
+// WITHOUT ANY WARRANTY; without even the implied warranty of
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+// General Public License for more details.
+//
+// You should have received a copy of the GNU General Public License
+// along with Yaqlite. If not, see <https://www.gnu.org/licenses/>.
+
use rusqlite;
use std::collections::HashSet;
diff --git a/src/yaml.rs b/src/yaml.rs
index c8840bf..cc9d9a3 100644
--- a/src/yaml.rs
+++ b/src/yaml.rs
@@ -1,3 +1,20 @@
+// Copyright (c) 2022 Teddy Wing
+//
+// This file is part of Yaqlite.
+//
+// Yaqlite is free software: you can redistribute it and/or modify it
+// under the terms of the GNU General Public License as published by
+// the Free Software Foundation, either version 3 of the License, or
+// (at your option) any later version.
+//
+// Yaqlite is distributed in the hope that it will be useful, but
+// WITHOUT ANY WARRANTY; without even the implied warranty of
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+// General Public License for more details.
+//
+// You should have received a copy of the GNU General Public License
+// along with Yaqlite. If not, see <https://www.gnu.org/licenses/>.
+
use rusqlite;
use yaml_rust::yaml;
diff --git a/src/yaml/sql.rs b/src/yaml/sql.rs
index 61c9d6c..6a20d1e 100644
--- a/src/yaml/sql.rs
+++ b/src/yaml/sql.rs
@@ -1,3 +1,20 @@
+// Copyright (c) 2022 Teddy Wing
+//
+// This file is part of Yaqlite.
+//
+// Yaqlite is free software: you can redistribute it and/or modify it
+// under the terms of the GNU General Public License as published by
+// the Free Software Foundation, either version 3 of the License, or
+// (at your option) any later version.
+//
+// Yaqlite is distributed in the hope that it will be useful, but
+// WITHOUT ANY WARRANTY; without even the implied warranty of
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+// General Public License for more details.
+//
+// You should have received a copy of the GNU General Public License
+// along with Yaqlite. If not, see <https://www.gnu.org/licenses/>.
+
use yaml_rust::yaml;
use std::borrow::Cow;
diff --git a/src/yaml/write.rs b/src/yaml/write.rs
index 4234a8c..0f9da71 100644
--- a/src/yaml/write.rs
+++ b/src/yaml/write.rs
@@ -1,3 +1,20 @@
+// Copyright (c) 2022 Teddy Wing
+//
+// This file is part of Yaqlite.
+//
+// Yaqlite is free software: you can redistribute it and/or modify it
+// under the terms of the GNU General Public License as published by
+// the Free Software Foundation, either version 3 of the License, or
+// (at your option) any later version.
+//
+// Yaqlite is distributed in the hope that it will be useful, but
+// WITHOUT ANY WARRANTY; without even the implied warranty of
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+// General Public License for more details.
+//
+// You should have received a copy of the GNU General Public License
+// along with Yaqlite. If not, see <https://www.gnu.org/licenses/>.
+
/// Adapt a `std::io::Write` type into a `std::fmt::Write`.
pub struct IoAdapter<'a, T: std::io::Write> {
inner: &'a mut T,