letsmelon / tsql Goto Github PK
View Code? Open in Web Editor NEWSQL with a little bit extra sugar on top and blazingly fast ✨
License: Apache License 2.0
SQL with a little bit extra sugar on top and blazingly fast ✨
License: Apache License 2.0
Some datatypes are not supported in every database platform.
PostgreSQL has the datatype uuid
while MySQL and SQLite don't have the datatype, uuid
is there either a text-type or binary(16)
.
PostgreSQL: docs
MySQL: blog about uuid
Line 77 in c22a5c1
At the current commit c3b5053 the ./src
-folder contains 14 clone()
method calls.
Things to do:
.tsql
test files and measure the footprint and the execution time when processing the file (done in 3cb1690)clone()
s or change the structs (maybe use Arc<[T]>
instead of Vec<T>
or Arc<str>
instead of String::clone(...)
)clone()
's currently in the project14 results - 3 files
src/lib.rs:
25 Ok((c, table)) => {
26: let c = c.to_string().clone();
27
28: let name = table.name.clone();
29 raw_tables.insert(name, Rc::new(RefCell::new(table)));
src/types.rs:
46 while let Some((name, table)) = get_first_element(&raw_tables) {
47: let name = name.clone();
48: let table = table.clone();
49
56 .iter()
57: .map(|item| item.borrow().name.clone())
58 .collect::<Vec<_>>();
83
84: parsed.insert(parsed_table.name.clone(), parsed_table);
85 }
97
98: parsed_table.name = raw.name.clone();
99
104 .fields
105: .insert(raw_field.name.clone(), Field::parse(raw_field)?);
106 }
122 let field = Field {
123: name: field_name.clone(),
124 datatype: fk_field.datatype,
125 foreign_key_reference: Some((
126: fk_table_name.clone(),
127: Rc::new(fk_field.clone()),
128 )),
148 .primary_key
149: .push(primary_key_field.clone());
150 }
187 .iter()
188: .map(|item| item.foreign_key_reference.as_ref().unwrap().1.name.clone())
189 .collect::<Vec<_>>()
src/parser/types.rs:
24 RawDataType::ForeignKeyTable(table_name) => {
25: table_names.push(table_name.clone())
26 }
A declarative, efficient, and flexible JavaScript library for building user interfaces.
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google ❤️ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.