From fba8c2cd1240dc69654b60a5f54504c726d3f684 Mon Sep 17 00:00:00 2001 From: svenvc Date: Sun, 18 Feb 2024 14:54:10 +0100 Subject: [PATCH] startup options added to P3Client --- P3/P3Client.class.st | 17 ++++++++++++++++- 1 file changed, 16 insertions(+), 1 deletion(-) diff --git a/P3/P3Client.class.st b/P3/P3Client.class.st index f9af252..312f044 100644 --- a/P3/P3Client.class.st +++ b/P3/P3Client.class.st @@ -1088,9 +1088,22 @@ P3Client >> startupMessage [ self database ifNotNil: [ out nextPutAll: (self asCString: 'database'). out nextPutAll: (self asCString: self database) ]. + self startupOptions ifNotNil: [ + out nextPutAll: (self asCString: 'options'). + out nextPutAll: (self asCString: self startupOptions) ]. out nextPut: 0 ] ] +{ #category : #accessing } +P3Client >> startupOptions [ + ^ settings at: #options ifAbsent: [ nil ] +] + +{ #category : #accessing } +P3Client >> startupOptions: optionsString [ + settings at: #options put: optionsString +] + { #category : #accessing } P3Client >> timeout [ "Return the timeout in seconds I (want to) use, the default being 10 seconds." @@ -1155,6 +1168,7 @@ P3Client >> url [ password: self password ]. self database ifNotNil: [ url addPathSegment: self database ]. self isSSL ifTrue: [ url queryAt: #sslmode put: #require ]. + self startupOptions ifNotNil: [ :options | url queryAt: #options put: options ]. ^ url ] @@ -1181,7 +1195,8 @@ P3Client >> url: stringOrUrl [ password: url password ]. self database: url firstPathSegment. (url queryAt: #sslmode ifAbsent: [ #disable ]) = #require - ifTrue: [ self setSSL ] + ifTrue: [ self setSSL ]. + url queryAt: #options ifPresent: [ :options | self startupOptions: options ] ] { #category : #accessing }