Commit graph

112 commits

Author SHA1 Message Date
David Ayers
0d24407fcf * EOControl/EOPriv.h/m: Split into...
* EOControl/EOPrivat.h/m: ... and ...
        * EOAccess/EOPrivat.h/m: ... files.
        * EOAccess/EOAdaptorChannel.m: Include new privat header.
        * EOAccess/EOAttribute.m, EOAccess/EODatabase.m,
        * EOAccess/EODatabaseChannel.m, EOAccess/EOEntity.m,
        * EOAccess/EORelationship.m, EOAccess/EOSQLExpression.m,
        * EOAccess/EOSQLQualifier.m, EOAccess/EOUtilities.m: Ditto.
        (+initialize): Call new private function.
        * EOAccess/EODatabaseContext.m: Ditto.
        (EODatabaseContext_snapshotForGlobalIDWithImpPtr)
        (EODatabaseContext_globalIDForObjectWithImpPtr): Move to
        EOPrivate.m.
        * EOAccess/EODatabaseContextPriv.h:
        (EODatabaseContext_snapshotForGlobalIDWithImpPtr)
        (EODatabaseContext_globalIDForObjectWithImpPtr): Move to
        EOPrivate.h.
        * EOAccess/GNUmakefile: Compile EOPrivate.m.

        * EOControl/EOClassDescription.m, EOControl/EOGenericRecord.m
        * EOControl/EOKeyGlobalID.m, EOControl/EOKeyValueCoding.m
        * EOControl/EOKeyValueQualifier.m, EOControl/EONSAddOns.m
        * EOControl/EOSortOrdering.m: Include new private header.
        * EOControl/EOEditingContext.h/m: Ditto.
        (EOEditingContext_objectForGlobalIDWithImpPtr)
        (EOEditingContext_recordObjectGlobalIDWithImpPtr): Move to
        EOPrivate.h/m.
        * EOControl/EOMutableKnownKeyDictionary.h/m: Include new
        private header.
        (EOMKKD_objectForKeyWithImpPtr, EOMKKD_setObjectForKeyWithImpPtr)
        (EOMKKD_removeObjectForKeyWithImpPtr, EOMKKD_hasKeyWithImpPtr)
        (EOMKKD_indexForKeyWithImpPtr)
        (EOMKKDInitializer_indexForKeyWithImpPtr): Move to EOPrivate.m
        * EOControl/EOFault.m: (+isFault:): Update comment.
        * EOControl/GNUmakefile: Build EOPrivate.m instead of EOPriv.m.
        Do not install private header.


git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/gdl2/trunk@20759 72102866-910b-0410-8b05-ffd578937521
2005-02-20 10:52:57 +00:00
David Ayers
ef8e948417 * EOAccess/EOAccessFault.m: Include NSThread.h.
git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/gdl2/trunk@20758 72102866-910b-0410-8b05-ffd578937521
2005-02-20 10:24:36 +00:00
Matt Rice
74a8e976bf Call -willChange: to support EOObserving in EOModel, EOEntity, EOAttribute,
EORelationship, EOStoredProcedure.


git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/gdl2/trunk@20745 72102866-910b-0410-8b05-ffd578937521
2005-02-18 16:46:38 +00:00
David Ayers
6b4ef319c9 * EOAccess/EODatabaseContext.m:
(recordChangesInEditingContext): Remove shadowing of local
	variable.


git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/gdl2/trunk@20739 72102866-910b-0410-8b05-ffd578937521
2005-02-17 12:19:38 +00:00
David Ayers
af63fd32b5 * EOAccess/EODatabaseContext.m:
(-_currentCommittedSnapshotForObject:): Fix crash in logging.


git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/gdl2/trunk@20738 72102866-910b-0410-8b05-ffd578937521
2005-02-17 09:52:14 +00:00
David Ayers
cd0f130fc7 * EOAccess/EOEntity.m: Remove unnecessary include.
(-setClassProperties:, -setPrimaryKeyAttributes:)
        (-setAttributesUsedForLocking:): Remove unnecessary casts.


git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/gdl2/trunk@20737 72102866-910b-0410-8b05-ffd578937521
2005-02-17 09:41:09 +00:00
David Ayers
11fac539ea * EOAccess/EOAccessFault.m ([EOAccessFaultHandler-init])
([EOAccessFaultHandler-dealloc])
        ([EOAccessArrayFaultHandler-dealloc]): Use GSCurrentThread
        instead of objc_thread_id.
        (-completeInitializationOfObject): Correct comment.


