Skip to content

Commit

Permalink
Merge pull request #49 from feenkcom/master
Browse files Browse the repository at this point in the history
Startup options added to P3Client
  • Loading branch information
svenvc authored Feb 18, 2024
2 parents 8006d95 + fba8c2c commit e3dd84e
Showing 1 changed file with 16 additions and 1 deletion.
17 changes: 16 additions & 1 deletion P3/P3Client.class.st
Original file line number Diff line number Diff line change
@@ -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 }

0 comments on commit e3dd84e

Please sign in to comment.