Commit graph

139 commits

Author SHA1 Message Date
David Ayers
7331d77528 * EOAdaptors/Postgres95/GNUmakefile.in:
Install into GNUSTEP_SYSTEM_ROOT by default.

	* * Update email addresses for Mirko Viviani and David Ayers.


git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/gdl2/trunk@23510 72102866-910b-0410-8b05-ffd578937521
2006-09-14 16:06:21 +00:00
David Ayers
7bd929705b * EOInterface/EOInterface.gsdoc: New file.
* EOInterface/GNUmakefile: Update variables to build documentation.
	* EOAccess/EOAccess.gsdoc: Specify title.
	* EOControl/EOControl.gsdoc: Ditto.
	* GDL2.gsdoc: Use sections allowed by DTD.  Remove reference to
	MulleEOInterface.


git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/gdl2/trunk@23474 72102866-910b-0410-8b05-ffd578937521
2006-09-12 20:39:43 +00:00
David Ayers
ad43813eb0 * EOAccess/EOSQLExpression.h (deleteStatementWithQualifier:entity:)
* EOAccess/EOSQLExpressionPriv.h (_aliasForRelationshipPath:)
	(_flattenRelPath:entity:, _aliasForRelatedAttribute:relationshipPath:)
	* EOAccess/EOSQLExpression.m (insertStatementForRow:entity:)
	(updateStatementForRow:qualifier:entity:)
	(deleteStatementWithQualifier:entity:)
	(selectStatementForAttributes🔒fetchSpecification:entity:)
	(_aliasForRelationshipPath:)
	* EOAccess/EORelationship.h (intermediateEntity)
	(_foreignKeyForSourceRow:)
	* EOAccess/EORelationship.m (_foreignKeyForSourceRow:, _leftSideKeyMap)
	* EOAccess/EODatabaseContext.h (databaseOperationForObject:)
	(databaseOperationForGlobalID:, recordDatabaseOperation:)
	(_openChannelWithLoginPanel:)
	* EOAccess/EODatabaseContextPriv.h (primaryKeyForObject:)
	(_currentCommittedSnapshotForObject:)
	* EOAccess/EOEntityPriv.h (_keyMapForRelationshipPath:)
	(_keyMapForIdenticalKeyRelationshipPath:, _mapAttribute:)
	(_relationshipPathIsToMany: valueForSQLExpression:)
	(_parsePropertyName:, classPropertyAttributeNames)
	(classPropertyToManyRelationshipNames)
	(classPropertyToOneRelationshipNames, dbSnapshotKeys)
	* EOAccess/EOUtilities.m (rawRowsForEntityNamed:qualifierFormat:)
	(rawRowsMatchingValue:forKey:entityNamed:)
	(rawRowsMatchingValues:entityNamed:, rawRowsWithSQL:modelNamed:)
	(rawRowsWithStoredProcedureNamed:arguments:)
	(executeStoredProcedureNamed:arguments:, databaseContextForModelNamed:)
	(primaryKeyForObject:)
	(destinationKeyForSourceObject:relationshipNamed:)
	* EOAccess/EOEntity.m
	(_mapAttribute:toDestinationAttributeInLastComponentOfRelationshipPath:)
	* EOAccess/EOAdaptor.h (adaptorWithModel:,adaptorWithName:)
	* EOAccess/EOModel.h (_classDescriptionNeeded:,_entityForClass:)
	(_addEntityWithPropertyList:)
	* EOAdaptors/Postgres95/Postgres95Channel.h
	(_evaluateExpression:withAttributes:)
	* EOControl/EOMutableKnownKeyDictionary.h/m (arrayMappingForKeys:)
	(subsetMappingForSourceDictionaryInitializer:sourceKeys:destinationKeys:)
	(subsetMappingForSourceDictionaryInitializer:)
	(setObject:forKey:, removeObjectForKey:, indexForKey:, objectForKey:)
	* EOControl/EOEditingContext.m (handleErrors:,setSharedEditingContext:)
	(faultForRawRow:entityNamed:)
	* GDL2Palette/KeyWrapper.h (setKey:, _key):
	* EOModeler/EOModelerEditor.h (selectionWithinViewedObject)
	* EOModeler/EOModelerEditor.m (initWithDocument:)
	(initWithParentEditor:)
	Correct method signatures.  Add necessary forward @class declations.

	* EOInterface/EOMasterDetailAssociation.m (establishConnection):
	* DBModeler/ModelerTableEmbedibleEditor.m
	(addDefaultTableColumnsForTableView:displayGroup:)
	* DBModeler/DefaultColumnProvider.m (setupTitleForColumn:named:)
	Cast types to avoid compiler warnings.

	* EOControl/EOCheapArray.m (dealloc): Supress compiler warning.
	* EOAdaptors/Postgres95/LoginPanel/Postgres95LoginPanel.m (dealloc)
	* EOModeler/EOModelerEditor.m (dealloc):
	* DBModeler/ModelerAttributeEditor.m (dealloc): Add missing call
	to super.
	* DBModeler/Preferences.m (sharedPreferences): Fix implementation for
	new compiler semantics.
	* EOControl/EOMultiReaderLock.m (init): Correct NSConditionLock
	initialization.


git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/gdl2/trunk@23472 72102866-910b-0410-8b05-ffd578937521
2006-09-12 19:36:24 +00:00
Matt Rice
c19aa897d7 * EOAccess/EOEntity.m (-relationships): Fix whitespace from previous
commit.


git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/gdl2/trunk@22684 72102866-910b-0410-8b05-ffd578937521
2006-03-19 18:39:38 +00:00
Matt Rice
fbedef852f * EOControl/EODetailDataSource.m (-editingContext): Return the master
data sources editing context.
* EOControl/EOGlobalID.m (-description): Correct conversion specification.
* EOAccess/EOModel.m (-referencesToProperty:): Implement.
* EOAccess/EORelationship.m (-referencesProperty:): Fix bug in or when
	sending messages to nil.
	(-validateName:): Return nil if the name is the properties current name.
* EOAccess/EOModel.m (-validateName:): Ditto.
* EOAccess/EOEntity.m (-validateName:): Ditto.
        (-relationships): Handle partially converted relationships array.
        (-addAttribute:): Remove unnecessary cast.
        (-addRelationship:): Ditto.
        (-removeAttribute): Remove property from the class properties and
        primary key attributes arrays.
        (-removeRelationship:): Remove property from the class properties
        array.
        (-_setIsEdited:): Rebuild _relationshipsByName.
* EOAdaptors/Postgres95/Postgres95SQLExpression.m: Fix warning.
* EOAdaptors/Postgres95/Postgres95Values.m: Remove c99 usage.




git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/gdl2/trunk@22681 72102866-910b-0410-8b05-ffd578937521
2006-03-19 18:03:50 +00:00
David Ayers
6240fa79a7 * EOAccess/EOAttribute.m: Translate comment to avoid
non-ASCII encoding.


git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/gdl2/trunk@22177 72102866-910b-0410-8b05-ffd578937521
2005-12-18 13:47:07 +00:00
Manuel Guesdon
1ae3f10933 * EOAccess/EOSQLQualifier.m: change in EOAndQualifier and
EOOrQualifier -schemaBasedQualifierWithRootEntity to allow
nil schemaBasedQualifier.
fix in EOKeyValueQualifier -schemaBasedQualifierWithRootEntity:
to handle key like rel1.rel2.rel3 (see Testsuite
EOKeyValueQualifier01.m)
* EOAccess/EOSQLExpression.m: added NSAssert in
-sqlStringForKeyValueQualifier:
* EOAccess/EORelationship.m: added NSAssert in setDefinition:


git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/gdl2/trunk@21682 72102866-910b-0410-8b05-ffd578937521
2005-08-25 18:32:44 +00:00
Manuel Guesdon
d6d1029a3e * EOControl/EOGenericRecord.m: fix -willChange call (don't call
it for takeStoredValue:forKey and for -setXX method).
* EOControl/EOClassDescription.m: check if value is not
already set before adding/setting it in
_setObject:forBothSidesOfRelationshipWithKey: and
addObject:toBothSidesOfRelationshipWithKey:
* EOAccess/EOAttribute.m: log in -validateValue:


git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/gdl2/trunk@21669 72102866-910b-0410-8b05-ffd578937521
2005-08-23 14:40:44 +00:00
David Ayers
41b2d38380 * EOAccess/EODatabaseContext.m ([-dealloc], [-rollbackChanges])
([-_cleanUpAfterSave]): Guard against missing hash table.
	([-registerLockedObjectWithGlobalID:]): Reformat.


git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/gdl2/trunk@21653 72102866-910b-0410-8b05-ffd578937521
2005-08-17 21:11:40 +00:00
David Ayers
9647f11503 * COPYING.LIB: Update to LGPL 2.1.
* configure: Regenerate.
	* Update FSF Address and Copyright years.


git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/gdl2/trunk@21645 72102866-910b-0410-8b05-ffd578937521
2005-08-17 08:07:57 +00:00
Matt Rice
22a14f5447 * EOAccess/EOAdaptorContext.h/m (-channels:): New method.
* EOAccess/EOSQLExpression.m
        (-_administrativeDatabaseStatementsForSelector:forEntityGroup:):
        Comment out login panel.
        * EOAccess/EOUtilities.m: Dont declare EOMoreThanOneException and
        NSObjectNotAvailableException as static.
        * EOControl/EOPrivate.h: Declare new class GDL2NonRetainingMutableArray
        and -registerAssociationForDeallocHack method.
        * EOControl/EOPrivate.m: New class GDL2NonRetainingMutableArray.
        * EOControl/EOEditingContext.m:
        (EOEditingContext -initWithParentObjectStore:): initialize _editors
        ivar with a non retaining array.
        (-dealloc): Remove the editing context as an observer for registered
        objects.
        (-[NSObject(DeallocHack) dealloc]): for associations, remove the
        association and object from the private hash table.
        (-[NSObject(DeallocHack) registerAssociationForDeallocHack]): New
        method.
        * EOControl/EOObserver.m (EOObserverCenter): Replace GSIArray usage
        with GDL2NonRetainingMutableArray.
        (+addObserver:forObject:, +removeObserver:forObject:): Ditto.
        (+initialize, +notifyObserversObjectWillChange:): Ditto.
        (+observersForObject:, +observerForObject:): Ditto.
        (+addOmniscientObserver:, +removeOmniscientObserver:): Ditto.
        (EOObserverProxy -initWithTarget:action:priority:): Don't retain
        target.
        (EOObserverProxy -dealloc:): Discard pending notifications.


git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/gdl2/trunk@21404 72102866-910b-0410-8b05-ffd578937521
2005-07-04 06:17:18 +00:00
Matt Rice
4ba78b33b4 * dev-apps/test/Testsuite/gdl2/GDL2Testing.h: Include ObjectTesting.h instead of stuff.h.
* dev-apps/test/Testsuite/gdl2/EOModel/test05.m: New test for -removeEntity:.

* dev-libs/gdl2/EOAccess/EOEntity.m (-_setModel:): Accept nil argument, comment.
* dev-libs/gdl2/EOAccess/EOModel.m (-removeEntity:): Comment.


git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/gdl2/trunk@21321 72102866-910b-0410-8b05-ffd578937521
2005-06-17 14:46:37 +00:00
Matt Rice
56ba650c5c * EOAccess/Makefile.preamble: Change link flag to use FND_LIBS
variable
        defined in base.make
        * EOControl/Makefile.preamble: Ditto.
        * EOAccess/EODatabaseDataSource.m (-entity): Look for entity with