git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/gdl2/trunk@20735 72102866-910b-0410-8b05-ffd578937521
2005-02-16 15:48:17 +00:00
David Ayers
901432dbe0 * EOAccess/EOAttribute.h/m (EOAdaptorUnknownType): Remove.
(protoOverride): Increase range.
        (isAttributeValueInitialized): New flag.
        (extraRefCount): Make standalone instance variable.
        (setValueClassName:): Use isAttributeValueInitialized flag
        instead of EOAdaptorUnknownType.
        (adaptorValueType): Use isAttributeValueInitialized flag
        instead of EOAdaptorUnknownType.
        * EOAdaptors/Postgres95/Postgres95Values.m
        (newValueForBytes:length:attribute:): Remove reference to
        EOAdaptorUnknownType.


git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/gdl2/trunk@20723 72102866-910b-0410-8b05-ffd578937521
2005-02-15 21:29:24 +00:00
David Ayers
75f86142d0 * EOAccess/EOModel.m (writeToFile:): Clairfy documentation
about setting receivers name and path.


git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/gdl2/trunk@20708 72102866-910b-0410-8b05-ffd578937521
2005-02-14 12:11:49 +00:00
Manuel Guesdon
8f9ee35c5c Optimizations :
2005-02-13  Manuel Guesdon  <mguesdon@orange-concept.com>
 * EOControl/EOClassDescription.m:
  o use IMPs
  o avoid NSString build in -addObject:toPropertyWithKey:
  o avoid NSString build in -removeObject:fromPropertyWithKey:
 * EOAccess/EODatabaseContext.m:
  o added and use EODatabaseContext_globalIDForObjectWithImpPtr
  o use IMPs
 * EOAccess/EOEntity.m:
  o use IMPs
 * EOAccess/EOAttribute.m:
  o use IMPs
  o optimized -validateValue
 * EOAccess/EODatabaseContextPriv.h:
  o added EODatabaseContext_globalIDForObjectWithImpPtr
 * EOControl/EOPriv.[hm]:
  o added more helpers
 * EOControl/EOEditingContext.m:
  o use IMPs
 * EOControl/EOGenericRecord.m:
  o use IMPs in descriptions
 * EOAdaptors/Postgres95Values.m:
  o use GDL2StringDefaultCStringEncoding() in
  +newValueForCharactersType:length:attribute:
 * EOAdaptors/Postgres95Channel.m:
  o IMP optimizations
 * EOAdaptors/Postgres95Adaptor.m:
  o IMP optimizations


git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/gdl2/trunk@20700 72102866-910b-0410-8b05-ffd578937521
2005-02-13 13:04:19 +00:00
Manuel Guesdon
bd72217067 COmmit Part 2
* EOAccess/EOAdaptor.m:
  o optimization in 'for' loops
* EOAccess/EODatabase.m:
  o include <EOCOntrol/EOPriv.h>
  o replaced isNilOrEONull() by _isNilOrEONull()
* EOAccess/EODatabaseContext.h:
  o added _snapshotForGlobalIDIMP
* EOAccess/EODatabaseContext.m:
  o commented  NSEmitTODO in
  -objectsForSourceGlobalID:relationshipName:editingContext:
  o added beter exception format in
  qualifierForLockingAttributes:primaryKeyAttributes:entity:snapshot:
  o fix compiler warning in -relayPrimaryKey:object:entity:
  o logs
  o optimizations in -objectsWithFetchSpecification:editingContext:
  o replaced isNilOrEONull() by _isNilOrEONull()
  o replace [EOFault isFault:] by _isFault()
  o use _snapshotForGlobalIDIMP
  o IMP usage optimization
* EOAccess/EOAttribute.[hm]:
  o added EOAdaptorUnknownType
  o added _adaptorValueType and avoid recomputing it each time
  o added _valueTypeChar to avoid string comparaisons
  o use EOPriv classes declarations
  o Temporary reverted David changes in
  -adaptorValueByConvertingAttributeValue
* EOAccess/EOAttributePriv.h:
  o added _valueTypeChar to avoid string comparaisons
* EOAccess/EOEntityPriv.h:
  o moved -attributeForPath: and -relationshipForPath: to
  EOEntityGDL2Additions category
* EOAccess/EOEntity.h:
  o moved private -attributeForPath: and -relationshipForPath: to
  EOEntityGDL2Additions category
* EOAccess/EOEntity.m:
  o better exception in classProperties
  o fix compiler warning in -setClassProperties:,
  -setPrimaryKeyAttributes:,
	-setAttributesUsedForLocking:
	o moved -attributeForPath: and -relationshipForPath: to
	EOEntityGDL2Additions category
	o include <EOCOntrol/EOPriv.h>
	o replaced [EONull null] by GDL2EONull
