C++20 镶 SQLC++20 ❤ SQL John R Bandela, MDOverview u SQL u C++ Example u Implementation techniques u fixed_string u meta_struct u Parsing compile time strings into meta_structsOverview v SQL v C++ Example {price_from_user};Avoiding SQL Injection Attacks SELECT orders.id, name, item, price, discount_code FROM orders JOIN customers ON customers.id = customerid WHERE price > ?;SQL Library Options u Traditional Lots of information available u Vulnerable to sql injection of developer not careful u Use dynamic typingDomain Specific Language u Use types to encode SQL u Looks more like regular C++ u Typically requires0 码力 | 46 页 | 775.02 KB | 6 月前3
⽤ egg 孵化你的 SQL 优化器 - 王润基第三届中国Rust开发者⼤会 ⽤ egg 孵化你的 SQL 优化器 王润基 RisingWave 内核开发⼯程师 ? Parser Binder Optimizer Executor SQL AST Logical Plan Physical Plan Table Catalog Storage RisingLight 查询引擎的整体结构 SELECT name, url url FROM t1 JOIN t2 WHERE t1.id = t2.id AND name = ‘Bob’ SQL Logical Plan Physical Plan Projection name, url Filter t1.id = t2.id name = “Bob” Join Scan t1(id, name) Scan t2(id, url) Filter #1 = “Bob” Hash Join #0 = #2 Scan $1.1, $1.2 Scan $2.1, $2.2 Projection #1, #3 ⼀个 SQL 语句优化的例⼦ 基于规则的优化 (RBO) 基于代价的优化 (CBO) 谓词下推 Join Filter A B Join Filter A B Filter Join A Join0 码力 | 39 页 | 6.48 MB | 1 年前3
Reference guide for FCL units. Document version 3.2.2. . . . . . . . . . . . . . . . . . . . . . . . . . . . 790 34.6 Automatic generation of update SQL statements . . . . . . . . . . . . . . . . . . . . 790 34.7 Using parameters . . . . . . . . . . 37TSQLQuery.ReadOnly . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 835 34.24.38TSQLQuery.SQL . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 835 34.24.39TSQLQuery.InsertSQL . TSQLStatement.ParseSQL . . . . . . . . . . . . . . . . . . . . . . . . . . . 855 34.27.10TSQLStatement.SQL . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 855 34.27.11TSQLStatement.Transaction0 码力 | 953 页 | 2.21 MB | 1 年前3
peewee Documentation Release 2.10.2records Counting records Aggregating records Retrieving Scalar Values SQL Functions, Subqueries and “Raw expressions” Security and SQL Injection Window functions Retrieving raw tuples / dictionaries Returning query: ... print person.name, person.birthday ... Herb 1950-05-05 One last query. This will use a SQL function to find all people whose names start with either an upper or lower-case G: >>> expression close() This is just the basics! You can make your queries as complex as you like. All the other SQL clauses are available as well, such as: group_by() having() limit() and offset() Check the documentation0 码力 | 275 页 | 276.96 KB | 1 年前3
peewee Documentation
Release 2.10.2query: ... print person.name, person.birthday ... Herb 1950-05-05 One last query. This will use a SQL function to find all people whose names start with either an upper or lower-case G: >>> expression close() This is just the basics! You can make your queries as complex as you like. All the other SQL clauses are available as well, such as: • group_by() 1.2. Quickstart 9 peewee Documentation, Release for instructions on installing peewee. Every model has a create_table() classmethod which runs a SQL CREATE TABLE statement in the database. This method will create the table, including all columns, foreign-key0 码力 | 221 页 | 844.06 KB | 1 年前3
peewee Documentation Release 3.0.0records Counting records Aggregating records Retrieving Scalar Values SQL Functions, Subqueries and “Raw expressions” Security and SQL Injection Window functions Retrieving row tuples / dictionaries / namedtuples every Person returned by the original SELECT! We can avoid this by performing a JOIN and using a SQL function to aggregate the results. query = (Person .select(Person, fn.COUNT(Pet.id).alias('pet_count')) prints: # Bob # * Kitty # * Fido # Grandma L. # Herb # * Mittens Jr SQL Functions One last query. This will use a SQL function to find all people whose names start with either an upper or lower-case0 码力 | 319 页 | 361.50 KB | 1 年前3
peewee Documentation
Release 3.5.0Query operators Three valued logic Adding user-defined operators Expressions SQL Functions SQL Helper Security and SQL Injection API Documentation Database Query-builder Fields Schema Manager Model every Person returned by the original SELECT! We can avoid this by performing a JOIN and using a SQL function to aggregate the results. query = (Person .select(Person, fn.COUNT(Pet.id).alias('pet_count')) prints: # Bob # * Kitty # * Fido # Grandma L. # Herb # * Mittens Jr SQL Functions One last query. This will use a SQL function to find all people whose names start with either an upper or lower-case0 码力 | 347 页 | 380.80 KB | 1 年前3
peewee Documentation
Release 3.5.0for every Person returned by the original SELECT! We can avoid this by performing a JOIN and using a SQL function to aggregate the results. query = (Person .select(Person, fn.COUNT(Pet.id).alias('pet_count')) name) # prints: # Bob # * Kitty # * Fido # Grandma L. # Herb # * Mittens Jr SQL Functions One last query. This will use a SQL function to find all people whose names start with either an upper or lower-case close() This is just the basics! You can make your queries as complex as you like. All the other SQL clauses are available as well, such as: • group_by() • having() • limit() and offset() Check the0 码力 | 282 页 | 1.02 MB | 1 年前3
peewee Documentation Release 3.4.0records Counting records Aggregating records Retrieving Scalar Values SQL Functions, Subqueries and “Raw expressions” Security and SQL Injection Window functions Retrieving row tuples / dictionaries / namedtuples every Person returned by the original SELECT! We can avoid this by performing a JOIN and using a SQL function to aggregate the results. query = (Person .select(Person, fn.COUNT(Pet.id).alias('pet_count')) prints: # Bob # * Kitty # * Fido # Grandma L. # Herb # * Mittens Jr SQL Functions One last query. This will use a SQL function to find all people whose names start with either an upper or lower-case0 码力 | 349 页 | 382.34 KB | 1 年前3
peewee Documentation
Release 3.4.0for every Person returned by the original SELECT! We can avoid this by performing a JOIN and using a SQL function to aggregate the results. query = (Person .select(Person, fn.COUNT(Pet.id).alias('pet_count')) name) # prints: # Bob # * Kitty # * Fido # Grandma L. # Herb # * Mittens Jr SQL Functions One last query. This will use a SQL function to find all people whose names start with either an upper or lower-case close() This is just the basics! You can make your queries as complex as you like. All the other SQL clauses are available as well, such as: • group_by() • having() • limit() and offset() Check the0 码力 | 284 页 | 1.03 MB | 1 年前3
共 874 条
- 1
- 2
- 3
- 4
- 5
- 6
- 88













