<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=us-ascii">
</head>
<body>
<div style="word-wrap:break-word">Hello Alexander
<div><br>
</div>
<div> let me be more specific.</div>
<div> I have a number of modules that query, update, delete against the database.</div>
<div> I want to centralize all the database bind, mapping, and table deletion operations in one module that other modules can call.</div>
<div> Here's my effort to write that centralized module.</div>
<div> The only method is:</div>
<div>Connect( DBMS='arthur_minerva', entityNames=[], dropAndCreateTable=False, debug=False )</div>
<div>DBMS is simply a key into a dictionary of database credential parameters. That works fine, and is used by bind.</div>
<div>entityNames is a list of entities; I want to connect() to make sure that if an entity is declared as a pony db entity then it is in the database</div>
<div>dropAndCreateTable controls whether tables are dropped; if it is true then tables for all entities should be dropped and then created</div>
<div>
<div><br>
</div>
<div> with the call:</div>
<div>
<div>Connect( MyDropAndCreateTables.args.DBMS, entityNames='CNV Subject'.split(), </div>
<div> dropAndCreateTable=True, debug=True )</div>
</div>
<div>
<div> this does not work, however:</div>
</div>
<div><br>
</div>
<div></div>
</div>
</div>
<div style="word-wrap:break-word">
<div>
<div></div>
<div></div>
</div>
</div>
<div style="word-wrap:break-word">
<div>
<div></div>
<div><br>
</div>
<div>I am using mysql. </div>
<div><br>
<div>
<div>On Nov 4, 2014, at 4:39 PM, Alexander Kozlovsky <<a href="mailto:alexander.kozlovsky@gmail.com">alexander.kozlovsky@gmail.com</a>> wrote:</div>
<blockquote type="cite">
<div dir="ltr"><span style="font-family:arial,sans-serif; font-size:13px">Hi Arthur,<br>
<br>
> How can I have the general purpose programs load all the pony entities, but then use only those specified on a command line?<br>
</span><br>
What do you mean by 'use'? Why this general purpose program can't use all entities? Can you provide some example?<br>
<br>
<div class="x_gmail_extra"><br>
<div class="x_gmail_quote">On Wed, Nov 5, 2014 at 12:24 AM, Goldberg, Arthur P <span dir="ltr">
<<a href="https://urldefense.proofpoint.com/v2/url?u=http-3A__mailto-3Aarthur.p.goldberg-40mssm.edu&d=AAMFaQ&c=4R1YgkJNMyVWjMjneTwN5tJRn8m8VqTSNCjYLg1wNX4&r=TntoeYH7lekXzpBRjXwLTkqiWTbWAvp3pHKo_kZp5qI&m=-l9d_YgpS5Br4HVerevDUPDePIdahRQvh6kua6GEKCg&s=8BLVACjagdDyNx90SlAn1F7tsSllEw4K5MHFxb6KM1o&e=" target="_blank">arthur.p.goldberg@mssm.edu</a>></span>
wrote:<br>
<blockquote class="x_gmail_quote" style="margin:0 0 0 .8ex; border-left:1px #ccc solid; padding-left:1ex">
Hi Guys<br>
<br>
I've pony entities (class foo(db.Entity), etc.) definitions in multiple modules. And I've several general purpose programs: 1) connect to the dbms and optionally create tables, 2) load a file into a table, etc.<br>
How can I have the general purpose programs load all the pony entities, but then use only those specified on a command line?<br>
<br>
Is this clear?<br>
<br>
thanks<br>
Arthur<br>
<br>
_______________________________________________<br>
ponyorm-list mailing list<br>
<a href="mailto:ponyorm-list@ponyorm.org">ponyorm-list@ponyorm.org</a><br>
<a href="https://urldefense.proofpoint.com/v2/url?u=https-3A__mailman-2Dmail5.webfaction.com_listinfo_ponyorm-2Dlist&d=AAMFaQ&c=4R1YgkJNMyVWjMjneTwN5tJRn8m8VqTSNCjYLg1wNX4&r=TntoeYH7lekXzpBRjXwLTkqiWTbWAvp3pHKo_kZp5qI&m=-l9d_YgpS5Br4HVerevDUPDePIdahRQvh6kua6GEKCg&s=ZTWdoePYiHrdwy3YThpUs2-mmvop7hGq2ibwteX9CYA&e=" target="_blank">/ponyorm-list</a><br>
</blockquote>
</div>
<br>
</div>
</div>
_______________________________________________<br>
ponyorm-list mailing list<br>
<a href="mailto:ponyorm-list@ponyorm.org">ponyorm-list@ponyorm.org</a><br>
https://urldefense.proofpoint.com/v2/url?u=https-3A__mailman-2Dmail5.webfaction.com_listinfo_ponyorm-2Dlist&d=AAIGaQ&c=4R1YgkJNMyVWjMjneTwN5tJRn8m8VqTSNCjYLg1wNX4&r=TntoeYH7lekXzpBRjXwLTkqiWTbWAvp3pHKo_kZp5qI&m=-l9d_YgpS5Br4HVerevDUPDePIdahRQvh6kua6GEKCg&s=ZTWdoePYiHrdwy3YThpUs2-mmvop7hGq2ibwteX9CYA&e=
<br>
</blockquote>
</div>
<br>
<div>
<div style="color:rgb(0,0,0); font-family:Helvetica; font-size:medium; font-style:normal; font-variant:normal; font-weight:normal; letter-spacing:normal; line-height:normal; orphans:2; text-indent:0px; text-transform:none; white-space:normal; widows:2; word-spacing:0px; word-wrap:break-word">
<div style="color:rgb(0,0,0); font-family:Helvetica; font-size:medium; font-style:normal; font-variant:normal; font-weight:normal; letter-spacing:normal; line-height:normal; orphans:2; text-indent:0px; text-transform:none; white-space:normal; widows:2; word-spacing:0px; word-wrap:break-word">
<div style="color:rgb(0,0,0); font-family:Helvetica; font-size:medium; font-style:normal; font-variant:normal; font-weight:normal; letter-spacing:normal; line-height:normal; orphans:2; text-indent:0px; text-transform:none; white-space:normal; widows:2; word-spacing:0px; word-wrap:break-word">
<span class="x_Apple-style-span" style="border-collapse:separate; border-spacing:0px">
<div style="word-wrap:break-word"><span class="x_Apple-style-span" style="border-collapse:separate; color:rgb(0,0,0); font-family:Helvetica; font-style:normal; font-variant:normal; font-weight:normal; letter-spacing:normal; line-height:normal; orphans:2; text-indent:0px; text-transform:none; white-space:normal; widows:2; word-spacing:0px; border-spacing:0px; font-size:medium">
<div style="word-wrap:break-word"><span class="x_Apple-style-span" style="orphans:2; text-indent:0px; widows:2">
<div style="word-wrap:break-word"><span class="x_Apple-style-span" style="orphans:2; text-indent:0px; widows:2">
<div style="word-wrap:break-word"><span class="x_Apple-style-span" style="orphans:2; text-indent:0px; widows:2">
<div style="word-wrap:break-word"><span class="x_Apple-style-span" style="orphans:2; text-indent:0px; widows:2">
<div style="word-wrap:break-word"><span class="x_Apple-style-span" style="orphans:2; text-indent:0px; widows:2">
<div style="word-wrap:break-word">
<div style="word-wrap:break-word">
<div style="border-collapse:separate; color:rgb(0,0,0); font-family:Helvetica; font-style:normal; font-variant:normal; font-weight:normal; letter-spacing:normal; line-height:normal; text-transform:none; white-space:normal; word-spacing:0px; border-spacing:0px; font-size:medium">
<div style="border-collapse:separate; color:rgb(0,0,0); font-family:Helvetica; font-style:normal; font-variant:normal; font-weight:normal; letter-spacing:normal; line-height:normal; text-transform:none; white-space:normal; word-spacing:0px; border-spacing:0px; font-size:medium">
---</div>
<div> </div>
<div>Arthur Goldberg
<div style="border-collapse:separate; color:rgb(0,0,0); font-family:Helvetica; font-style:normal; font-variant:normal; font-weight:normal; letter-spacing:normal; line-height:normal; text-transform:none; white-space:normal; word-spacing:0px; border-spacing:0px; font-size:medium">
Associate Professor of Psychiatry</div>
<div>Seaver Autism Center and Icahn Institute for Genomics & Multiscale Biology</div>
<div>Icahn School of Medicine at Mount Sinai</div>
<div style="border-collapse:separate; color:rgb(0,0,0); font-family:Helvetica; font-style:normal; font-variant:normal; font-weight:normal; letter-spacing:normal; line-height:normal; text-transform:none; white-space:normal; word-spacing:0px; border-spacing:0px; font-size:medium">
Seaver Center, Room ABE-33</div>
<div style="border-collapse:separate; color:rgb(0,0,0); font-family:Helvetica; font-style:normal; font-variant:normal; font-weight:normal; letter-spacing:normal; line-height:normal; text-transform:none; white-space:normal; word-spacing:0px; border-spacing:0px; font-size:medium">
212-241-4229<br>
<a href="mailto:Arthur.Goldberg@mssm.edu">Arthur.Goldberg@mssm.edu</a></div>
</div>
</div>
<div>Follow us on Twitter <a href="https://twitter.com/IcahnInstitute">@IcahnInstitute</a></div>
<div style="border-collapse:separate; color:rgb(0,0,0); font-family:Helvetica; font-style:normal; font-variant:normal; font-weight:normal; letter-spacing:normal; line-height:normal; text-transform:none; white-space:normal; word-spacing:0px; border-spacing:0px; font-size:medium">
<br>
</div>
</div>
</div>
</span></div>
</span></div>
</span></div>
</span></div>
</span></div>
</span></div>
</span></div>
</div>
</div>
<br class="x_Apple-interchange-newline">
<br class="x_Apple-interchange-newline">
</div>
<br>
</div>
</div>
</div>
</body>
</html>