-
Notifications
You must be signed in to change notification settings - Fork 337
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
Implement MySqlScript #382
Comments
Hi Martin, This library is a drop-in replacement for Oracle's Read our tutorial for using with .NET Core MVC for some examples. These examples also work for the full .NET Framework. |
Hi, Any replacement or workaround for that? Regards |
My apologies, I misunderstood your question. I do not think we implement the MySqlScript class presently. |
Based on the tutorial the Rough outline of public API:
|
Hi, not so simple, it has a tokenizer etc. to split a series of commands into blocks and then execute them one by one. Look at the original code from Orcacle: https://github.com/mysql/mysql-connector-net/blob/6.9/Source/MySql.Data/MySqlScript.cs Regards |
BTW, is there a alternative to: MySql.Data.Types ? like MySql.Data.Types.MySqlDateTime and others? Regards |
No, many of the Oracle extensions in Connector/NET that aren't part of ADO.NET aren't implemented in this library. |
I'm not seeing the benefit of
Perhaps there could be some benefit from the It's also hard to find a use of the type (on GitHub) that isn't just a copy of this test file. |
@bgrainger The benefit I see is that |
After investigating Oracle's code, I found out that that damn tokenizer IS the reason that MySqlScript is required in the first place! |
Are you talking about MySql.Data or MySqlConnector? AFAIK there's no problem with doing everything in one MySqlConnector/tests/SideBySide/StoredProcedureFixture.cs Lines 10 to 127 in 7159b63
If that's the only reason |
I'm talking about |
It's good for running scripts from sql files on disk or supplied by users, but that's a risky case anyway. |
Hi just wanna share this code that was copied from mysql source, and works fine for me, thanks. https://github.com/tofilagman/Mysql.Powershell/tree/master/Mysql.Powershell/MySqlClient |
@tofilagman Note that you'll have to initialize its properties (i.e |
@danielgindi yes, that is why i have to expose the two tokenizer properties on MySqlScript Class because MysqlConnector doesnt support it yet and let the developer decide to configure it. hope that make sense, thanks.
|
Because |
Yes an extension package with stuff the Oracle adapter has but MySqlConnector not. |
Yep, but I think that who needs that will find with a simple search/open issue on this repo. |
Thats really not difficult. Dapper i.e. has many additional packages. No problem to find and reference them. |
Per #824, changing the default namespace for the main classes could let "legacy" types (including |
Just came here years later looking for MySqlScript in MySqlConnector, too. I'm glad I found this thread. |
Guys to keep you informed: I solved this issue by using FluentMigrator. You have built in support for lots of databases , creating/upgrade/downgrade them in an object oriented way and you can easily copy tables between databases very simply by using Dapper Entity extensions. Cheers |
Hello,
is there any MySqlScript replacement for the original code of Oracle?
Couldn't find a class for that.
Regards
Martin
The text was updated successfully, but these errors were encountered: