Skip to content

Conversation

@ssweber
Copy link
Collaborator

@ssweber ssweber commented Jun 29, 2023

@PySimpleSQL, hope your trip went well.

I'm at a good stopping point. Big update. Lots of new features and bug-fixes. If you have old programs that you'd like help updating, I'm more than happy to work on them in a private github repository.

  • Worked through all the issues to make an orders.py example that works with all sqldrivers. Capturing generated for all drivers, fixed sql_commands/sql_script for all drivers, and now MsAccess can create its own file!
  • Made specialized columns that allow validation and better casting
  • Allow an easy way to add a info status bar

I tried to break it out in changes that are easy to review.

thonny_Kz1j5XFKyb.mp4

ssweber added 30 commits June 29, 2023 12:07
sort_enable is on by default, so we can remove that.
renamed `edit_enable` -> allow_cell_edits
As an option, if someone has a newer msaccess file that has 'attachment' column
This fixes all the 'problem connecting' errors for me
Sqlite, Mysql, Postgres, SqlServer, and Msaccess!

Sporting alot of new features:
- basic validators for all columns
- updating a sg.StatusBar and/or sg.Text with info-msgs
- Custom validator for email field in `customer` quick-editor
used in automatically updating sg.StatusBar and/or sg.Text
Fixed a placeholder issue with it.
This allows setting column_info attributes. The dataset is generated, so this setting custom attributes.
Adds an info-element that displays the str of an info msg. Useful to use as a status bar.

Form.add_info_element is called in auto_map_elements

Then popup handles updating them when an info msg is created.
Changed Column to a dataclass
Added:
-BoolCol
-DateCol
-DateTimeCol
-DecimalCol
-FloatCol
-IntCol
-StrCol
-TimeCol

and also two `base col classes`:

LengthCol
MinMaxCol

that the others subclass
new functions:
- parse_domain
- get_column_class
added Decimal handling for sqlite

Added:
COLUMN_CLASS_MAP
SQL_CONSTANTS

Fixed: generated capturing
Moved: execute_script
Added:
COLUMN_CLASS_MAP
SQL_CONSTANTS

new arg: tinyint1_is_boolean

Fixed executescript (mysql doesn't have one)

Converted to use new specialized type Cols

Fixed duplicate handling - mysql doesn't have a 'RETURNING'
Added
COLUMN_CLASS_MAP
SQL_CONSTANTS

added an execute_script function, and correct sql_commands function
Add and use COLUMN_CLASS_MAP
Add SQL_CONSTANTS

get generated columns
fix execute_script / sql_commands
-Add/use COLUMN_CLASS_MAP
-add ability to create an access file, and overwrite one
-infer datetype column from column default (if there is one)
create/fix sql_commands/sql_file
ssweber added 28 commits July 20, 2023 16:50
This is currently broken, so removing for now until there is a viable strategy for implementing.
Too many bugs generated if it is None
Allows quick_editor (or others) that share driver to close without closing driver.
Fix a few 'Critical' mkdocstrings errors
Adds clarity, since Last is used elsewhere for the last record of a table, not previous :)
* ValidateRule documentation

* Update pysimplesql.py

* Update pysimplesql.py

* docs

* Docs

* Docs

* autotyping 1 of

* --bool-param

* --int-param, --float-param, --str-param, --bytes-param

* --int-param, --float-param, --str-param, --bytes-param

* --annotate-magics

* type hinting

* Docs, and moving constants to enums

* Fix: Check for 'TableBuilder' key intead of searching metadata

* Update pysimplesql.py

* import dataclass as dataclass, so we don't have to use dc. everywhere

* use init=False to make these instance vars only

* Get ruff to pass, harmonize sql_script/sql_commands

* Rename parent_virtual, to is_parent_virtual

Small fix too

* .
@ssweber ssweber merged commit ea70b2b into development Sep 20, 2023
@ssweber ssweber deleted the wip branch September 20, 2023 12:57
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants