File tree 10 files changed +31
-21
lines changed
10 files changed +31
-21
lines changed Original file line number Diff line number Diff line change
1
+ # Database files used for testing
2
+ * .db
3
+
1
4
** /target
2
5
/.bloop /
3
6
/.bsp /
Original file line number Diff line number Diff line change @@ -15,9 +15,9 @@ and more.
15
15
16
16
# Passing the first stage
17
17
18
- The entry point for your SQLite implementation is in ` src/main/scala/Main.scala ` .
19
- Study and uncomment the relevant code, and push your changes to pass the first
20
- stage:
18
+ The entry point for your SQLite implementation is in
19
+ ` src/main/scala/Main.scala ` . Study and uncomment the relevant code, and push
20
+ your changes to pass the first stage:
21
21
22
22
``` sh
23
23
git commit -am " pass 1st stage" # any msg
@@ -30,7 +30,7 @@ Time to move on to the next stage!
30
30
31
31
Note: This section is for stages 2 and beyond.
32
32
33
- 1 . Ensure you have ` mvn ` installed locally
33
+ 1 . Ensure you have ` sbt (1.10.7) ` installed locally
34
34
1 . Run ` ./your_program.sh ` to run your program, which is implemented in
35
35
` src/main/scala/Main.scala ` .
36
36
1 . Commit your changes and run ` git push origin master ` to submit your solution
Original file line number Diff line number Diff line change 4
4
# unless you really need them.
5
5
debug : false
6
6
7
- # Use this to change the Java version used to run your code
7
+ # Use this to change the Scala version used to run your code
8
8
# on Codecrafters.
9
9
#
10
- # Available versions: java-23
11
- language_pack : java-17
10
+ # Available versions: scala-3.3.5
11
+ language_pack : scala-3.3.5
Original file line number Diff line number Diff line change @@ -19,7 +19,12 @@ object Main extends App {
19
19
databaseFile.read(pageSizeBytes)
20
20
val pageSizeSigned = ByteBuffer .wrap(pageSizeBytes).getShort()
21
21
val pageSize = pageSizeSigned & 0xFFFF
22
- println(" database page size: " + pageSize)
22
+
23
+ // You can use print statements as follows for debugging, they'll be visible when running tests.
24
+ System .err.println(" Logs from your program will appear here!" )
25
+
26
+ // Uncomment this block to pass the first stage
27
+ // println("database page size: " + pageSize)
23
28
}
24
29
case _ => println(" Missing or invalid command passed: " + command)
25
30
}
Original file line number Diff line number Diff line change
1
+ # Database files used for testing
2
+ * .db
3
+
1
4
** /target
2
5
/.bloop /
3
6
/.bsp /
Original file line number Diff line number Diff line change @@ -15,9 +15,9 @@ and more.
15
15
16
16
# Passing the first stage
17
17
18
- The entry point for your SQLite implementation is in ` src/main/scala/Main.scala ` .
19
- Study and uncomment the relevant code, and push your changes to pass the first
20
- stage:
18
+ The entry point for your SQLite implementation is in
19
+ ` src/main/scala/Main.scala ` . Study and uncomment the relevant code, and push
20
+ your changes to pass the first stage:
21
21
22
22
``` sh
23
23
git commit -am " pass 1st stage" # any msg
@@ -30,7 +30,7 @@ Time to move on to the next stage!
30
30
31
31
Note: This section is for stages 2 and beyond.
32
32
33
- 1 . Ensure you have ` mvn ` installed locally
33
+ 1 . Ensure you have ` sbt (1.10.7) ` installed locally
34
34
1 . Run ` ./your_program.sh ` to run your program, which is implemented in
35
35
` src/main/scala/Main.scala ` .
36
36
1 . Commit your changes and run ` git push origin master ` to submit your solution
Original file line number Diff line number Diff line change 4
4
# unless you really need them.
5
5
debug : false
6
6
7
- # Use this to change the Java version used to run your code
7
+ # Use this to change the Scala version used to run your code
8
8
# on Codecrafters.
9
9
#
10
- # Available versions: java-23
11
- language_pack : java-17
10
+ # Available versions: scala-3.3.5
11
+ language_pack : scala-3.3.5
Original file line number Diff line number Diff line change @@ -19,6 +19,7 @@ object Main extends App {
19
19
databaseFile.read(pageSizeBytes)
20
20
val pageSizeSigned = ByteBuffer .wrap(pageSizeBytes).getShort()
21
21
val pageSize = pageSizeSigned & 0xFFFF
22
+
22
23
println(" database page size: " + pageSize)
23
24
}
24
25
case _ => println(" Missing or invalid command passed: " + command)
Original file line number Diff line number Diff line change 1
- --- starter_templates/scala/code/src/main/scala/Main.scala 2025-03-27 19:30:51.374671531 -0400
2
- +++ solutions/scala/01-dr6/code/src/main/scala/Main.scala 2025-03-27 19:22:20.930550947 -0400
3
- @@ -1,31 +1,26 @@
1
+ @@ -1,31 +1,27 @@
4
2
import java.io.File
5
3
import java.io.FileInputStream
6
4
import java.io.IOException
7
5
import java.nio.ByteBuffer
8
-
6
+
9
7
object Main extends App {
10
8
if args.length < 2
11
9
then {
22
20
databaseFile.read(pageSizeBytes)
23
21
val pageSizeSigned = ByteBuffer.wrap(pageSizeBytes).getShort()
24
22
val pageSize = pageSizeSigned & 0xFFFF
25
- -
23
+
26
24
- // You can use print statements as follows for debugging, they'll be visible when running tests.
27
25
- System.err.println("Logs from your program will appear here!")
28
26
-
Original file line number Diff line number Diff line change @@ -4,7 +4,7 @@ Study and uncomment the relevant code:
4
4
5
5
``` scala
6
6
// Uncomment this block to pass the first stage
7
- println(" database page size: " + pageSize);
7
+ println(" database page size: " + pageSize)
8
8
```
9
9
10
10
Push your changes to pass the first stage:
You can’t perform that action at this time.
0 commit comments