* EOAccess/EOSQLExpression.m:
  o optimization in -tableListWithRootEntity:
  o optimization in -formatSQLString:format:
  o optimization in +sqlPatternFromShellPattern:
  o optimization in +sqlPatternFromShellPattern:withEscapeCharacter:
  o fix in -sqlStringForKeyValueQualifier:
  o added log in -sqlStringForKeyValueQualifier: for not handled
  readFormat
  o added log -addInsertListAttribute:value: for not handled
  writeFormat
  o added log -addUpdateListAttribute:value: for not handled
  writeFormat
  o changed  EOFLOGObjectFnStart to EOFLOGObjectFnStartCond
  o changed  EOFLOGObjectFnStop to EOFLOGObjectFnStopCond
  o include <EOCOntrol/EOPriv.h>
  o replaced [EONull null] by GDL2EONull
* EOAccess/EOSQLQualifier.m:
  o implemented EOKeyComparisonQualifier
  -schemaBasedQualifierWithRootEntity
* EOAccess/EOUtilities.m:
  o include <EOCOntrol/EOPriv.h>
  o replaced [EONull null] by GDL2EONull
* EOControl/EOPriv.[hm]:
  o added. Contains various classes/selectors/IMPs
* EOControl/EOClassDescription.m:
  o handle EONull case in -propagateDeleteForObject:editingContext:,
    -addObject:toPropertyWithKey:, -snapshot,
    -removeObject:fromPropertyWithKey:,
	_setObject:forBothSidesOfRelationshipWithKey:,
	addObject:toBothSidesOfRelationshipWithKey:,
		-removeObject:fromBothSidesOfRelationshipWithKey:
		o fix compiler warning in
		-dictionaryForInstanceProperties, -shallowCopy,
		-updateFromSnapshot:, -snapshot
		o include <EOCOntrol/EOPriv.h>
		o replaced [EONull null] by GDL2EONull
		o replaced isNilOrEONull() by _isNilOrEONull()
		o fix in -validateForSave
		o rewritten -validateValue:forKey: selector build
* EOControl/EOEditingContext.h:
  o added -hasUnprocessedChanges
* EOControl/EOEditingContext.m:
  o added -hasUnprocessedChanges
  o added NS_DURING,... to catch exceptions
  o replace [EOFault isFault:] by _isFault()
  o IMP usage optimization
* EOControl/EOKeyGlobalID.m:
  o replaced isNilOrEONull() by _isNilOrEONull()
  o include <EOCOntrol/EOPriv.h>
* EOControl/EOGenericRecord.m:
  o partially rewritten -description
  o include <EOCOntrol/EOPriv.h>
  o replaced isNilOrEONull() by _isNilOrEONull()
  o replace [EOFault isFault:] by _isFault()
  o changed variable name type of
  _infoForInstanceVariableNamed:retType:retSize:retOffset:
  o rewritten valueForKey:,... to use cString NSKeyValueCoding
* EOControl/EOKeyValueCoding.m:
  o changed NSAssert in NSArray -valueForKey:
  o optimization in NSDictionary -takeValue:forKeyPath:isSmart:
  o optimization in NSDictionary -takeStoredValue:forKeyPath:
  o include <EOCOntrol/EOPriv.h>
  o replaced [EONull null] by GDL2EONull
  o include <EOCOntrol/EOPriv.h>
* EOControl/EOKeyValueQualifier.m:
  o fixes for EONull/nil in -evaluateWithObject:
  o replaced [EONull null] by GDL2EONull
  o include <EOCOntrol/EOPriv.h>
* EOControl/EOSortOrdering.m:
  o include <EOCOntrol/EOPriv.h>
  o replaced [EONull null] by GDL2EONull
* EOAdaptors/Postgres95SQLExpression.m:
  o float formatting in +formatValue:forAttribute:
  o added -externalNameQuoteCharacter
  o added +sqlPatternFromShellPattern:
  o added +sqlPatternFromShellPattern:withEscapeCharacter:
  o replaced isNilOrEONull() by _isNilOrEONull()
* EOAdaptors/Postgres95Channel.m:
  o logs
* EOAdaptors/Postgres95Values.m:
  o logs
  o fix in +setPostgres95Format:
  o fix calendard format to handle timezone (%z)
  o optimizations
* EOControl/EOMutableKnownKeyDictionary.m
  o removed EOMKKDArrayMapping
  +dictionaryFromDictionary:subsetMapping:
  o include <EOCOntrol/EOPriv.h>
  o replaced isNilOrEONull() by _isNilOrEONull()
* EOControl/EONSAddOns.[hm]:
  o added NSString(ShellPattern)


git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/gdl2/trunk@20688 72102866-910b-0410-8b05-ffd578937521
2005-02-11 17:37:23 +00:00
David Ayers
6d1dc39232 * EOAccess/EOModel.m (-writeToFile:): Make sure all objects
are loaded before making backup.


