Changeset 2103


Ignore:
Timestamp:
Sep 8, 2007 11:06:58 PM (10 years ago)
Author:
hazmat
Message:

cleanup work for sa-0.4

Location:
ore.alchemist/branches/0.4
Files:
10 deleted
5 edited
1 copied

Legend:

Unmodified
Added
Removed
  • ore.alchemist/branches/0.4/setup.py

    r1968 r2103  
    33setup( 
    44    name="ore.alchemist", 
    5     version="0.1.0", 
     5    version="0.3.0", 
    66    install_requires=['setuptools'], 
    77    packages=find_packages('src', exclude=["*.tests"]), 
  • ore.alchemist/branches/0.4/src/ore/alchemist/__init__.py

    r1503 r2103  
    2424""" 
    2525 
     26__all__ = [ 'Session', 'create_engine'] 
    2627 
    2728def named( klass ): 
  • ore.alchemist/branches/0.4/src/ore/alchemist/annotation.py

    r1792 r2103  
    2222""" 
    2323Annotations for Table objects, to annotate as needed, the notion 
    24  
    2524is that the annotation keys correspond to column, and values correspond 
    2625to application specific column metadata. 
     
    3029 
    3130from zope.interface import implements 
    32 from interfaces import IModelAnnotation 
    3331from sqlalchemy.util import OrderedDict 
    34      
    35 class ModelAnnotation( object ): 
    36      
    37     implements( IModelAnnotation ) 
    38      
    39     def __init__(self, context, annotation): 
    40         self.context = context 
    41         self.annotation = annotation 
    42  
    43     def getDisplayColumns(self): 
    44         from zc.table.column import GetterColumn         
    45         columns = [] 
    46         for i in self.annotation.values(): 
    47             if i.get('table_column') is not True: 
    48                 continue 
    49             def getter( ob, format, name=i['name']): 
    50                 return getattr( ob, name ) 
    51             column = GetterColumn( title = i['label'], 
    52                                    name = i['name'], 
    53                                    getter = getter ) 
    54             columns.append( column ) 
    55         return columns 
    5632 
    5733class TableAnnotation( object ): 
    58  
    59     #__slots__ = ("table_name", "_annot", "_options") 
    6034 
    6135    def __init__(self, table_name, columns=(), properties=(), schema_order=(), table_columns=(), order_by=()): 
  • ore.alchemist/branches/0.4/src/ore/alchemist/interfaces.py

    r1968 r2103  
    3636        """ 
    3737        translates the schema and returns the translation. 
    38  
    39         kw are specific to the translation 
     38         
     39        translations and kw are specific to the translation being performed. 
    4040        """ 
    4141 
  • ore.alchemist/branches/0.4/src/ore/alchemist/todo.txt

    r1792 r2103  
    1616           track of mappers 
    1717 
     18 
     19 
     20- Relational Database Support 
     21 
     22  everything sqlalchemy supports, with the additional restriction that 
     23  mysql < 5 need not apply. we heavily rely on introspection features. 
     24 
     25  need to check unicode settings against database. 
     26 
     27- sa2zs.py 
     28 
     29  fairly good individual column support, support for fk relationships 
     30  non existent atm. 
     31 
     32  conversion to object fields and many2many relations depending on 
     33  property settings. 
     34 
     35  relations are mapper based, we do translation based on table 
     36  structures, we need to move to mapper based definitions. 
     37 
     38  could do just do an overlay on top of  
     39 
     40  needs tests for binding, date fields 
     41 
     42   
     43 
Note: See TracChangeset for help on using the changeset viewer.