C++20 镶 SQL
C++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 | 5 月前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 年前3Spring Framwork Testing v5.3.36 SNAPSHOT
. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 25 @Sql . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 112 3.5.10. Executing SQL Scripts . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 119 Executing SQL scripts programmatically . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 119 Executing SQL scripts declaratively with @Sql . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 1210 码力 | 193 页 | 2.53 MB | 1 年前3sqlalchemy tutorial
About the Tutorial SQLAlchemy is a popular SQL toolkit and Object Relational Mapper. It is written in Python and gives full power and flexibility of SQL to an application developer. It is an open source understanding of the Python programming language. A basic understanding of relational databases, DB- API, and SQL is desired to understand this tutorial. Copyright & Disclaimer Copyright 2018 by Tutorials Point ........................................................................ 7 5. SQLAlchemy Core – SQL Expressions ......................................................................................0 码力 | 92 页 | 1.77 MB | 1 年前3Spring Framwork Data Access v5.3.36 SNAPSHOT
and Data Value Handling. . . . . . . . . . . . . . . . . . . . . . . . . . . 126 3.8.1. Providing SQL Type Information for Parameters. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . does what? Action Spring You Define connection parameters. X Open the connection. X Specify the SQL statement. X Declare parameters and provide parameter values X Prepare and run the statement. X This approach provides better documentation and ease of use when you have multiple parameters for an SQL statement. • SimpleJdbcInsert and SimpleJdbcCall optimize database metadata to limit the amount of0 码力 | 197 页 | 2.76 MB | 1 年前3peewee Documentation Release 3.5.0
Query 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 年前3peewee Documentation Release 3.5.0
for 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 年前3peewee Documentation Release 3.4.0
records 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 年前3peewee Documentation Release 3.4.0
for 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 年前3peewee Documentation Release 3.1.0
records 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 码力 | 332 页 | 370.77 KB | 1 年前3
共 874 条
- 1
- 2
- 3
- 4
- 5
- 6
- 88