the
        fetch specifications entity name in a model group.
        (-databaseContext): Return a registered database context.
        * EOAdaptors/Postgres95/LoginPanel/Postgres95LoginPanel.m: Cast
before
        calling -initWithIdentifier to remove warning with gcc 3.4
        * EOControl/EOEditingContext.m
(-encodeWithCoder:,-initWithCoder:):
        initial implementation of methods.
        * EOControl/EOClassDescription.m (-snapshot): cast 'value' to get
        thwart warnings.
        * EOControl/EOFault.m (-superClass): Implement as returning a
class.
        * Tools/gsdoc-model.m: Include headers alphabetically, include
        NSCalendarDate.h to thwart warning.


git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/gdl2/trunk@21221 72102866-910b-0410-8b05-ffd578937521
2005-05-12 19:13:34 +00:00
Manuel Guesdon
2e0f2da446 fixed test error in EOAttribute -newValueForBytes:length:
git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/gdl2/trunk@21156 72102866-910b-0410-8b05-ffd578937521
2005-04-24 14:18:59 +00:00
Manuel Guesdon
9c4a91f7ce Fixes inEOAttribute.m and EOKeyValueARchiver.m
git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/gdl2/trunk@21153 72102866-910b-0410-8b05-ffd578937521
2005-04-24 11:28:15 +00:00
David Ayers
d7ba99629e Fix bug reported by: jim _at_ uchicago dot edu.
* EOAccess/EOEntity.m (-primaryKeyRootName): Recurse to
	through primaryKeyRootName of parent entity.
        * EOAdaptors/Postgres95/Postgres95Channel.m
        (primaryKeyForNewRowWithEntity:): Use primaryKeyRootName to
        construct sequence name.


git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/gdl2/trunk@21126 72102866-910b-0410-8b05-ffd578937521
2005-04-19 14:14:37 +00:00
Manuel Guesdon
9d8277892a Implemeted things in EOKeyValueArchiver, put back David changes in
-adaptorValueByConvertingAttributeValue in EOAttribute.m


git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/gdl2/trunk@21125 72102866-910b-0410-8b05-ffd578937521
2005-04-19 10:44:49 +00:00
David Ayers
c1baf1e562 * EOAccess/EORelationship.m (validateValue:): Document.
Remove unnecessary comments and code.  Handle EONulls.
        (+initialize): Implement.
        (+relationshipWithPropertyList:owner:): Move to top.


git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/gdl2/trunk@20840 72102866-910b-0410-8b05-ffd578937521
2005-03-03 17:36:16 +00:00
David Ayers
1f9afe4934 * EOAccess/EODatabaseContext.m (-forgetSnapshotForGlobalID:):
Handle deleted globalIDs correctly.
        (-forgetSnapshotsForGlobalIDs:): Ditto.
        (-_commitTransaction, -_beginTransaction): Ditto.
        (-_rollbackTransaction): Implement.


git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/gdl2/trunk@20836 72102866-910b-0410-8b05-ffd578937521
2005-03-03 14:00:42 +00:00
David Ayers
6a28dfbc6e * EOAccess/EOEntity.m (initWithPropertyList:owner:):
Reformatting for GNU coding standards.
        (-attributes): Fix memory leak.  Use global class cache.
        Handle partially converted attributes array.
        (-_attributeNameChangedFrom:to:): New privat method.
        * EOAccess/EOEntityPriv.h (-_attributeNameChangedFrom:to:):
        Declare new private method.
        * EOAccess/EOAttribute.m (setName:): Call
        -[EOEntity _attributeNameChangedFrom:to:] if attribute is in
        an EOEntity.


git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/gdl2/trunk@20835 72102866-910b-0410-8b05-ffd578937521
2005-03-03 12:17:57 +00:00
David Ayers
627c340174 * EOAccess/EOModel.m (setName:): Remove from group before
changing name and readd afterwards.


