-
Notifications
You must be signed in to change notification settings - Fork 81
feat: Support arbitrary properties for x-sql-datatype in x-sql-datatype-properties
#3373
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: main
Are you sure you want to change the base?
Conversation
Reviewer's GuideThis PR introduces support for the x-sql-datatype-properties extension by extending the Schema model, adding round-trip tests for custom SQL datatype properties, and updating the SQL-target documentation with examples for registering and using handlers that consume these properties. ER diagram for JSON Schema with x-sql-datatype-propertieserDiagram
addresses {
number int
x-sql-datatype varchar
}
values {
x-sql-datatype varchar
x-sql-datatype-properties json
}
addresses ||--o| values : contains
Class diagram for updated Schema model with x-sql-datatype-propertiesclassDiagram
class Schema {
+str|None x_sql_datatype
+dict[str, Any]|None x_sql_datatype_properties
+str|None contentEncoding
+bool|None deprecated
+Any|None oneOf
}
Class diagram for custom SQL datatype handler registrationclassDiagram
class JSONSchemaToSQL {
+register_sql_datatype_handler(datatype: str, handler: Callable)
}
class MyConnector {
+jsonschema_to_sql()
}
class VectorType {
+__init__(**kwargs)
}
JSONSchemaToSQL <|-- MyConnector
MyConnector o-- VectorType: uses
File-Level Changes
Tips and commandsInteracting with Sourcery
Customizing Your ExperienceAccess your dashboard to:
Getting Help
|
Documentation build overview
Show files changed (1 files in total): 📝 1 modified | ➕ 0 added | ➖ 0 deleted
|
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## main #3373 +/- ##
=======================================
Coverage 93.80% 93.80%
=======================================
Files 69 69
Lines 5780 5781 +1
Branches 718 718
=======================================
+ Hits 5422 5423 +1
Misses 254 254
Partials 104 104
Flags with carried forward coverage won't be shown. Click here to find out more. ☔ View full report in Codecov by Sentry. 🚀 New features to boost your workflow:
|
CodSpeed Performance ReportMerging #3373 will not alter performanceComparing Summary
|
d9e85fb to
36c636c
Compare
…atype-properties` Signed-off-by: Edgar Ramírez-Mondragón <[email protected]>
36c636c to
ba73a5e
Compare
Summary by Sourcery
Enable schemas to carry arbitrary parameters for custom SQL data types by introducing the
x-sql-datatype-propertiesextension and wiring it through the Schema model, serialization logic, tests, and documentation.New Features:
x-sql-datatypevia a newx-sql-datatype-propertiesextension on the Schema classEnhancements:
x-sql-datatype-propertiesin the JSON Schema extension list and in schema-to-dict and dict-to-schema conversionsDocumentation:
x-sql-datatype-propertiesTests: