October 15, 2011
On Sat, 15 Oct 2011 20:08:28 +0200, sclytrack wrote:

> On 10/14/2011 09:27 AM, Steve Teale wrote:
>>>
>>> 2) would be a thin wrapper around the C API. I think that runs against Phobos' philosophy especially with eventually four layers of abstraction. I'm just saying. Wouldn't mind personally.
>>
>> Marco,
>>
>> Not if it's anything like the piece I'm working on, which if I judge by the effort I've put into it, is not thin. Perhaps I'm at the wrong level.
>>
>> I hope to put an infant version on github before the weekend is out, then you can judge.
>>
>> Steve
> 
> nice :-)
> 
> 
> 
> ---
> 
> http://www.mysql.com/about/legal/licensing/foss-exception/

It's Greek to me. But we're not considering distributing their library - the closest we come is the translation to D of three of their header files.

And the source code will be available, and there's a long list of exceptions, but whether we pass or not I can't tell at this time of day.

Steve
> 
> I'm not sure how to interpret this.

October 15, 2011
Am 14.10.2011 16:23, schrieb Steve Teale:
> OK, for what it's worth, the compiler generated documentation (well, more
> or less) for my mysqlD effort is now on my web site. The same directory
> also has the source files and a Code::Blocks project for anyone who uses
> the latter.
>
> I added links to these files at the bottom of the doc.
>
> I'll put the stuff on github as soon as I figure out how. The page for
> now is:
>
> http://britseyeview.com/software/mysqld/

Hi Steve,
don't want to be the first one,  but heck, after waiting a day ...

LIKE : RowSet
The RowSet implementation is pretty cool. Especially the convenience implementation. Guess this RowSet implementation will ease D ORM development.

MISS : MetaData
Without thinking too much about Object Relational Mappers and GUI Adaptors...
Having Meta information is not a bad thing. In other words NEEDED.

A draft :
string[] GetDataBases()
string[] GetSchemas()
IColumns GetColumns()
string [] GetStoredPredures()
etc...

Why ? - Enable creating a Visual DB Toolkit, ER Designer, D ORM   source code generator....

MISS : Mapping Functionality
Map D types to database types and vice versa

Why ? - See ORM

MISS/WANT LATER : Transaction and stored procedure support
Makes IMHO not too much sense to implement MySQL TTS and  Stored proc. specific code right now.

Why ? Seems to be hard to create a common Interface. (nested Transactions are not avail. on all systems, just to face one thing) Nevertheless. A DB without TTS is not worth to be included into std.database

MISS/EXOTIC : Database Events
CallBack Implementation for DB Server triggered events


-----------------------------------------------------------------------
FWIW

Since creating an universal Database Interface has much to do with abstraction and ergo with OOP patterns...

From an OOP view .. What is needed at Level _Two_  ? (DB classes)

_GoF pattern_ :

The Factory Design pattern -> In order to enable database independent development.
OR
The Prototype pattern -> smarter than Factory, but this pattern requires the implementation of ICloneable respective MemberwiseClone

The Observer Pattern ->
Get and transfer DB Server-side Events to interested parties.

What is needed at Level _Three_ ? (Object Relation Mapper)
Enterprise patterns

- The Data Mapper pattern
- The Active Record Pattern (optional)
- The Unit Of Work Pattern
------ UOW Pattern is using the (GoF) Memento Pattern

Random thoughts..
I guess that we will need std.uid ( getGUID() getOID() etc ) and also std.serialisation -> ( orange library) to make std.database work.

Finally .. as I see the Levels
1 etc.c
2 Database classes - D query language
3 ORM classes
4 GUI Adaptor classes

I hope this comments are useful. will try your MySQL stuff on WIN 7 asap,  and (maybe) create a more detailed ORM design within the following days.. Thanks, Bjoern
October 16, 2011
On Sun, 16 Oct 2011 00:36:52 +0200, bls wrote:

> LIKE : RowSet
> The RowSet implementation is pretty cool. Especially the convenience
> implementation. Guess this RowSet implementation will ease D ORM
> development.
> 
> MISS : MetaData
> Without thinking too much about Object Relational Mappers and GUI
> Adaptors...
> Having Meta information is not a bad thing. In other words NEEDED.
> 
> A draft :
> string[] GetDataBases()
> string[] GetSchemas()
> IColumns GetColumns()
> string [] GetStoredPredures()
> etc...
> 
> Why ? - Enable creating a Visual DB Toolkit, ER Designer, D ORM   source code generator....
> 
> MISS : Mapping Functionality
> Map D types to database types and vice versa
> 
> Why ? - See ORM
> 
> MISS/WANT LATER : Transaction and stored procedure support Makes IMHO not too much sense to implement MySQL TTS and  Stored proc. specific code right now.
> 
> Why ? Seems to be hard to create a common Interface. (nested Transactions are not avail. on all systems, just to face one thing) Nevertheless. A DB without TTS is not worth to be included into std.database
> 
> MISS/EXOTIC : Database Events
> CallBack Implementation for DB Server triggered events
> 
> 
> -----------------------------------------------------------------------
> FWIW
> 
> Since creating an universal Database Interface has much to do with abstraction and ergo with OOP patterns...
> 
>  From an OOP view .. What is needed at Level _Two_  ? (DB classes)
> 
> _GoF pattern_ :
> 
> The Factory Design pattern -> In order to enable database independent
> development.
> OR
> The Prototype pattern -> smarter than Factory, but this pattern requires
> the implementation of ICloneable respective MemberwiseClone
> 
> The Observer Pattern ->
> Get and transfer DB Server-side Events to interested parties.
> 
> What is needed at Level _Three_ ? (Object Relation Mapper) Enterprise
> patterns
> 
> - The Data Mapper pattern
> - The Active Record Pattern (optional) - The Unit Of Work Pattern
> ------ UOW Pattern is using the (GoF) Memento Pattern
> 
> Random thoughts..
> I guess that we will need std.uid ( getGUID() getOID() etc ) and also
> std.serialisation -> ( orange library) to make std.database work.
> 
> Finally .. as I see the Levels
> 1 etc.c
> 2 Database classes - D query language 3 ORM classes
> 4 GUI Adaptor classes
> 
> I hope this comments are useful. will try your MySQL stuff on WIN 7 asap,  and (maybe) create a more detailed ORM design within the following days.. Thanks, Bjoern

Bjoern,

Lots of people have visited the page, but first you were. However I could have a lot worse fist comment. Thank you for your considered constructive criticism. The metadata sounds like a good task for a quiet Sunday.

Also I'll add that the mapping functionality is pretty much all there, just not explicitly exposed. A job for Monday perhaps ;=)

Steve
October 16, 2011
There's a discussion going on about Windows header files that has discussed whether header files can be copyright.

Header files may be an issue with the database implementations. For example my mysql.d is a straight translation of mysql.h (and a couple of others). Does that mean it is tainted by GPL and I can't make it Boost?

Do we have a license specialist in our group?

Steve
October 16, 2011
> I hope this comments are useful. will try your MySQL stuff on WIN 7 asap,  and (maybe) create a more detailed ORM design within the following days.. Thanks, Bjoern

Just thought. On Windows you'll have to do something about Connection.open (). I have not yet resolved the issue of the default Unix socket path.

I did the earliest version of this on Win32, and if I remember rightly, all I had to pass then were the basics - host, user, password, database.

Steve

October 16, 2011
On 16.10.2011 08:13, Steve Teale wrote:
> There's a discussion going on about Windows header files that has
> discussed whether header files can be copyright.
>
> Header files may be an issue with the database implementations. For
> example my mysql.d is a straight translation of mysql.h (and a couple of
> others). Does that mean it is tainted by GPL and I can't make it Boost?
>
> Do we have a license specialist in our group?
>
> Steve

I cannot find any information regarding this now, but I seem to remember this has been tried and that header files is legal to translate and change license. I think it has been the case with ReactOS and MinGW.
October 17, 2011
On Sun, 16 Oct 2011 02:13:05 -0400, Steve Teale <steve.teale@britseyeview.com> wrote:

> There's a discussion going on about Windows header files that has
> discussed whether header files can be copyright.
>
> Header files may be an issue with the database implementations. For
> example my mysql.d is a straight translation of mysql.h (and a couple of
> others). Does that mean it is tainted by GPL and I can't make it Boost?

A direct translation is a derivative work.  So yes, it must be GPL.

However, there must be ways around this.  I believe headers have certain rules in most licenses.

You will definitely need some sort of non-translated header though.  I'm not a license expert, so I don't know to what lengths you need to go to re-license the header.

However, what about mysql itself?  If the header is GPL, so is the library, no?  I'm assuming you are not reimplementing the mysql client lib?  Linking against a GPL library is definitely not going to be acceptable in a phobos module.