git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/gdl2/trunk@20678 72102866-910b-0410-8b05-ffd578937521
2005-02-09 13:26:08 +00:00
David Ayers
8a224e3e37 * EOAccess/EOModel.m (-init): Initialize _storedProcedures.
(-storedProcedureNames): Simplify.
        (-storedProcedureNamed:): Reimplement.
        (-storedProcedures): Simplify.
        (-writeToFile:): Call _setPath: after preliminary testing.
        Write stored procedures.
        (-initWithTableOfContentsPropertyList:path:): Reimplement
        stored procedure handling.
        (-encodeTableOfContentsIntoPropertyList:): Handle stored
        procedures.
        (-encodeIntoPropertyList:): Fix encoding title for stored
        procedures.
        (-addStoredProcedure:, -removeStoredProcedure:) Make more
        thread safe.
        (-loadAllModelObjects): Implement.
        * EOAccess/EOStoredProcedure.m (-initWithPropertyList:): Call
        awakeWithPropertyList: to finish initialization.
        (-encodeIntoPropertyList:): Implement.
        (-description): Implement.
        (-_setIsEdited): Implement.


git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/gdl2/trunk@20676 72102866-910b-0410-8b05-ffd578937521
2005-02-09 11:39:42 +00:00
Matt Rice
8eff5c7764 * EOControl/EOObjectStore.m: Assign correct key names for EOUpdatedKey,
EOInsertedKey, EODeletedKey, EOInvalidatedKey.
        * EOAccess/EODatabaseContext.m (-_objectsChanged:, -commitChanges): Use
        EOUpdatedKey, EOInsertedKey, EODeletedKey, EOInvalidatedKey, instead
        of hard coded keys.
        * EOControl/EOEditingContext.m (-didSaveChanges, pendingInfo): Ditto.


git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/gdl2/trunk@20674 72102866-910b-0410-8b05-ffd578937521
2005-02-08 14:02:32 +00:00
David Ayers
af3705ad45 * EOAccess/EODatabaseDataSource.m (-insertObject): Do not
insert object into the editing context.


git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/gdl2/trunk@20654 72102866-910b-0410-8b05-ffd578937521
2005-02-03 17:18:34 +00:00
David Ayers
ff4b08e06d * EOAccess/EODatabaseContext.h/m:(_numLocked): Removed.
(_lockedObjects): Use hash table instead of plain memory.
        (-_registerDatabaseContext:) Only attempt to retrieve entities
        with valid names.
        (-dealloc): Update _lockedObjects usage.
        (-lockObjectWithGlobalID:editingContext:): Inialize local variable.
        Fire fault if necessary to obtain snapshot and raise upon
        failure.
        (-registerLockedObjectWithGlobalID:): Use new hash table.
        (-isObjectLockedWithGlobalID:): Ditto.
        (-_cleanUpAfterSave): Ditto.
        (-invalidateAllObjects): Call -invalidateResultCache and make
        more gdb friendly.
        (-invalidateObjectsWithGlobalIDs:): Call
        forgetSnapshotsForGlobalIDs: on self instead of the _database.
        (-commitChanges): Execute the commit if a transaction is open
        to insure held locks are freed server side.
        (-snapshotForGlobalID): Move implementation to ...
        (-snapshotForGlobalID:after:): ... here and call this version
        in the _database.
        (-forgetSnapshotsForGlobalIDs:): Implement.
        (-forgetAllLocks): Ditto.
        (-forgetLocksForObjectsWithGlobalIDs:) Ditto.


git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/gdl2/trunk@20653 72102866-910b-0410-8b05-ffd578937521
2005-02-03 17:13:16 +00:00
Matt Rice
ffb09fb47b * EOAccess/EOEntity.m (-setName:): Validate the new name and remove
the checks from here.
  (-validateName): Don't check if an attribute or a relationship with
the name exist.  Check if an entity of the same name exists.
Return an exception with a valid reason in all cases.
* EOAccess/EOAttribute.m (validateName): Return an exception with a
valid reason in all cases.  Don't check if a relationship with the
name exists.
* EOAccess/EOAttribute.m (validateName): Return an exception with a
valid reason in all cases.  Don't check if a attribute with the
 name exists.


git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/gdl2/trunk@20652 72102866-910b-0410-8b05-ffd578937521
2005-02-03 13:09:50 +00:00
David Ayers
7ce3d33814 * EOAccess/EODatabase.h/m:(EODistantPastTimeInterval): Added
global variable.
        (snapshotForGlobalID:after:): Implemented.


git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/gdl2/trunk@20642 72102866-910b-0410-8b05-ffd578937521
2005-02-01 17:23:05 +00:00
David Ayers
06b7c0bf3c * EOAccess/EOUtilities.m (NSObjectNotAvailableException):
Reactivate correct exception name.  Correct a few whitespace
        issues.


