Skip to content

Commit

Permalink
more tasks
Browse files Browse the repository at this point in the history
  • Loading branch information
Wandalen committed Mar 20, 2024
1 parent 040a76e commit f061755
Show file tree
Hide file tree
Showing 5 changed files with 24 additions and 8 deletions.
6 changes: 5 additions & 1 deletion module/move/unitore/src/executor/actions/query.rs
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
//! Query command endpoint and report.
// qqq : don't use both
use crate::*;
use super::*;
use gluesql::core::executor::Payload;
Expand Down Expand Up @@ -86,4 +87,7 @@ impl std::fmt::Display for QueryReport
}
}

impl Report for QueryReport {}
impl Report for QueryReport {}

// qqq : good tests for query action
// all tables should be touched by these tests
8 changes: 4 additions & 4 deletions module/move/unitore/src/executor/actions/table.rs
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,7 @@ pub async fn list_columns
"feed" =>
{
table_description = String::from( "Contains feed items." );

for label in columns.get( "feed" ).unwrap()
{
match label.as_str()
Expand All @@ -57,7 +57,7 @@ pub async fn list_columns
String::from( "Link to feed source, unique identifier for the feed" ),
); }
"title" => { columns_desc.insert( label.clone(), String::from( "The title of the feed" ) ); }
"updated" =>
"updated" =>
{
columns_desc.insert( label.clone(), String::from
(
Expand Down Expand Up @@ -166,7 +166,7 @@ impl std::fmt::Display for ColumnsReport
{
writeln!( f, "Table name: {}", self.table_name )?;
writeln!( f, "Description: {}", self.table_description )?;

if !self.columns.is_empty()
{
writeln!( f, "Columns:" )?;
Expand Down Expand Up @@ -293,7 +293,7 @@ impl std::fmt::Display for TablesReport
{
writeln!( f, "{}", table )?;
}

Ok( () )
}
}
Expand Down
4 changes: 2 additions & 2 deletions module/move/unitore/src/executor/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -77,7 +77,7 @@ pub fn execute() -> Result< (), Box< dyn std::error::Error + Send + Sync > >
}
})
.end()

.command( "frames.list" )
.long_hint( concat!
(
Expand All @@ -104,7 +104,7 @@ pub fn execute() -> Result< (), Box< dyn std::error::Error + Send + Sync > >
" - `link` : URL for feed source;\n\n",
" Example:\n",
" [[config]]\n",
" update_period = \"1min\"\n",
" update_period = \"1min\"\n",
" link = \"https://feeds.bbci.co.uk/news/world/rss.xml\"\n",
))
.subject().hint( "Path" ).kind( Type::Path ).optional( false ).end()
Expand Down
4 changes: 3 additions & 1 deletion module/move/unitore/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -3,4 +3,6 @@ pub mod retriever;
pub mod feed_config;
pub mod executor;
pub mod storage;
pub mod table_display;
pub mod table_display;

// qqq : src/Readmу.md with file structure please
10 changes: 10 additions & 0 deletions module/move/unitore/src/storage/config.rs
Original file line number Diff line number Diff line change
Expand Up @@ -111,3 +111,13 @@ impl ConfigStore for FeedStorage< SledStorage >
Ok( res )
}
}

// qqq : use AbsolutePath newtype from `path_tools`
// qqq : normalize all paths with `path_tools::path::normalize`
// https://docs.rs/proper_path_tools/latest/proper_path_tools/path/fn.normalize.html

// unitore .query.execute \'SELECT \* FROM feed\'
// qqq : something is broken in this table. also lack of association with config files

// unitore .query.execute \'SELECT \* FROM x\'
// qqq : it is not obvious where one record ends and another begins

0 comments on commit f061755

Please sign in to comment.