Re: [sqlalchemy] Create Table DDL options before "("

2016-05-23 Thread Mike Bayer

I've added you to the "contributors" group so you should have access now.

On 05/23/2016 12:45 PM, Mark Sandan wrote:

No worries, I'll put up a reference to the PR and gerrit proposal in
case anybody wants to chime in. The change is proposed in git PR #275
 and in gerrit
 (which I'm still getting used too).


On Sunday, May 22, 2016 at 8:23:14 PM UTC-7, Mike Bayer wrote:

OK so we'll probably just add the hook you've proposed.

I've not had anytime to work on a computer for like five days straight
which puts me super behind, ill try to get to your PR soon.


On 05/19/2016 01:08 PM, Mark Sandan wrote:
> Sure, the Teradata database has create table ddl where you can
specify
> certain options that are separated by commas. We have a reference
manual
> available online specifying the full DDL here
>

>
(see
> page 383 for the full syntax).  Here is some example DDL:
>
> |
> CREATE TABLE t1 ,FALLBACK ,
>  NO BEFORE JOURNAL,
>  NO AFTER JOURNAL,
>  CHECKSUM = DEFAULT,
>  DEFAULT MERGEBLOCKRATIO
>  (
>   c1 VARCHAR(128) NOT NULL,
>   Id BYTE(4) NOT NULL,
>   OwnerId BYTE(4) NOT NULL
>  )
>UNIQUE PRIMARY INDEX ( c1 )
>  UNIQUE INDEX ( Id );
> |
>
>
>
> On Thursday, May 19, 2016 at 8:31:49 AM UTC-7, Mike Bayer wrote:
>
> saw your pull request, just curious what database / DDL is
this?  Just
> like to see the finished product that you're going for.
>
>
>
> On 05/18/2016 09:19 PM, Mark Sandan wrote:
> > Hi, I'm implementing a dialect for sqlalchemy and would like
to add
> > options before the '(' but after the table name in
visit_create. I
> know
> > I can just subclass visit_create in my ddl compiler but it
seems
> kind of
> > silly since I'd be making a small change. Something like the
> following:
> > |
> >
> >
> > defvisit_create_table(self,create):
> >   table =create.element
> >   preparer =self.preparer
> >
> >   text ="\nCREATE "
> >   iftable._prefixes:
> >  text +=" ".join(table._prefixes)+" "
> >   text +="TABLE "+preparer.format_table(table)+"
> "+table_options(table)+" ("
> >
> > |
> >
> > table_options would be a function in the ddl compiler
provided by the
> > dialect that takes dialect specific keywords and simply
appends comma
> > delimited values. I essentially need something like the
'prefixes'
> > keyword in Table but for after the table name and before the
left
> > parens. Any ideas?
> >
> > --
> > You received this message because you are subscribed to the
Google
> > Groups "sqlalchemy" group.
> > To unsubscribe from this group and stop receiving emails
from it,
> send
> > an email to sqlalchemy+...@googlegroups.com 
> > .
> > To post to this group, send email to sqlal...@googlegroups.com
> 
> > .
> > Visit this group at
https://groups.google.com/group/sqlalchemy

> >.
> > For more options, visit https://groups.google.com/d/optout

> >.
>
> --
> You received this message because you are subscribed to the Google
> Groups "sqlalchemy" group.
> To unsubscribe from this group and stop receiving emails from it,
send
> an email to sqlalchemy+...@googlegroups.com 
> .
> To post to this group, send email to sqlal...@googlegroups.com

> .
> Visit this group at https://groups.google.com/group/sqlalchemy
.
> For more options, visit https://groups.google.com/d/optout

Re: [sqlalchemy] Create Table DDL options before "("

2016-05-23 Thread Mark Sandan
No worries, I'll put up a reference to the PR and gerrit proposal in case 
anybody wants to chime in. The change is proposed in git PR #275 
 and in gerrit 
 (which I'm still getting used too).


On Sunday, May 22, 2016 at 8:23:14 PM UTC-7, Mike Bayer wrote:
>
> OK so we'll probably just add the hook you've proposed. 
>
> I've not had anytime to work on a computer for like five days straight 
> which puts me super behind, ill try to get to your PR soon. 
>
>
> On 05/19/2016 01:08 PM, Mark Sandan wrote: 
> > Sure, the Teradata database has create table ddl where you can specify 
> > certain options that are separated by commas. We have a reference manual 
> > available online specifying the full DDL here 
> > <
> https://www.google.com/url?sa=t=j==s=web=1=rja=8=0ahUKEwjZkreizubMAhVIXh4KHWp0DrAQFggdMAA=http%3A%2F%2Ftunweb.teradata.ws%2Ftunstudent%2FTeradataUserManuals%2FSQL_Reference_--_Data_Definition_Syntax_Example.pdf=AFQjCNFEIVA1TfbRXNV_hQfCVNBe7gZt3g=dPP1GmBUBEyB186Pkh6HmA>
>  
> (see 
> > page 383 for the full syntax).  Here is some example DDL: 
> > 
> > | 
> > CREATE TABLE t1 ,FALLBACK , 
> >  NO BEFORE JOURNAL, 
> >  NO AFTER JOURNAL, 
> >  CHECKSUM = DEFAULT, 
> >  DEFAULT MERGEBLOCKRATIO 
> >  ( 
> >   c1 VARCHAR(128) NOT NULL, 
> >   Id BYTE(4) NOT NULL, 
> >   OwnerId BYTE(4) NOT NULL 
> >  ) 
> >UNIQUE PRIMARY INDEX ( c1 ) 
> >  UNIQUE INDEX ( Id ); 
> > | 
> > 
> > 
> > 
> > On Thursday, May 19, 2016 at 8:31:49 AM UTC-7, Mike Bayer wrote: 
> > 
> > saw your pull request, just curious what database / DDL is this? 
>  Just 
> > like to see the finished product that you're going for. 
> > 
> > 
> > 
> > On 05/18/2016 09:19 PM, Mark Sandan wrote: 
> > > Hi, I'm implementing a dialect for sqlalchemy and would like to 
> add 
> > > options before the '(' but after the table name in visit_create. I 
> > know 
> > > I can just subclass visit_create in my ddl compiler but it seems 
> > kind of 
> > > silly since I'd be making a small change. Something like the 
> > following: 
> > > | 
> > > 
> > > 
> > > defvisit_create_table(self,create): 
> > >   table =create.element 
> > >   preparer =self.preparer 
> > > 
> > >   text ="\nCREATE " 
> > >   iftable._prefixes: 
> > >  text +=" ".join(table._prefixes)+" " 
> > >   text +="TABLE "+preparer.format_table(table)+" 
> > "+table_options(table)+" (" 
> > > 
> > > | 
> > > 
> > > table_options would be a function in the ddl compiler provided by 
> the 
> > > dialect that takes dialect specific keywords and simply appends 
> comma 
> > > delimited values. I essentially need something like the 'prefixes' 
> > > keyword in Table but for after the table name and before the left 
> > > parens. Any ideas? 
> > > 
> > > -- 
> > > You received this message because you are subscribed to the Google 
> > > Groups "sqlalchemy" group. 
> > > To unsubscribe from this group and stop receiving emails from it, 
> > send 
> > > an email to sqlalchemy+...@googlegroups.com  
> > >  >. 
> > > To post to this group, send email to sqlal...@googlegroups.com 
> >  
> > > . 
> > > Visit this group at https://groups.google.com/group/sqlalchemy 
> > . 
> > > For more options, visit https://groups.google.com/d/optout 
> > . 
> > 
> > -- 
> > You received this message because you are subscribed to the Google 
> > Groups "sqlalchemy" group. 
> > To unsubscribe from this group and stop receiving emails from it, send 
> > an email to sqlalchemy+...@googlegroups.com  
> > . 
> > To post to this group, send email to sqlal...@googlegroups.com 
>  
> > . 
> > Visit this group at https://groups.google.com/group/sqlalchemy. 
> > For more options, visit https://groups.google.com/d/optout. 
>

-- 
You received this message because you are subscribed to the Google Groups 
"sqlalchemy" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to sqlalchemy+unsubscr...@googlegroups.com.
To post to this group, send email to sqlalchemy@googlegroups.com.
Visit this group at https://groups.google.com/group/sqlalchemy.
For more options, visit https://groups.google.com/d/optout.


Re: [sqlalchemy] Create Table DDL options before "("

2016-05-22 Thread Mike Bayer

OK so we'll probably just add the hook you've proposed.

I've not had anytime to work on a computer for like five days straight 
which puts me super behind, ill try to get to your PR soon.



On 05/19/2016 01:08 PM, Mark Sandan wrote:

Sure, the Teradata database has create table ddl where you can specify
certain options that are separated by commas. We have a reference manual
available online specifying the full DDL here

 (see
page 383 for the full syntax).  Here is some example DDL:

|
CREATE TABLE t1 ,FALLBACK ,
 NO BEFORE JOURNAL,
 NO AFTER JOURNAL,
 CHECKSUM = DEFAULT,
 DEFAULT MERGEBLOCKRATIO
 (
  c1 VARCHAR(128) NOT NULL,
  Id BYTE(4) NOT NULL,
  OwnerId BYTE(4) NOT NULL
 )
   UNIQUE PRIMARY INDEX ( c1 )
 UNIQUE INDEX ( Id );
|



On Thursday, May 19, 2016 at 8:31:49 AM UTC-7, Mike Bayer wrote:

saw your pull request, just curious what database / DDL is this?  Just
like to see the finished product that you're going for.



On 05/18/2016 09:19 PM, Mark Sandan wrote:
> Hi, I'm implementing a dialect for sqlalchemy and would like to add
> options before the '(' but after the table name in visit_create. I
know
> I can just subclass visit_create in my ddl compiler but it seems
kind of
> silly since I'd be making a small change. Something like the
following:
> |
>
>
> defvisit_create_table(self,create):
>   table =create.element
>   preparer =self.preparer
>
>   text ="\nCREATE "
>   iftable._prefixes:
>  text +=" ".join(table._prefixes)+" "
>   text +="TABLE "+preparer.format_table(table)+"
"+table_options(table)+" ("
>
> |
>
> table_options would be a function in the ddl compiler provided by the
> dialect that takes dialect specific keywords and simply appends comma
> delimited values. I essentially need something like the 'prefixes'
> keyword in Table but for after the table name and before the left
> parens. Any ideas?
>
> --
> You received this message because you are subscribed to the Google
> Groups "sqlalchemy" group.
> To unsubscribe from this group and stop receiving emails from it,
send
> an email to sqlalchemy+...@googlegroups.com 
> .
> To post to this group, send email to sqlal...@googlegroups.com

> .
> Visit this group at https://groups.google.com/group/sqlalchemy
.
> For more options, visit https://groups.google.com/d/optout
.

--
You received this message because you are subscribed to the Google
Groups "sqlalchemy" group.
To unsubscribe from this group and stop receiving emails from it, send
an email to sqlalchemy+unsubscr...@googlegroups.com
.
To post to this group, send email to sqlalchemy@googlegroups.com
.
Visit this group at https://groups.google.com/group/sqlalchemy.
For more options, visit https://groups.google.com/d/optout.


--
You received this message because you are subscribed to the Google Groups 
"sqlalchemy" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to sqlalchemy+unsubscr...@googlegroups.com.
To post to this group, send email to sqlalchemy@googlegroups.com.
Visit this group at https://groups.google.com/group/sqlalchemy.
For more options, visit https://groups.google.com/d/optout.


Re: [sqlalchemy] Create Table DDL options before "("

2016-05-19 Thread Mark Sandan
Sure, the Teradata database has create table ddl where you can specify 
certain options that are separated by commas. We have a reference manual 
available online specifying the full DDL here 

 (see 
page 383 for the full syntax).  Here is some example DDL:

CREATE TABLE t1 ,FALLBACK ,
 NO BEFORE JOURNAL,
 NO AFTER JOURNAL,
 CHECKSUM = DEFAULT,
 DEFAULT MERGEBLOCKRATIO
 (
  c1 VARCHAR(128) NOT NULL,
  Id BYTE(4) NOT NULL,
  OwnerId BYTE(4) NOT NULL
 )
   UNIQUE PRIMARY INDEX ( c1 )
 UNIQUE INDEX ( Id );



On Thursday, May 19, 2016 at 8:31:49 AM UTC-7, Mike Bayer wrote:
>
> saw your pull request, just curious what database / DDL is this?  Just 
> like to see the finished product that you're going for. 
>
>
>
> On 05/18/2016 09:19 PM, Mark Sandan wrote: 
> > Hi, I'm implementing a dialect for sqlalchemy and would like to add 
> > options before the '(' but after the table name in visit_create. I know 
> > I can just subclass visit_create in my ddl compiler but it seems kind of 
> > silly since I'd be making a small change. Something like the following: 
> > | 
> > 
> > 
> > defvisit_create_table(self,create): 
> >   table =create.element 
> >   preparer =self.preparer 
> > 
> >   text ="\nCREATE " 
> >   iftable._prefixes: 
> >  text +=" ".join(table._prefixes)+" " 
> >   text +="TABLE "+preparer.format_table(table)+" 
> "+table_options(table)+" (" 
> > 
> > | 
> > 
> > table_options would be a function in the ddl compiler provided by the 
> > dialect that takes dialect specific keywords and simply appends comma 
> > delimited values. I essentially need something like the 'prefixes' 
> > keyword in Table but for after the table name and before the left 
> > parens. Any ideas? 
> > 
> > -- 
> > You received this message because you are subscribed to the Google 
> > Groups "sqlalchemy" group. 
> > To unsubscribe from this group and stop receiving emails from it, send 
> > an email to sqlalchemy+...@googlegroups.com  
> > . 
> > To post to this group, send email to sqlal...@googlegroups.com 
>  
> > . 
> > Visit this group at https://groups.google.com/group/sqlalchemy. 
> > For more options, visit https://groups.google.com/d/optout. 
>

-- 
You received this message because you are subscribed to the Google Groups 
"sqlalchemy" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to sqlalchemy+unsubscr...@googlegroups.com.
To post to this group, send email to sqlalchemy@googlegroups.com.
Visit this group at https://groups.google.com/group/sqlalchemy.
For more options, visit https://groups.google.com/d/optout.


Re: [sqlalchemy] Create Table DDL options before "("

2016-05-19 Thread Mike Bayer
saw your pull request, just curious what database / DDL is this?  Just 
like to see the finished product that you're going for.




On 05/18/2016 09:19 PM, Mark Sandan wrote:

Hi, I'm implementing a dialect for sqlalchemy and would like to add
options before the '(' but after the table name in visit_create. I know
I can just subclass visit_create in my ddl compiler but it seems kind of
silly since I'd be making a small change. Something like the following:
|


defvisit_create_table(self,create):
  table =create.element
  preparer =self.preparer

  text ="\nCREATE "
  iftable._prefixes:
 text +=" ".join(table._prefixes)+" "
  text +="TABLE "+preparer.format_table(table)+" "+table_options(table)+" ("

|

table_options would be a function in the ddl compiler provided by the
dialect that takes dialect specific keywords and simply appends comma
delimited values. I essentially need something like the 'prefixes'
keyword in Table but for after the table name and before the left
parens. Any ideas?

--
You received this message because you are subscribed to the Google
Groups "sqlalchemy" group.
To unsubscribe from this group and stop receiving emails from it, send
an email to sqlalchemy+unsubscr...@googlegroups.com
.
To post to this group, send email to sqlalchemy@googlegroups.com
.
Visit this group at https://groups.google.com/group/sqlalchemy.
For more options, visit https://groups.google.com/d/optout.


--
You received this message because you are subscribed to the Google Groups 
"sqlalchemy" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to sqlalchemy+unsubscr...@googlegroups.com.
To post to this group, send email to sqlalchemy@googlegroups.com.
Visit this group at https://groups.google.com/group/sqlalchemy.
For more options, visit https://groups.google.com/d/optout.


[sqlalchemy] Create Table DDL options before "("

2016-05-18 Thread Mark Sandan
Hi, I'm implementing a dialect for sqlalchemy and would like to add options 
before the '(' but after the table name in visit_create. I know I can just 
subclass visit_create in my ddl compiler but it seems kind of silly since 
I'd be making a small change. Something like the following:


def visit_create_table(self, create): 
  table = create.element
  preparer = self.preparer
 
  text = "\nCREATE "
  if table._prefixes:
 text += " ".join(table._prefixes) + " "
  text += "TABLE " + preparer.format_table(table)+ " " + table_options(table
) + " ("


table_options would be a function in the ddl compiler provided by the 
dialect that takes dialect specific keywords and simply appends comma 
delimited values. I essentially need something like the 'prefixes' keyword 
in Table but for after the table name and before the left parens. Any ideas?

-- 
You received this message because you are subscribed to the Google Groups 
"sqlalchemy" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to sqlalchemy+unsubscr...@googlegroups.com.
To post to this group, send email to sqlalchemy@googlegroups.com.
Visit this group at https://groups.google.com/group/sqlalchemy.
For more options, visit https://groups.google.com/d/optout.