From: Jiří Č. <ji...@ci...> - 2015-11-15 11:04:40
|
Hi * before I'll start cracking on FB 3 support (we have some good PRs) I'd like to get some features out. The list of changes is in http://tracker.firebirdsql.org/browse/DNET/fixforversion/10722 (and also some internal network stuff changes - check the commits if you're interested). Test it. Probably the long awaited is EF Migrations [3] support. You can us the new `FbMigrationSqlGenerator` [1] class. It's registered by default, but if you want to play harder check these lines [2]. Try it, discuss it here. Known issue [5]. The version is available on *NuGet only* [4]. [1]: https://github.com/cincuranet/FirebirdSql.Data.FirebirdClient/blob/master/NETProvider/src/EntityFramework.Firebird/FbMigrationSqlGenerator.cs [2]: https://github.com/cincuranet/FirebirdSql.Data.FirebirdClient/blob/master/NETProvider/src/FirebirdSql.Data.FirebirdClient/FirebirdClient/FbProviderServices.cs#L69,L70 [3]: https://msdn.microsoft.com/en-us/data/jj591621.aspx [4]: https://www.nuget.org/packages/FirebirdSql.Data.FirebirdClient/4.9.0-beta1 [5]: http://entityframework.codeplex.com/workitem/2683 -- Mgr. Jiří Činčura Independent IT Specialist |
From: Геннадий З. <zab...@gm...> - 2015-11-16 06:07:49
|
Here is my comments about Migration: 1. readonly IFbMigrationSqlGeneratorBehavior _behavior; Is used only in migration operations DropColumn/AlterColumn, not used in AddColumn. 2. We have additional implementation of Check in (0,1) for boolean fields like implemented in SsdlToSql.cs 3. CreateItemName function doesn't support names longer than 31 character. 4. Also, I don't see where IFbMigrationSqlGeneratorBehavior can be injected from client's app code. 5. I think the generator creation code in DefaultFbMigrationSqlGeneratorBehavior will be copied to a possible new implementation, so it is better to split logic. See base class: https://github.com/zabulus/NETProvider/blob/master/NETProvider/src/EntityFramework.Firebird/DefaultFbMigrationSqlGeneratorBehavior.cs and it's default implementation. https://github.com/zabulus/NETProvider/blob/master/NETProvider/src/EntityFramework.Firebird/CustomFbMigrationSqlGeneratorBehavior.cs For all these suggestions I can prepare PRs this week without problems. On 15 November 2015 at 13:04, Jiří Činčura <ji...@ci...> wrote: > Hi * > > before I'll start cracking on FB 3 support (we have some good PRs) I'd > like to get some features out. The list of changes is in > http://tracker.firebirdsql.org/browse/DNET/fixforversion/10722 (and also > some internal network stuff changes - check the commits if you're > interested). Test it. > > Probably the long awaited is EF Migrations [3] support. You can us the > new `FbMigrationSqlGenerator` [1] class. It's registered by default, but > if you want to play harder check these lines [2]. Try it, discuss it > here. Known issue [5]. > > The version is available on *NuGet only* [4]. > > [1]: > https://github.com/cincuranet/FirebirdSql.Data.FirebirdClient/blob/master/NETProvider/src/EntityFramework.Firebird/FbMigrationSqlGenerator.cs > [2]: > https://github.com/cincuranet/FirebirdSql.Data.FirebirdClient/blob/master/NETProvider/src/FirebirdSql.Data.FirebirdClient/FirebirdClient/FbProviderServices.cs#L69,L70 > [3]: https://msdn.microsoft.com/en-us/data/jj591621.aspx > [4]: > https://www.nuget.org/packages/FirebirdSql.Data.FirebirdClient/4.9.0-beta1 > [5]: http://entityframework.codeplex.com/workitem/2683 > > -- > Mgr. Jiří Činčura > Independent IT Specialist > > ------------------------------------------------------------------------------ > _______________________________________________ > Firebird-net-provider mailing list > Fir...@li... > https://lists.sourceforge.net/lists/listinfo/firebird-net-provider |
From: Jiří Č. <ji...@ci...> - 2015-12-05 15:54:15
|
> 1. readonly IFbMigrationSqlGeneratorBehavior _behavior; > Is used only in migration operations DropColumn/AlterColumn, not used > in AddColumn. The AddColumnOperation calls Generate method for ColumnModel and this method handles the identity stuff. Or do you mean something else? > 2. We have additional implementation of Check in (0,1) for boolean > fields like implemented in SsdlToSql.cs Good idea. Added. (Testing it as we speak.) > 3. CreateItemName function doesn't support names longer than 31 > character. Do you think it should throw exception? I would rather let that for Firebird. Somebody might tweak the script or something like that. I know you proposed hashing the name, but that's not reasonable general solution. The database would look gibberish for outside view. Nobody would know what's what. > 4. Also, I don't see where IFbMigrationSqlGeneratorBehavior can be > injected from client's app code. In ctor. > 5. I think the generator creation code in > DefaultFbMigrationSqlGeneratorBehavior will be copied to a possible > new implementation, so it is better to split logic. See base class: Agree. I'd like to first see somebody outside implement other behavior. Then we can talk about what to extract - i.e. the system tables logic etc. -- Mgr. Jiří Činčura Independent IT Specialist |
From: Геннадий З. <zab...@gm...> - 2015-12-06 17:29:30
|
> Do you think it should throw exception? I would rather let that for > Firebird. Somebody might tweak the script or something like that. > I know you proposed hashing the name, but that's not reasonable general > solution. The database would look gibberish for outside view. Nobody > would know what's what. I think the earlier it will be thrown the better. Also, in exception message you can include text or/and link about workaround of this FB limitation. It will be a good convenience for library users. As for hashing, agree, when we implemented this solution I missed the possibility to specify custom short names for tables. > > 4. Also, I don't see where IFbMigrationSqlGeneratorBehavior can be > > injected from client's app code. > In ctor. Ctor of what? > Agree. I'd like to first see somebody outside implement other behavior. > Then we can talk about what to extract - i.e. the system tables logic > etc. In specified links, I've provided my implementation of generator-per-table. On 5 December 2015 at 17:54, Jiří Činčura <ji...@ci...> wrote: >> 1. readonly IFbMigrationSqlGeneratorBehavior _behavior; >> Is used only in migration operations DropColumn/AlterColumn, not used >> in AddColumn. > > The AddColumnOperation calls Generate method for ColumnModel and this > method handles the identity stuff. Or do you mean something else? > >> 2. We have additional implementation of Check in (0,1) for boolean >> fields like implemented in SsdlToSql.cs > > Good idea. Added. (Testing it as we speak.) > >> 3. CreateItemName function doesn't support names longer than 31 >> character. > > Do you think it should throw exception? I would rather let that for > Firebird. Somebody might tweak the script or something like that. > > I know you proposed hashing the name, but that's not reasonable general > solution. The database would look gibberish for outside view. Nobody > would know what's what. > >> 4. Also, I don't see where IFbMigrationSqlGeneratorBehavior can be >> injected from client's app code. > > In ctor. > >> 5. I think the generator creation code in >> DefaultFbMigrationSqlGeneratorBehavior will be copied to a possible >> new implementation, so it is better to split logic. See base class: > > Agree. I'd like to first see somebody outside implement other behavior. > Then we can talk about what to extract - i.e. the system tables logic > etc. > > -- > Mgr. Jiří Činčura > Independent IT Specialist > > ------------------------------------------------------------------------------ > Go from Idea to Many App Stores Faster with Intel(R) XDK > Give your users amazing mobile app experiences with Intel(R) XDK. > Use one codebase in this all-in-one HTML5 development environment. > Design, debug & build mobile apps & 2D/3D high-impact games for multiple OSs. > http://pubads.g.doubleclick.net/gampad/clk?id=254741911&iu=/4140 > _______________________________________________ > Firebird-net-provider mailing list > Fir...@li... > https://lists.sourceforge.net/lists/listinfo/firebird-net-provider |
From: Геннадий З. <zab...@gm...> - 2015-12-07 07:29:23
|
One more question. Will this PR get merged: https://github.com/cincuranet/FirebirdSql.Data.FirebirdClient/pull/43 ? On 6 December 2015 at 19:29, Геннадий Забула <zab...@gm...> wrote: >> Do you think it should throw exception? I would rather let that for >> Firebird. Somebody might tweak the script or something like that. > >> I know you proposed hashing the name, but that's not reasonable general >> solution. The database would look gibberish for outside view. Nobody >> would know what's what. > > I think the earlier it will be thrown the better. Also, in exception > message you can include text or/and link about workaround of this FB > limitation. It will be a good convenience for library users. > > As for hashing, agree, when we implemented this solution I missed the > possibility to specify custom short names for tables. > >> > 4. Also, I don't see where IFbMigrationSqlGeneratorBehavior can be >> > injected from client's app code. >> In ctor. > > Ctor of what? > >> Agree. I'd like to first see somebody outside implement other behavior. >> Then we can talk about what to extract - i.e. the system tables logic >> etc. > > In specified links, I've provided my implementation of generator-per-table. > > > On 5 December 2015 at 17:54, Jiří Činčura <ji...@ci...> wrote: >>> 1. readonly IFbMigrationSqlGeneratorBehavior _behavior; >>> Is used only in migration operations DropColumn/AlterColumn, not used >>> in AddColumn. >> >> The AddColumnOperation calls Generate method for ColumnModel and this >> method handles the identity stuff. Or do you mean something else? >> >>> 2. We have additional implementation of Check in (0,1) for boolean >>> fields like implemented in SsdlToSql.cs >> >> Good idea. Added. (Testing it as we speak.) >> >>> 3. CreateItemName function doesn't support names longer than 31 >>> character. >> >> Do you think it should throw exception? I would rather let that for >> Firebird. Somebody might tweak the script or something like that. >> >> I know you proposed hashing the name, but that's not reasonable general >> solution. The database would look gibberish for outside view. Nobody >> would know what's what. >> >>> 4. Also, I don't see where IFbMigrationSqlGeneratorBehavior can be >>> injected from client's app code. >> >> In ctor. >> >>> 5. I think the generator creation code in >>> DefaultFbMigrationSqlGeneratorBehavior will be copied to a possible >>> new implementation, so it is better to split logic. See base class: >> >> Agree. I'd like to first see somebody outside implement other behavior. >> Then we can talk about what to extract - i.e. the system tables logic >> etc. >> >> -- >> Mgr. Jiří Činčura >> Independent IT Specialist >> >> ------------------------------------------------------------------------------ >> Go from Idea to Many App Stores Faster with Intel(R) XDK >> Give your users amazing mobile app experiences with Intel(R) XDK. >> Use one codebase in this all-in-one HTML5 development environment. >> Design, debug & build mobile apps & 2D/3D high-impact games for multiple OSs. >> http://pubads.g.doubleclick.net/gampad/clk?id=254741911&iu=/4140 >> _______________________________________________ >> Firebird-net-provider mailing list >> Fir...@li... >> https://lists.sourceforge.net/lists/listinfo/firebird-net-provider |
From: Jiří Č. <ji...@ci...> - 2015-12-09 12:37:59
|
> Will this PR get merged: > https://github.com/cincuranet/FirebirdSql.Data.FirebirdClient/pull/43 > ? Yes. -- Mgr. Jiří Činčura Independent IT Specialist |
From: Jiří Č. <ji...@ci...> - 2015-12-09 12:43:53
|
On Sun, Dec 6, 2015, at 18:29, Геннадий Забула wrote: > I think the earlier it will be thrown the better. Also, in exception > message you can include text or/and link about workaround of this FB > limitation. It will be a good convenience for library users. As I don't have any opinion on that I'll go with you. :) > Ctor of what? Of the FbMigrationSqlGenerator. -- Mgr. Jiří Činčura Independent IT Specialist |
From: Jiří Č. <ji...@ci...> - 2015-12-09 13:13:31
|
On Wed, Dec 9, 2015, at 13:43, Jiří Činčura wrote: > On Sun, Dec 6, 2015, at 18:29, Геннадий Забула wrote: > > I think the earlier it will be thrown the better. Also, in exception > > message you can include text or/and link about workaround of this FB > > limitation. It will be a good convenience for library users. > > As I don't have any opinion on that I'll go with you. :) ArgumentException or maybe ArgumentOutOfRange exception? -- Mgr. Jiří Činčura Independent IT Specialist |
From: Геннадий З. <zab...@gm...> - 2015-12-09 13:32:58
|
I think it should be ArgumentOutOfRange On 9 December 2015 at 15:13, Jiří Činčura <ji...@ci...> wrote: > On Wed, Dec 9, 2015, at 13:43, Jiří Činčura wrote: >> On Sun, Dec 6, 2015, at 18:29, Геннадий Забула wrote: >> > I think the earlier it will be thrown the better. Also, in exception >> > message you can include text or/and link about workaround of this FB >> > limitation. It will be a good convenience for library users. >> >> As I don't have any opinion on that I'll go with you. :) > > ArgumentException or maybe ArgumentOutOfRange exception? > > -- > Mgr. Jiří Činčura > Independent IT Specialist > > ------------------------------------------------------------------------------ > _______________________________________________ > Firebird-net-provider mailing list > Fir...@li... > https://lists.sourceforge.net/lists/listinfo/firebird-net-provider |
From: Jiří Č. <ji...@ci...> - 2015-12-09 13:42:23
|
Be my guest: https://github.com/cincuranet/FirebirdSql.Data.FirebirdClient/commit/4d8d1b8a5d72b6304e8d15af36542f72a9b5da8c#diff-02c77ebea06976e32e7ce3b42bca24c9R641 . I'm open to rewording it, as I'm bit flat on creativity today. :D -- Mgr. Jiří Činčura Independent IT Specialist |
From: Геннадий З. <zab...@gm...> - 2015-12-09 14:05:20
|
The name '{name}' is longer than Firebird's {LengthLimit} characters limit for objects names. On 9 December 2015 at 15:42, Jiří Činčura <ji...@ci...> wrote: > Be my guest: > https://github.com/cincuranet/FirebirdSql.Data.FirebirdClient/commit/4d8d1b8a5d72b6304e8d15af36542f72a9b5da8c#diff-02c77ebea06976e32e7ce3b42bca24c9R641 > . I'm open to rewording it, as I'm bit flat on creativity today. :D > > -- > Mgr. Jiří Činčura > Independent IT Specialist > > ------------------------------------------------------------------------------ > _______________________________________________ > Firebird-net-provider mailing list > Fir...@li... > https://lists.sourceforge.net/lists/listinfo/firebird-net-provider |