Skip to content

Commit 81d5823

Browse files
committed
back in shape to get data from database, default getters by primary index attributes and by unique index attribute not implemented yet
1 parent 4866b5f commit 81d5823

File tree

1 file changed

+12
-12
lines changed

1 file changed

+12
-12
lines changed

Resource.vb

Lines changed: 12 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -9,8 +9,8 @@
99
schema = table.Substring(0, dotPos)
1010
table = table.Substring(dotPos + 1)
1111
End If
12-
Return Databasic.Statement.Prepare(
13-
"SELECT c.name
12+
Return Databasic.Statement.Prepare(
13+
"SELECT c.name
1414
FROM sys.columns AS c
1515
WHERE
1616
c.object_id = (
@@ -25,16 +25,16 @@
2525
)
2626
)
2727
ORDER BY c.column_id",
28-
connection
29-
).FetchAll(New With {
30-
.schema = schema,
31-
.table = table
32-
}).ToList(Of String)()
33-
End Function
28+
connection
29+
).FetchAll(New With {
30+
.schema = schema,
31+
.table = table
32+
}).ToList(Of String)()
33+
End Function
3434

3535
Public Overrides Function GetLastInsertedId(transaction As Databasic.Transaction) As Object
36-
Return Databasic.Statement.Prepare("SELECT SCOPE_IDENTITY()", transaction).FetchOne().ToValue(Of Object)()
37-
End Function
36+
Return Databasic.Statement.Prepare("SELECT SCOPE_IDENTITY()", transaction).FetchOne().ToInstance(Of Object)()
37+
End Function
3838

3939
Public Overrides Function GetAll(
4040
connection As Databasic.Connection,
@@ -66,7 +66,7 @@
6666
If limit > 0 Then sql += $" FETCH NEXT {limit} ROWS ONLY"
6767
End If
6868
End If
69-
Return Statement.Prepare(sql, connection).FetchAll()
70-
End Function
69+
Return Databasic.Statement.Prepare(sql, connection).FetchAll()
70+
End Function
7171

7272
End Class

0 commit comments

Comments
 (0)