-Steve
October 17, 2011
On Mon, 17 Oct 2011 09:42:13 -0400, Steven Schveighoffer wrote:

> On Sun, 16 Oct 2011 02:13:05 -0400, Steve Teale <steve.teale@britseyeview.com> wrote:
> 
>> There's a discussion going on about Windows header files that has discussed whether header files can be copyright.
>>
>> Header files may be an issue with the database implementations. For example my mysql.d is a straight translation of mysql.h (and a couple of others). Does that mean it is tainted by GPL and I can't make it Boost?
> 
> A direct translation is a derivative work.  So yes, it must be GPL.
> 
> However, there must be ways around this.  I believe headers have certain rules in most licenses.
> 
> You will definitely need some sort of non-translated header though.  I'm not a license expert, so I don't know to what lengths you need to go to re-license the header.
> 
> However, what about mysql itself?  If the header is GPL, so is the library, no?  I'm assuming you are not reimplementing the mysql client lib?  Linking against a GPL library is definitely not going to be acceptable in a phobos module.
> 
> -Steve

Hmm, I just did a quick check, and the MySQL client/server protocol is GPL also, so there's nowhere to go.

How do Python and PHP communicate with MySQL. Is it just that they have the clout to get a dispensation from MySQL AB?

Does this stuff have to go in some repository like the proposed Deimos (a figure representing dread in Greek Mythology) where you will presumably often encounter dread licensing gotchas?

Steve
October 17, 2011
Steve Teale Wrote:

> Hmm, I just did a quick check, and the MySQL client/server protocol is GPL also, so there's nowhere to go.

That was fixed.

> How do Python and PHP communicate with MySQL. Is it just that they have the clout to get a dispensation from MySQL AB?

MySQL license has FLOSS exception: opensource software can use MySQL, but not *relicense* its code.
http://mysql.com/about/legal/licensing/foss-exception/
Though boost is not in the list.
October 17, 2011
On Mon, 17 Oct 2011 10:25:13 -0400, Steve Teale <steve.teale@britseyeview.com> wrote:

> On Mon, 17 Oct 2011 09:42:13 -0400, Steven Schveighoffer wrote:
>
>> On Sun, 16 Oct 2011 02:13:05 -0400, Steve Teale
>> <steve.teale@britseyeview.com> wrote:
>>
>>> There's a discussion going on about Windows header files that has
>>> discussed whether header files can be copyright.
>>>
>>> Header files may be an issue with the database implementations. For
>>> example my mysql.d is a straight translation of mysql.h (and a couple
>>> of others). Does that mean it is tainted by GPL and I can't make it
>>> Boost?
>>
>> A direct translation is a derivative work.  So yes, it must be GPL.
>>
>> However, there must be ways around this.  I believe headers have certain
>> rules in most licenses.
>>
>> You will definitely need some sort of non-translated header though.  I'm
>> not a license expert, so I don't know to what lengths you need to go to
>> re-license the header.
>>
>> However, what about mysql itself?  If the header is GPL, so is the
>> library, no?  I'm assuming you are not reimplementing the mysql client
>> lib?  Linking against a GPL library is definitely not going to be
>> acceptable in a phobos module.
>>
>> -Steve
>
> Hmm, I just did a quick check, and the MySQL client/server protocol is
> GPL also, so there's nowhere to go.

Protocol cannot be copyrighted.  A protocol is carefully formatted data, but not *MySQL's* data, it's *your* data.

If they want to attempt to say my passing "select name, bar, gobbledegook from myPrivateDatabase" to a server makes my code GPL, be my guest, I don't even think I'd need a lawyer to defend that :)  Here is a good post discussing it: http://krow.livejournal.com/684068.html?thread=2670116

But the library can be copyrighted (and the protocol description).  Given mysql's sales model (and the company behind it), you would need a very meticulously documented process to clean-room implement it in a way that could be defended, and even then Walter may not go for inclusion in phobos, he is allergic to even the *notion* that something might be challenged in court being in D/phobos.

>
> How do Python and PHP communicate with MySQL. Is it just that they have
> the clout to get a dispensation from MySQL AB?

little searching reveals:

http://www.mysql.com/about/legal/licensing/foss-exception/

Note PHP and Python are both in the license list, whereas Boost is not :(

> Does this stuff have to go in some repository like the proposed Deimos (a
> figure representing dread in Greek Mythology) where you will presumably
> often encounter dread licensing gotchas?

I'd imagine so.  Another option is to reimplement libmysql.

Sorry :(

-Steve