git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/gdl2/trunk@20618 72102866-910b-0410-8b05-ffd578937521
2005-01-26 14:11:31 +00:00
David Ayers
b3e33138f3 * EOAccess/EOEntity.m (-initWithPropertyList:owner:): Correct
test for file existance and reformat.
        * EOControl/EOFetchSpecification.h/m
        (-fetchSpecificationByApplyingBindings:) Remove obsolete
        method.
        (-fetchSpecificationWithQualifierBindings:) Implement.
        * EOControl/EOQualifier.m (initWithKeyValueUnarchiver:):
        Implement.
        (-encodeWithKeyValueArchiver:): Ditto.


git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/gdl2/trunk@20617 72102866-910b-0410-8b05-ffd578937521
2005-01-26 13:38:47 +00:00
David Ayers
2f6232368a * EOAccess/EOModelGroup.m ([+globalModelGroup]): Search for
.eomodel files as well and call -addModelWithFile: with full
        path.
        * EOAccess/EOModel.m ([-initWithContentsOfFile:]): Add assert
        if file could not be read.

        * EOControl/EOKeyGlobalID.m ([-hash]): Improve quality of hash
        values.


git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/gdl2/trunk@20294 72102866-910b-0410-8b05-ffd578937521
2004-11-04 11:08:10 +00:00
David Ayers
aad84f842f * EOAccess/EOAdaptorContext.h: Only use ASCII characters.
* EOAccess/EOSQLQualifier.m: Ditto.


git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/gdl2/trunk@20285 72102866-910b-0410-8b05-ffd578937521
2004-11-03 12:03:14 +00:00
David Ayers
e9534fd2dc * GDL2.gsdoc: New file for documentation project.
* GNUmakefile: Build documentation project.
        * EOAccess/gdl2.gsdoc: Rename to ...
        * EOAccess/EOAccess.gsdoc: ... new name.
        * EOControl/gdl2control.gsdoc: Rename to ...
        * EOControl/EOControl.gsdoc: ... new name.
        * EOAccess/GNUmakefile: Update documentation project name.
        * EOControl/GNUmakefile: Ditto.
        * README: Remove reference to potentially obsolete name.

        * Tools/eomodeltemplate.gsdoc: Update encoding, DTD reference
	and minor reformatting.
        * Tools/gdl2gsdoc.gsdoc: Update DTD reference and add myself
	as coauthor.


git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/gdl2/trunk@20280 72102866-910b-0410-8b05-ffd578937521
2004-11-02 16:17:32 +00:00
David Ayers
d590199f26 * EOAccess/EODatabaseContext.h/m:
(EOStoredProcedureNameHintKey, EOCustomQueryExpressionHintKey):
        Define missing keys.
        * EOControl/EODeprecated.h: (EOPrefetchingRelationshipHintKey)
        (EOFetchLimitHintKey, EOPromptAfterFetchLimitHintKey): Ditto.
        * EOControl/EOFetchSpecification.m:
        (EOPrefetchingRelationshipHintKey, EOFetchLimitHintKey)
        (EOPromptAfterFetchLimitHintKey): Ditto.  Use globally defined
        keys instead of local strings.
        * EOAccess/EODatabaseChannel.m
        (_selectWithFetchSpecification:editingContext:) Use globally
        defined keys instead of local strings.

        * EOControl/EOQualifier.m (+[stringForOperatorSelector:]):
        Return selector name instead of nil if not given a standard
        EOQualifierOperator selector.


git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/gdl2/trunk@20279 72102866-910b-0410-8b05-ffd578937521
2004-11-02 10:43:58 +00:00
David Ayers
9517b6b6fd Fix typo.
git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/gdl2/trunk@20205 72102866-910b-0410-8b05-ffd578937521
2004-10-07 14:13:05 +00:00
David Ayers
f4fd4ec9a6 * EOAccess/EOAttribute.m (encodeIntoPropertyList:): Encode
numeric values as stings for WO45 EOModel format compatibility.


git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/gdl2/trunk@20202 72102866-910b-0410-8b05-ffd578937521
2004-10-06 22:45:21 +00:00
David Ayers
432a2d5ce4 * EOAccess/EOEntity.m ([EOEntityClassDescription
awakeObject:fromInsertionInEditingContext:]): Only process
        class properties.  Remove inactive code.  Document.


git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/gdl2/trunk@20166 72102866-910b-0410-8b05-ffd578937521
2004-09-28 11:09:18 +00:00
David Ayers
ffb14dffe8 * EOAccess/EOEntity.m (-[setName:]): Skip the uniqueing if the
name is the same.


git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/gdl2/trunk@20152 72102866-910b-0410-8b05-ffd578937521
2004-09-26 21:30:02 +00:00
David Ayers
1b24b40493 * EOAccess/EOEntity.m (-[setName:],-[setExternalName:])
(-[setExternalQuery:],-[setClassName:],-[setDocComment]): Use
        ASSIGNCOPY instead of ASSIGN to deal with mutable strings.


