Skip to content

Commit 90aa096

Browse files
instance creation convenience
1 parent 9ed4ee9 commit 90aa096

File tree

2 files changed

+9
-2
lines changed

2 files changed

+9
-2
lines changed

src/Mapless-SQLite-Core/MaplessSQLiteRepository.class.st

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,12 @@ Class {
77
#category : #'Mapless-SQLite-Core'
88
}
99

10+
{ #category : #'instance creation' }
11+
MaplessSQLiteRepository class >> for: aDatabaseName on: aPathString [
12+
13+
^ self for: aDatabaseName with: (MaplessSQLitePool on: aPathString)
14+
]
15+
1016
{ #category : #actions }
1117
MaplessSQLiteRepository class >> getNewId [
1218
^ UUID new asString36

src/Mapless-SQLite-Tests/MaplessSQLiteTest.class.st

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -63,10 +63,11 @@ MaplessSQLiteTest >> savePersonNamed: aString [
6363

6464
{ #category : #'setUp-tearDown' }
6565
MaplessSQLiteTest >> setUp [
66+
6667
super setUp.
6768
repository := MaplessSQLiteRepository
68-
for: 'Mapless-Tests'
69-
with: (MaplessSQLitePool on: self class testDatabasePathString).
69+
for: 'Mapless-Tests'
70+
on: self class testDatabasePathString.
7071
repository ensureDatabase.
7172
self resetDatabase
7273
]

0 commit comments

Comments
 (0)