Permalink
Browse files

Persist long values.

  • Loading branch information...
1 parent c277408 commit 0107657217156b27580b18acd543afdc274bcfa5 @lyudmil committed Jun 6, 2012
View
@@ -1,13 +0,0 @@
-<?xml version="1.0" encoding="utf-8"?>
-<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
- android:orientation="vertical"
- android:layout_width="fill_parent"
- android:layout_height="fill_parent"
- >
-<TextView
- android:layout_width="fill_parent"
- android:layout_height="wrap_content"
- android:text="Hello World, ACTIVITY_ENTRY_NAME"
- />
-</LinearLayout>
-
@@ -12,10 +12,14 @@
put(Integer.class, "integer");
put(int.class, "integer");
+ put(Long.class, "integer");
+ put(long.class, "integer");
+
put(DateTime.class, "varchar(19)");
put(Boolean.class, "integer");
put(boolean.class, "integer");
+
}};
public static String sqlTypeFor(Class fieldType) {
@@ -70,6 +70,7 @@ public void testGeneratesSqlToCreateTable() throws Exception {
"field1 text, " +
"created_at varchar(19), " +
"updated_at varchar(19));";
+
String sql = ActiveRecordBase.createSqlFor(ExampleRecord.class);
assertEquals(expectedSql, sql);
@@ -22,4 +22,9 @@ public void testSqlTypeForBoolean() throws Exception {
assertEquals("integer", ColumnHelper.sqlTypeFor(Boolean.class));
assertEquals("integer", ColumnHelper.sqlTypeFor(boolean.class));
}
+
+ public void testSqlTypeForLong() throws Exception {
+ assertEquals("integer", ColumnHelper.sqlTypeFor(Long.class));
+ assertEquals("integer", ColumnHelper.sqlTypeFor(long.class));
+ }
}

0 comments on commit 0107657

Please sign in to comment.