git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/gdl2/trunk@20121 72102866-910b-0410-8b05-ffd578937521
2004-09-24 10:02:05 +00:00
David Ayers
4590ef7618 * EOAccess/EOAttribute.m (-[copyWithZone:]): Override
implementation of GCObject as it isn't safe to copy
        EOAttributes.
        * EOAccess/EOEntity.m (-[addAttribute:]); Use NSAsserts to check
        integrity of parameters.  Insure that attribute is not used by
        other entity or stored procedure.
        (-[_setModel:]): Rename from -setModel:.  Assert that entity
        is not used by another model.
        * EOAccess/EOEntityPriv.h (-[_setModel:]): Rename from
        -setModel:.
        * EOAccess/EOModel.m (-[_addEntity:]): Use -_setModel: instead
        of -setModel:.
        (-[removeEntity:]): Ditto.
        (-[addEntity:)): Use NSAssert to insure that entity name is
        unique and that the entity is not being used by other mode.  Use
        -_setModel: instead of -setModel:.


git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/gdl2/trunk@20032 72102866-910b-0410-8b05-ffd578937521
2004-09-08 13:05:25 +00:00
David Ayers
fd7890a4cf * EOAccess/EOModel.m: Include EOKeyValueCoding.h.
(-[_addEntity:]): Set model via public API.
	* EOAccess/EOEntityPriv.h (-[_setModel:]): Remove.


git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/gdl2/trunk@20027 72102866-910b-0410-8b05-ffd578937521
2004-09-07 17:20:29 +00:00
David Ayers
d1f12d438c * EOAccess/EORelationship.m
(-[setDefinition:]): Allow definition to unset.
        (-[setEntity:]): Mark both old and new entity as edited.

        * EOAccess/EOStoredProcedure.m
        (-[initWithPropertyList:]): Make return type explicit.


git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/gdl2/trunk@20024 72102866-910b-0410-8b05-ffd578937521
2004-09-07 16:21:07 +00:00
David Ayers
87b002d68d * EOAccess/EOModel.m (-[_updateCache]): New method.
* EOAccess/EOEntity.m
        (-[EOModel _updateCache]): Declare private EOModel method.
        (-[setName:]): Insure model updates its cache.
        (-[setModel]): Set instance variable directly without
        retaining it.
        (-[_setModel]): Remove.
        (-[gcDecrementRefCountOfContainedObjects]): Do not decrement
        backward reference to owning model.


