Re: [Zope] Generating HTML and SQL from results of Describe Table queries.

2000-12-17 Thread Dieter Maurer

Lloyd Kvam writes:
 >  
 >   T. J. Mannos has written
 > how to apply wrappers to html to turn them into DTML Documents.  I could not
 > find any equivalent description for Z SQL Methods.
A Z SQL Method uses a template (in fact a DTML template with additional
commands) to construct a command (in fact a sequence of commands)
to a database from the arguments provided and its context.

Thus, you have 2 options:

  1.  if your operations fall into well defined classes
  easily described by a DTML template with arguments,

  then you define a Z SQL method for each of these templates.

  e.g.

  Arguments: TableName ColumnName ColumnType
  Template:

MODIFY 
ADD COLUMN  


  2.  otherwise, you define a very general Z SQL method

  Arguments: command
  Template:



  and build your "command" with any appropriate tool
  (e.g. an external method or Python script)
  and pass it as a parameter.

  Be *VERY* careful, not to make such a Z SQL method accessible
  from the Internet, as it allows very malicious operations
  on your system!


You will probably go for option 1.



Dieter

___
Zope maillist  -  [EMAIL PROTECTED]
http://lists.zope.org/mailman/listinfo/zope
**   No cross posts or HTML encoding!  **
(Related lists - 
 http://lists.zope.org/mailman/listinfo/zope-announce
 http://lists.zope.org/mailman/listinfo/zope-dev )




[Zope] Generating HTML and SQL from results of Describe Table queries.

2000-12-15 Thread Lloyd Kvam

I would like to generate the necessary DTML Documents and Z SQL Methods to
provide list, add, update, and delete capabilities for each table in a MySQL
database.  I know (in principle) how to parse the results of describe table
queires and create reasonable default files with the proper sql and html
content.

My next step is to move the html and sql into ZOPE.  T. J. Mannos has written
how to apply wrappers to html to turn them into DTML Documents.  I could not
find any equivalent description for Z SQL Methods.

Any pointers would be appriciated.  Has anyone done this already?  Would I be
smarter to try to do this directly in ZOPE rather than trying to build the
pieces outside of ZOPE and then import them?

--
Lloyd Kvam
Venix Corp.
1 Court Street, Suite 378
Lebanon, NH 03766-1358

voice: 603-443-6155
fax: 801-459-9582



___
Zope maillist  -  [EMAIL PROTECTED]
http://lists.zope.org/mailman/listinfo/zope
**   No cross posts or HTML encoding!  **
(Related lists - 
 http://lists.zope.org/mailman/listinfo/zope-announce
 http://lists.zope.org/mailman/listinfo/zope-dev )