git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/gdl2/trunk@20831 72102866-910b-0410-8b05-ffd578937521
2005-03-02 15:34:57 +00:00
David Ayers
da6a07ec81 * EOControl/EOKeyValueCoding.h/m: (-setNilValueForKey:):
Override NSObject's category to invoke
        -unableToSetNullForKey:.

        * EOControl/EOSortOrdering.m: Include EONull.h instead of
        NSNull.h.

        * EOAccess/EODatabaseChannel.m: Update formatting,


git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/gdl2/trunk@20830 72102866-910b-0410-8b05-ffd578937521
2005-03-02 14:10:36 +00:00
David Ayers
86b1325708 * EOAccess/EOAttribute.m, EOAccess/EODatabaseContext.m,
* EOAccess/EOEntity.m, EOAccess/EOSQLExpression.m
        * EOAccess/EOPrivate.h, EOAccess/EOPrivate.m,
        * EOAccess/EOSQLQualifier.m, EOAccess/EOUtilities.m
        * EOControl/EOClassDescription.m, EOControl/EOEditingContext.m
        * EOControl/EOGenericRecord.m, EOControl/EOKeyGlobalID.m
        * EOControl/EOKeyValueCoding.m,
        * EOControl/EOKeyValueQualifier.m
        * EOControl/EOMutableKnownKeyDictionary.m,
        * EOControl/EOPrivate.h, EOControl/EOPrivate.m
        Unify GDL2 identifiers with GDL2_ prefix.  Replace
        GDL2NSClass_alloc with GDL2_alloc(NSClass).  Replace
        GDL2NSClassWith* calls with
        AUTORELEASE([GDL2_alloc(NSCLass) initWith* calls]).
        Rename GDL2PrivInit to GDL2_PrivateInit.
        (GDL2_NSArray, GDL2_NSMutableArray_allocWithZoneIMP)
        (GDL2_NSMutableDictionary_allocWithZoneIMP): New globals.
        (GDL2_alloc): New macro.
        (GDL2NSString_alloc, GDL2NSDecimalNumber_alloc)
        (GDL2NSNumber_alloc, GDL2NSCalendarDate_alloc, GDL2NSData_alloc)
        (GDL2DataWithBytesAndLength, GDL2MutableArrayWithCapacity)
        (GDL2MutableArrayWithArray, GDL2MutableArray, GDL2Array)
        (GDL2MutableDictionaryWithCapacity): Remove.


git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/gdl2/trunk@20779 72102866-910b-0410-8b05-ffd578937521
2005-02-22 16:14:03 +00:00
David Ayers
e4bdd8f5dc * EOAccess/EOAdaptor.m (-hasOpenChannels): Make safe for
unsigned.


git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/gdl2/trunk@20774 72102866-910b-0410-8b05-ffd578937521
2005-02-22 12:52:46 +00:00
David Ayers
8b5a93e44e * EOAccess/EOAdaptor.m: Consistently use unsigned for array
index variables.


git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/gdl2/trunk@20767 72102866-910b-0410-8b05-ffd578937521
2005-02-20 20:58:28 +00:00
David Ayers
2fb344f062 * EOAccess/EOPrivate.h, EOAccess/EOPrivate.m,
* EOAccess/EODatabaseContext.m, EOAccess/EOSQLExpression.m,
        * EOControl/EOEditingContext.m, EOControl/EOKeyValueCoding.m,
        * EOControl/EOMutableKnownKeyDictionary.m,
        * EOControl/EOPrivate.h, EOControl/EOPrivate.m: Remove global
        selector cache.


git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/gdl2/trunk@20766 72102866-910b-0410-8b05-ffd578937521
2005-02-20 20:33:09 +00:00
David Ayers
944432d46e Add file missing from last commit.
git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/gdl2/trunk@20762 72102866-910b-0410-8b05-ffd578937521
2005-02-20 13:57:23 +00:00
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