git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/gdl2/trunk@20023 72102866-910b-0410-8b05-ffd578937521
2004-09-07 16:14:23 +00:00
David Ayers
329eccc59c * EOAccess/EOAttribute.h
* EOAccess/EOAttribute.m (_parent, -[setParent:]): Do not
        retain backward reference.
        (-[setName:): Mark as editited if parent is an entity.


git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/gdl2/trunk@20022 72102866-910b-0410-8b05-ffd578937521
2004-09-07 15:57:21 +00:00
David Ayers
dae87e4bec * EOAccess/EOAccessFault.m: Include privat headers locally.
* EOAccess/EOAdaptor.m: Ditto.
	* EOAccess/EOAdaptorChannel.m: Ditto.
	* EOAccess/EOAdaptorContext.m: Ditto.
	* EOAccess/EOAttribute.m: Ditto.
	* EOAccess/EODatabaseChannel.m: Ditto.
	* EOAccess/EODatabaseContext.m: Ditto.
	* EOAccess/EODatabaseOperation.m: Ditto.
	* EOAccess/EOModel.m: Ditto.
	* EOAccess/EORelationship.m: Ditto.
	* EOAccess/EOSQLExpression.m: Ditto.
	* EOAccess/EOSQLQualifier.m: Ditto.

	* EOAccess/EOEntity.h: Remove declarations of privat methods.
	Reorder declaraions.
	(+[entity], +[entityWithPropertyList:owner:]): Deprecate.
	(-[sharedObjectFetchSpecificationNames]): New method.
	(-[setSharedObjectFetchSpecificationsByName:]: Ditto.
	(-[addSharedObjectFetchSpecificationByName:]: Ditto.
	(-[removeSharedObjectFetchSpecificationByName:]: Ditto.
	* EOAccess/EOEntityPriv.h: Add declarations of privat methods.
	Reorder declarations.
	* EOAccess/EOEntity.m: Reorder implementations according to
	headers.  Include privat headers locally.
	(+[entity], +[entityWithPropertyList:owner:]): Deprecate.
	(-[sharedObjectFetchSpecificationNames]): New method.
	(-[setSharedObjectFetchSpecificationsByName:]: Ditto.
	(-[addSharedObjectFetchSpecificationByName:]: Ditto.
	(-[removeSharedObjectFetchSpecificationByName:]: Ditto.

	* EOAccess/EOEntity.m: Adapt usage of deprecated -[entity...]
	and privat methods.
	* EOAccess/EOModel.m: Ditto.
	* EOAdaptors/Postgres95/Postgres95SQLExpression.m: Ditto.

	* TODO: Add comment.


git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/gdl2/trunk@19772 72102866-910b-0410-8b05-ffd578937521
2004-07-23 18:33:29 +00:00
David Ayers
d664f86ff8 * EOAccess/EODatabaseContext.m: Replace EOFLOGObjectLevel and
EOFLOGObjectLevelArgs with NSDebugMLLog.  Remove some
	superfluos
	NSLogs and replace others woth NSDebugMLLogs.  Reformat.
	* EOAccess/EOEntity.m ([EOEntity primaryKeyForGlobalID:]):
	Ditto.


git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/gdl2/trunk@19343 72102866-910b-0410-8b05-ffd578937521
2004-05-15 23:58:06 +00:00
David Ayers
c06964b2af * EOAccess/EOAttribute.m: Insert missing breaks.
git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/gdl2/trunk@19340 72102866-910b-0410-8b05-ffd578937521
2004-05-15 17:57:54 +00:00
David Ayers
145fb1dfac * EOAccess/EOAttribute.m
([EOAttribute initialize]): Implement class caching.
	([EOAttribute *]): Use cached classes.
	([EOAttribute adaptorValueByConvertingAttributeValue:]):
	Only convert attributes when necessary.


git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/gdl2/trunk@19336 72102866-910b-0410-8b05-ffd578937521
2004-05-15 12:52:48 +00:00
David Ayers
d50838d4a0 * EOAccess/EOModel.m ([EOModel entityNamed:]): Fix typo.
git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/gdl2/trunk@19286 72102866-910b-0410-8b05-ffd578937521
2004-05-12 09:18:21 +00:00
David Ayers
4e4535b912 * EOAccess/EOAdaptor.m ([EOAdaptor availableAdaptorNames]):
Return unique names if multiple Adaptors are found.  Document.
        Reported by Matt Rice <ratmice@yahoo.com>.


git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/gdl2/trunk@19173 72102866-910b-0410-8b05-ffd578937521
2004-04-23 10:28:16 +00:00
Mirko Viviani
4a11c997f2 rewrite
git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/gdl2/trunk@19147 72102866-910b-0410-8b05-ffd578937521
2004-04-18 20:07:50 +00:00
David Ayers
ab13b0f5a9 * EOAccess/EODatabase.m ([EODatabase dealloc]): Use DESTROY
in favor of release.
	* EOAccess/EOExpressionArray.m ([EOExpressionArray dealloc]):
	Ditto.
	* EOAdaptors/Postgres95/Postgres95Adaptor.m
	([Postgres95Adaptor dealloc]): Ditto.

	* EOControl/EOCheapArray.h ([EOCheapArray dealloc]) Remove
	declaration.
	* EOControl/EOKeyValueArchiver.m
	([EOKeyValueArchivingContainer dealloc]): Ditto.
	* EOControl/EOMutableKnownKeyDictionary.h
	([EOMKKDInitializer dealloc]),
	([EOMKKDKeyEnumerator dealloc]),
	([EOMKKDSubsetMapping dealloc]),
	([EOMKKDArrayMapping dealloc]),
	([EOMutableKnownKeyDictionary dealloc]) Ditto.


git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/gdl2/trunk@19137 72102866-910b-0410-8b05-ffd578937521
2004-04-17 12:41:32 +00:00
David Ayers
6ae713bf89 * */*.h: Format declarations consistently. Add -*-objc-*
shabang line.  Replace remaining extern declarations with
	GDL2*_EXPORT.


git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/gdl2/trunk@19134 72102866-910b-0410-8b05-ffd578937521
2004-04-17 11:30:47 +00:00
David Ayers
6d8f87b9a5 * EOAccess/EOModel.m ([EOModel writeToFile:]) Set path (and
name implicitly) of the receiver.  Create backup file when
        necessary after removing the potentially existing backup file.
        Raise NSInvalidArgumentExceptions upon failures.  Add support
        for .eomodel files.  Document.
        ([EOModel _verifyBuiltEntityObject:named:]): Add support for
        .eomodel files.


git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/gdl2/trunk@19129 72102866-910b-0410-8b05-ffd578937521
2004-04-16 13:10:43 +00:00
David Ayers
f2aa536535 * TODO: Start tracking major TODO's until formal auditing is
available.

        * EOAccess/EODatabase.m
        * EOControl/EOGlobalID.h: Added documentation about
        EOGlobalIDChangedNotification semantics.

        * EOControl/EOSortOrdering.m: Removed superfluous define.


git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/gdl2/trunk@19110 72102866-910b-0410-8b05-ffd578937521
2004-04-15 10:33:35 +00:00
David Ayers
fa497e1524 * EOAccess/EOModelGroup.m ([EOModelGroup globalModelGroup]):
Create single global model group and cache it to allow
	persistant manual adding of models.


git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/gdl2/trunk@18961 72102866-910b-0410-8b05-ffd578937521
2004-03-29 19:00:45 +00:00
David Ayers
a601888682 * *.[hm] Use GNUSTEP in favor of NeXT_Foundation_LIBRARY
as requested by Marcus Mueller <znek@mulle-kybernetik.com>.


git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/gdl2/trunk@18856 72102866-910b-0410-8b05-ffd578937521
2004-03-19 16:41:21 +00:00
David Ayers
bad9d9d571 * EOAccess/EOAdaptor.m
([EOAdaptor dropDatabaseWithAdministrativeConnectionDictionary:
	administrativeConnectionDictionary:]): Correct documentation.
	([EOAdaptor administrativeConnectionDictionaryForAdaptor:]):
	Documented.

	* EOAdaptors/Postgres95/GNUmakefile.in: Added LoginPanel subproject.
	* EOAdaptors/Postgres95/Postgres95Adaptor.m
	([Postgres95Adaptor assertConnectionDictionaryIsValid]): Added
	test to insure channel is open befor attempting to close.
	([Postgres95Adaptor createPGconn]): Added exception to raise.
	* EOAdaptors/Postgres95/Postgres95Channel.m
	([Postgres95/Postgres95Channel describeDatabaseNames]): Implemented
	new method.
	([Postgres95 userNameIsAdministrative]): Ditto.

	* EOAdaptors/Postgres95/LoginPanel/GNUmakefile: New file.
	* EOAdaptors/Postgres95/LoginPanel/Postgres95LoginPanel.h/m: Ditto.


git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/gdl2/trunk@18782 72102866-910b-0410-8b05-ffd578937521
2004-03-06 11:12:49 +00:00
David Ayers
61eadbd04a * EOControl/EODebug.h: Include missing header for non-*-gnu-*.
* EOAccess/EOAdaptor
        ([EOAdaptor _performAdministativeStatementsForSelect:
        connectionDictionary:administrativeConnectionDictionary]):
        Add cast to silence warning.
        * EOControl/EOCheapArray.m ([EOCheapArray autorelease]):
        Replace objc_thread_id with GSCurrentThread.
        ([EOCheapArray release]): Ditto.
        ([EOCheapArray retainCount]): Ditto.
        ([EOCheapArray retain]): Ditto.
        ([EOCheapArray dealloc]): Ditto.
        ([EOCheapArray shallowCopy]): Ditto.
        * EOControl/EOFault.m: Include missing header.
        ([EOFault dealloc]): Replace objc_thread_id with GSCurrentThread.


git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/gdl2/trunk@18676 72102866-910b-0410-8b05-ffd578937521
2004-02-26 14:18:04 +00:00
David Ayers
e721e1b781 * EOAccess/EOSQLExpression.m
([EOSQLExpression foreignKeyConstraintStatementsForRelationship:]):
        Create constraint even though no inversRelationship exists.
        ([EOSQLExpression foreignKeyConstraintStatementsForEntityGroup:]):
        Create constraints for all entities in the group which have no
        parent entity.
        ([EOSQLExpression foreignKeyConstraintStatementsForEntityGroups:]):
        Reformat for source level debuging.
        ([EOSQLExpression tableListWithRootEntity:]): Honor
        EOAdaptorQuotesExternalNames.
        ([EOSQLExpression createTableStatementsForEntityGroup:]): Ditto.
        ([EOSQLExpression dropTableStatementsForEntityGroup:]): Ditto.
        ([EOSQLExpression primaryKeyConstraintStatementsForEntityGroup:]):
        Ditto.
        ([EOSQLExpression primaryKeySupportStatementsForEntityGroup]):
        Ditto.
        ([EOSQLExpression dropPrimaryKeySupportStatementsForEntityGroup:]):
        Ditto.
        ([EOSQLExpression prepareConstraintStatementForRelationship:
        sourceColumns:destinationColumns:]): Ditto.
        * EOAdaptors/Postgres95/Postgres95SQLExpression.h/m
        ([Postgres95SQLExpression externalNameQuoteCharacter]): Remove.
        ([Postgres95SQLExpression
        createDatabaseStatementsForConnectionDictionary:
        administrativeConnectionDictionary]): Honor
        EOAdaptorQuotesExternalNames.
        ([Postgres95SQLExpression
        dropDatabaseStatementsForConnectionDictionary:
        administrativeConnectionDictionary:]): Ditto.
        ([Postgres95SQLExpression dropTableStatementsForEntityGroup:]):
        Ditto.
        ([Postgres95SQLExpression tableListWithRootEntity:]): Ditto.


git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/gdl2/trunk@18661 72102866-910b-0410-8b05-ffd578937521
2004-02-25 12:52:59 +00:00