Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions src/BaselineOfSQLite3/BaselineOfSQLite3.class.st
Original file line number Diff line number Diff line change
Expand Up @@ -65,13 +65,13 @@ BaselineOfSQLite3 >> versionSpecificBaseline: spec [
group: 'Core' with: 'SQLite3-Pharo8'
].

spec for: #( #'pharo9.x' #'pharo10.x' #'pharo11.x' #'pharo12.x' #'pharo13.x') do: [
spec for: #( #'pharo9.x' #'pharo10.x' #'pharo11.x' #'pharo12.x' #'pharo13.x' ) do: [
spec
package: 'SQLite3-Pharo9';
group: 'Core' with: 'SQLite3-Pharo9'
].

spec for: #( #'pharo10.x' #'pharo11.x' #'pharo12.x' #'pharo13.x') do: [
spec for: #( #'pharo10.x' #'pharo11.x' #'pharo12.x' #'pharo13.x' ) do: [
spec
package: 'SQLite3-Pharo10';
group: 'Core' with: 'SQLite3-Pharo10'.
Expand Down
Original file line number Diff line number Diff line change
@@ -1,14 +1,14 @@
Extension { #name : #AbstractFileReference }
Extension { #name : 'AbstractFileReference' }

{ #category : #'*SQLite3-Inspector-Extensions' }
{ #category : '*SQLite3-Inspector-Extensions' }
AbstractFileReference >> databaseSize [
|s|
s := self size.
s / 1024 > 1024 ifTrue: [ ^ ((s / 1024 / 1024) roundDownTo: 0.01) asString, ' MB' ].
^ ((s / 1024) roundDownTo: 0.01) asString, ' KB'
]

{ #category : #'*SQLite3-Inspector-Extensions' }
{ #category : '*SQLite3-Inspector-Extensions' }
AbstractFileReference >> inspectionSQLite3Info [
<inspectorPresentationOrder: -2 title: 'SQLite3 - Info'>

Expand All @@ -27,13 +27,13 @@ AbstractFileReference >> inspectionSQLite3Info [
yourself
]

{ #category : #'*SQLite3-Inspector-Extensions' }
{ #category : '*SQLite3-Inspector-Extensions' }
AbstractFileReference >> inspectionSQLite3InfoContext: aContext [

^ aContext active: self isSQlite3Database
]

{ #category : #'*SQLite3-Inspector-Extensions' }
{ #category : '*SQLite3-Inspector-Extensions' }
AbstractFileReference >> inspectionSQLite3Tables [
<inspectorPresentationOrder: -1 title: 'SQLite3 - Tables'>

Expand All @@ -44,13 +44,13 @@ AbstractFileReference >> inspectionSQLite3Tables [
yourself
]

{ #category : #'*SQLite3-Inspector-Extensions' }
{ #category : '*SQLite3-Inspector-Extensions' }
AbstractFileReference >> inspectionSQLite3TablesContext: aContext [

^ aContext active: self isSQlite3Database
]

{ #category : #'*SQLite3-Inspector-Extensions' }
{ #category : '*SQLite3-Inspector-Extensions' }
AbstractFileReference >> isSQlite3Database [
"Return true if the reference is an SQLite3 database file"

Expand Down
5 changes: 3 additions & 2 deletions src/SQLite3-Inspector-Extensions/SQLite3Database.extension.st
Original file line number Diff line number Diff line change
@@ -1,11 +1,12 @@
Extension { #name : #SQLite3Database }
Extension { #name : 'SQLite3Database' }

{ #category : #'*SQLite3-Inspector-Extensions' }
{ #category : '*SQLite3-Inspector-Extensions' }
SQLite3Database >> inspectionSQLite3Tables [
<inspectorPresentationOrder: 10 title: 'Sqlite3 - Tables'>

^ SpTablePresenter new
items: self tables;
beResizable;
addColumn: (SpStringTableColumn title: 'Name' evaluated: [ :assoc | assoc name ]);
addColumn: (SpStringTableColumn title: 'Number of rows' evaluated: [ :assoc | assoc numberOfRows ]);
yourself
Expand Down
4 changes: 2 additions & 2 deletions src/SQLite3-Inspector-Extensions/SQLite3Row.extension.st
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
Extension { #name : #SQLite3Row }
Extension { #name : 'SQLite3Row' }

{ #category : #'*SQLite3-Inspector-Extensions' }
{ #category : '*SQLite3-Inspector-Extensions' }
SQLite3Row >> inspectionSQLite3Row [
<inspectorPresentationOrder: 10 title: 'SQlite3 - Contents'>

Expand Down
64 changes: 41 additions & 23 deletions src/SQLite3-Inspector-Extensions/SQLite3Table.extension.st
Original file line number Diff line number Diff line change
@@ -1,32 +1,45 @@
Extension { #name : #SQLite3Table }
Extension { #name : 'SQLite3Table' }

{ #category : #'*SQLite3-Inspector-Extensions' }
{ #category : '*SQLite3-Inspector-Extensions' }
SQLite3Table >> inspectionSQLite3Columns [
<inspectorPresentationOrder: 13 title: 'SQLite3 - Columns'>

<inspectorPresentationOrder: 13 title: 'SQLite3 - Columns'>
^ SpTablePresenter new
items: self columns;
addColumn: (SpStringTableColumn title: 'Column Name' evaluated: [ :each | each name ]);
addColumn: (SpStringTableColumn title: 'Column Type' evaluated: [ :each | each type ]);
addColumn: (SpStringTableColumn title: 'Non-empty values' evaluated: [ :each | each hasNotNullConstraint ifTrue: ['NOT NULL'] ifFalse: [''] ]);
yourself
items: self columns;
beResizable;
addColumn: (SpStringTableColumn
title: 'Column Name'
evaluated: [ :each | each name ]);
addColumn: (SpStringTableColumn
title: 'Column Type'
evaluated: [ :each | each type ]);
addColumn:
(SpStringTableColumn
title: 'Non-empty values'
evaluated: [ :each |
each hasNotNullConstraint
ifTrue: [ 'NOT NULL' ]
ifFalse: [ '' ] ]);
yourself
]

{ #category : #'*SQLite3-Inspector-Extensions' }
{ #category : '*SQLite3-Inspector-Extensions' }
SQLite3Table >> inspectionSQLite3Data [
<inspectorPresentationOrder: 11 title: 'SQLite3 - Data'>

<inspectorPresentationOrder: 11 title: 'SQLite3 - Data'>
| presenter |
presenter := SpTablePresenter new.
presenter items: self rows.
presenter := SpTablePresenter new
items: self rows;
beResizable;
yourself.

self columnNames do: [:col |
presenter addColumn: (SpStringTableColumn title: col evaluated: [ :each | each at: col ])
].
^presenter
self columnNames do: [ :col |
presenter addColumn:
(SpStringTableColumn title: col evaluated: [ :each | each at: col ]) ].
^ presenter
]

{ #category : #'*SQLite3-Inspector-Extensions' }
{ #category : '*SQLite3-Inspector-Extensions' }
SQLite3Table >> inspectionSQLite3Schema [
<inspectorPresentationOrder: 10 title: 'SQLite3 - Schema'>

Expand All @@ -35,13 +48,18 @@ SQLite3Table >> inspectionSQLite3Schema [
yourself
]

{ #category : #'*SQLite3-Inspector-Extensions' }
{ #category : '*SQLite3-Inspector-Extensions' }
SQLite3Table >> inspectionSQLite3TableProperties [
<inspectorPresentationOrder: 40 title: 'SQLite3 - Table Properties'>

<inspectorPresentationOrder: 40 title: 'SQLite3 - Table Properties'>
^ SpTablePresenter new
items: self properties associations;
addColumn: (SpStringTableColumn title: 'Property' evaluated: [ :assoc | assoc key ]);
addColumn: (SpStringTableColumn title: 'Value' evaluated: [ :assoc | assoc value ]);
yourself
items: self properties associations;
beResizable;
addColumn: (SpStringTableColumn
title: 'Property'
evaluated: [ :assoc | assoc key ]);
addColumn: (SpStringTableColumn
title: 'Value'
evaluated: [ :assoc | assoc value ]);
yourself
]
2 changes: 1 addition & 1 deletion src/SQLite3-Inspector-Extensions/package.st
Original file line number Diff line number Diff line change
@@ -1 +1 @@
Package { #name : #'SQLite3-Inspector-Extensions' }
Package { #name : 'SQLite3-Inspector-Extensions' }